STORAGE Model Class for storages.
More...
Static Public Member Functions |
def | get |
| Returns the Storage with the most amount of free space.
|
Static Public Attributes |
tuple | address = models.CharField(max_length=64, null=True) |
tuple | capacity = models.IntegerField() |
tuple | dir = models.CharField(max_length=256, null=True) |
tuple | name = models.CharField(max_length=256) |
tuple | state = models.IntegerField(default=0) |
tuple | transport = models.CharField(max_length=20, default="netfs") |
Detailed Description
STORAGE Model Class for storages.
This class controlls cluster's Storage - where Images are stored. Storage is mounted to Node physical machine via web interface.
Definition at line 42 of file storage.py.
Member Function Documentation
def src.cm.models.storage.Storage.__unicode__ |
( |
|
self | ) |
|
def src.cm.models.storage.Storage.dict |
( |
|
self | ) |
|
- Returns
- (
dict
) this Storage's data
fields:
id
(int
)
state
see also: src.common.states.storage_states
name
(string
) human-readable name of this Storage
capacity
(int
) space total [MB] of this Storage
used_space
(int
) space used [MB]
mountpoint
(string
) mountpoint path to this Storage on the CM
dir
(string
) export path on the NFC server
address
(string
) NFC server address
Definition at line 71 of file storage.py.
def src.cm.models.storage.Storage.free_space |
( |
|
self | ) |
|
def src.cm.models.storage.Storage.get |
( |
| ) |
|
|
static |
Returns the Storage with the most amount of free space.
- Returns
- (
Storage
) instance of Storage with the most amount of free space
- Exceptions
-
CMException('storage_no_storage') | no Storages mounted |
Definition at line 134 of file storage.py.
def src.cm.models.storage.Storage.libvirt_template |
( |
|
self | ) |
|
def src.cm.models.storage.Storage.lock |
( |
|
self | ) |
|
Method sets this Storage's state as "locked".
Nothing can be read from or written to this Storage. Images saved on this Storage are displayed on the Web Interface as unavailable.
Definition at line 155 of file storage.py.
def src.cm.models.storage.Storage.path |
( |
|
self | ) |
|
- Returns
- (
string
) total mountpoint path to this Storage on the CM
Definition at line 89 of file storage.py.
def src.cm.models.storage.Storage.unlock |
( |
|
self | ) |
|
def src.cm.models.storage.Storage.used_space |
( |
|
self | ) |
|
Returns total size of images space (system, disks and cds) used on this Storage [MB].
- Returns
- (
int
) used space on storage
Definition at line 114 of file storage.py.
Member Data Documentation
tuple src.cm.models.storage.Storage.address = models.CharField(max_length=64, null=True) |
|
static |
tuple src.cm.models.storage.Storage.capacity = models.IntegerField() |
|
static |
tuple src.cm.models.storage.Storage.dir = models.CharField(max_length=256, null=True) |
|
static |
tuple src.cm.models.storage.Storage.name = models.CharField(max_length=256) |
|
static |
tuple src.cm.models.storage.Storage.state = models.IntegerField(default=0) |
|
static |
src.cm.models.storage.Storage.state |
tuple src.cm.models.storage.Storage.transport = models.CharField(max_length=20, default="netfs") |
|
static |
The documentation for this class was generated from the following file: