Bare Metal and VM provisioning and management services.
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 1.0.0-beta
- Package version: 1.0.0
- Generator version: 7.16.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
Python 3.9+
Clone the repository and:
git clone https://github.com/voltagepark/vp-cloud-sdk.git
cd vp-cloud-sdk
uv sync
source .venv/bin/activateThen import the package:
import vpcloud_clientExecute pytest to run the tests.
Before using the SDK, you need to export the following environment variables:
export VPCLOUD_CLIENT_ID=
export VPCLOUD_CLIENT_SECRET=Please follow the installation procedure and then run the following:
import os
import json
import vpcloud_client
from vpcloud_client.rest import ApiException
# Configure Auth0 M2M authentication using client credentials
# The SDK will automatically exchange these for an access token
# Defining the host is optional and defaults to https://api.sea1.voltagepark.com
# See configuration.py for a list of all supported configuration parameters.
configuration = vpcloud_client.Configuration(
host = "https://api.sea1.voltagepark.com",
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.FleetsApi(api_client)
try:
# List your fleets
api_response = api_instance.list_fleets()
print("The response of FleetsApi->list_fleets:\n")
# Convert response to dict for cleaner output
print(json.dumps(api_response.model_dump(), indent=2))
except ApiException as e:
print("Exception when calling FleetsApi->list_fleets: %s\n" % e)Save this example to a file (e.g., example.py) and run it with:
source .venv/bin/activate
python3 example.pyAll URIs are relative to https://api.sea1.voltagepark.com
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AuditApi | get_audit_log_export | GET /v1/audit-logs/export | Check the 90-day audit log export and get its download URL |
| AuditApi | get_audit_logs | GET /v1/audit-logs | List recent audit logs for your organization |
| AuditApi | start_audit_log_export | POST /v1/audit-logs/export | Start building the 90-day audit log export for your organization |
| FleetsApi | get_fleet | GET /v1/fleets/{fleetId} | Get fleet details |
| FleetsApi | get_fleet_health | GET /v1/fleets/{fleetId}/health | Get fleet health metrics |
| FleetsApi | list_fleets | GET /v1/fleets | List your fleets |
| KubernetesMKS2Api | cordon_customer_mks2_worker_node | POST /v1/fleets/{fleetId}/kubernetes-v2/nodes/{nodeId}/cordon | Cordon an MKS-2 worker node |
| KubernetesMKS2Api | drain_customer_mks2_worker_node | POST /v1/fleets/{fleetId}/kubernetes-v2/nodes/{nodeId}/drain | Drain an MKS-2 worker node |
| KubernetesMKS2Api | get_customer_mks2_worker_node | GET /v1/fleets/{fleetId}/kubernetes-v2/nodes/{nodeId} | Get MKS-2 worker node detail |
| KubernetesMKS2Api | list_customer_mks2_pods | GET /v1/fleets/{fleetId}/kubernetes-v2/pods | List MKS-2 pods |
| KubernetesMKS2Api | list_customer_mks2_worker_nodes | GET /v1/fleets/{fleetId}/kubernetes-v2/nodes | List MKS-2 worker nodes |
| KubernetesMKS2Api | uncordon_customer_mks2_worker_node | POST /v1/fleets/{fleetId}/kubernetes-v2/nodes/{nodeId}/uncordon | Uncordon an MKS-2 worker node |
| MonitoringApi | get_fleet_grafana_dashboards | GET /v1/fleets/{fleetId}/services/grafana | Get Grafana dashboards for a specific fleet |
| MonitoringApi | get_fleet_logs | GET /v1/fleets/{fleetId}/services/logs | Get Grafana Dashboard and Explore links for a fleet's system logs |
| MonitoringApi | list_fleet_grafana_dashboards | GET /v1/fleets/services/grafana | List Grafana dashboards for all fleets |
| NodeOperationsApi | create_node_power_operation | POST /v1/fleets/{fleetId}/nodes/{nodeId}/power | Queue a node power operation |
| NodeOperationsApi | remediate_nodes | POST /v1/fleets/{fleetId}/nodes/remediate | Fix unhealthy nodes |
| NodesApi | get_fleet_node_details | GET /v1/fleets/{fleetId}/nodes/{nodeId}/details | Get consolidated node details |
| NodesApi | get_node_by_fleet_id | GET /v1/fleets/{fleetId}/nodes/{nodeId} | Get node details |
| NodesApi | get_node_power_state | GET /v1/fleets/{fleetId}/nodes/{nodeId}/power | Get node power state |
| NodesApi | list_nodes_by_fleet_id | GET /v1/fleets/{fleetId}/nodes | List nodes in a fleet |
| StorageApi | add_storage_view | POST /v1/fleets/{fleetId}/storage/views | Add a VAST storage view |
| StorageApi | delete_storage_view | DELETE /v1/fleets/{fleetId}/storage/views/{view} | Delete a VAST storage view |
| StorageApi | get_storage_view | GET /v1/fleets/{fleetId}/storage/views/{view} | Get a VAST storage view |
| StorageApi | list_storage_views | GET /v1/fleets/{fleetId}/storage/views | List VAST storage views |
| StorageApi | update_storage_view | PATCH /v1/fleets/{fleetId}/storage/views/{view} | Update a VAST storage view |
- AddStorageViewRequest
- AuditLogEntry
- AuditLogExportStatusResponse
- AuditLogListResponse
- Bootstrap
- ErrorResponse
- ExpandableCapacity
- ExpandableNodeSpec
- ExternalStorageConfig
- Fleet
- FleetApps
- FleetAppsMks2Cluster
- FleetAppsMks2NodeCounts
- FleetAppsMksCluster
- FleetComputeFootprint
- FleetHealthResponse
- FleetNode
- FleetNodeSpec
- FleetStatus
- GetFleetHealth422Response
- GrafanaDashboardResponse
- GrafanaLogsResponse
- Infrastructure
- InfrastructureNetwork
- KubernetesServiceLinks
- ListFleetsResponse
- ListNodesResponse
- Mks2CordonNodeResponse
- Mks2DrainNodeRequest
- Mks2DrainNodeResponse
- Mks2GpuInfo
- Mks2NodeCondition
- Mks2NodeTaint
- Mks2Pod
- Mks2PodCondition
- Mks2PodConditionStatus
- Mks2PodContainerState
- Mks2PodContainerStatus
- Mks2PodList
- Mks2PodListMeta
- Mks2PodPhase
- Mks2WorkerNode
- Mks2WorkerNodeDetail
- Mks2WorkerNodeKubernetesStatus
- Mks2WorkerNodeList
- Mks2WorkerNodeListMeta
- Mks2WorkerNodeRegistrationStatus
- Node
- NodeDetails
- NodeHealth
- NodeManagedServices
- NodePowerOperation
- NodePowerOperationQueued
- NodePowerState
- NodeState
- OsConfig
- PowerActionReadiness
- RemediateNodeRequest
- RemediateNodeResponse
- SlurmParameters
- SlurmParametersSshKeysInner
- StorageConfig
- StorageProtectionPolicy
- StorageView
- StorageViewListResponse
- UpdateStorageViewRequest
Authentication schemes defined for the API:
- Type: Bearer authentication (JWT)
This project is licensed under the Apache License 2.0. See the LICENSE file for details.
The generated SDK includes third-party dependencies. For a complete list of dependencies and their licenses, see THIRD_PARTY_LICENSES.txt. All dependencies are compatible with the Apache License 2.0.