openstack.compute.v2.image

Image 类

Image 类继承自 Resource

class openstack.compute.v2.image.Image(_synchronized=False, connection=None, **attrs)

基础资源

参数:
  • _synchronized (bool) – 这不打算直接使用。请参阅 new()existing()

  • connection (openstack.connection.Connection) – 对正在使用的 Connection 的引用。默认为 None,允许在单元测试中等情况下使用不带活动 Connection 的 Resource 对象。Resource 代码中对 self._connection 的使用应使用 None 检查进行保护。

resource_key = 'image'

资源的单数形式的键。

resources_key = 'images'

资源的复数形式的键。

base_path = '/images'

此资源的 URI 的基本部分。

allow_fetch = True

允许对此资源进行获取操作。

allow_delete = True

允许对此资源进行删除操作。

allow_list = True

允许对此资源进行列表操作。

与此镜像相关的链接。这是一个字典列表,每个字典包含 hrefrel 键,以及可选的 type 键。

name

此镜像的名称。

created_at

镜像创建的时间戳。

min_disk

最小磁盘大小。类型: int

min_ram

最小 RAM 大小。类型: int

progress

如果此镜像仍在构建中,其进度在此处表示。镜像创建完成后,进度将为 100。类型: int

status

此镜像的状态。

updated_at

镜像更新的时间戳。

size

镜像大小,以字节为单位。类型: int

ImageDetail 类

ImageDetail 类继承自 Image

openstack.compute.v2.image.ImageDetail

Image 的别名