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.
Get build info for service engine and API
A dictionary containing the API and engine revision string.
Get a generator of profile types.
A generator of objects that are of type
ProfileType
Get the details about a profile type.
profile_type – The name of the profile_type to retrieve or an
object of
ProfileType
.
A ProfileType
object.
ResourceNotFound
when no
profile_type matching the name could be found.
Create a new profile from attributes.
Delete a profile.
profile – The value can be either the name or ID of a profile or
a Profile
instance.
ignore_missing (bool) – When set to False
, an exception
ResourceNotFound
will be raised when
the profile could not be found. When set to True
, no exception
will be raised when attempting to delete a non-existent profile.
None
Find a single profile.
name_or_id (str) – The name or ID of a profile.
ignore_missing (bool) – When set to False
ResourceNotFound
will be
raised when the resource does not exist.
When set to True
, None will be returned when
attempting to find a nonexistent resource.
One Profile
object
or None
Get a single profile.
Retrieve a generator of profiles.
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 asc
or desc
.
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.
A generator of profile instances.
Update a profile.
Validate a profile spec.
attrs (dict) – Keyword arguments that will be used to create a
ProfileValidate
, it is
comprised of the properties on the Profile class.
The results of profile validation.
ProfileValidate
.
Get a generator of policy types.
A generator of objects that are of type
PolicyType
Get the details about a policy type.
policy_type – The name of a poicy_type or an object of
PolicyType
.
A PolicyType
object.
ResourceNotFound
when no
policy_type matching the name could be found.
Create a new policy from attributes.
Delete a policy.
policy – The value can be either the name or ID of a policy or a
Policy
instance.
ignore_missing (bool) – When set to False
, an exception
ResourceNotFound
will be raised when
the policy could not be found. When set to True
, no exception
will be raised when attempting to delete a non-existent policy.
None
Find a single policy.
name_or_id (str) – The name or ID of a policy.
ignore_missing (bool) – When set to False
ResourceNotFound
will be
raised when the specified policy does not exist.
When set to True
, None will be returned when
attempting to find a nonexistent policy.
A policy object or None.
Get a single policy.
Retrieve a generator of policies.
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 asc
or desc
.
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.
A generator of policy instances.
validate_policy
Create a new cluster from attributes.
Delete a cluster.
cluster – The value can be either the name or ID of a cluster or
a Cluster
instance.
ignore_missing (bool) – When set to False
, an exception
ResourceNotFound
will be raised when
the cluster could not be found. When set to True
, 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.
The instance of the Cluster which was deleted.
Cluster
.
Find a single cluster.
name_or_id (str) – The name or ID of a cluster.
ignore_missing (bool) – When set to False
ResourceNotFound
will be
raised when the resource does not exist.
When set to True
, None will be returned when
attempting to find a nonexistent resource.
One Cluster
object
or None
Get a single cluster.
Retrieve a generator of clusters.
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 asc
or desc
.
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.
A generator of cluster instances.
Update a cluster.
Add nodes to a cluster.
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.
A dict containing the action initiated by this operation.
Remove nodes from a cluster.
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.
A dict containing the action initiated by this operation.
Replace the nodes in a cluster with specified nodes.
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.
A dict containing the action initiated by this operation.
Inflate the size of a cluster.
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.
A dict containing the action initiated by this operation.
Shrink the size of a cluster.
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.
A dict containing the action initiated by this operation.
Resize of cluster.
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.
A dict containing the action initiated by this operation.
Attach a policy to a cluster.
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.
A dict containing the action initiated by this operation.
Detach a policy from a cluster.
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.
A dict containing the action initiated by this operation.
Change properties of a policy which is bound to the cluster.
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.
A dict containing the action initiated by this operation.
Collect attribute values across a cluster.
cluster – The value can be either the ID of a cluster or a
Cluster
instance.
path – A Json path string specifying the attribute to collect.
query – Optional query parameters to be sent to limit the resources being returned.
A dictionary containing the list of attribute values.
Check a cluster.
cluster – The value can be either the ID of a cluster or a
Cluster
instance.
params (dict) – A dictionary providing the parameters for the check action.
A dictionary containing the action ID.
recover a cluster.
cluster – The value can be either the ID of a cluster or a
Cluster
instance.
params (dict) – A dictionary providing the parameters for the recover action.
A dictionary containing the action ID.
Perform an operation on the specified cluster.
cluster – The value can be either the ID of a cluster or a
Cluster
instance.
operation – A string specifying the operation to be performed.
params (dict) – A dictionary providing the parameters for the operation.
A dictionary containing the action ID.
Retrieve a generator of cluster-policy bindings.
cluster – The value can be the name or ID of a cluster or a
Cluster
instance.
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.
A generator of cluster-policy binding instances.
Get a cluster-policy binding.
a cluster-policy binding object.
CLusterPolicy
ResourceNotFound
when no
cluster-policy binding matching the criteria could be found.
Create a new node from attributes.
Delete a node.
node – The value can be either the name or ID of a node or a
Node
instance.
ignore_missing (bool) – When set to False
, an exception
ResourceNotFound
will be raised when
the node could not be found. When set to True
, 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.
The instance of the Node which was deleted.
Node
.
Find a single node.
name_or_id (str) – The name or ID of a node.
ignore_missing (bool) – When set to “False”
ResourceNotFound
will be
raised when the specified node does not exist.
when set to “True”, None will be returned when
attempting to find a nonexistent policy
One Node
object
or None.
Get a single node.
Retrieve a generator of nodes.
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 asc
or desc
.
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.
A generator of node instances.
Update a node.
Check the health of the specified node.
node – The value can be either the ID of a node or a
Node
instance.
params (dict) – A dictionary providing the parametes to the check action.
A dictionary containing the action ID.
Recover the specified node into healthy status.
node – The value can be either the ID of a node or a
Node
instance.
params (dict) – A dict supplying parameters to the recover action.
A dictionary containing the action ID.
Adopting an existing resource as a node.
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.
The result of node adoption. If preview is set to False
(default), returns a Node
object, otherwise a Dict is returned containing the profile to
be used for the new node.
Perform an operation on the specified node.
node – The value can be either the ID of a node or a
Node
instance.
operation – A string specifying the operation to be performed.
params (dict) – A dictionary providing the parameters for the operation.
A dictionary containing the action ID.
Create a new receiver from attributes.
Update a receiver.
Delete a receiver.
receiver – The value can be either the name or ID of a receiver
or a Receiver
instance.
ignore_missing (bool) – When set to False
, an exception
ResourceNotFound
will be raised when
the receiver could not be found. When set to True
, no exception
will be raised when attempting to delete a non-existent receiver.
None
Find a single receiver.
name_or_id (str) – The name or ID of a receiver.
ignore_missing (bool) – When set to False
ResourceNotFound
will be
raised when the specified receiver does not exist. When
set to True
, None will be returned when attempting to
find a nonexistent receiver.
A receiver object or None.
Get a single receiver.
Retrieve a generator of receivers.
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 asc
or desc
.
global_project: A boolean value indicating whether receivers
from all projects will be returned.
A generator of receiver instances.
Get a single action.
Retrieve a generator of actions.
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 asc
or desc
.
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.
A generator of action instances.
Get a single event.
Retrieve a generator of events.
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
, policy
etc.
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 asc
or desc
.
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.
A generator of event instances.
Wait for a resource to be in a particular status.
res – The resource to wait on to reach the specified status.
The resource must have a status
attribute.
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.
The resource is returned on success.
ResourceTimeout
if transition
to the desired status failed to occur in specified seconds.
ResourceFailure
if the resource
has transited to one of the failure statuses.
AttributeError
if the resource does not have a
status
attribute.
Wait for a resource to be deleted.
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.
The resource is returned on success.
ResourceTimeout
if transition
to delete failed to occur in the specified seconds.
Get a generator of services.
A generator of objects that are of type
Service
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.