The heat.engine.properties ModuleΒΆ

class heat.engine.properties.Properties(schema, data, resolver=<function <lambda> at 0x7fed5482e410>, parent_name=None, context=None)[source]

Bases: _abcoll.Mapping

static Properties.schema_from_params(params_snippet)[source]

Convert a template snippet that defines parameters into a properties schema

Parameters:params_snippet – parameter definition from a template
Returns:an equivalent properties schema for the specified params
classmethod Properties.schema_to_parameters_and_properties(schema)[source]

Generates properties with params resolved for a resource’s properties_schema.

Parameters:schema – A resource type’s properties_schema
Returns:A tuple of params and properties dicts
ex: input: {‘foo’: {‘Type’: ‘String’}}
output: {‘foo’: {‘Type’: ‘String’}},
{‘foo’: {‘Ref’: ‘foo’}}
ex: input: {‘foo’: {‘Type’: ‘List’}, ‘bar’: {‘Type’: ‘Map’}}
output: {‘foo’: {‘Type’: ‘CommaDelimitedList’}
‘bar’: {‘Type’: ‘Json’}},
{‘foo’: {‘Fn::Split’: {‘Ref’: ‘foo’}},
‘bar’: {‘Ref’: ‘bar’}}
Properties.validate(with_value=True)[source]
class heat.engine.properties.Property(schema, name=None, context=None)[source]

Bases: object

Property.default()[source]
Property.get_value(value, validate=False)[source]

Get value from raw value and sanitize according to data type.

Property.has_default()[source]
Property.immutable()[source]
Property.implemented()[source]
Property.required()[source]
Property.support_status()[source]
Property.type()[source]
Property.update_allowed()[source]
class heat.engine.properties.Schema(data_type, description=None, default=None, schema=None, required=False, constraints=None, implemented=True, update_allowed=False, immutable=False, support_status=<heat.engine.support.SupportStatus object at 0x7fed5481ced0>, allow_conversion=False)[source]

Bases: heat.engine.constraints.Schema

Schema class for validating resource properties.

This class is used for defining schema constraints for resource properties. It inherits generic validation features from the base Schema class and add processing that is specific to resource properties.

Schema.CONSTRAINTS = 'constraints'
Schema.DEFAULT = 'default'
Schema.DESCRIPTION = 'description'
Schema.IMMUTABLE = 'immutable'
Schema.KEYS = ('type', 'description', 'default', 'schema', 'required', 'constraints', 'update_allowed', 'immutable')
Schema.REQUIRED = 'required'
Schema.SCHEMA = 'schema'
Schema.TYPE = 'type'
Schema.UPDATE_ALLOWED = 'update_allowed'
Schema.allowed_param_prop_type()[source]

Return allowed type of Property Schema converted from parameter.

Especially, when generating Schema from parameter, Integer Property Schema will be supplied by Number parameter.

classmethod Schema.from_legacy(schema_dict)[source]

Return a Property Schema object from a legacy schema dictionary.

classmethod Schema.from_parameter(param)[source]

Return a Property Schema corresponding to a Parameter Schema.

Convert a parameter schema from a provider template to a property Schema for the corresponding resource facade.

heat.engine.properties.schemata(schema_dicts)[source]

Return dictionary of Schema objects for given dictionary of schemata.

The input schemata are converted from the legacy (dictionary-based) format to Schema objects where necessary.

Previous topic

The heat.engine.constraints Module

Next topic

The heat.engine.lifecycle_plugin Module

This Page