openstack.image.v2.metadef_property

MetadefProperty 类

MetadefProperty 类继承自 Resource

class openstack.image.v2.metadef_property.MetadefProperty(_synchronized=False, connection=None, **attrs)

基础资源

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

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

base_path = '/metadefs/namespaces/%(namespace_name)s/properties'

此资源的 URI 的基本部分。

allow_create = True

允许对此资源进行创建操作。

allow_fetch = True

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

allow_commit = True

允许对此资源进行更新操作。

allow_delete = True

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

allow_list = True

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

namespace_name

命名空间的标识符(名称)。

name

属性的名称

type

属性类型。

title

属性的标题。

description

属性的详细描述。

operators

运算符列表

default

默认属性描述。

is_readonly

指示此属性是否为只读。

minimum

允许的最小数值。

maximum

允许的最大数值。

enum

属性值的枚举列表。

pattern

字符串值必须匹配的正则表达式(ECMA 262)。

min_length

允许的最小字符串长度。

max_length

允许的最大字符串长度。

items

数组中项目的模式。

require_unique_items

指示数组中的所有值必须不同。

min_items

数组的最小长度。

max_items

数组的最大长度。

allow_additional_items

描述额外的项目,如果使用元组类型。如果 items 的值为数组(元组类型),并且实例的长度大于 items 中的模式列表,则额外的项目由此属性中的模式描述。如果此值为 false,则实例不能大于 items 中的模式列表。如果此值为 true,则等效于空模式(任何内容都可以)。

classmethod list(session, paginated=True, base_path=None, allow_unknown_params=False, **, microversion=None, **params)

此方法是一个生成器,它产生资源对象。

list() 的重新实现,该实现处理 glance 的单个、未分页的列表实现。

有关完整的文档,包括参数、异常和返回类型文档,请参阅 list()