heat.engine.parameters module

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]

Get the parameter value, optionally sanitising it for output.

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

Bases: heat.engine.parameters.ParsedParameter, collections.abc.Sequence

A template parameter of type “CommaDelimitedList”.

parse(value)[source]
parsed
value()[source]

Get the parameter value, optionally sanitising it for output.

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]

Get the parameter value, optionally sanitising it for output.

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

Bases: heat.engine.parameters.Parameter

A template parameter of type “Number”.

value()[source]

Get the parameter value, optionally sanitising it for output.

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

Return the tags associated with the parameter

user_default
user_value
validate(validate_value=True, context=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: collections.abc.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 Parameters.<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, tags=None)[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', 'Tags')
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'
TAGS = 'Tags'
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]

Set the default value for this Schema object.

validate_value(value, context=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]

Get the parameter value, optionally sanitising it for output.

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.