The heat.engine.parameters Module

class heat.engine.parameters.BooleanParam(name, schema, value=None)[source]

Bases: heat.engine.parameters.Parameter

A template parameter of type “Boolean”.

value()[source]
class heat.engine.parameters.CommaDelimitedListParam(name, schema, value=None)[source]

Bases: heat.engine.parameters.ParsedParameter, _abcoll.Sequence

A template parameter of type “CommaDelimitedList”.

parse(value)[source]
parsed
value()[source]
class heat.engine.parameters.JsonParam(name, schema, value=None)[source]

Bases: heat.engine.parameters.ParsedParameter

A template parameter who’s value is map or list.

parse(value)[source]
parsed
value()[source]
class heat.engine.parameters.NumberParam(name, schema, value=None)[source]

Bases: heat.engine.parameters.Parameter

A template parameter of type “Number”.

value()[source]
class heat.engine.parameters.Parameter(name, schema, value=None)[source]

Bases: object

A template parameter.

default()[source]

Return the default value of the parameter.

description()[source]

Return the description of the parameter.

has_default()[source]

Return whether the parameter has a default value.

has_value()[source]

Parameter has a user or default value.

hidden()[source]

Return whether the parameter is hidden.

Hidden parameters should be sanitised in any output to the user.

label()[source]

Return the label or param name.

name
schema
set_default(value)[source]
user_default
user_value
validate(validate_value=True, context=None, template=None)[source]

Validates the parameter.

This method validates if the parameter’s schema is valid, and if the default value - if present - or the user-provided value for the parameter comply with the schema.

value()[source]

Get the parameter value, optionally sanitising it for output.

class heat.engine.parameters.Parameters(stack_identifier, tmpl, user_params=None, param_defaults=None)[source]

Bases: _abcoll.Mapping

Parameters of a stack.

The parameters of a stack, with type checking, defaults, etc. specified by the stack’s template.

immutable_params_modified(new_parameters, input_params)[source]
map(func, filter_func=<function <lambda>>)[source]

Map the supplied function onto each Parameter.

Map the supplied function onto each Parameter (with an optional filter function) and return the resulting dictionary.

set_stack_id(stack_identifier)[source]

Set the StackId pseudo parameter value.

validate(validate_value=True, context=None)[source]

Validates all parameters.

This method validates if all user-provided parameters are actually defined in the template, and if all parameters are valid.

class heat.engine.parameters.ParsedParameter(name, schema, value=None)[source]

Bases: heat.engine.parameters.Parameter

A template parameter with cached parsed value.

parsed
set_default(value)[source]
class heat.engine.parameters.Schema(data_type, description=None, default=None, schema=None, constraints=None, hidden=False, label=None, immutable=False)[source]

Bases: heat.engine.constraints.Schema

Parameter schema.

BOOLEAN = ‘Boolean’
CONSTRAINTS = ‘Constraints’
DEFAULT = ‘Default’
DESCRIPTION = ‘Description’
HIDDEN = ‘NoEcho’
IMMUTABLE = ‘Immutable’
KEYS = (‘Type’, ‘Description’, ‘Default’, ‘Schema’, ‘Constraints’, ‘NoEcho’, ‘Label’, ‘Immutable’)
LABEL = ‘Label’
LIST = ‘CommaDelimitedList’
MAP = ‘Json’
NUMBER = ‘Number’
PARAMETER_KEYS = (‘Type’, ‘Default’, ‘NoEcho’, ‘AllowedValues’, ‘AllowedPattern’, ‘MaxLength’, ‘MinLength’, ‘MaxValue’, ‘MinValue’, ‘Description’, ‘ConstraintDescription’, ‘Label’)
SCHEMA = ‘Schema’
STRING = ‘String’
TYPE = ‘Type’
TYPES = (‘String’, ‘Number’, ‘CommaDelimitedList’, ‘Json’, ‘Boolean’)
classmethod from_dict(param_name, schema_dict)[source]

Return a Parameter Schema object from a legacy schema dictionary.

Parameters:param_name (str) – name of the parameter owning the schema; used for more verbose logging
static get_num(key, context)[source]
set_default(default=None)[source]
validate_value(value, context=None, template=None)[source]
class heat.engine.parameters.StringParam(name, schema, value=None)[source]

Bases: heat.engine.parameters.Parameter

A template parameter of type “String”.

value()[source]