Skip to content

feat: Add Nutanix v4.2 Python SDK documentation (13 packages)#196

Open
seli-equinix wants to merge 2 commits intoandrewyng:mainfrom
seli-equinix:feat/nutanix-v4.2-python-sdk
Open

feat: Add Nutanix v4.2 Python SDK documentation (13 packages)#196
seli-equinix wants to merge 2 commits intoandrewyng:mainfrom
seli-equinix:feat/nutanix-v4.2-python-sdk

Conversation

@seli-equinix
Copy link
Copy Markdown

@seli-equinix seli-equinix commented Mar 25, 2026

What

Community-contributed documentation for the Nutanix v4.2 Python SDK, covering all 12 namespace-specific packages plus a unified SDK overview.

  • 112 API classes and 644 methods across 13 packages
  • Each DOC.md includes accurate function signatures, parameter details, usage examples, and common patterns
  • Follows the existing content/<vendor>/docs/<package>/python/DOC.md structure
  • Metadata uses source: community as per convention

Packages Added

Package Description
nutanix-sdk Overview + shared authentication/client patterns
nutanix-vmm VM management (create, power, migrate, snapshots)
nutanix-clustermgmt Clusters, hosts, storage containers
nutanix-networking Subnets, VPCs, floating IPs, VPN
nutanix-prism Tasks, categories, batch operations
nutanix-dataprotection DR, recovery points, protection policies
nutanix-datapolicies Replication, protection rules
nutanix-monitoring Alerts, audit trails, health checks
nutanix-volumes Volume groups, iSCSI targets
nutanix-lifecycle LCM inventory, firmware updates
nutanix-licensing License management
nutanix-microseg Flow network security policies
nutanix-aiops Capacity planning, what-if scenarios

Why

Nutanix runs a significant share of enterprise HCI infrastructure, but LLMs consistently hallucinate its SDK signatures — wrong package names, incorrect import patterns, non-existent methods. These docs give coding agents accurate reference material for the v4.2 SDK.

All function signatures and patterns were verified against the real installed SDK packages from PyPI (pip install ntnx-*-py-client). The Copilot review flagged 7 issues (version inconsistencies, wrong attribute names, undefined parameters) — all were verified against the SDK source and fixed:

  • TaskStatus enum uses CANCELED (single L), not CANCELLED — verified via ntnx_prism_py_client.models.prism.v4.config.Task.TaskStatus
  • Configuration.backoff_factor is the correct attribute — backoff_multiplier does not exist on the class
  • ntnx-licensing-py-client==4.2.1 exists on PyPI (was incorrectly listed as 4.3.1)
  • ntnx-aiops-py-client only has 4.2.1b1 beta — no stable 4.2.1 release (version note added)

Testing

  • npm test passes (231/231 tests)
  • chub build content/ --validate-only succeeds (1566 docs, 0 errors)
  • All DOC.md files under 500-line guideline (largest: nutanix-vmm at 491 lines)
  • All frontmatter validated (name, description, metadata.languages, metadata.versions, metadata.source)
  • SDK signatures verified against installed packages (pip install --no-deps ntnx-*-py-client==4.2.1)
chub search nutanix
chub get nutanix/nutanix-vmm --lang py

Notes

  • The aiops namespace only has a beta release (4.2.1b1) on PyPI — a version note is included in the SDK overview doc
  • Reference files are in references/ subdirectories for the three largest namespaces (vmm, clustermgmt, networking) to keep the main DOC.md under 500 lines
  • All 13 DOC.md files share a consistent wait_for_task(prism_client, ...) helper pattern that matches the canonical definition in the SDK overview doc

Community-contributed documentation for the Nutanix v4.2 Python SDK,
covering all 12 namespace-specific packages plus a unified SDK overview.

Covers 112 API classes and 644 methods across:
- nutanix-sdk (overview + shared patterns)
- nutanix-vmm (VM management)
- nutanix-clustermgmt (clusters, hosts, storage containers)
- nutanix-networking (subnets, VPCs, floating IPs)
- nutanix-prism (tasks, categories, batch operations)
- nutanix-dataprotection (DR, recovery points, policies)
- nutanix-datapolicies (replication, protection rules)
- nutanix-monitoring (alerts, audit, health)
- nutanix-volumes (volume groups, iSCSI)
- nutanix-lifecycle (LCM inventory, updates)
- nutanix-licensing (license management)
- nutanix-microseg (Flow network security)
- nutanix-aiops (capacity planning, scenarios)

Each DOC.md includes accurate function signatures, parameter details,
usage examples, and common patterns extracted from the official SDK.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 25, 2026 01:00
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds community-sourced documentation for the Nutanix v4.2 Python SDK, following the repo’s content/<vendor>/docs/<package>/python/DOC.md layout, to provide reliable reference material for coding agents and developers.

Changes:

  • Added per-namespace Python SDK guides for Nutanix (vmm, prism, networking, clustermgmt, volumes, etc.).
  • Added “complete reference” markdowns for selected large APIs (e.g., VMM VmApi, Clustermgmt ClustersApi, Networking API class list).
  • Added a unified SDK overview doc describing shared auth/client patterns, task polling, ETag usage, and OData filtering.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
content/nutanix/docs/nutanix-sdk/python/DOC.md Unified overview + shared patterns (auth, tasks, ETag, OData) and namespace matrix
content/nutanix/docs/nutanix-vmm/python/DOC.md VMM namespace guide with VM lifecycle examples and key patterns
content/nutanix/docs/nutanix-vmm/python/references/vm-api-complete.md Full VmApi method and model reference (AHV config)
content/nutanix/docs/nutanix-prism/python/DOC.md Prism foundation guide (Tasks, Categories, Batches) with examples
content/nutanix/docs/nutanix-networking/python/DOC.md Networking namespace guide (subnets, VPCs, FIPs, etc.) with examples
content/nutanix/docs/nutanix-networking/python/references/api-classes.md Complete API class/method index for networking
content/nutanix/docs/nutanix-clustermgmt/python/DOC.md Clustermgmt namespace guide (clusters/hosts/storage containers)
content/nutanix/docs/nutanix-clustermgmt/python/references/clusters-api-complete.md Full ClustersApi + StorageContainersApi reference with examples
content/nutanix/docs/nutanix-volumes/python/DOC.md Volumes namespace guide (volume groups, disks, attachments, stats)
content/nutanix/docs/nutanix-monitoring/python/DOC.md Monitoring namespace guide (alerts/events/audits/policies/logs/health checks)
content/nutanix/docs/nutanix-microseg/python/DOC.md Microsegmentation (Flow) guide (security policies, address/service groups)
content/nutanix/docs/nutanix-lifecycle/python/DOC.md LCM guide (inventory, recommendations, notifications, upgrades)
content/nutanix/docs/nutanix-licensing/python/DOC.md Licensing namespace guide (EULA, keys, compliance, entitlements)
content/nutanix/docs/nutanix-dataprotection/python/DOC.md Data protection execution guide (recovery points, replication, failover)
content/nutanix/docs/nutanix-datapolicies/python/DOC.md Data policy/planning guide (protection policies, recovery plans, storage policies)
content/nutanix/docs/nutanix-aiops/python/DOC.md AIOps guide (scenarios, simulations, runway, stats)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

All fixes verified against installed Nutanix v4.2 SDK packages:

- Fix TaskStatus values: SDK enum uses CANCELED (single L), not
  CANCELLED. Added CANCELING and SUSPENDED to status documentation.
- Fix Configuration attribute: SDK uses backoff_factor, not
  backoff_multiplier (verified across networking, clustermgmt, vmm).
- Fix wait_for_task() calls: replace undefined `factory` parameter
  with `prism_client` matching the canonical helper signature
  (23 call sites across 8 namespace docs).
- Fix licensing version: 4.2.1 exists on PyPI, not just 4.3.1.
- Fix aiops version note: 4.2.1 stable does not exist on PyPI,
  only 4.2.1b1 beta — added explicit version note.
- Fix VmApi import: use already-imported VmApi directly instead of
  redundant fully-qualified ntnx_vmm_py_client.api.VmApi path.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants