controllers.static_route_controller module¶
-
class
controllers.static_route_controller.
StaticRouteController
(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_static_routes
()[source]¶ Does a GET request to /public/staticRoutes.
Returns the Static Routes for the Cohesity Cluster.
- Returns:
list of StaticRoute: 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_static_route
(ip)[source]¶ Does a DELETE request to /public/staticRoutes/{ip}.
Returns the delete status upon completion.
- Args:
- ip (string): Specifies the subnet IP of the route destination
network.
- 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_static_route
(ip, body=None)[source]¶ Does a PUT request to /public/staticRoutes/{ip}.
Returns the created or updated Static Route on the Cohesity Cluster.
- Args:
- ip (string): Specifies the subnet IP of the route destination
network.
- body (StaticRoute, optional): TODO: type description here.
Example:
- Returns:
StaticRoute: 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.
-