Metadata-Version: 2.4
Name: vmware-vcf
Version: 0.1.0
Summary: Python SDK for VMware Cloud Foundation (VCF) — SDDC Manager, NSX-T Policy API, and vCenter REST API
Author-email: Darryl Cauldwell <darryl.cauldwell@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/darrylcauldwell/vcf-sdk
Project-URL: Repository, https://github.com/darrylcauldwell/vcf-sdk
Keywords: vmware,vcf,nsx,vsphere,sddc,cloud-foundation
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: System Administrators
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: System :: Systems Administration
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.31.0
Requires-Dist: pydantic>=2.0
Requires-Dist: urllib3>=2.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Requires-Dist: black>=23.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Requires-Dist: mypy>=1.0; extra == "dev"
Dynamic: license-file

# 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

```python
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

```bash
# 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
