Deployments API¶
-
class
cloudify_rest_client.deployments.Deployment(deployment)[source]¶ Bases:
dictCloudify deployment.
-
id¶ Returns: The identifier of the deployment.
-
blueprint_id¶ Returns: The identifier of the blueprint this deployment belongs to.
-
created_by¶ Returns: The name of the deployment creator.
-
workflows¶ Returns: The workflows of this deployment.
-
inputs¶ Returns: The inputs provided on deployment creation.
-
outputs¶ Returns: The outputs definition of this deployment.
-
description¶ Returns: The description of this deployment.
-
-
class
cloudify_rest_client.deployments.Workflow(workflow)[source]¶ Bases:
dict-
id¶ Returns: The workflow’s id
-
name¶ Returns: The workflow’s name
-
parameters¶ Returns: The workflow’s parameters
-
-
class
cloudify_rest_client.deployments.DeploymentOutputs(outputs)[source]¶ Bases:
dict-
deployment_id¶ Deployment Id the outputs belong to.
-
outputs¶ Deployment outputs as dict.
-
-
class
cloudify_rest_client.deployments.DeploymentsClient(api)[source]¶ Bases:
object-
list(_include=None, sort=None, is_descending=False, **kwargs)[source]¶ Returns a list of all deployments.
Parameters: - _include – List of fields to include in response.
- sort – Key for sorting the list.
- is_descending – True for descending order, False for ascending.
- kwargs – Optional filter fields. for a list of available fields see the REST service’s models.Deployment.fields
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, private_resource=False, skip_plugins_validation=False)[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.
- private_resource – Whether the deployment should be private
- skip_plugins_validation – Determines whether to validate if the required deployment plugins exist on the manager. If validation is skipped, plugins containing source URL will be installed from source.
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.
-