controllers_v2.keystone_controller module¶
-
class
controllers_v2.keystone_controller.
KeystoneController
(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.
-
create_keystone
(body)[source]¶ Does a POST request to /keystones.
Create a Keystone configuration.
- Args:
- body (Keystone): Specifies the paremters to create a Keystone
configuration.
- Returns:
Keystone: 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_keystone
(id, admin_password)[source]¶ Does a DELETE request to /keystones/{id}.
Delete a Keystone configuration.
- Args:
id (long|int): Specifies the Keystone id. admin_password (string): Specifies the password of Keystone
administrator.
- 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_keystones
(names=None, tenant_ids=None, include_tenants=None)[source]¶ Does a GET request to /keystones.
Get Keystones.
- Args:
- names (list of string, optional): Specifies a list of Keystone
names.
- tenant_ids (list of string, optional): TenantIds contains ids of
the tenants for which objects are to be returned.
- include_tenants (bool, optional): If true, the response will
include Keystones which were created by all tenants which the current user has permission to see. If false, then only Keystones created by the current user will be returned.
- Returns:
Keystones: 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_keystones_by_id
(id)[source]¶ Does a GET request to /keystones/{id}.
Get a Keystone by its id.
- Args:
id (long|int): Specifies the Keystone id.
- Returns:
Keystone: 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_keystone
(id, body)[source]¶ Does a PUT request to /keystones/{id}.
Update a Keystone configuration.
- Args:
id (long|int): Specifies the Keystone id. body (Keystone): Specifies the paremters to update a Keystone
configuration.
- Returns:
Keystone: 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.
-