Skip to content

Latest commit

 

History

History
339 lines (239 loc) · 12.3 KB

NodesApi.md

File metadata and controls

339 lines (239 loc) · 12.3 KB

vpcloud_client.NodesApi

All URIs are relative to your region's API endpoint, for example https://api.iad1.voltagepark.com. Set Configuration(region=...) or VPCLOUD_REGION to pick it.

Method HTTP request Description
get_fleet_node_details GET /v1/fleets/{fleetId}/nodes/{nodeId}/details Get consolidated node details
get_node_by_fleet_id GET /v1/fleets/{fleetId}/nodes/{nodeId} Get node details
get_node_power_state GET /v1/fleets/{fleetId}/nodes/{nodeId}/power Get node power state
list_nodes_by_fleet_id GET /v1/fleets/{fleetId}/nodes List nodes in a fleet

get_fleet_node_details

NodeDetails get_fleet_node_details(fleet_id, node_id)

Get consolidated node details

Returns consolidated single-node details for the node-details page: base physical fields (publicIp only), advisory powerActionReadiness, and optional managed-service data. Org-scoped: the caller's JWT org must own the fleet and the node must belong to that fleet.

Net-new endpoint — does not replace GET /v1/fleets/{fleetId}/nodes/{nodeId}.

Example

  • Bearer (JWT) Authentication (bearerAuth):
import os
import vpcloud_client
from vpcloud_client.models.node_details import NodeDetails
from vpcloud_client.rest import ApiException
from pprint import pprint

# region is where your fleets are: sea1, iad1, dfw2 or ord1
# The SDK exchanges your application's client credentials for an access token.
# See configuration.py for a list of all supported configuration parameters.
configuration = vpcloud_client.Configuration(
    region = os.environ.get("VPCLOUD_REGION"),
    client_id = os.environ["VPCLOUD_CLIENT_ID"],
    client_secret = os.environ["VPCLOUD_CLIENT_SECRET"],
)

# Enter a context with an instance of the API client
with vpcloud_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = vpcloud_client.NodesApi(api_client)
    fleet_id = 'fleet_id_example' # str | Fleet identifier
    node_id = 'g0546' # str | Node identifier (fleet node id)

    try:
        # Get consolidated node details
        api_response = api_instance.get_fleet_node_details(fleet_id, node_id)
        print("The response of NodesApi->get_fleet_node_details:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling NodesApi->get_fleet_node_details: %s\n" % e)

Parameters

Name Type Description Notes
fleet_id str Fleet identifier
node_id str Node identifier (fleet node id)

Return type

NodeDetails

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Success - returns consolidated node details -
401 Authentication required -
404 Fleet or node not found, or node not in the caller's org/fleet -
500 Internal server error -
502 Upstream infrastructure failure -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_node_by_fleet_id

Node get_node_by_fleet_id(fleet_id, node_id)

Get node details

Get detailed information about a specific GPU node, including IP addresses, health status, and connection details.

When to use:

  • Get SSH connection info for a specific node
  • Check detailed health status of a node
  • Troubleshoot issues with a particular node
  • Display node details in your UI

Example

  • Bearer (JWT) Authentication (bearerAuth):
import os
import vpcloud_client
from vpcloud_client.models.node import Node
from vpcloud_client.rest import ApiException
from pprint import pprint

# region is where your fleets are: sea1, iad1, dfw2 or ord1
# The SDK exchanges your application's client credentials for an access token.
# See configuration.py for a list of all supported configuration parameters.
configuration = vpcloud_client.Configuration(
    region = os.environ.get("VPCLOUD_REGION"),
    client_id = os.environ["VPCLOUD_CLIENT_ID"],
    client_secret = os.environ["VPCLOUD_CLIENT_SECRET"],
)

# Enter a context with an instance of the API client
with vpcloud_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = vpcloud_client.NodesApi(api_client)
    fleet_id = '900e8eac-2b1f-421f-a635-72556268b41f' # str | Fleet identifier
    node_id = 'i-0abc123def456' # str | Node identifier (from list nodes response)

    try:
        # Get node details
        api_response = api_instance.get_node_by_fleet_id(fleet_id, node_id)
        print("The response of NodesApi->get_node_by_fleet_id:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling NodesApi->get_node_by_fleet_id: %s\n" % e)

Parameters

Name Type Description Notes
fleet_id str Fleet identifier
node_id str Node identifier (from list nodes response)

Return type

Node

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Success - returns complete node information -
404 Node not found -
500 Internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_node_power_state

NodePowerState get_node_power_state(fleet_id, node_id)

Get node power state

Returns the node's power state and, when available, the most recent power operation. This read is eventually consistent. powerState is the last confirmed value, not a live hardware read on every call. It can stay at the previous value while a power operation is in progress, and a power change that did not go through this API can take up to 5 minutes to appear. The value is refreshed from the hardware when the confirmation is older than 5 minutes, and again when the operation finishes. While lastOperation is ACCEPTED or IN_PROGRESS, wait 10 to 15 seconds between calls. The response includes Retry-After while that operation is still running.

Example

  • Bearer (JWT) Authentication (bearerAuth):
import os
import vpcloud_client
from vpcloud_client.models.node_power_state import NodePowerState
from vpcloud_client.rest import ApiException
from pprint import pprint

# region is where your fleets are: sea1, iad1, dfw2 or ord1
# The SDK exchanges your application's client credentials for an access token.
# See configuration.py for a list of all supported configuration parameters.
configuration = vpcloud_client.Configuration(
    region = os.environ.get("VPCLOUD_REGION"),
    client_id = os.environ["VPCLOUD_CLIENT_ID"],
    client_secret = os.environ["VPCLOUD_CLIENT_SECRET"],
)

# Enter a context with an instance of the API client
with vpcloud_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = vpcloud_client.NodesApi(api_client)
    fleet_id = '900e8eac-2b1f-421f-a635-72556268b41f' # str | Fleet identifier
    node_id = 'g311' # str | Node identifier (from list nodes response)

    try:
        # Get node power state
        api_response = api_instance.get_node_power_state(fleet_id, node_id)
        print("The response of NodesApi->get_node_power_state:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling NodesApi->get_node_power_state: %s\n" % e)

Parameters

Name Type Description Notes
fleet_id str Fleet identifier
node_id str Node identifier (from list nodes response)

Return type

NodePowerState

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 The node's last confirmed power state. * Retry-After - Seconds to wait before calling again while the power operation is still running.
400 Fleet has an invalid reservation ID, or nodeId is invalid -
404 Fleet or node not found, or the fleet has no reservation yet -
500 Internal failure before the upstream call -
502 Upstream infrastructure service returned an error, or the node's BMC is unreachable -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_nodes_by_fleet_id

ListNodesResponse list_nodes_by_fleet_id(fleet_id, limit=limit, next_token=next_token)

List nodes in a fleet

Get all GPU nodes in a fleet with their current status, IP addresses, and health information.

When to use:

  • Display node list in your fleet dashboard
  • Check which nodes are ready for workloads
  • Monitor node health across the fleet
  • Get SSH connection details for nodes

Response includes: Node status, private/public IPs, GPU info, and health status.

Example

  • Bearer (JWT) Authentication (bearerAuth):
import os
import vpcloud_client
from vpcloud_client.models.list_nodes_response import ListNodesResponse
from vpcloud_client.rest import ApiException
from pprint import pprint

# region is where your fleets are: sea1, iad1, dfw2 or ord1
# The SDK exchanges your application's client credentials for an access token.
# See configuration.py for a list of all supported configuration parameters.
configuration = vpcloud_client.Configuration(
    region = os.environ.get("VPCLOUD_REGION"),
    client_id = os.environ["VPCLOUD_CLIENT_ID"],
    client_secret = os.environ["VPCLOUD_CLIENT_SECRET"],
)

# Enter a context with an instance of the API client
with vpcloud_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = vpcloud_client.NodesApi(api_client)
    fleet_id = '900e8eac-2b1f-421f-a635-72556268b41f' # str | Fleet identifier
    limit = 100 # int | Nodes per page (default: 100) (optional) (default to 100)
    next_token = 'next_token_example' # str | Token from previous response for next page (optional)

    try:
        # List nodes in a fleet
        api_response = api_instance.list_nodes_by_fleet_id(fleet_id, limit=limit, next_token=next_token)
        print("The response of NodesApi->list_nodes_by_fleet_id:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling NodesApi->list_nodes_by_fleet_id: %s\n" % e)

Parameters

Name Type Description Notes
fleet_id str Fleet identifier
limit int Nodes per page (default: 100) [optional] [default to 100]
next_token str Token from previous response for next page [optional]

Return type

ListNodesResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Success - returns paginated list of nodes -
400 Bad request - invalid pagination parameters -
404 Fleet not found -
500 Internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]