orchestration methods

class ecl.orchestration.v1._proxy.Proxy(session)[source]

Bases: ecl.proxy2.BaseProxy

check_stack(stack)[source]

Check a stack’s status

Since this is an asynchronous action, the only way to check the result is to track the stack’s status.

Parameters:stack – The value can be either the ID of a stack or an instance of Stack.
Returns:None
create_software_config(**attrs)[source]

Create a new software config from attributes

Parameters:attrs (dict) – Keyword arguments which will be used to create a SoftwareConfig, comprised of the properties on the SoftwareConfig class.
Returns:The results of software config creation
Return type:SoftwareConfig
create_software_deployment(**attrs)[source]

Create a new software deployment from attributes

Parameters:attrs (dict) – Keyword arguments which will be used to create a SoftwareDeployment, comprised of the properties on the SoftwareDeployment class.
Returns:The results of software deployment creation
Return type:SoftwareDeployment
create_stack(preview=False, **attrs)[source]

Create a new stack from attributes

Parameters:
  • perview (bool) – When True, returns an StackPreview object, otherwise an Stack object. 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

delete_software_config(software_config, ignore_missing=True)[source]

Delete a software config

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

None

delete_software_deployment(software_deployment, ignore_missing=True)[source]

Delete a software deployment

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

None

delete_stack(stack, ignore_missing=True)[source]

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 stack.
Returns:

None

find_stack(name_or_id, ignore_missing=True)[source]

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

get_software_config(software_config)[source]

Get details about a specific software config.

Parameters:software_config – The value can be the ID of a software config or a instace of SoftwareConfig,
Returns:An object of type SoftwareConfig
get_software_deployment(software_deployment)[source]

Get details about a specific software deployment resource

Parameters:software_deployment – The value can be the ID of a software deployment or an instace of SoftwareDeployment,
Returns:An object of type SoftwareDeployment
get_stack(stack)[source]

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.
resources(stack, **query)[source]

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.

software_configs(**query)[source]

Returns a generator of software configs

Parameters:query (dict) – Optional query parameters to be sent to limit the software configs returned.
Returns:A generator of software config objects.
Return type:

SoftwareConfig

software_deployments(**query)[source]

Returns a generator of software deployments

Parameters:query (dict) – Optional query parameters to be sent to limit the software deployments returned.
Returns:A generator of software deployment objects.
Return type:

SoftwareDeployment

stacks(**query)[source]

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
update_software_deployment(software_deployment, **attrs)[source]

Update a software deployment

Parameters:
  • server – Either the ID of a software deployment or an instance of SoftwareDeployment
  • attrs (dict) – The attributes to update on the software deployment represented by software_deployment.
Returns:

The updated software deployment

Return type:

SoftwareDeployment

update_stack(stack, **attrs)[source]

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.

validate_template(template, environment=None, template_url=None, ignore_errors=None)[source]

Validates a template.

Parameters:
  • template – The stack template on which the validation is performed.
  • environment – A JSON environment for the stack, if provided.
  • template_url – A URI to the location containing the stack template for validation. This parameter is only required if the template parameter is None. This parameter is ignored if template is specified.
  • ignore_errors – A string containing comma separated error codes to ignore. Currently the only valid error code is ‘99001’.
Returns:

The result of template validation.

Raises:

InvalidRequest if neither template not template_url is provided.

Raises:

HttpException if the template fails the validation.

resource

class ecl.orchestration.v1.resource.Resource(synchronized=False, **attrs)[source]

Bases: ecl.resource2.Resource

allow_create = False
allow_delete = False
allow_list = True
allow_retrieve = False
allow_update = False
base_path = '/stacks/%(stack_name)s/%(stack_id)s/resources'

A list of dictionaries containing links relevant to the resource.

logical_resource_id = None

ID of the logical resource, usually the literal name of the resource as it appears in the stack template.

name = None

Name of the resource.

name_attribute = 'resource_name'
physical_resource_id = None

ID of the physical resource (if any) that backs up the resource. For example, it contains a nova server ID if the resource is a nova server.

required_by = None

A list of resource names that depend on this resource. This property facilitates the deduction of resource dependencies. Type: list

resource_key = 'resource'
resource_type = None

A string representation of the resource type.

resources_key = 'resources'
service = {'region_name': None, 'service_name': None, 'interface': 'public', 'version': None, 'service_type': 'orchestration', 'requires_project_id': True, 'api_version': None}
status = None

A string representing the status the resource is currently in.

status_reason = None

A string that explains why the resource is in its current status.

updated_at = None

Timestamp of the last update made to the resource.

software_config

class ecl.orchestration.v1.software_config.SoftwareConfig(synchronized=False, **attrs)[source]

Bases: ecl.resource2.Resource

allow_create = True
allow_delete = True
allow_get = True
allow_list = True
allow_update = False
base_path = '/software_configs'
config = None

Configuration script or manifest that defines which configuration is performed

create(session)[source]
created_at = None

The date and time when the software config resource was created.

group = None

A string indicating the namespace used for grouping software configs.

inputs = None

A list of schemas each representing an input this software config expects.

name = None

Name of the software config.

options = None

A string that contains options that are specific to the configuraiton management tool that this resource uses.

outputs = None

A list of schemas each representing an output this software config produces.

resource_key = 'software_config'
resources_key = 'software_configs'
service = {'region_name': None, 'service_name': None, 'interface': 'public', 'version': None, 'service_type': 'orchestration', 'requires_project_id': True, 'api_version': None}

software_deployment

class ecl.orchestration.v1.software_deployment.SoftwareDeployment(synchronized=False, **attrs)[source]

Bases: ecl.resource2.Resource

action = None

The stack action that triggers this deployment resource.

allow_create = True
allow_delete = True
allow_get = True
allow_list = True
allow_update = True
base_path = '/software_deployments'
config_id = None

The UUID of the software config resource that runs when applying to the server.

create(session)[source]
created_at = None

The date and time when the software deployment resource was created.

input_values = None

A map containing the names and values of all inputs to the config.

output_values = None

A map containing the names and values from the deployment.

resource_key = 'software_deployment'
resources_key = 'software_deployments'
server_id = None

The UUID of the compute server to which the configuration applies.

service = {'region_name': None, 'service_name': None, 'interface': 'public', 'version': None, 'service_type': 'orchestration', 'requires_project_id': True, 'api_version': None}
stack_user_project_id = None

The ID of the authentication project which can also perform operations on this deployment.

status = None

Current status of the software deployment.

status_reason = None

Error description for the last status change.

update(session)[source]
updated_at = None

The date and time when the software deployment resource was created.

stack

class ecl.orchestration.v1.stack.Stack(synchronized=False, **attrs)[source]

Bases: ecl.resource2.Resource

allow_create = True
allow_delete = True
allow_get = True
allow_list = True
allow_update = True
base_path = '/stacks'
capabilities = None

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

check(session)[source]
create(session)[source]
created_at = None

Timestamp of the stack creation.

description = None

A text description of the stack.

get(session, requires_id=True)[source]
is_rollback_disabled = None

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 = None

Name of the stack.

name_attribute = 'stack_name'
notification_topics = None

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

outputs = None

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

owner_id = None

The ID of the owner stack if any.

parameters = None

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

parent_id = None

The ID of the parent stack if any

resource_key = 'stack'
resources_key = 'stacks'
service = {'region_name': None, 'service_name': None, 'interface': 'public', 'version': None, 'service_type': 'orchestration', 'requires_project_id': True, 'api_version': None}
status = None

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

status_reason = None

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

template = None

A dict containing the template use for stack creation.

template_description = None

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

template_url = None

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

timeout_mins = None

Stack operation timeout in minutes.

update(session)[source]
updated_at = None

Timestamp of last update on the stack.

user_project_id = None

The ID of the user project created for this stack.

class ecl.orchestration.v1.stack.StackPreview(synchronized=False, **attrs)[source]

Bases: ecl.orchestration.v1.stack.Stack

allow_create = True
allow_delete = False
allow_get = False
allow_list = False
allow_update = False
base_path = '/stacks/preview'

template

class ecl.orchestration.v1.template.Template(synchronized=False, **attrs)[source]

Bases: ecl.resource2.Resource

allow_create = False
allow_delete = False
allow_list = False
allow_retrieve = False
allow_update = False
description = None

The description specified in the template

parameter_groups = None

A list of parameter groups each contains a lsit of parameter names.

parameters = None

Key and value pairs that contain template parameters

service = {'region_name': None, 'service_name': None, 'interface': 'public', 'version': None, 'service_type': 'orchestration', 'requires_project_id': True, 'api_version': None}
validate(session, template, environment=None, template_url=None, ignore_errors=None)[source]