controllers_v2.platform_controller module

class controllers_v2.platform_controller.PlatformController(config=None, client=None, call_back=None)[source]

Bases: cohesity_management_sdk.controllers_v2.base_controller.BaseController

A Controller to access Endpoints in the cohesity_management_sdk API.

add_remote_disk(body)[source]

Does a POST request to /disks/remote.

Add a remote disk.

Args:

body (RemoteDisks): Specifies the remote disk configuration.

Returns:

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

create_cluster(body)[source]

Does a POST request to /clusters.

Create a cluster with given network and cluster configuration.

Args:
body (CreateClusterRequestParameters): Specifies the parameters to

create cluster.

Returns:

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

create_racks(body)[source]

Does a POST request to /racks.

Create list of racks and optionally also assign list of chassis to each rack

Args:

body (ListOfRacks): Specifies the parameters to create racks.

Returns:

ListOfRacks: 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_rack_by_id(id)[source]

Does a DELETE request to /racks/{id}.

Delete a given rack by id.

Args:

id (string): Specifies a unique id of the rack.

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.

delete_racks()[source]

Does a DELETE request to /racks.

Delete all the racks.

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.

delete_remote_storage_registration(id)[source]

Does a DELETE request to /remote-storage/{id}.

Delete remote storage registration.

Args:
id (long|int): Specifies the registration id of the registered

remote storage.

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_alert_summary(start_time_usecs=None, end_time_usecs=None, include_tenants=None, tenant_ids=None, states_list=None)[source]

Does a GET request to /alertsSummary.

Get alerts summary grouped by category.

Args:
start_time_usecs (long|int, optional): Filter by start time.

Specify the start time as a Unix epoch Timestamp (in microseconds). By default it is current time minus a day.

end_time_usecs (long|int, optional): Filter by end time. Specify

the end time as a Unix epoch Timestamp (in microseconds). By default it is current time.

include_tenants (bool, optional): IncludeTenants specifies if

alerts of all the tenants under the hierarchy of the logged in user’s organization should be used to compute summary.

tenant_ids (list of string, optional): TenantIds contains ids of

the tenants for which alerts are to be used to compute summary.

states_list (list of StatesListEnum, optional): Specifies list of

alert states to filter alerts by. If not specified, only open alerts will be used to get summary.

Returns:

AlertsSummaryResponse: 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_chassis(no_rack_assigned=None)[source]

Does a GET request to /chassis.

Get list of all chassis info that are part of cluster.

Args:
no_rack_assigned (bool, optional): Filters chassis that have no

rack assigned.

Returns:

ListOfChassis: 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_chassis_by_id(id)[source]

Does a GET request to /chassis/{id}.

Get a chassis info by id.

Args:

id (long|int): Specifies the id of chassis.

Returns:

ChassisSpecificResponse: 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_rack_by_id(id)[source]

Does a GET request to /racks/{id}.

Get a rack info by id.

Args:

id (long|int): Specifies the id of rack.

Returns:

RackSpecificResponse: 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_racks()[source]

Does a GET request to /racks.

Get list of all racks that are part of cluster.

Returns:

ListOfRacks: 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_registered_remote_storage_list()[source]

Does a GET request to /remote-storage.

Get summary about list of registered remote storage servers.

Returns:

RegisteredRemoteStorageList: 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_disks(disk_ids=None, node_ids=None, tiers=None, mount_path=None, file_system=None)[source]

Does a GET request to /disks/remote.

Get remote disks.

Args:
disk_ids (list of long|int, optional): Specifies a list of disk

ids, only disks having these ids will be returned.

node_ids (list of long|int, optional): Specifies a list of node

ids, only disks in these nodes will be returned.

tiers (list of Tier2Enum, optional): Specifies a list of disk

tiers, only disks with given tiers will be returned.

mount_path (string, optional): This field is deprecated. Providing

this queryparam will not have any impact. Please use fileSystem query param to filter instead.

file_system (string, optional): Specified file system name to

search. only disks with file system name that partially matches the specified name will be returned.

Returns:

RemoteDisks: 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_storage_details(id, include_available_space=False, include_available_data_vips=False)[source]

Does a GET request to /remote-storage/{id}.

Get details of remote storage given by id.

Args:

id (long|int): Specifies the id of the registered remote storage. include_available_space (bool, optional): Specifies whether to

include available capacity on remote storage.

include_available_data_vips (bool, optional): Specifies whether to

include available data vips on remote storage.

Returns:
RemoteStorageRegistrationParameters: 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.

register_new_remote_storage(body)[source]

Does a POST request to /remote-storage.

Register a remote storage to be used for disaggregated storage.

Args:
body (RemoteStorageRegistrationParameters): Specifies the

parameters to register a remote storage management server.

Returns:
RemoteStorageRegistrationParameters: 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.

remove_remote_disk(id)[source]

Does a DELETE request to /disks/remote/{id}.

Remove a remote disk.

Args:

id (long|int): Specifies the id of the remote disk to remove.

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.

update_chassis_by_id(id, body=None)[source]

Does a PATCH request to /chassis/{id}.

Update selected properties of chassis info by id.

Args:

id (long|int): Specifies the id of chassis. body (ChassisSpecificResponse, optional): Specifies the parameters

to update chassis.

Returns:

ChassisSpecificResponse: 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_rack_by_id(id, body=None)[source]

Does a PATCH request to /racks/{id}.

Update selected properties of a rack given by id.

Args:

id (long|int): Specifies the id of rack. body (RackSpecificResponse, optional): Specifies the parameters to

update rack.

Returns:

RackSpecificResponse: 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_racks(body)[source]

Does a PATCH request to /racks.

Updates list of racks with name, chassis list or/and location

Args:

body (ListOfRacks): Specifies the parameters to update racks.

Returns:

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

Does a PATCH request to /remote-storage/{id}.

Update Registered Remote Storage Config.

Args:
id (long|int): Specifies the registration id of the registered

remote storage.

body (RemoteStorageRegistrationParameters): Specifies the

parameters to update the registration.

Returns:
RemoteStorageRegistrationParameters: 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.