controllers.remote_cluster_controller module

class controllers.remote_cluster_controller.RemoteClusterController(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.

create_remote_cluster(body)[source]

Does a POST request to /public/remoteClusters.

For a Protection Job to replicate Snapshots from one Cluster to another Cluster, the Clusters must be paired together by registering each Cluster on the other Cluster. For example, Cluster A must be registered on Cluster B and Cluster B must be registered on Cluster A.

Args:
body (RegisterRemoteCluster): Request to register a remote

Cluster.

Returns:

RemoteCluster: 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.

delete_remote_cluster(id)[source]

Does a DELETE request to /public/remoteClusters/{id}.

Delete the specified remote Cluster registration connection on this Cluster.

Args:

id (long|int): id of the remote Cluster

Returns:

void: Response from the API. No Content

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_remote_cluster_by_id(id)[source]

Does a GET request to /public/remoteClusters/{id}.

Returns the details about the remote Cluster with the specified Cluster id that is registered on this local Cluster.

Args:

id (long|int): id of the remote Cluster

Returns:

list of RemoteCluster: 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_remote_clusters(cluster_ids=None, cluster_names=None, purpose_replication=None, purpose_remote_access=None)[source]

Does a GET request to /public/remoteClusters.

Cohesity Clusters involved in replication, must be registered to each other. For example, if Cluster A is replicating Snapshots to Cluster B, Cluster B must be registered on Cluster A and Cluster B must be registered on Cluster A.

Args:
cluster_ids (list of long|int, optional): Filter by a list of

Cluster ids.

cluster_names (list of string, optional): Filter by a list of

Cluster names.

purpose_replication (bool, optional): Filter for purpose as

Replication.

purpose_remote_access (bool, optional): Filter for purpose as

Remote Access.

Returns:

list of RemoteCluster: 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_replication_encryption_key()[source]

Does a GET request to /public/replicationEncryptionKey.

Get the encryption key that is used for encrypting replication data between this Cluster and a remote Cluster.

Returns:

ReplicationEncryptionKeyReponse: 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_remote_cluster(id, body)[source]

Does a PUT request to /public/remoteClusters/{id}.

Update the connection settings of the specified remote Cluster that is registered on this Cluster.

Args:

id (long|int): id of the remote Cluster body (RegisterRemoteCluster): Request to update a remote Cluster.

Returns:

RemoteCluster: 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.