controllers.cluster_controller module

class controllers.cluster_controller.ClusterController(config=None, client=None, call_back=None)[source]

Bases: cohesity_management_sdk.controllers.base_controller.BaseController

A Controller to access Endpoints in the cohesity_management_sdk API.

get_app_settings()[source]

Does a GET request to /public/cluster/appSettings.

Returns the app settings for the cluster.

Returns:

AppsConfig: Response from the API. Success

Raises:
APIException: When an error occurs while fetching the data from

the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request.

get_basic_cluster_info()[source]

Does a GET request to /public/basicClusterInfo.

All Active Directory domains that are currently joined to the Cohesity Cluster are returned. In addition, the default LOCAL domain on the Cohesity Cluster is returned as the first element of the domains array in the response.

Returns:

BasicClusterInfo: Response from the API. Success

Raises:
APIException: When an error occurs while fetching the data from

the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request.

get_cluster(fetch_stats=None, fetch_time_series_schema=None, include_minimum_nodes_info=None)[source]

Does a GET request to /public/cluster.

Returns information about this Cohesity Cluster.

Args:
fetch_stats (bool, optional): If ‘true’, also get statistics about

the Cohesity Cluster.

fetch_time_series_schema (bool, optional): Specifies whether to

get time series schema info of the cluster.

include_minimum_nodes_info (bool, optional): Specifies whether to

include info about minimum failure domains needed to support based on fault tolerance configured and EC configuration on all storage domains.

Returns:

Cluster: Response from the API. Successful Response

Raises:
APIException: When an error occurs while fetching the data from

the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request.

get_cluster_status()[source]

Does a GET request to /public/cluster/status.

Sends a request to get the status of every node that is part of the current Cluster.

Returns:

ClusterStatusResult: Response from the API. Success

Raises:
APIException: When an error occurs while fetching the data from

the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request.

update_app_settings(body=None)[source]

Does a PUT request to /public/cluster/appSettings.

Returns the updated app settings.

Args:

body (AppsConfig): Update App Settings Parameter.

Returns:

AppsConfig: Response from the API. Success

Raises:
APIException: When an error occurs while fetching the data from

the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request.

update_cluster(body=None)[source]

Does a PUT request to /public/cluster.

Returns the updated Cluster configuration.

Args:

body (UpdateClusterParams, optional): Update Cluster Parameter.

Returns:

Cluster: Response from the API. Success

Raises:
APIException: When an error occurs while fetching the data from

the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request.