heat.engine.resources.template_resource module

class heat.engine.resources.template_resource.TemplateResource(name, definition, stack)[source]

Bases: heat.engine.resources.stack_resource.StackResource

A resource implemented by a nested stack.

This implementation passes resource properties as parameters to the nested stack. Outputs of the nested stack are exposed as attributes of this resource.

child_params()[source]

Override method of child_params for the resource.

Returns

parameter values for our nested stack based on our properties

child_template()[source]

Default implementation to get the child template.

Resources that inherit from StackResource should override this method with specific details about the template used by them.

get_attribute(key, *path)[source]

Default implementation for function get_attr and Fn::GetAtt.

This may be overridden by resource plugins to add extra logic specific to the resource implementation.

get_reference_id()[source]

Default implementation for function get_resource.

This may be overridden by resource plugins to add extra logic specific to the resource implementation.

static get_schemas(tmpl, param_defaults)[source]
static get_template_file(template_name, allowed_schemes)[source]
handle_adopt(resource_data=None)[source]
handle_create()[source]
handle_update(json_snippet, tmpl_diff, prop_diff)[source]
metadata_update(new_metadata=None)[source]

Refresh the metadata if new_metadata is None.

regenerate_info_schema(definition)[source]

Default implementation; should be overridden by resources.

Should be overridden by resources that would require schema refresh during update, ex. TemplateResource.

Definition

Resource Definition

template_data()[source]
property template_url

Template url for the stack resource.

When stack resource is a TemplateResource, it’s the template location. For group resources like ResourceGroup where the template is constructed dynamically, it’s just a placeholder.

validate()[source]

Validate the resource.

This may be overridden by resource plugins to add extra validation logic specific to the resource implementation.

validate_template()[source]

Validate structural/syntax aspects of the resource definition.

Resource plugins should not override this, because this interface is expected to be called pre-create so things normally valid in an overridden validate() such as accessing properties may not work.

heat.engine.resources.template_resource.generate_class_from_template(name, data, param_defaults)[source]