Skip to main content

Python SDK for VMware Cloud Foundation (VCF) — SDDC Manager, NSX-T Policy API, and vCenter REST API

Project description

VCF SDK — Python Library for VMware Cloud Foundation

A Python SDK for programmatically managing VMware Cloud Foundation (VCF), NSX, and vSphere infrastructure.

Features

  • SDDC Manager API — Domains, hosts, licensing, tasks
  • NSX Manager API — Segments, gateways, VPC, transport nodes
  • vCenter API — Clusters, datastores, namespaces, VKS
  • Consistent error handling — Detailed error messages with remediation hints
  • Idempotent operations — Check-before-create pattern
  • Async task polling — Built-in task monitoring

Quick Start

from vcf_sdk import SDDCManager

# Authenticate
sddc = SDDCManager(
    hostname="sddc-manager.lab.dev",
    username="admin@local",
    password="password"
)

# Fetch task status
task = sddc.tasks.get("task-123")
print(f"Status: {task.status}, Progress: {task.progress}%")

# Commission hosts
commission_task = sddc.hosts.commission(
    hosts=[
        {
            "fqdn": "esxi-05.lab.dev",
            "username": "root",
            "password": "password",
            "storageType": "VSAN_ESA",
            "networkPoolId": "pool-uuid"
        }
    ]
)
commission_task.wait_for_completion(timeout=3600)

Architecture

vcf_sdk/
├── __init__.py
├── auth.py              # Token management, SSL handling
├── base.py              # Base client, error handling
├── sddc_manager.py      # SDDC Manager client & managers
├── nsx_manager.py       # NSX Policy API client
├── vcenter.py           # vCenter REST API client
├── models/              # Pydantic models for API responses
│   ├── __init__.py
│   ├── domain.py
│   ├── host.py
│   ├── task.py
│   ├── network.py
│   └── storage.py
└── exceptions.py        # Custom exceptions

Development

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest tests/ -v --cov=vcf_sdk

# Format code
black vcf_sdk/ tests/

# Lint
ruff check vcf_sdk/

License

MIT

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

vmware_vcf-0.1.0.tar.gz (68.5 kB view details)

Uploaded Source

Built Distribution

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

vmware_vcf-0.1.0-py3-none-any.whl (84.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vmware_vcf-0.1.0.tar.gz
  • Upload date:
  • Size: 68.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for vmware_vcf-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5fd7339f451999aa744672d9ea7ee7defb43498dcf18cb2b254e8154a017ea2c
MD5 bc90264ef14598132111c216ddcb81d1
BLAKE2b-256 ef48eb5617db1fb75add8140d1eb9ebb9ff836a0a7f0d7afdf12853449398a33

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vmware_vcf-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 84.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for vmware_vcf-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 07268879469677364d89e9cb09ea2c1d4ef7f48bb11ea2c14c8f9cda8c80ba7a
MD5 77720604d10865695e516526cc076d10
BLAKE2b-256 c2a33c2c8bf43db747f15cc8db91d88305dbb7127a43332a749c8812a69ba045

See more details on using hashes here.

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