yakumo.cinder.v2.volume.Resource

Package yakumo :: Package cinder :: Package v2 :: Module volume :: Class Resource |
[hide private]
[frames] | no frames]

# Class Resource

source code

       object --+
                |
    base.Resource --+
                    |
                   Resource

resource class for volumes on Block Storage V2 API

Instance Methods | [hide private]
None |
update(self, name=`'``__UNDEF__``'`, description=`'``__UNDEF__``'`, metadata=`'``__UNDEF__``'`) Update properties of a volume | source code
dict |
get_metadata(self) Get metadata of a volume | source code
None |
set_metadata(self, **metadata) Update metadata of a volume | source code
None |
unset_metadata(self, *keys) Delete metadata of a volume | source code
None |
extend(self, size=None) Extend a volume | source code
None |
reset_status(self, status=None, attach_status=None, migration_status=None) Reset status of a volume | source code
None |
set_image_metadata(self, metadata=None) Set image metadata | source code
None |
delete_image_metadata(self, key=None) Set image metadata | source code
None |
unmanage(self) Unmanage a volume | source code
None |
force_detach(self, attachment=None, connector=None) Force detach a volume | source code
upload(self, name=None, disk_format=`'``raw``'`, force=False) Upload volume image to Glance | source code
Inherited from `base.Resource`: `__eq__`, `__getattr__`, `__init__`, `__ne__`, `__repr__`, `__str__`, `delete`, `get_attrs`, `get_id`, `reload`, `wait_for_finished` Inherited from `base.Resource` (private): `_clear_attrs`, `_set_attrs` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Class Variables | [hide private]
| _stable_state = ``[``'``available``'``,` `'``in-use``'``,` `'``error``'``,` `'``error_deleti``...``
Inherited from `base.Resource` (private): `_attrs`, `_id`, `_loaded`, `_state_attr`, `_sub_manager_list`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### update(self, name=`'``__UNDEF__``'`, description=`'``__UNDEF__``'`, metadata=`'``__UNDEF__``'`) | source code
Update properties of a volume Parameters: `name` (str) - Volume name `description` (str) - Description `metadata` (dict) - Metadata (key=value) Returns: None Overrides: base.Resource.update

### get_metadata(self) | source code
Get metadata of a volume Returns: dict Metadata

### set_metadata(self, **metadata) | source code
Update metadata of a volume Parameters: `metadata` (dict) - key=value style. Returns: None

### unset_metadata(self, *keys) | source code
Delete metadata of a volume Parameters: `key` - key of the metadata `keys` ([str]) Returns: None

### extend(self, size=None) | source code
Extend a volume Parameters: `size` (int) - new size; should be larger than the current size Returns: None

### reset_status(self, status=None, attach_status=None, migration_status=None) | source code
Reset status of a volume Parameters: `status` (str) - new status `attach_status` - new attach status `migration_status` (str) - new migration status Returns: None

### set_image_metadata(self, metadata=None) | source code
Set image metadata Parameters: `metadata` (dict) - new metadata Returns: None

### delete_image_metadata(self, key=None) | source code
Set image metadata Parameters: `key` (str) - key to delete Returns: None

### force_detach(self, attachment=None, connector=None) | source code
Force detach a volume Parameters: `attachment` (yakumo.server.volume_attachment.Resource) - Volume attachment `connector` (dict) - Connector information Returns: None

### upload(self, name=None, disk_format=`'``raw``'`, force=False) | source code
Upload volume image to Glance Parameters: `name` (str) - Image name `disk_format` (str) - Disk format (default: 'raw') `force` (bool) - Force creation

Class Variable Details | [hide private]

  ### _stable_state Value:
      ['available', 'in-use', 'error', 'error_deleting']