Skip to main content

Modern Python CLI and SDK for OpenNebula

Project description

opennebula-cli

opennebula-cli is a modern Python CLI and SDK for OpenNebula 7.0.x.

It preserves familiar workflows such as onevm, onehost, oneimage, and onetemplate, while also exposing a canonical one <resource> <verb> command tree and a typed Python SDK built for remote use from laptops, CI, and other automation systems.

Quickstart

Below is the fastest way to get started using this tool.

uv tool install opennebula-cli

export ONE_XMLRPC="http://127.0.0.1:2633/RPC2"
export ONE_AUTH="oneadmin:password-for-auth"

onevm list

Status

This repository is in active bootstrap. The current milestone focuses on:

  • uv-managed packaging and contributor workflow
  • typed config, auth, transport, and SDK foundations
  • Wave 1 resource families:
    • onevm
    • onehost
    • oneimage
    • onetemplate
  • Wave 2 read-only families:
    • onevnet
    • onedatastore
    • onecluster
  • public Mintlify docs under docs/
  • local-only maintainer context tooling under refs/

Goals

  • Behavioral parity with the official OpenNebula CLI for OpenNebula 7.0.x
  • Strongly typed Python SDK under opennebula_cli.sdk
  • Compatibility shims for official command families
  • Deterministic machine-readable output modes
  • Plugin-ready architecture for future OneFlow and ecosystem extensions

Install

Local development

uv sync --group dev
uv run one --help
uv run onevm --help

Build

uv build

Release policy

The current public bootstrap release is 0.1.0.

  • v0.1.0 is a one-time bootstrap package release.
  • later, after live validation against OpenNebula 7.0.x, package versions will switch to OpenNebula-mirrored releases starting at 7.0.0.
  • the release workflow publishes only when the pushed git tag matches project.version exactly.

Examples:

uv run python tools/check_release_version.py --tag v0.1.0
git tag -a v0.1.0 -m "Release v0.1.0"

Quick start

export ONE_XMLRPC=https://opennebula.example.com/RPC2
export ONE_AUTH=$HOME/.one/one_auth

uv run one vm list
uv run onevm show 42
uv run one image list --output json
uv run one vnet list --output json

Help examples

Every implemented subcommand includes 1-2 concrete usage examples in --help.

uv run one vm list --help
uv run one template instantiate --help

Live read-only capture

When live credentials cannot be shared, use the private capture tooling to emit sanitized read-only observations:

tools/capture_live_readonly.sh --write-artifact > /tmp/opennebula-capture.jsonl
uv run python tools/import_live_capture.py import --input /tmp/opennebula-capture.jsonl

The capture path:

  • only executes allowlisted --help, list, and show commands
  • never executes create, update, delete, or lifecycle mutations
  • redacts endpoints, hostnames, IPs, MACs, and secret-like fields
  • writes private artifacts under refs/tasks/live-capture/

SDK

from opennebula_cli.sdk import OneClient

client = OneClient.from_env()
for vm in client.vm.list():
    print(vm.id, vm.name, vm.state)

Repo layout

  • src/opennebula_cli/: application and SDK code
  • docs/: public Mintlify documentation
  • tests/: unit and future parity/contract coverage
  • tools/: repo maintenance helpers
  • refs/: private local maintainer workspace, ignored by git

Documentation

Public docs are tracked in docs/. The main entrypoints are:

  • docs/index.mdx
  • docs/getting-started.mdx
  • docs/architecture.mdx
  • docs/sdk.mdx
  • docs/testing.mdx
  • docs/contributing.mdx

Development checks

uv run ruff check .
uv run mypy src tests tools
uv run pytest
uv run python tools/check_catalog_schema.py

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

opennebula_cli-0.1.0.tar.gz (28.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

opennebula_cli-0.1.0-py3-none-any.whl (61.4 kB view details)

Uploaded Python 3

File details

Details for the file opennebula_cli-0.1.0.tar.gz.

File metadata

  • Download URL: opennebula_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 28.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for opennebula_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cf21435441caf69de70b2cbfd64666d73f60cb2ff05c1b1b95afe20f16515835
MD5 0180a671e6f6539da712a77ff1aa6611
BLAKE2b-256 3fa884904f8f65ea01ca17af24c9ffadd88cfa6685f556374819688d31e77ffa

See more details on using hashes here.

Provenance

The following attestation bundles were made for opennebula_cli-0.1.0.tar.gz:

Publisher: release.yml on SparkAIUR/opennebula-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file opennebula_cli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: opennebula_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 61.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for opennebula_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 344006010ebda18f577b218dffe132c4ca69f81b9695258ba8eb6172b6ba5b5a
MD5 9da74a098f6ea438011b1afe5231a1f2
BLAKE2b-256 f6015ba8ce3c90c97459a60cc5359d8b24259502bb501ab1d5c56f913c973bbc

See more details on using hashes here.

Provenance

The following attestation bundles were made for opennebula_cli-0.1.0-py3-none-any.whl:

Publisher: release.yml on SparkAIUR/opennebula-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page