controllers.analytics_controller module¶
-
class
controllers.analytics_controller.
AnalyticsController
(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.
-
analyze_jar
(body=None)[source]¶ Does a POST request to /public/analytics/analyzeJar.
Returns the result of the jar analysis.
- Args:
- body (AnalyseJarArg, optional): Create Notification Rule
argument.
- Returns:
AnalyseJarResult: 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.
-
cancel_map_reduce_instance_run
(id)[source]¶ Does a PUT request to /public/analytics/cancelAppInstanceRun/{id}.
Cancel a specific map reduce instance run.
- Args:
id (long|int): TODO: Type description here.
- Returns:
KillMapReduceInstanceResult: 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_application
(body=None)[source]¶ Does a POST request to /public/analytics/apps.
Returns the created application.
- Args:
body (MapReduceInfo): Create an Application.
- Returns:
MapReduceInfo: 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_mapper
(body=None)[source]¶ Does a POST request to /public/analytics/mappers.
Returns the created mapper.
- Args:
body (MapperInfo): Create an Application.
- Returns:
MapperInfo: 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_reducer
(body=None)[source]¶ Does a POST request to /public/analytics/reducers.
Returns the created reducer.
- Args:
body (ReducerInfo): Request to create a reducer
- Returns:
ReducerInfo: 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_application
(id)[source]¶ Does a DELETE request to /public/analytics/apps/{id}.
Returns delete status upon completion.
- Args:
id (long|int): TODO: Type description here.
- 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_map_reduce_instance_run
(id)[source]¶ Does a DELETE request to /public/analytics/mrAppRun/{id}
Delete a Map-Reduce Application Instance Run.
Returns delete status upon completion.
- Args:
id (long|int): TODO: Type description here.
- 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_mapper
(id)[source]¶ Does a DELETE request to /public/analytics/mappers/{id}
Returns delete status upon completion.
- Args:
id (long|int): TODO: Type description here.
- 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_reducer
(id)[source]¶ Does a DELETE request to /public/analytics/reducers/{id}.
Returns delete status upon completion.
- Args:
id (long|int): TODO: Type description here.
- 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_uploaded_jar
(body)[source]¶ Does a DELETE request to /public/analytics/uploadJar.
Returns delete status upon completion.
- Args:
body (UploadMRJarViewPathWrapper)
- 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.
-
download_mr_base_jar
()[source]¶ Does a GET request to /public/analytics/mrBaseJar.
Returns a struct containing the map reduce base jar from the cluster.
- Returns:
ExtractFileRangeResult: 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.
-
download_mr_output_files
(is_nfs_file=None, partition_id=None, view_box_id=None, view_name=None, file_path=None, start_offset=None, length_bytes=None)[source]¶ Does a GET request to /public/analytics/mrOutputfiles.
Returns a struct containing the map reduce instance run output files from Yoda.
Download map reduce base instance run output files from Yoda.
- Args:
- is_nfs_file (bool, optional): If true, then extracts file from
NFS, else from local file system.
- partition_id (int, optional): Cluster partition id for the file
to be read.
- view_box_id (int, optional): View box id for the file to be read.
Required for nfs files only.
- view_name (string, optional): View name for the file to be read.
Required for nfs files only.
file_path (string, optional): filepath of the file on NFS. start_offset (int, optional): start offset from where bytes will
be read.
- length_bytes (int, optional): Number of bytes to be read from
start_offset.
- Returns:
ExtractFileRangeResult: 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_application_by_id
(id)[source]¶ Does a GET request to /public/analytics/apps/{id}
Returns the Application corresponding to the specified Application Id.
List details about a single Application.
- Args:
id (long|int): TODO: Type description here.
- Returns:
MapReduceInfo: 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_applications
()[source]¶ Does a GET request to /public/analytics/apps.
If no parameters are specified, all Applications currently on the Cohesity Cluster are returned. Specifying parameters filters the results that are returned.
List Applications filtered by the specified parameters.
- Returns:
ApplicationsWrapper: 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_map_reduce_app_runs
(body=None)[source]¶ Does a GET request to /public/analytics/mrAppRuns.
List map reduce application runs filtered by the specified parameters.
If no parameters are specified, all map reduce application instance runs currently on the Cohesity Cluster are returned. Specifying parameters filters the results that are returned.
- Args:
body(GetMapReduceAppRunsParams): TODO Type description here.
- Returns:
list of AppRunHistory: 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_map_reduce_file_formats
(result_file_path=None, storage_domain_id=None, view_name=None)[source]¶ Does a GET request to /public/analytics/mrFileFormats.
The Analytics workbench generates output files from map reduce instances run for a particular application. This API returns the output file formats available to the user for download.
- Args:
- result_file_path (string, optional): Specifies the path where the
map reduce instance has the result. file generated.
- storage_domain_id (int, optional): Specifies the ID of the storage
domain.
- view_name (int, optional): Specifies the maximum number of NLM
locks to return in the response. This field cannot be set above 1000. If this is not set, maximum of 1000 entries are returned.
- Returns:
MapReduceFileFormats: 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_mapper_by_id
(id)[source]¶ Does a GET request to /public/analytics/mappers/{id}
Returns the Mapper corresponding to the specified Mapper Id.
- Args:
id (string): TODO: Type description here.
- Returns:
MapperInfo: 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_mappers
()[source]¶ Does a GET request to /public/analytics/mappers.
If no parameters are specified, all Mappers currently on the Cohesity Cluster are returned. Specifying parameters filters the results that are returned.
List Mappers filtered by the specified parameters.
- Returns:
list of MappersWrapper: 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_mr_upload_jar_path
()[source]¶ Does a GET request to /public/analytics/uploadJarPath.
Returns the mounted path to upload Jars.
- Returns:
GetMRJarUploadPathResult: 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_reducer_by_id
(id)[source]¶ Does a GET request to /public/analytics/reducers/{id}.
Returns the Reducer corresponding to the specified Reducer Id.
List details about a single Reducer.
- Args:
id (long|int): Specifies the reducer id.
- Returns:
ReducerInfo: 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_reducers
()[source]¶ Does a GET request to /public/analytics/reducers.
If no parameters are specified, all Reducers currently on the Cohesity Cluster are returned. Specifying parameters filters the results that are returned.
- Returns:
ReducersWrapper: 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_supported_patterns
(application_id, application_data_type=None)[source]¶ Does a GET request to /public/analytics/supportedPatterns.
The Analytics workbench has ability to search for patterns which can be system defined or can be user defined. This API returns the patterns available for search.
Used to retrieve supported patterns available for search in an application.
- Args:
application_id (list of long|int): Specifies the application Id. application_data_type (list of string, optional): Specifies the
data type for which supported patterns can be fetched.
- Returns:
list of SupportedPattern: 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.
-
run_map_reduce_app_instance
(body=None)[source]¶ Does a PUT request to /public/analytics/runAppInstance.
Returns the updated Application.
- Args:
body (RunMapReduceParams): Request to update a View.
- Returns:
RunMapReduceInstanceResult: 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.
-
save_pattern
(body=None)[source]¶ Does a PUT request to /public/analytics/supportedPatterns.
The Analytics workbench has ability to search for patterns which can be system defined or can be user defined. This API enables the user to save patterns for searching.
Used to save user patterns for search in an application.
- Args:
body (PatternRequestBody): Request to update a View.
- 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_application
(id, body=None)[source]¶ Does a PUT request to /public/analytics/apps/{id}.
Returns the updated Application.
- Args:
id (long|int): TODO: Type description here. body (MapReduceInfo, optional): TODO: Type description here.
- Returns:
MapReduceInfo: 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_mapper
(id, body=None)[source]¶ Does a PUT request to /public/analytics/apps/{id}.
Returns the updated Application.
- Args:
id (long|int): TODO: Type description here. body (MapperInfo): TODO: Type description here.
- Returns:
MapperInfo: 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_reducer
(id, body=None)[source]¶ Does a PUT request to /public/analytics/reducers/{id}.
Update a Reducer.
- Args:
id (long|int): TODO: Type description here. body (ReducerInfo): Request to update reducer.
- Returns:
ReducerInfo: 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.
-
upload_jar
()[source]¶ Does a POST request to /public/analytics/uploadJar.
Returns a struct containing the jar name and local mount path where the jar will be uploaded.
Upload a jar to pre-specified Yoda internal view.
- Returns:
UploadMRJarViewPathWrapper: 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.
-