yakumo.glance.v1.image.Manager

Package yakumo :: Package glance :: Package v1 :: Module image :: Class Manager |
[hide private]
[frames] | no frames]

# Class Manager

source code

      object --+
               |
    base.Manager --+
                   |
                  Manager

manager class for images on Image V1 API

Nested Classes | [hide private]
| resource_class resource class for images on Image V1 API

Instance Methods | [hide private]
yakumo.glance.v1.image.Resource |
create(self, name=`'``__UNDEF__``'`, uri=`'``__UNDEF__``'`, disk_format=`'``__UNDEF__``'`, container_format=`'``__UNDEF__``'`, size=`'``__UNDEF__``'`, virtual_size=`'``__UNDEF__``'`, checksum=`'``__UNDEF__``'`, min_ram=`'``__UNDEF__``'`, min_disk=`'``__UNDEF__``'`, owner=`'``__UNDEF__``'`, properties=`'``__UNDEF__``'`, is_public=`'``__UNDEF__``'`, file=None) Register an image | source code
yakumo.glance.v1.image.Resource |
get(self, id) Get an image | source code
Inherited from `base.Manager`: `__init__`, `find`, `find_one`, `get_empty`, `list` Inherited from `base.Manager` (private): `_attr2json`, `_find_gen`, `_json2attr`, `_no_such_api` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Class Variables | [hide private]
| service_type = ``'``image``'``
| _attr_mapping = ``[``(``'``id``'``,` `'``id``'``,` <yakumo.mapper.NoopClass object `...``
| _json_resource_key = ``'``image``'``
| _json_resources_key = ``'``images``'``
| _url_resource_list_path = ``'``/v1/images/detail``'``
| _url_resource_path = ``'``/v1/images``'``
Inherited from `base.Manager` (private): `_has_detail`, `_has_extra_attr`, `_hidden_methods`, `_id_attr`, `_update_method`

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

Method Details | [hide private]

### create(self, name=`'``__UNDEF__``'`, uri=`'``__UNDEF__``'`, disk_format=`'``__UNDEF__``'`, container_format=`'``__UNDEF__``'`, size=`'``__UNDEF__``'`, virtual_size=`'``__UNDEF__``'`, checksum=`'``__UNDEF__``'`, min_ram=`'``__UNDEF__``'`, min_disk=`'``__UNDEF__``'`, owner=`'``__UNDEF__``'`, properties=`'``__UNDEF__``'`, is_public=`'``__UNDEF__``'`, file=None) | source code
Register an image Parameters: `name` (str) - Image name `uri` (str) - URL to an image `disk_format` (str) - Disk format (raw, qcow2, vmdk, ...) `container_format` (str) - Container format (bare, vmdk, ...) `size` (int) - Image file size in GB `virtual_size` (int) - Virtual disk size in GB `checksum` (str) - Image checksum `min_ram` (int) - Minimum RAM size required for VMs in MB `min_disk` (int) - Minimum disk size required for VMs in GB `owner` (str) - Image owner `properties` (dict) - Image properties `is_public` (bool) - Whether the image is public or not `file` (str) - Filename to upload Returns: yakumo.glance.v1.image.Resource Created image Overrides: base.Manager.create

### get(self, id) | source code
Get an image Parameters: `id` (str) - Image UUID Returns: yakumo.glance.v1.image.Resource Image Overrides: base.Manager.get

Class Variable Details | [hide private]

  ### _attr_mapping Value:
      [('id', 'id', mapper.Noop), ('name', 'name', mapper.Noop), ('disk_form
      at', 'disk_format', mapper.Noop), ('container_format', 'container_form
      at', mapper.Noop), ('size', 'size', mapper.Noop), ('virtual_size', 'vi
      rtual_size', mapper.Noop), ('checksum', 'checksum', mapper.Noop), ('mi
      n_ram', 'min_ram', mapper.Noop), ('min_disk', 'min_disk', mapper.Noop)
      , ('owner', 'owner', mapper.Noop), ('properties', 'properties', mapper
      .Noop), ('is_public', 'is_public', mapper.Noop), ('status', 'status',
      mapper.Noop), ('created_at', 'created_at', mapper.DateTime), ('updated
      ...