The cluster high-level interface is available through the cluster
member of a Connection object. The
cluster member will only be added if the service is detected.
openstack.cluster.v1._proxy.Proxy(session)profile_types(**query)¶Get a generator of profile types.
| Returns: | A generator of objects that are of type
ProfileType |
|---|
get_profile_type(profile_type)¶Get the details about a profile_type.
| Parameters: | name – The name of the profile_type to retrieve or an object of
ProfileType. |
|---|---|
| Returns: | A ProfileType
object. |
| Raises: | ResourceNotFound when no
profile_type matching the name could be found. |
openstack.cluster.v1._proxy.Proxy(session)create_profile(**attrs)¶Create a new profile from attributes.
| Parameters: | attrs (dict) – Keyword arguments that will be used to create a
Profile, it is comprised
of the properties on the Profile class. |
|---|---|
| Returns: | The results of profile creation. |
| Return type: | Profile. |
update_profile(profile, **attrs)¶Update a profile.
| Parameters: |
|
|---|---|
| Returns: | The updated profile. |
| Return type: |
delete_profile(profile, ignore_missing=True)¶Delete a profile.
| Parameters: |
|
|---|---|
| Returns: |
|
get_profile(profile)¶Get a single profile.
| Parameters: | profile – The value can be the name or ID of a profile or a
Profile instance. |
|---|---|
| Returns: | One Profile |
| Raises: | ResourceNotFound when no
profile matching the criteria could be found. |
find_profile(name_or_id, ignore_missing=True)¶Find a single profile.
| Parameters: | |
|---|---|
| Returns: | One |
profiles(**query)¶Retrieve a generator of profiles.
| Parameters: | **query (kwargs) – Optional query parameters to be sent to restrict the profiles to be returned. Available parameters include:
|
|---|---|
| Returns: | A generator of profile instances. |
openstack.cluster.v1._proxy.Proxy(session)policy_types(**query)¶Get a generator of policy types.
| Returns: | A generator of objects that are of type
PolicyType |
|---|
get_policy_type(policy_type)¶Get the details about a policy_type.
| Parameters: | policy_type – The name of a poicy_type or an object of
PolicyType. |
|---|---|
| Returns: | A PolicyType
object. |
| Raises: | ResourceNotFound when no
policy_type matching the name could be found. |
openstack.cluster.v1._proxy.Proxy(session)create_policy(**attrs)¶Create a new policy from attributes.
| Parameters: | attrs (dict) – Keyword arguments that will be used to create a
Policy, it is comprised
of the properties on the Policy class. |
|---|---|
| Returns: | The results of policy creation. |
| Return type: | Policy. |
update_policy(policy, **attrs)¶Update a policy.
| Parameters: |
|
|---|---|
| Returns: | The updated policy. |
| Return type: |
delete_policy(policy, ignore_missing=True)¶Delete a policy.
| Parameters: |
|
|---|---|
| Returns: |
|
get_policy(policy)¶Get a single policy.
| Parameters: | policy – The value can be the name or ID of a policy or a
Policy instance. |
|---|---|
| Returns: | A policy object. |
| Return type: | Policy |
| Raises: | ResourceNotFound when no
policy matching the criteria could be found. |
find_policy(name_or_id, ignore_missing=True)¶Find a single policy.
| Parameters: | |
|---|---|
| Returns: | A policy object or None. |
| Return type: |
policies(**query)¶Retrieve a generator of policies.
| Parameters: | **query (kwargs) – Optional query parameters to be sent to restrict the policies to be returned. Available parameters include:
|
|---|---|
| Returns: | A generator of policy instances. |
openstack.cluster.v1._proxy.Proxy(session)create_cluster(**attrs)¶Create a new cluster from attributes.
| Parameters: | attrs (dict) – Keyword arguments that will be used to create a
Cluster, it is comprised
of the properties on the Cluster class. |
|---|---|
| Returns: | The results of cluster creation. |
| Return type: | Cluster. |
update_cluster(cluster, **attrs)¶Update a cluster.
| Parameters: |
|
|---|---|
| Returns: | The updated cluster. |
| Return type: |
delete_cluster(cluster, ignore_missing=True)¶Delete a cluster.
| Parameters: |
|
|---|---|
| Returns: | The instance of the Cluster which was deleted. |
| Return type: |
get_cluster(cluster)¶Get a single cluster.
| Parameters: | cluster – The value can be the name or ID of a cluster or a
Cluster instance. |
|---|---|
| Returns: | One Cluster |
| Raises: | ResourceNotFound when no
cluster matching the criteria could be found. |
find_cluster(name_or_id, ignore_missing=True)¶Find a single cluster.
| Parameters: | |
|---|---|
| Returns: | One |
clusters(**query)¶Retrieve a generator of clusters.
| Parameters: | **query (kwargs) – Optional query parameters to be sent to restrict the clusters to be returned. Available parameters include:
|
|---|---|
| Returns: | A generator of cluster instances. |
check_cluster(cluster, **params)¶Check a cluster.
| Parameters: | |
|---|---|
| Returns: | A dictionary containing the action ID. |
recover_cluster(cluster, **params)¶recover a cluster.
| Parameters: | |
|---|---|
| Returns: | A dictionary containing the action ID. |
resize_cluster(cluster, **params)¶Resize of cluster.
| Parameters: | |
|---|---|
| Returns: | A dict containing the action initiated by this operation. |
scale_in_cluster(cluster, count=None)¶Shrink the size of a cluster.
| Parameters: |
|
|---|---|
| Returns: | A dict containing the action initiated by this operation. |
scale_out_cluster(cluster, count=None)¶Inflate the size of a cluster.
| Parameters: |
|
|---|---|
| Returns: | A dict containing the action initiated by this operation. |
collect_cluster_attrs(cluster, path)¶Collect attribute values across a cluster.
| Parameters: |
|
|---|---|
| Returns: | A dictionary containing the list of attribute values. |
perform_operation_on_cluster(cluster, operation, **params)¶Perform an operation on the specified cluster.
| Parameters: | |
|---|---|
| Returns: | A dictionary containing the action ID. |
add_nodes_to_cluster(cluster, nodes)¶Add nodes to a cluster.
| Parameters: |
|
|---|---|
| Returns: | A dict containing the action initiated by this operation. |
remove_nodes_from_cluster(cluster, nodes, **params)¶Remove nodes from a cluster.
| Parameters: |
|
|---|---|
| Returns: | A dict containing the action initiated by this operation. |
replace_nodes_in_cluster(cluster, nodes)¶Replace the nodes in a cluster with specified nodes.
| Parameters: |
|
|---|---|
| Returns: | A dict containing the action initiated by this operation. |
attach_policy_to_cluster(cluster, policy, **params)¶Attach a policy to a cluster.
| Parameters: | |
|---|---|
| Returns: | A dict containing the action initiated by this operation. |
update_cluster_policy(cluster, policy, **params)¶Change properties of a policy which is bound to the cluster.
| Parameters: | |
|---|---|
| Returns: | A dict containing the action initiated by this operation. |
detach_policy_from_cluster(cluster, policy)¶Detach a policy from a cluster.
| Parameters: |
|
|---|---|
| Returns: | A dict containing the action initiated by this operation. |
get_cluster_policy(cluster_policy, cluster)¶Get a cluster-policy binding.
| Parameters: | |
|---|---|
| Returns: | a cluster-policy binding object. |
| Return type: |
|
| Raises: |
|
cluster_policies(cluster, **query)¶Retrieve a generator of cluster-policy bindings.
| Parameters: |
|
|---|---|
| Returns: | A generator of cluster-policy binding instances. |
cluster_add_nodes(*args, **kwargs)¶Add nodes to a cluster.
param cluster: Either the name or the ID of the cluster, or an instance of Cluster.param nodes: List of nodes to be added to the cluster. returns: A dict containing the action initiated by this operation.
Deprecated in 0.9.14, to be removed in 1.0. Use add_nodes_to_cluster instead
cluster_attach_policy(*args, **kwargs)¶Attach a policy to a cluster.
param cluster: Either the name or the ID of the cluster, or an instance of Cluster.param policy: Either the name or the ID of a policy. param dict **params: A dictionary containing the properties for the policy to be attached. returns: A dict containing the action initiated by this operation.
Deprecated in 0.9.14, to be removed in 1.0. Use attach_policy_to_cluster instead
cluster_del_nodes(*args, **kwargs)¶Remove nodes from a cluster.
param cluster: Either the name or the ID of the cluster, or an instance of
Cluster.param nodes: List of nodes to be removed from the cluster.
param kwargs **params: Optional query parameters to be sent to restrict the nodes to be returned. Available parameters include:
- destroy_after_deletion: A boolean value indicating whether the
- deleted nodes to be destroyed right away.
returns: A dict containing the action initiated by this operation.
Deprecated in 0.9.14, to be removed in 1.0. Use remove_nodes_from_cluster instead
cluster_detach_policy(*args, **kwargs)¶Attach a policy to a cluster.
param cluster: Either the name or the ID of the cluster, or an instance of Cluster.param policy: Either the name or the ID of a policy. returns: A dict containing the action initiated by this operation.
Deprecated in 0.9.14, to be removed in 1.0. Use detach_policy_from_cluster instead
cluster_operation(*args, **kwargs)¶Perform an operation on the specified cluster.
param cluster: The value can be either the ID of a cluster or a Clusterinstance.param operation: A string specifying the operation to be performed. param dict params: A dictionary providing the parameters for the operation. returns: A dictionary containing the action ID.
Deprecated in 0.9.14, to be removed in 1.0. Use perform_operation_on_cluster instead
cluster_replace_nodes(*args, **kwargs)¶Replace the nodes in a cluster with specified nodes.
param cluster: Either the name or the ID of the cluster, or an instance of Cluster.param nodes: List of nodes to be deleted/added to the cluster. returns: A dict containing the action initiated by this operation.
Deprecated in 0.9.14, to be removed in 1.0. Use replace_nodes_in_cluster instead
cluster_resize(*args, **kwargs)¶Resize of cluster.
param cluster: Either the name or the ID of the cluster, or an instance of Cluster.param dict **params: A dictionary providing the parameters for the resize action. returns: A dict containing the action initiated by this operation.
Deprecated in 0.9.14, to be removed in 1.0. Use resize_cluster instead
cluster_scale_in(*args, **kwargs)¶Shrink the size of a cluster.
param cluster: Either the name or the ID of the cluster, or an instance of Cluster.param count: Optional parameter specifying the number of nodes to be removed. returns: A dict containing the action initiated by this operation.
Deprecated in 0.9.14, to be removed in 1.0. Use scale_in_cluster instead
cluster_scale_out(*args, **kwargs)¶Inflate the size of a cluster.
param cluster: Either the name or the ID of the cluster, or an instance of Cluster.param count: Optional parameter specifying the number of nodes to be added. returns: A dict containing the action initiated by this operation.
Deprecated in 0.9.14, to be removed in 1.0. Use scale_out_cluster instead
cluster_update_policy(*args, **kwargs)¶Change properties of a policy which is bound to the cluster.
param cluster: Either the name or the ID of the cluster, or an instance of Cluster.param policy: Either the name or the ID of a policy. param dict **params: A dictionary containing the new properties for the policy. returns: A dict containing the action initiated by this operation.
Deprecated in 0.9.14, to be removed in 1.0. Use update_cluster_policy instead
openstack.cluster.v1._proxy.Proxy(session)create_node(**attrs)¶Create a new node from attributes.
| Parameters: | attrs (dict) – Keyword arguments that will be used to create a
Node, it is comprised
of the properties on the Node class. |
|---|---|
| Returns: | The results of node creation. |
| Return type: | Node. |
update_node(node, **attrs)¶Update a node.
| Parameters: |
|
|---|---|
| Returns: | The updated node. |
| Return type: |
delete_node(node, ignore_missing=True)¶Delete a node.
| Parameters: | |
|---|---|
| Returns: | The instance of the Node which was deleted. |
| Return type: |
|
get_node(node, details=False)¶Get a single node.
| Parameters: |
|
|---|---|
| Returns: | One |
| Raises: |
|
find_node(name_or_id, ignore_missing=True)¶Find a single node.
| Parameters: | name_or_id (str) – The name or ID of a node. |
|---|---|
| Returns: | One Node object or None. |
nodes(**query)¶Retrieve a generator of nodes.
| Parameters: | **query (kwargs) – Optional query parameters to be sent to restrict the nodes to be returned. Available parameters include:
|
|---|---|
| Returns: | A generator of node instances. |
check_node(node, **params)¶Check the health of the specified node.
| Parameters: | |
|---|---|
| Returns: | A dictionary containing the action ID. |
recover_node(node, **params)¶Recover the specified node into healthy status.
| Parameters: | |
|---|---|
| Returns: | A dictionary containing the action ID. |
perform_operation_on_node(node, operation, **params)¶Perform an operation on the specified node.
| Parameters: | |
|---|---|
| Returns: | A dictionary containing the action ID. |
adopt_node(preview=False, **attrs)¶Adopting an existing resource as a node.
| Parameters: |
|
|---|---|
| Returns: | The result of node adoption. If preview is set to False
(default), returns a |
node_operation(*args, **kwargs)¶Perform an operation on the specified node.
param cluster: The value can be either the ID of a node or a Nodeinstance.param operation: A string specifying the operation to be performed. param dict params: A dictionary providing the parameters for the operation. returns: A dictionary containing the action ID.
Deprecated in 0.9.14, to be removed in 1.0. Use perform_operation_on_node instead
openstack.cluster.v1._proxy.Proxy(session)create_receiver(**attrs)¶Create a new receiver from attributes.
| Parameters: | attrs (dict) – Keyword arguments that will be used to create a
Receiver, it is comprised
of the properties on the Receiver class. |
|---|---|
| Returns: | The results of receiver creation. |
| Return type: | Receiver. |
update_receiver(receiver, **attrs)¶Update a receiver.
| Parameters: |
|
|---|---|
| Returns: | The updated receiver. |
| Return type: |
delete_receiver(receiver, ignore_missing=True)¶Delete a receiver.
| Parameters: |
|
|---|---|
| Returns: |
|
get_receiver(receiver)¶Get a single receiver.
| Parameters: | receiver – The value can be the name or ID of a receiver or a
Receiver instance. |
|---|---|
| Returns: | A receiver object. |
| Return type: | Receiver |
| Raises: | ResourceNotFound when no
receiver matching the criteria could be found. |
find_receiver(name_or_id, ignore_missing=True)¶Find a single receiver.
| Parameters: | |
|---|---|
| Returns: | A receiver object or None. |
| Return type: |
receivers(**query)¶Retrieve a generator of receivers.
| Parameters: | **query (kwargs) – Optional query parameters for restricting the receivers to be returned. Available parameters include:
|
|---|---|
| Returns: | A generator of receiver instances. |
openstack.cluster.v1._proxy.Proxy(session)get_action(action)¶Get a single action.
| Parameters: | action – The value can be the name or ID of an action or a
Action instance. |
|---|---|
| Returns: | an action object. |
| Return type: | Action |
| Raises: | ResourceNotFound when no
action matching the criteria could be found. |
actions(**query)¶Retrieve a generator of actions.
| Parameters: | **query (kwargs) – Optional query parameters to be sent to restrict the actions to be returned. Available parameters include:
|
|---|---|
| Returns: | A generator of action instances. |
openstack.cluster.v1._proxy.Proxy(session)get_event(event)¶Get a single event.
| Parameters: | event – The value can be the name or ID of an event or a
Event instance. |
|---|---|
| Returns: | an event object. |
| Return type: | Event |
| Raises: | ResourceNotFound when no
event matching the criteria could be found. |
events(**query)¶Retrieve a generator of events.
| Parameters: | **query (kwargs) – Optional query parameters to be sent to restrict the events to be returned. Available parameters include:
|
|---|---|
| Returns: | A generator of event instances. |
openstack.cluster.v1._proxy.Proxy(session)wait_for_delete(resource, interval=2, wait=120)¶Wait for a resource to be deleted.
| Parameters: |
|
|---|---|
| Returns: | The resource is returned on success. |
| Raises: |
|
wait_for_status(resource, status, failures=[], interval=2, wait=120)¶Wait for a resource to be in a particular status.
| Parameters: |
|
|---|---|
| Returns: | The resource is returned on success. |
| Raises: |
|
| Raises: |
|
| Raises: |
|
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.