In our most recent article, Nutanix v4 API Update: January 2024, we covered the latest features and improvements made available in Nutanix Prism Central™ pc2023.3 and AOS™ 6.7. Along with that article a number of code samples were updated and published to the NutanixDev GitHub; today’s article outlines the new code samples now available and highlights how to get started using them. Note: this article covers Python® and JavaScript™ code samples.
Python
New Code Samples
Create Nutanix Prism Central categories
- Create Nutanix Prism Central categories using
ntnx_prism_py_client
Python SDK. Categories specifications are read from on-disk JSON file.
Create Nutanix Flow Network Security™ Policy
- Create Nutanix Flow Network Security™ Policy using
ntnx_microseg_py_client
Python SDK. Network security policy created in MONITOR mode to ensure policy does not affect live network traffic.
Create managed subnet
- Create managed subnet using
ntnx_networking_py_client
Python SDK. Subnet specifications are loaded from on-disk JSON file.
Create Nutanix AHV® VM
- Create Nutanix AHV® VM using
ntnx_vmm_py_client
Python SDK. VM details include cluster selection, virtual compute resources, storage and networking.
Updated Code Samples
Collect details for and run Nutanix LCM® updates
- Collect details for and run Nutanix LCM® updates using
ntnx_lcm_py_client
Python SDK. Previous version ran LCM Precheck; this version removes the Precheck step.
JavaScript®
Updated Code Samples
List clusters
- List clusters with
clustermgmt-js-client
SDK for Node.js. The previous code sample used thevmm-js-client
SDK.
Wrapping Up
These new code samples are intended to introduce new and existing Nutanix API users to the Nutanix v4 APIs and SDKs. For more information, see the Nutanix v4 API Introduction.
Related Resources
License
Nutanix code samples are distributed under the MIT license available at https://github.com/nutanixdev/code-samples/blob/master/LICENSE.
Disclaimer
These code samples are intended as a standalone examples. Please be aware that all public code samples provided by Nutanix are unofficial in nature, are provided as examples only, are unsupported and will need to be heavily scrutinized and potentially modified before they can be used in a production environment. All such code samples are provided on an as-is basis, and Nutanix expressly disclaims all warranties, express or implied. All code samples are © Nutanix, Inc., and are provided as-is under the MIT license (https://opensource.org/licenses/MIT).