openstack.orchestration.v1.stack_snapshot

The StackSnapshot Class

The StackSnapshot class inherits from Resource.

class openstack.orchestration.v1.stack_snapshot.StackSnapshot(_synchronized=False, connection=None, **attrs)

The base resource

Parameters:
  • _synchronized – This is not intended to be used directly. See new() and existing().

  • 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.

resource_key = 'snapshot'

Singular form of key for resource.

resources_key = 'snapshots'

Plural form of key for resource.

base_path = '/stacks/%(stack_name)s/%(stack_id)s/snapshots'

The base part of the URI for this resource.

allow_create = True

Allow create operation for this resource.

allow_list = True

Allow list operation for this resource.

allow_fetch = True

Allow get operation for this resource.

allow_delete = True

Allow delete operation for this resource.

allow_commit = False

Allow update operation for this resource.

create_opts = CreateOpts(request_key=None, response_key=None, method='POST', requires_id=UNSET, request_has_body=True, response_has_body=True)

Class-level configuration for the create operation. Subclasses can override this to set per-resource defaults without overriding create().

stack_id

The ID of the stack.

stack_name

The name of the stack.

created_at

Creation time of the snapshot.

status

The status of the snapshot.

status_reason

The reason for the snapshot status.

data

The data needed to restore the stack.

restore(session)

Restore the stack to this snapshot.

Parameters:

session – The session to use for making this request.

Returns:

None. Restoration is asynchronous.

Raises:

HttpException if the request fails.