Cluster API¶
The Cluster Class¶
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.
Build Info Operations¶
-
class
openstack.clustering.v1._proxy.Proxy(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)¶ -
get_build_info()¶ Get build info for service engine and API
Returns: A dictionary containing the API and engine revision string.
-
Profile Type Operations¶
-
class
openstack.clustering.v1._proxy.Proxy(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs) -
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: profile_type – The name of the profile_type to retrieve or an object of ProfileType.Returns: A ProfileTypeobject.Raises: ResourceNotFoundwhen no profile_type matching the name could be found.
-
Profile Operations¶
-
class
openstack.clustering.v1._proxy.Proxy(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs) -
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: - profile – Either the name or the ID of the profile, or an
instance of
Profile. - attrs – The attributes to update on the profile represented by
the
valueparameter.
Returns: The updated profile.
Return type: - profile – Either the name or the ID of the profile, or an
instance of
-
delete_profile(profile, ignore_missing=True)¶ Delete a profile.
Parameters: - profile – The value can be either the name or ID of a profile or
a
Profileinstance. - ignore_missing (bool) – When set to
False, an exceptionResourceNotFoundwill be raised when the profile could not be found. When set toTrue, no exception will be raised when attempting to delete a non-existent profile.
Returns: None- profile – The value can be either the name or ID of a profile or
a
-
get_profile(profile)¶ Get a single profile.
Parameters: profile – The value can be the name or ID of a profile or a Profileinstance.Returns: One ProfileRaises: ResourceNotFoundwhen no profile matching the criteria could be found.
-
find_profile(name_or_id, ignore_missing=True)¶ Find a single profile.
Parameters: - name_or_id (str) – The name or ID of a profile.
- ignore_missing (bool) – When set to
FalseResourceNotFoundwill be raised when the resource does not exist. When set toTrue, None will be returned when attempting to find a nonexistent resource.
Returns: One
Profileobject or None
-
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:
- name: The name of a profile.
- type: The type name of a profile.
- metadata: A list of key-value pairs that are associated with a
- profile.
- sort: A list of sorting keys separated by commas. Each sorting
- key can optionally be attached with a sorting direction
modifier which can be
ascordesc.
- limit: Requests a specified size of returned items from the
- query. Returns a number of items up to the specified limit value.
- marker: Specifies the ID of the last-seen item. Use the limit
- parameter to make an initial limited request and use the ID of the last-seen item from the response as the marker parameter value in a subsequent limited request.
- global_project: A boolean value indicating whether profiles
- from all projects will be returned.
Returns: A generator of profile instances.
-
validate_profile(**attrs)¶ Validate a profile spec.
Parameters: attrs (dict) – Keyword arguments that will be used to create a ProfileValidate, it is comprised of the properties on the Profile class.Returns: The results of profile validation. Return type: ProfileValidate.
-
Policy Type Operations¶
-
class
openstack.clustering.v1._proxy.Proxy(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs) -
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 PolicyTypeobject.Raises: ResourceNotFoundwhen no policy_type matching the name could be found.
-
Policy Operations¶
-
class
openstack.clustering.v1._proxy.Proxy(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs) -
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 thePolicyclass.Returns: The results of policy creation. Return type: Policy.
-
update_policy(policy, **attrs)¶ Update a policy.
Parameters: - policy – Either the name or the ID of a policy, or an instance
of
Policy. - attrs – The attributes to update on the policy represented by
the
valueparameter.
Returns: The updated policy.
Return type: - policy – Either the name or the ID of a policy, or an instance
of
-
delete_policy(policy, ignore_missing=True)¶ Delete a policy.
Parameters: - policy – The value can be either the name or ID of a policy or a
Policyinstance. - ignore_missing (bool) – When set to
False, an exceptionResourceNotFoundwill be raised when the policy could not be found. When set toTrue, no exception will be raised when attempting to delete a non-existent policy.
Returns: None- policy – The value can be either the name or ID of a policy or a
-
get_policy(policy)¶ Get a single policy.
Parameters: policy – The value can be the name or ID of a policy or a Policyinstance.Returns: A policy object. Return type: PolicyRaises: ResourceNotFoundwhen no policy matching the criteria could be found.
-
find_policy(name_or_id, ignore_missing=True)¶ Find a single policy.
Parameters: - name_or_id (str) – The name or ID of a policy.
- ignore_missing (bool) – When set to
FalseResourceNotFoundwill be raised when the specified policy does not exist. When set toTrue, None will be returned when attempting to find a nonexistent policy.
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:
- name: The name of a policy.
- type: The type name of a policy.
- sort: A list of sorting keys separated by commas. Each sorting
- key can optionally be attached with a sorting direction
modifier which can be
ascordesc.
- limit: Requests a specified size of returned items from the
- query. Returns a number of items up to the specified limit value.
- marker: Specifies the ID of the last-seen item. Use the limit
- parameter to make an initial limited request and use the ID of the last-seen item from the response as the marker parameter value in a subsequent limited request.
- global_project: A boolean value indicating whether policies from
- all projects will be returned.
Returns: A generator of policy instances.
-
validate_policy(**attrs)¶ Validate a policy spec.
Parameters: attrs (dict) – Keyword arguments that will be used to create a PolicyValidate, it is comprised of the properties on the Policy class.Returns: The results of Policy validation. Return type: PolicyValidate.
-
Cluster Operations¶
-
class
openstack.clustering.v1._proxy.Proxy(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs) -
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: - cluster – Either the name or the ID of the cluster, or an
instance of
Cluster. - attrs – The attributes to update on the cluster represented by
the
clusterparameter.
Returns: The updated cluster.
Return type: - cluster – Either the name or the ID of the cluster, or an
instance of
-
delete_cluster(cluster, ignore_missing=True, force_delete=False)¶ Delete a cluster.
Parameters: - cluster – The value can be either the name or ID of a cluster or
a
Clusterinstance. - ignore_missing (bool) – When set to
False, an exceptionResourceNotFoundwill be raised when the cluster could not be found. When set toTrue, no exception will be raised when attempting to delete a non-existent cluster. - force_delete (bool) – When set to
True, the cluster deletion will be forced immediately.
Returns: The instance of the Cluster which was deleted.
Return type: Cluster.- cluster – The value can be either the name or ID of a cluster or
a
-
get_cluster(cluster)¶ Get a single cluster.
Parameters: cluster – The value can be the name or ID of a cluster or a Clusterinstance.Returns: One ClusterRaises: ResourceNotFoundwhen no cluster matching the criteria could be found.
-
find_cluster(name_or_id, ignore_missing=True)¶ Find a single cluster.
Parameters: - name_or_id (str) – The name or ID of a cluster.
- ignore_missing (bool) – When set to
FalseResourceNotFoundwill be raised when the resource does not exist. When set toTrue, None will be returned when attempting to find a nonexistent resource.
Returns: One
Clusterobject or None
-
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:
- name: The name of a cluster.
- status: The current status of a cluster.
- sort: A list of sorting keys separated by commas. Each sorting
- key can optionally be attached with a sorting direction
modifier which can be
ascordesc.
- limit: Requests a specified size of returned items from the
- query. Returns a number of items up to the specified limit value.
- marker: Specifies the ID of the last-seen item. Use the limit
- parameter to make an initial limited request and use the ID of the last-seen item from the response as the marker parameter value in a subsequent limited request.
- global_project: A boolean value indicating whether clusters
- from all projects will be returned.
Returns: A generator of cluster instances.
-
check_cluster(cluster, **params)¶ Check a cluster.
Parameters: - cluster – The value can be either the ID of a cluster or a
Clusterinstance. - params (dict) – A dictionary providing the parameters for the check action.
Returns: A dictionary containing the action ID.
- cluster – The value can be either the ID of a cluster or a
-
recover_cluster(cluster, **params)¶ recover a cluster.
Parameters: - cluster – The value can be either the ID of a cluster or a
Clusterinstance. - params (dict) – A dictionary providing the parameters for the recover action.
Returns: A dictionary containing the action ID.
- cluster – The value can be either the ID of a cluster or a
-
resize_cluster(cluster, **params)¶ Resize of cluster.
Parameters: - cluster – Either the name or the ID of the cluster, or an
instance of
Cluster. - params (dict) – A dictionary providing the parameters for the resize action.
Returns: A dict containing the action initiated by this operation.
- cluster – Either the name or the ID of the cluster, or an
instance of
-
scale_in_cluster(cluster, count=None)¶ Shrink the size of a cluster.
Parameters: - cluster – Either the name or the ID of the cluster, or an
instance of
Cluster. - count – Optional parameter specifying the number of nodes to be removed.
Returns: A dict containing the action initiated by this operation.
- cluster – Either the name or the ID of the cluster, or an
instance of
-
scale_out_cluster(cluster, count=None)¶ Inflate the size of a cluster.
Parameters: - cluster – Either the name or the ID of the cluster, or an
instance of
Cluster. - count – Optional parameter specifying the number of nodes to be added.
Returns: A dict containing the action initiated by this operation.
- cluster – Either the name or the ID of the cluster, or an
instance of
-
collect_cluster_attrs(cluster, path)¶ Collect attribute values across a cluster.
Parameters: - cluster – The value can be either the ID of a cluster or a
Clusterinstance. - path – A Json path string specifying the attribute to collect.
Returns: A dictionary containing the list of attribute values.
- cluster – The value can be either the ID of a cluster or a
-
perform_operation_on_cluster(cluster, operation, **params)¶ Perform an operation on the specified cluster.
Parameters: - cluster – The value can be either the ID of a cluster or a
Clusterinstance. - operation – A string specifying the operation to be performed.
- params (dict) – A dictionary providing the parameters for the operation.
Returns: A dictionary containing the action ID.
- cluster – The value can be either the ID of a cluster or a
-
add_nodes_to_cluster(cluster, nodes)¶ Add nodes to a cluster.
Parameters: - cluster – Either the name or the ID of the cluster, or an
instance of
Cluster. - nodes – List of nodes to be added to the cluster.
Returns: A dict containing the action initiated by this operation.
- cluster – Either the name or the ID of the cluster, or an
instance of
-
remove_nodes_from_cluster(cluster, nodes, **params)¶ Remove nodes from a cluster.
Parameters: - cluster – Either the name or the ID of the cluster, or an
instance of
Cluster. - nodes – List of nodes to be removed from the cluster.
- params (kwargs) –
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.
- cluster – Either the name or the ID of the cluster, or an
instance of
-
replace_nodes_in_cluster(cluster, nodes)¶ Replace the nodes in a cluster with specified nodes.
Parameters: - cluster – Either the name or the ID of the cluster, or an
instance of
Cluster. - nodes – List of nodes to be deleted/added to the cluster.
Returns: A dict containing the action initiated by this operation.
- cluster – Either the name or the ID of the cluster, or an
instance of
-
attach_policy_to_cluster(cluster, policy, **params)¶ Attach a policy to a cluster.
Parameters: - cluster – Either the name or the ID of the cluster, or an
instance of
Cluster. - policy – Either the name or the ID of a policy.
- params (dict) – A dictionary containing the properties for the policy to be attached.
Returns: A dict containing the action initiated by this operation.
- cluster – Either the name or the ID of the cluster, or an
instance of
-
update_cluster_policy(cluster, policy, **params)¶ Change properties of a policy which is bound to the cluster.
Parameters: - cluster – Either the name or the ID of the cluster, or an
instance of
Cluster. - policy – Either the name or the ID of a policy.
- params (dict) – A dictionary containing the new properties for the policy.
Returns: A dict containing the action initiated by this operation.
- cluster – Either the name or the ID of the cluster, or an
instance of
-
detach_policy_from_cluster(cluster, policy)¶ Detach a policy from a cluster.
Parameters: - cluster – Either the name or the ID of the cluster, or an
instance of
Cluster. - policy – Either the name or the ID of a policy.
Returns: A dict containing the action initiated by this operation.
- cluster – Either the name or the ID of the cluster, or an
instance of
-
get_cluster_policy(cluster_policy, cluster)¶ Get a cluster-policy binding.
Parameters: Returns: a cluster-policy binding object.
Return type: CLusterPolicyRaises: ResourceNotFoundwhen no cluster-policy binding matching the criteria could be found.
-
cluster_policies(cluster, **query)¶ Retrieve a generator of cluster-policy bindings.
Parameters: - cluster – The value can be the name or ID of a cluster or a
Clusterinstance. - query (kwargs) –
Optional query parameters to be sent to restrict the policies to be returned. Available parameters include:
- enabled: A boolean value indicating whether the policy is
- enabled on the cluster.
Returns: A generator of cluster-policy binding instances.
- cluster – The value can be the name or ID of a cluster or a
-
Node Operations¶
-
class
openstack.clustering.v1._proxy.Proxy(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs) -
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 theNodeclass.Returns: The results of node creation. Return type: Node.
-
update_node(node, **attrs)¶ Update a node.
Parameters: - node – Either the name or the ID of the node, or an instance
of
Node. - attrs – The attributes to update on the node represented by
the
nodeparameter.
Returns: The updated node.
Return type: - node – Either the name or the ID of the node, or an instance
of
-
delete_node(node, ignore_missing=True, force_delete=False)¶ Delete a node.
Parameters: - node – The value can be either the name or ID of a node or a
Nodeinstance. - ignore_missing (bool) – When set to
False, an exceptionResourceNotFoundwill be raised when the node could not be found. When set toTrue, no exception will be raised when attempting to delete a non-existent node. - force_delete (bool) – When set to
True, the node deletion will be forced immediately.
Returns: The instance of the Node which was deleted.
Return type: Node.- node – The value can be either the name or ID of a node or a
-
get_node(node, details=False)¶ Get a single node.
Parameters: - node – The value can be the name or ID of a node or a
Nodeinstance. - details – An optional argument that indicates whether the server should return more details when retrieving the node data.
Returns: One
NodeRaises: ResourceNotFoundwhen no node matching the name or ID could be found.- node – The value can be the name or ID of a node or a
-
find_node(name_or_id, ignore_missing=True)¶ Find a single node.
Parameters: - name_or_id (str) – The name or ID of a node.
- ignore_missing (bool) – When set to “False”
ResourceNotFoundwill be raised when the specified node does not exist. when set to “True”, None will be returned when attempting to find a nonexistent policy
Returns: One
Nodeobject 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:
- cluster_id: A string including the name or ID of a cluster to
- which the resulted node(s) is a member.
- name: The name of a node.
- status: The current status of a node.
- sort: A list of sorting keys separated by commas. Each sorting
- key can optionally be attached with a sorting direction
modifier which can be
ascordesc.
- limit: Requests at most the specified number of items be
- returned from the query.
- marker: Specifies the ID of the last-seen node. Use the limit
- parameter to make an initial limited request and use the ID of the last-seen node from the response as the marker parameter value in a subsequent limited request.
- global_project: A boolean value indicating whether nodes
- from all projects will be returned.
Returns: A generator of node instances.
-
check_node(node, **params)¶ Check the health of the specified node.
Parameters: - node – The value can be either the ID of a node or a
Nodeinstance. - params (dict) – A dictionary providing the parametes to the check action.
Returns: A dictionary containing the action ID.
- node – The value can be either the ID of a node or a
-
recover_node(node, **params)¶ Recover the specified node into healthy status.
Parameters: - node – The value can be either the ID of a node or a
Nodeinstance. - params (dict) – A dict supplying parameters to the recover action.
Returns: A dictionary containing the action ID.
- node – The value can be either the ID of a node or a
-
perform_operation_on_node(node, operation, **params)¶ Perform an operation on the specified node.
Parameters: - node – The value can be either the ID of a node or a
Nodeinstance. - operation – A string specifying the operation to be performed.
- params (dict) – A dictionary providing the parameters for the operation.
Returns: A dictionary containing the action ID.
- node – The value can be either the ID of a node or a
-
adopt_node(preview=False, **attrs)¶ Adopting an existing resource as a node.
Parameters: - preview – A boolean indicating whether this is a “preview” operation which means only the profile to be used is returned rather than creating a node object using that profile.
- attrs (dict) –
Keyword parameters for node adoption. Valid parameters include:
- type: (Required) A string containing the profile type and
- version to be used for node adoption. For example,
os.nova.sever-1.0.
- identity: (Required) A string including the name or ID of an
- OpenStack resource to be adopted as a Senlin node.
- name: (Optional) The name of node to be created. Omitting
- this parameter will have the node named automatically.
- snapshot: (Optional) A boolean indicating whether a snapshot
- of the target resource should be created if possible. Default is False.
- metadata: (Optional) A dictionary of arbitrary key-value pairs
- to be associated with the adopted node.
- overrides: (Optional) A dictionary of key-value pairs to be used
- to override attributes derived from the target resource.
Returns: The result of node adoption. If preview is set to False (default), returns a
Nodeobject, otherwise a Dict is returned containing the profile to be used for the new node.
-
Receiver Operations¶
-
class
openstack.clustering.v1._proxy.Proxy(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs) -
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: - receiver – The value can be either the name or ID of a receiver
or a
Receiverinstance. - attrs – The attributes to update on the receiver parameter.
Valid attribute names include
name,actionandparams.
Returns: The updated receiver.
Return type: - receiver – The value can be either the name or ID of a receiver
or a
-
delete_receiver(receiver, ignore_missing=True)¶ Delete a receiver.
Parameters: - receiver – The value can be either the name or ID of a receiver
or a
Receiverinstance. - ignore_missing (bool) – When set to
False, an exceptionResourceNotFoundwill be raised when the receiver could not be found. When set toTrue, no exception will be raised when attempting to delete a non-existent receiver.
Returns: None- receiver – The value can be either the name or ID of a receiver
or a
-
get_receiver(receiver)¶ Get a single receiver.
Parameters: receiver – The value can be the name or ID of a receiver or a Receiverinstance.Returns: A receiver object. Return type: ReceiverRaises: ResourceNotFoundwhen no receiver matching the criteria could be found.
-
find_receiver(name_or_id, ignore_missing=True)¶ Find a single receiver.
Parameters: - name_or_id (str) – The name or ID of a receiver.
- ignore_missing (bool) – When set to
FalseResourceNotFoundwill be raised when the specified receiver does not exist. When set toTrue, None will be returned when attempting to find a nonexistent receiver.
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:
- name: The name of a receiver object.
- type: The type of receiver objects.
- cluster_id: The ID of the associated cluster.
- action: The name of the associated action.
- sort: A list of sorting keys separated by commas. Each sorting
- key can optionally be attached with a sorting direction
modifier which can be
ascordesc.
- global_project: A boolean value indicating whether receivers
- from all projects will be returned.
Returns: A generator of receiver instances.
-
Action Operations¶
-
class
openstack.clustering.v1._proxy.Proxy(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs) -
get_action(action)¶ Get a single action.
Parameters: action – The value can be the name or ID of an action or a Actioninstance.Returns: an action object. Return type: ActionRaises: ResourceNotFoundwhen 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:
- name: name of action for query.
- target: ID of the target object for which the actions should be
- returned.
- action: built-in action types for query.
- sort: A list of sorting keys separated by commas. Each sorting
- key can optionally be attached with a sorting direction
modifier which can be
ascordesc.
- limit: Requests a specified size of returned items from the
- query. Returns a number of items up to the specified limit value.
- marker: Specifies the ID of the last-seen item. Use the limit
- parameter to make an initial limited request and use the ID of the last-seen item from the response as the marker parameter value in a subsequent limited request.
Returns: A generator of action instances.
-
Event Operations¶
-
class
openstack.clustering.v1._proxy.Proxy(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs) -
get_event(event)¶ Get a single event.
Parameters: event – The value can be the name or ID of an event or a Eventinstance.Returns: an event object. Return type: EventRaises: ResourceNotFoundwhen 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:
- obj_name: name string of the object associated with an event.
- obj_type: type string of the object related to an event. The
- value can be
cluster,node,policyetc.
- obj_id: ID of the object associated with an event.
- cluster_id: ID of the cluster associated with the event, if any.
- action: name of the action associated with an event.
- sort: A list of sorting keys separated by commas. Each sorting
- key can optionally be attached with a sorting direction
modifier which can be
ascordesc.
- limit: Requests a specified size of returned items from the
- query. Returns a number of items up to the specified limit value.
- marker: Specifies the ID of the last-seen item. Use the limit
- parameter to make an initial limited request and use the ID of the last-seen item from the response as the marker parameter value in a subsequent limited request.
- global_project: A boolean specifying whether events from all
- projects should be returned. This option is subject to access control checking.
Returns: A generator of event instances.
-
Helper Operations¶
-
class
openstack.clustering.v1._proxy.Proxy(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs) -
wait_for_delete(res, interval=2, wait=120)¶ Wait for a resource to be deleted.
Parameters: - res – The resource to wait on to be deleted.
- interval – Number of seconds to wait before to consecutive checks. Default to 2.
- wait – Maximum number of seconds to wait before the change. Default to 120.
Returns: The resource is returned on success.
Raises: ResourceTimeoutif transition to delete failed to occur in the specified seconds.
-
wait_for_status(res, status, failures=None, interval=2, wait=120)¶ Wait for a resource to be in a particular status.
Parameters: - res – The resource to wait on to reach the specified status.
The resource must have a
statusattribute. - status – Desired status.
- failures (
list) – Statuses that would be interpreted as failures. - interval – Number of seconds to wait before to consecutive checks. Default to 2.
- wait – Maximum number of seconds to wait before the change. Default to 120.
Returns: The resource is returned on success.
Raises: ResourceTimeoutif transition to the desired status failed to occur in specified seconds.Raises: ResourceFailureif the resource has transited to one of the failure statuses.Raises: AttributeErrorif the resource does not have astatusattribute.- res – The resource to wait on to reach the specified status.
The resource must have a
-
Service Operations¶
-
class
openstack.clustering.v1._proxy.Proxy(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs) -
services(**query)¶ Get a generator of services.
Returns: A generator of objects that are of type Service
-