heat.engine.attributes module

heat.engine.attributes module

class heat.engine.attributes.Attribute(attr_name, schema)[source]

Bases: object

An Attribute schema.

as_output(resource_name, template_type='cfn')[source]

Output entry for a provider template with the given resource name.

  • resource_name – the logical name of the provider resource
  • template_type – the template type to generate

This attribute as a template ‘Output’ entry for cfn template and ‘output’ entry for hot template

class heat.engine.attributes.Attributes(res_name, schema, resolver)[source]

Bases: collections.abc.Mapping

Models a collection of Resource Attributes.

static as_outputs(resource_name, resource_class, template_type='cfn')[source]

Dict of Output entries for a provider template with resource name.

  • resource_name – logical name of the resource
  • resource_class – resource implementation class

The attributes of the specified resource_class as a template Output map


Return the cache mode for the specified attribute.

If the attribute is not defined in the schema, the default cache mode (CACHE_LOCAL) is returned.


Returns True if cached_attrs have changed

Allows the caller to determine if this instance’s cached_attrs have been updated since they were initially set (if at all).

static schema_from_outputs(json_snippet)[source]
set_cached_attr(key, value)[source]
class heat.engine.attributes.Schema(description=None, support_status=<heat.engine.support.SupportStatus object>, cache_mode='cache_local', type=None)[source]

Bases: heat.engine.constraints.Schema

Simple schema class for attributes.

Schema objects are serializable to dictionaries following a superset of the HOT input Parameter schema using dict().

BOOLEAN = 'Boolean'
CACHE_LOCAL = 'cache_local'
CACHE_MODES = ('cache_local', 'cache_none')
CACHE_NONE = 'cache_none'
DESCRIPTION = 'description'
INTEGER = 'Integer'
KEYS = ('description', 'type')
LIST = 'List'
MAP = 'Map'
STRING = 'String'
TYPE = 'type'
TYPES = ('String', 'Map', 'List', 'Integer', 'Boolean')
classmethod from_attribute(schema_dict)[source]

Return a Property Schema corresponding to a Attribute Schema.


Return dictionary of Schema objects for given dictionary of schemata.

heat.engine.attributes.select_from_attribute(attribute_value, path)[source]

Select an element from an attribute value.

  • attribute_value – the attribute value.
  • path – a list of path components to select from the attribute.

the selected attribute component value.

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.