Node Instances API

class cloudify_rest_client.node_instances.NodeInstance(node_instance)[source]

Bases: dict

Cloudify node instance.

id[source]
Returns:The identifier of the node instance.
node_id[source]
Returns:The identifier of the node whom this is in instance of.
relationships[source]
Returns:The node instance relationships.
host_id[source]
Returns:The node instance host_id.
deployment_id[source]
Returns:The deployment id the node instance belongs to.
runtime_properties[source]
Returns:The runtime properties of the node instance.
state[source]
Returns:The current state of the node instance.
version[source]
Returns:The current version of the node instance (used for optimistic locking on update)
class cloudify_rest_client.node_instances.NodeInstancesClient(api)[source]

Bases: object

get(node_instance_id, _include=None)[source]

Returns the node instance for the provided node instance id.

Parameters:
  • node_instance_id – The identifier of the node instance to get.
  • _include – List of fields to include in response.
Returns:

The retrieved node instance.

update(node_instance_id, state=None, runtime_properties=None, version=0)[source]

Update node instance with the provided state & runtime_properties.

Parameters:
  • node_instance_id – The identifier of the node instance to update.
  • state – The updated state.
  • runtime_properties – The updated runtime properties.
  • version – Current version value of this node instance in Cloudify’s storage (used for optimistic locking).
Returns:

The updated node instance.

list(deployment_id=None, node_name=None, _include=None)[source]

Returns a list of node instances which belong to the deployment identified by the provided deployment id.

Parameters:
  • deployment_id – Optional deployment id to list node instances for.
  • node_name – Optional node id to only fetch node instances with this name
  • _include – List of fields to include in response.
Returns:

Node instances.

Return type:

list