The heat.engine.resource Module

heat.engine.resource.Metadata[source]

A descriptor for accessing the metadata of a resource while ensuring the most up-to-date data is always obtained from the database.

class heat.engine.resource.Resource(name, json_snippet, stack)[source]

Bases: object

CREATE_COMPLETE = 'CREATE_COMPLETE'
CREATE_FAILED = 'CREATE_FAILED'
CREATE_IN_PROGRESS = 'IN_PROGRESS'
DELETE_COMPLETE = 'DELETE_COMPLETE'
DELETE_FAILED = 'DELETE_FAILED'
DELETE_IN_PROGRESS = 'DELETE_IN_PROGRESS'
FnBase64(data)[source]

http://docs.amazonwebservices.com/AWSCloudFormation/latest/UserGuide/ intrinsic-function-reference-base64.html

FnGetAtt(key)[source]

http://docs.amazonwebservices.com/AWSCloudFormation/latest/UserGuide/ intrinsic-function-reference-getatt.html

FnGetRefId()[source]

http://docs.amazonwebservices.com/AWSCloudFormation/latest/UserGuide/ intrinsic-function-reference-ref.html

UPDATE_COMPLETE = 'UPDATE_COMPLETE'
UPDATE_FAILED = 'UPDATE_FAILED'
UPDATE_INTERRUPTION = 'UPDATE_INTERRUPTION'
UPDATE_IN_PROGRESS = 'UPDATE_IN_PROGRESS'
UPDATE_NOT_IMPLEMENTED = 'UPDATE_NOT_IMPLEMENTED'
UPDATE_NO_INTERRUPTION = 'UPDATE_NO_INTERRUPTION'
UPDATE_REPLACE = 'UPDATE_REPLACE'
add_dependencies(deps)[source]
cache_template()[source]

make a cache of the resource’s parsed template this can then be used via parsed_template(cached=True)

check_active()[source]

Check if the resource is active (ready to move to the CREATE_COMPLETE state). By default this happens as soon as the handle_create() method has completed successfully, but subclasses may customise this by overriding this function.

cinder()[source]
create()[source]

Create the resource. Subclasses should provide a handle_create() method to customise creation.

created_time = None
delete()[source]

Delete the resource. Subclasses should provide a handle_delete() method to customise deletion.

destroy()[source]

Delete the resource and remove it from the database.

handle_update(json_snippet=None)[source]
identifier()[source]

Return an identifier for this resource

keystone()[source]
metadata = None
metadata_update(new_metadata=None)[source]

No-op for resources which don’t explicitly override this method

nova(service_type='compute')[source]
parsed_template(section=None, default={}, cached=False)[source]

Return the parsed template data for the resource. May be limited to only one section of the data, in which case a default value may also be supplied.

physical_resource_name()[source]
physical_resource_name_find(resource_name)[source]
quantum()[source]
resource_id_set(inst)[source]
state_set(new_state, reason='state changed')[source]
strict_dependency = True
swift()[source]
type()[source]
update(json_snippet=None)[source]

update the resource. Subclasses should provide a handle_update() method to customise update, the base-class handle_update will fail by default.

update_allowed_keys = ()
update_allowed_properties = ()
update_template_diff(json_snippet=None)[source]

Returns the difference between json_template and self.t If something has been removed in json_snippet which exists in self.t we set it to None. If any keys have changed which are not in update_allowed_keys, raises NotImplementedError

update_template_diff_properties(json_snippet=None)[source]

Returns the changed Properties between json_template and self.t If a property has been removed in json_snippet which exists in self.t we set it to None. If any properties have changed which are not in update_allowed_properties, raises NotImplementedError

updated_time = None
validate()[source]
heat.engine.resource.get_class(resource_type)[source]

Return the Resource class for a given resource type

heat.engine.resource.get_types()[source]

Return an iterator over the list of valid resource types

This Page