yakumo.glance.v2.image.Resource

Package yakumo :: Package glance :: Package v2 :: Module image :: Class Resource |
[hide private]
[frames] | no frames]

# Class Resource

source code

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

resource class for images on Image V2 API

Instance Methods | [hide private]
None |
update(self, name=`'``__UNDEF__``'`, disk_format=`'``__UNDEF__``'`, container_format=`'``__UNDEF__``'`, size=`'``__UNDEF__``'`, virtual_size=`'``__UNDEF__``'`, checksum=`'``__UNDEF__``'`, min_ram=`'``__UNDEF__``'`, min_disk=`'``__UNDEF__``'`, owner=`'``__UNDEF__``'`, status=`'``__UNDEF__``'`, created_at=`'``__UNDEF__``'`, updated_at=`'``__UNDEF__``'`, is_public=`'``__UNDEF__``'`, protected=`'``__UNDEF__``'`, schema=`'``__UNDEF__``'`, tags=`'``__UNDEF__``'`, **kwargs) Update properties of an image | source code
None |
upload(self, file=None) Upload an image from a local file | source code
None |
download(self, file=None) Download an image into a local file | source code
None |
activate(self) Activate an image | source code
None |
deactivate(self) Deactivate an image | source code
None |
add_tag(self, tag=None) Tag an image | source code
None |
remove_tag(self, tag=None) Untag an image | 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 = ``[``'``active``'``,` `'``killed``'``,` `'``deleted``'``,` `'``deactivated``'``]``
| _sub_manager_list = ``{``'``members``'``:` <class 'yakumo.glance.v2.image`...``
Inherited from `base.Resource` (private): `_attrs`, `_id`, `_loaded`, `_state_attr`

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

Method Details | [hide private]

### update(self, name=`'``__UNDEF__``'`, disk_format=`'``__UNDEF__``'`, container_format=`'``__UNDEF__``'`, size=`'``__UNDEF__``'`, virtual_size=`'``__UNDEF__``'`, checksum=`'``__UNDEF__``'`, min_ram=`'``__UNDEF__``'`, min_disk=`'``__UNDEF__``'`, owner=`'``__UNDEF__``'`, status=`'``__UNDEF__``'`, created_at=`'``__UNDEF__``'`, updated_at=`'``__UNDEF__``'`, is_public=`'``__UNDEF__``'`, protected=`'``__UNDEF__``'`, schema=`'``__UNDEF__``'`, tags=`'``__UNDEF__``'`, **kwargs) | source code
Update properties of an image Non-standard key=value arguments are allowed (value must be a string). Parameters: `name` (str) - Image name `container_format` (str) - Container format ('ami','ari','aki','bare',or 'ovf') `disk_format` (str) - Disk format ('ami','ari','aki','vhd','vmdk','raw','qcow2', 'vdi',or 'iso') `size` (int) - Image size in GB `virtual_size` (int) - virtual size in GB `checksum` (str) - Checksu `min_ram` (int) - Minimum size of RAM in MB `min_disk` (int) - Minimum size of Disk in GB `owner` (str) - User ID `status` (str) - Image status `created_at` (str) - Created time `updated_at` (str) - Updated time `is_public` (bool) - Public flag `is_protected` (bool) - Protected flag `schema` (str) - Image schema `tags` ([str]) - Image tags `file` (str) - Image file path Returns: None Overrides: base.Resource.update

### upload(self, file=None) | source code
Upload an image from a local file Parameters: `file` (str) - File name to save (required) Returns: None

### download(self, file=None) | source code
Download an image into a local file Parameters: `file` (str) - File name to save (required) Returns: None

### add_tag(self, tag=None) | source code
Tag an image Parameters: `tag` (str) - Tag (required) Returns: None

### remove_tag(self, tag=None) | source code
Untag an image Parameters: `tag` (str) - Tag (required) Returns: None

Class Variable Details | [hide private]

  ### _sub_manager_list Value:
      {'members': <class 'yakumo.glance.v2.image_member.Manager'>}