Deployments API

class cloudify_rest_client.deployments.Deployment(deployment)[source]

Bases: dict

Cloudify deployment.

id[source]
Returns:The identifier of the deployment.
blueprint_id[source]
Returns:The identifier of the blueprint this deployment belongs to.
workflows[source]
Returns:The workflows of this deployment.
inputs[source]
Returns:The inputs provided on deployment creation.
outputs[source]
Returns:The outputs definition of this deployment.
class cloudify_rest_client.deployments.Workflow(workflow)[source]

Bases: dict

id[source]
Returns:The workflow’s id
name[source]
Returns:The workflow’s name
parameters[source]
Returns:The workflow’s parameters
class cloudify_rest_client.deployments.DeploymentOutputs(outputs)[source]

Bases: dict

deployment_id[source]

Deployment Id the outputs belong to.

outputs[source]

Deployment outputs as dict.

class cloudify_rest_client.deployments.DeploymentOutputsClient(api)[source]

Bases: object

get(deployment_id)[source]

Gets the outputs for the provided deployment’s Id.

Parameters:deployment_id – Deployment Id to get outputs for.
Returns:Outputs as dict.
class cloudify_rest_client.deployments.DeploymentModificationNodeInstances(node_instances)[source]

Bases: dict

List of added nodes and nodes that are related to them

List of removed nodes and nodes that are related to them

class cloudify_rest_client.deployments.DeploymentModification(modification)[source]

Bases: dict

deployment_id[source]

Deployment Id the outputs belong to.

node_instances[source]

Dict containing added_and_related and remove_and_related node instances list

modified_nodes[source]

Original request modified nodes dict

class cloudify_rest_client.deployments.DeploymentModifyClient(api)[source]

Bases: object

start(deployment_id, nodes)[source]

Start deployment modification.

Parameters:
  • deployment_id – The deployment id
  • nodes – the nodes to modify
Returns:

DeploymentModification dict

Return type:

DeploymentModification

finish(deployment_id, modification)[source]

Finish deployment modification

Parameters:
  • deployment_id – The deployment id
  • modification – The modification response received on ‘start’
class cloudify_rest_client.deployments.DeploymentsClient(api)[source]

Bases: object

list(_include=None)[source]

Returns a list of all deployments.

Parameters:_include – List of fields to include in response.
Returns:Deployments list.
get(deployment_id, _include=None)[source]

Returns a deployment by its id.

Parameters:
  • deployment_id – Id of the deployment to get.
  • _include – List of fields to include in response.
Returns:

Deployment.

create(blueprint_id, deployment_id, inputs=None)[source]

Creates a new deployment for the provided blueprint id and deployment id.

Parameters:
  • blueprint_id – Blueprint id to create a deployment of.
  • deployment_id – Deployment id of the new created deployment.
  • inputs – Inputs dict for the deployment.
Returns:

The created deployment.

delete(deployment_id, ignore_live_nodes=False)[source]

Deletes the deployment whose id matches the provided deployment id. By default, deployment with live nodes deletion is not allowed and this behavior can be changed using the ignore_live_nodes argument.

Parameters:
  • deployment_id – The deployment’s to be deleted id.
  • ignore_live_nodes – Determines whether to ignore live nodes.
Returns:

The deleted deployment.