The heat.engine.function Module

The heat.engine.function Module

class heat.engine.function.Function(stack, fn_name, args)[source]

Bases: object

Abstract base class for template functions.

all_dep_attrs()[source]

Return resource, attribute name pairs of all attributes referenced.

Return an iterator over the resource name, attribute name tuples of all attributes that this function references.

The special value heat.engine.attributes.ALL_ATTRIBUTES may be used to indicate that all attributes of the resource are required.

By default this calls the dep_attrs() method, but subclasses can override to provide a more efficient implementation.

dep_attrs(resource_name)[source]

Return the attributes of the specified resource that are referenced.

Return an iterator over any attributes of the specified resource that this function references.

The special value heat.engine.attributes.ALL_ATTRIBUTES may be used to indicate that all attributes of the resource are required.

dependencies(path)[source]
result()[source]

Return the result of resolving the function.

Function subclasses must override this method to calculate their results.

stack
validate()[source]

Validate arguments without resolving the function.

Function subclasses must override this method to validate their args.

class heat.engine.function.Invalid(stack, fn_name, args)[source]

Bases: heat.engine.function.Function

A function for checking condition functions and to force failures.

This function is used to force failures for functions that are not supported in condition definition.

result()[source]
class heat.engine.function.Macro(stack, fn_name, raw_args, parse_func, template)[source]

Bases: heat.engine.function.Function

Abstract base class for template macros.

A macro differs from a function in that it controls how the template is parsed. As such, it operates on the syntax tree itself, not on the parsed output.

all_dep_attrs()[source]

Return resource, attribute name pairs of all attributes referenced.

Return an iterator over the resource name, attribute name tuples of all attributes that this function references.

The special value heat.engine.attributes.ALL_ATTRIBUTES may be used to indicate that all attributes of the resource are required.

By default this calls the dep_attrs() method, but subclasses can override to provide a more efficient implementation.

dep_attrs(resource_name)[source]

Return the attributes of the specified resource that are referenced.

Return an iterator over any attributes of the specified resource that this function references.

The special value heat.engine.attributes.ALL_ATTRIBUTES may be used to indicate that all attributes of the resource are required.

dependencies(path)[source]
parse_args(parse_func)[source]

Parse the macro using the supplied parsing function.

Macro subclasses should override this method to control parsing of the arguments.

result()[source]

Return the resolved result of the macro contents.

template
validate()[source]

Validate arguments without resolving the result.

heat.engine.function.all_dep_attrs(snippet)[source]

Iterator over resource, attribute name pairs referenced in a snippet.

The snippet should be already parsed to insert Function objects where appropriate.

Returns:an iterator over the resource name, attribute name tuples of all

attributes that are referenced in the template snippet.

heat.engine.function.dep_attrs(snippet, resource_name)[source]

Iterator over dependent attrs of a resource in a template snippet.

The snippet should be already parsed to insert Function objects where appropriate.

Returns:an iterator over the attributes of the specified resource that

are referenced in the template snippet.

heat.engine.function.dependencies(snippet, path='')[source]

Return an iterator over Resource dependencies in a template snippet.

The snippet should be already parsed to insert Function objects where appropriate.

heat.engine.function.resolve(snippet)[source]
heat.engine.function.validate(snippet, path='')[source]
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.