Skip to content

Repository files navigation

VP Cloud SDK

⚠️ BETA PREVIEW: This API is currently in beta and is subject to changes. Features, endpoints, request/response formats, and functionality may be modified as we continue to improve the service.

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

Requirements.

Python 3.9+

Installation & Usage

uv (Recommended)

Clone the repository and:

git clone https://github.com/voltagepark/vp-cloud-sdk.git
cd vp-cloud-sdk
uv sync
source .venv/bin/activate

Then import the package:

import vpcloud_client

Tests

Execute pytest to run the tests.

Configuration

Before using the SDK, you need to export the following environment variables:

export VPCLOUD_CLIENT_ID=
export VPCLOUD_CLIENT_SECRET=

Getting Started

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.py

Documentation for API Endpoints

All 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

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

bearerAuth

  • Type: Bearer authentication (JWT)

Author

support@voltagepark.com

License

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.

About

Public Python SDK for Voltage Park Cloud

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages