Orchestration API

Orchestration API

For details on how to use orchestration, see Using OpenStack Orchestration

The Orchestration Class

The orchestration high-level interface is available through the orchestration member of a Connection object. The orchestration member will only be added if the service is detected.

class openstack.orchestration.v1._proxy.Proxy(session)
create_stack(preview=False, **attrs)

Create a new stack from attributes

Parameters:
  • perview (bool) – When True, returns StackPreview objects, otherwise Stack. Default: ``False``
  • attrs (dict) – Keyword arguments which will be used to create a Stack, comprised of the properties on the Stack class.
Returns:

The results of stack creation

Return type:

Stack

find_stack(name_or_id, ignore_missing=True)

Find a single stack

Parameters:
  • name_or_id – The name or ID of a stack.
  • ignore_missing (bool) – When set to False ResourceNotFound will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.
Returns:

One Stack or None

stacks(**query)

Return a generator of stacks

Parameters:**query (kwargs) – Optional query parameters to be sent to limit the resources being returned.
Returns:A generator of stack objects
Return type:Stack
get_stack(stack)

Get a single stack

Parameters:stack – The value can be the ID of a stack or a Stack instance.
Returns:One Stack
Raises:ResourceNotFound when no resource can be found.
update_stack(stack, **attrs)

Update a stack

Parameters:
  • stack – The value can be the ID of a stack or a Stack instance.
  • **attrs (kwargs) – The attributes to update on the stack represented by value.
Returns:

The updated stack

Return type:

Stack

Raises:

ResourceNotFound when no resource can be found.

delete_stack(stack, ignore_missing=True)

Delete a stack

Parameters:
  • stack – The value can be either the ID of a stack or a Stack instance.
  • ignore_missing (bool) – When set to False ResourceNotFound will be raised when the stack does not exist. When set to True, no exception will be set when attempting to delete a nonexistent server.
Returns:

None

resources(stack, **query)

Return a generator of resources

Parameters:
  • stack – This can be a stack object, or the name of a stack for which the resources are to be listed.
  • **query (kwargs) – Optional query parameters to be sent to limit the resources being returned.
Returns:

A generator of resource objects if the stack exists and there are resources in it. If the stack cannot be found, an exception is thrown.

Return type:

A generator of Resource

Raises:

ResourceNotFound when the stack cannot be 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.