The Module

class, data, resolver=<function <lambda> at 0x7fbb57bdec80>, parent_name=None, context=None, section=None)[source]

Bases: _abcoll.Mapping

get_user_value(key, validate=False, template=None)[source]
static schema_from_params(params_snippet)[source]

Create properties schema from the parameters section of a template.

Parameters:params_snippet – parameter definition from a template
Returns:equivalent properties schemata for the specified parameters
classmethod schema_to_parameters_and_properties(schema, template_type='cfn')[source]

Convert a schema to template parameters and properties.

This can be used to generate a provider template that matches the given properties schemata.

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

Bases: object

get_value(value, validate=False, template=None)[source]

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

class, description=None, default=None, schema=None, required=False, constraints=None, implemented=True, update_allowed=False, immutable=False, support_status=< object at 0x7fbb57bdf390>, 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.

CONSTRAINTS = 'constraints'
DEFAULT = 'default'
DESCRIPTION = 'description'
IMMUTABLE = 'immutable'
KEYS = ('type', 'description', 'default', 'schema', 'required', 'constraints', 'update_allowed', 'immutable')
REQUIRED = 'required'
SCHEMA = 'schema'
TYPE = 'type'
UPDATE_ALLOWED = 'update_allowed'

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 from_legacy(schema_dict)[source]

Return a Property Schema object from a legacy schema dictionary.

classmethod 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.


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.plugin_manager Module

Next topic

The heat.engine.resource Module

Project Source

This Page