Node Instances API¶
-
class
cloudify_rest_client.node_instances.
NodeInstance
[source]¶ Bases:
dict
Cloudify node instance.
-
id
¶ Returns: The identifier of the node instance.
-
node_id
¶ Returns: The identifier of the node whom this is in instance of.
-
relationships
¶ Returns: The node instance relationships.
-
host_id
¶ Returns: The node instance host_id.
-
deployment_id
¶ Returns: The deployment id the node instance belongs to.
-
created_by
¶ Returns: The name of the node instance creator.
-
runtime_properties
¶ Returns: The runtime properties of the node instance.
-
state
¶ Returns: The current state of the node instance.
-
version
¶ Returns: The current version of the node instance (used for optimistic locking on update)
-
scaling_groups
¶ Returns: Scaling group instances this node instance belongs to.
-
-
class
cloudify_rest_client.node_instances.
NodeInstancesClient
(api)[source]¶ Bases:
object
-
get
(node_instance_id, _include=None, evaluate_functions=False)[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.
- evaluate_functions – Evaluate intrinsic functions
Returns: The retrieved node instance.
-
update
(node_instance_id, state=None, runtime_properties=None, version=1)[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, node_id=None, _include=None, sort=None, is_descending=False, **kwargs)[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 name to only fetch node instances with this name. The node_name positional argument will be deprecated as of the next rest-client version. Use node_id instead.
- node_id – Equivalent to node_name.
- _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.DeploymentNodeInstance.fields
Returns: Node instances.
Return type:
-