heat.engine.resources.stack_resource module¶
-
class
heat.engine.resources.stack_resource.
StackResource
(name, definition, stack)[source]¶ Bases:
heat.engine.resource.Resource
Allows entire stack to be managed as a resource in a parent stack.
An abstract Resource subclass that allows the management of an entire Stack as a resource in a parent stack.
-
child_params
()[source]¶ Default implementation to get the child params.
Resources that inherit from StackResource should override this method with specific details about the parameters used by them.
-
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.
-
child_template_files
(child_env)[source]¶ Default implementation to get the files map for child template.
-
create_with_template
(child_template, user_params=None, timeout_mins=None, adopt_data=None)[source]¶ Create the nested stack with the given template.
-
get_nested_parameters_stack
()[source]¶ Return a stack for schema validation.
This returns a stack to be introspected for building parameters schema. It can be customized by subclass to return a restricted version of what will be running.
-
get_output
(op)[source]¶ Return the specified Output value from the nested stack.
If the output key does not exist, raise a NotFound exception.
-
handle_preempt
()[source]¶ Pre-empt an in-progress update when a new update is available.
This method is called when a previous convergence update is in progress but a new update for the resource is available. By default it does nothing, but subclasses may override it to cancel the in-progress update if it is safe to do so.
Note that this method does not run in the context of the in-progress update and has no access to runtime information about it; nor is it safe to make changes to the Resource in the database. If implemented, this method should cause the existing update to complete by external means. If this leaves the resource in a FAILED state, that should be taken into account in needs_replace_failed().
-
nested
()[source]¶ Return a Stack object representing the nested (child) stack.
If we catch NotFound exception when loading, return None.
-
preview
()[source]¶ Preview a StackResource as resources within a Stack.
This method overrides the original Resource.preview to return a preview of all the resources contained in this Stack. For this to be possible, the specific resources need to override both
child_template
andchild_params
with specific information to allow the stack to be parsed correctly. If any of these methods is missing, the entire StackResource will be returned as if it were a regular Resource.
-
requires_deferred_auth
= True¶
-
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.
-
update_with_template
(child_template, user_params=None, timeout_mins=None)[source]¶ Update the nested stack with the new template.
-