heat.engine.clients.os.glance module

class heat.engine.clients.os.glance.GlanceClientPlugin(context)[source]

基类: ClientPlugin

IMAGE = 'image'
V2 = '2'
default_version = '2'
exceptions_module = [ 'heat.engine.clients.client_exception' from '/home/zuul/src/opendev.org/openstack/heat/heat/engine/clients/client_exception.py'>, 'glanceclient.exc' from '/home/zuul/src/opendev.org/openstack/heat/.tox/docs/lib/python3.12/site-packages/glanceclient/exc.py'>]
find_image_by_name_or_id(image_identifier)[source]

返回指定镜像名称或标识符的 ID。

参数:

image_identifier – 镜像名称或类似 UUID 的标识符

返回值:

请求的 :image_identifier 的 id

get_image(image_identifier)[source]

返回指定镜像名称/id 的镜像对象。

参数:

image_identifier – 镜像名称

返回值:

一个包含名称/id 为 :image_identifier 的镜像对象

is_conflict(ex)[source]

如果异常是冲突,则返回 True。

is_not_found(ex)[source]

如果异常是未找到,则返回 True。

is_over_limit(ex)[source]

如果异常是超出限制,则返回 True。

service_types = ['image']
supported_versions = ['2']
class heat.engine.clients.os.glance.ImageConstraint[source]

基类: BaseCustomConstraint

expected_exceptions = ( 'heat.engine.clients.client_exception.EntityMatchNotFound'>, 'heat.engine.clients.client_exception.EntityUniqueMatchNotFound'>)
resource_client_name = 'glance'
resource_getter_name = 'find_image_by_name_or_id'