openstack.orchestration.v1.stack

openstack.orchestration.v1.stack

The Stack Class

The Stack class inherits from Resource.

class openstack.orchestration.v1.stack.Stack(_synchronized=False, connection=None, **attrs)

The base resource

Parameters:
  • _synchronized (bool) – This is not intended to be used directly. See new() and existing().
  • connection (openstack.connection.Connection) – Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.
capabilities

Placeholder for AWS compatible template listing capabilities required by the stack.

created_at

Timestamp of the stack creation.

description

A text description of the stack.

deleted

A list of resource objects that will be deleted if a stack update is performed.

is_rollback_disabled

Whether the stack will support a rollback operation on stack create/update failures. Type: bool

A list of dictionaries containing links relevant to the stack.

name

Name of the stack.

notification_topics

Placeholder for future extensions where stack related events can be published.

outputs

A list containing output keys and values from the stack, if any.

owner_id

The ID of the owner stack if any.

parameters

A dictionary containing the parameter names and values for the stack.

parent_id

The ID of the parent stack if any

replaced

A list of resource objects that will be replaced if a stack update is performed.

status

A string representation of the stack status, e.g. CREATE_COMPLETE.

status_reason

A text explaining how the stack transits to its current status.

tags

A list of strings used as tags on the stack

template

A dict containing the template use for stack creation.

template_description

Stack template description text. Currently contains the same text as that of the description property.

template_url

A string containing the URL where a stack template can be found.

timeout_mins

Stack operation timeout in minutes.

unchanged

A list of resource objects that will remain unchanged if a stack update is performed.

updated

A list of resource objects that will have their properties updated in place if a stack update is performed.

updated_at

Timestamp of last update on the stack.

user_project_id

The ID of the user project created for this stack.

create(session, base_path=None)

Create a remote resource based on this instance.

Parameters:
  • session (Adapter) – The session to use for making this request.
  • prepend_key – A boolean indicating whether the resource_key should be prepended in a resource creation request. Default to True.
  • base_path (str) – Base part of the URI for creating resources, if different from base_path.
Returns:

This Resource instance.

Raises:

MethodNotSupported if Resource.allow_create is not set to True.

commit(session, base_path=None)

Commit the state of the instance to the remote resource.

Parameters:
  • session (Adapter) – The session to use for making this request.
  • prepend_key – A boolean indicating whether the resource_key should be prepended in a resource update request. Default to True.
  • retry_on_conflict (bool) – Whether to enable retries on HTTP CONFLICT (409). Value of None leaves the Adapter defaults.
  • base_path (str) – Base part of the URI for modifying resources, if different from base_path.
Returns:

This Resource instance.

Raises:

MethodNotSupported if Resource.allow_commit is not set to True.

update([E, ]**F) → None. Update D from dict/iterable E and F.

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

fetch(session, requires_id=True, base_path=None, error_message=None)

Get a remote resource based on this instance.

Parameters:
  • session (Adapter) – The session to use for making this request.
  • requires_id (boolean) – A boolean indicating whether resource ID should be part of the requested URI.
  • base_path (str) – Base part of the URI for fetching resources, if different from base_path.
  • error_message (str) – An Error message to be returned if requested object does not exist.
Returns:

This Resource instance.

Raises:

MethodNotSupported if Resource.allow_fetch is not set to True.

Raises:

ResourceNotFound if the resource was not found.

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.