Inventory API
This topic describes the Python SDK API for getting the GPU and GPU Nodes available in the EGS Inventory.
Syntax
egs.inventory(authenticated_session=None)
Use this API to get the list of GPU and GPU nodes available in the inventory.
Parameters
Parameter | Parameter Type | Description | Required |
---|---|---|---|
authenticated_session | [AuthenticatedSession] | The default value is None . Use this parameter for providing the authenticated session with the EGS Controller. If no authenticated session is provided, SDK tries to use the SDK default. If no SDK default has been found, an exception is raised. | Optional |
Response Returned
Returns | Description |
---|---|
Class Inventory | The list of GPU nodes as available in the EGS inventory is returned. |
Class Inventory
Parameter | Type | Description |
---|---|---|
gpu_node_name | String | The name of the GPU node. |
gpu_shape | String | The shape of the GPU. |
gpu_model_name | String | The model name of the GPU. |
instance_type | String | The type of the node. |
cluster_name | String | The name of the cluster on which the node is available. |
memory | int | The memory in MB available on each GPU. |
gpu_count | int | The number of GPUs available on the node. |
gpu_temp_threshold | String | The temperature threshold of the GPU. |
gpu_power_threshold | String | The power threshold of the GPU. |
cloud_provider | String | The cloud provider providing the node. |
region | String | The cloud region in which the node is available. |
node_health | String | The health of the node. |
gpu_node_status | String | The status of the GPU node. |
Exceptions Raised
Raises | Description |
---|---|
exceptions.Unauthorized | This exception is raised when querying the inventory is not allowed to the API key. |
Example
import egs
auth = egs.authenticate("https://egs-core-apis.example.com", "5067bd55-1aef-4c84-8987-3e966e917f07")
inventory = egs.inventory(authenticated_session=None)