The heat.objects.stack Module

Stack object.

class heat.objects.stack.Stack(context=None, **kwargs)[source]

Bases: heat.objects.base.HeatObject, oslo_versionedobjects.base.VersionedObjectDictCompat, oslo_versionedobjects.base.ComparableVersionedObject

classmethod count_all(context, **kwargs)[source]
classmethod count_total_resources(context, stack_id)[source]
classmethod create(context, values)[source]
classmethod delete(context, stack_id)[source]
classmethod encrypt_hidden_parameters(tmpl)[source]
fields = {'prev_raw_template': Object(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'created_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'parent_resource_name': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'current_deps': Json(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'timeout': Integer(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'stack_user_project_id': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'owner_id': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'status_reason': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'updated_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'tenant': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'user_creds_id': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'current_traversal': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'deleted_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'nested_depth': Integer(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'username': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'tags': Object(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'status': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'id': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'raw_template_id': Integer(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'disable_rollback': Boolean(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'convergence': Boolean(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'prev_raw_template_id': Integer(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'name': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'backup': Boolean(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'action': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'raw_template': Object(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False)}
classmethod get_all(context, *args, **kwargs)[source]
classmethod get_all_by_owner_id(context, owner_id)[source]
classmethod get_by_id(context, stack_id, **kwargs)[source]
classmethod get_by_name(context, stack_name)[source]
classmethod get_by_name_and_owner_id(context, stack_name, owner_id)[source]
classmethod get_root_id(context, stack_id)[source]
classmethod get_status(context, stack_id)[source]

Return action and status for the given stack.

classmethod persist_state_and_release_lock(context, stack_id, engine_id, values)[source]
refresh()[source]
classmethod select_and_update(context, stack_id, values, exp_trvsl=None)[source]

Update the stack by selecting on traversal ID.

Uses UPDATE ... WHERE (compare and swap) to catch any concurrent update problem.

If the stack is found with given traversal, it is updated.

If there occurs a race while updating, only one will succeed and other will get return value of False.

update_and_save(values)[source]
classmethod update_by_id(context, stack_id, values)[source]

Update and return (boolean) if it was updated.

Note: the underlying stack_update filters by current_traversal and stack_id.

Previous topic

The heat.objects.software_deployment Module

Next topic

The heat.objects.stack_lock Module

Project Source

This Page