openstack.clustering.v1.Cluster

The Cluster Class

The Cluster class inherits from Resource.

class openstack.clustering.v1.cluster.Cluster(_synchronized=False, connection=None, **attrs)

The base resource

Parameters:
  • _synchronized (bool) – This is not intended to be used directly. See new() and existing().

  • connection (openstack.connection.Connection) – Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

resource_key = 'cluster'

Singular form of key for resource.

resources_key = 'clusters'

Plural form of key for resource.

base_path = '/clusters'

The base part of the URI for this resource.

allow_create = True

Allow create operation for this resource.

allow_fetch = True

Allow get operation for this resource.

allow_commit = True

Allow update operation for this resource.

allow_delete = True

Allow delete operation for this resource.

allow_list = True

Allow list operation for this resource.

commit_method = 'PATCH'

Method for committing a resource (PUT, PATCH, POST)

name

The name of the cluster.

profile_id

The ID of the profile used by this cluster.

user_id

The ID of the user who created this cluster, thus the owner of it.

project_id

The ID of the project this cluster belongs to.

domain_id

The domain ID of the cluster owner.

init_at

Timestamp of when the cluster was initialized. Type: datetime object parsed from ISO 8601 formatted string

created_at

Timestamp of when the cluster was created. Type: datetime object parsed from ISO 8601 formatted string

updated_at

Timestamp of when the cluster was last updated. Type: datetime object parsed from ISO 8601 formatted string

min_size

Lower bound (inclusive) for the size of the cluster.

max_size

Upper bound (inclusive) for the size of the cluster. A value of -1 indicates that there is no upper limit of cluster size.

desired_capacity

Desired capacity for the cluster. A cluster would be created at the scale specified by this value.

timeout

Default timeout (in seconds) for cluster operations.

status

A string representation of the cluster status.

status_reason

A string describing the reason why the cluster in current status.

config

A dictionary configuration for cluster.

metadata

A collection of key-value pairs that are attached to the cluster.

data

A dictionary with some runtime data associated with the cluster.

node_ids

A list IDs of nodes that are members of the cluster.

profile_name

Name of the profile used by the cluster.

is_profile_only

Specify whether the cluster update should only pertain to the profile.

dependents

A dictionary with dependency information of the cluster

op(session, operation, **params)

Perform an operation on the cluster.

Parameters:
  • session – A session object used for sending request.

  • operation – A string representing the operation to be performed.

  • params (dict) – An optional dict providing the parameters for the operation.

Returns:

A dictionary containing the action ID.

force_delete(session)

Force delete a cluster.