Skip to content

Commit 3e4e57d

Browse files
Merge pull request #440 from purohitshweta/master
vSphere Automation SDK Python 9.0.0.0 release
2 parents d57e82c + 4d7bcf2 commit 3e4e57d

130 files changed

Lines changed: 2751 additions & 7633 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The following information must be included in the README.md or in the sample doc
1515
* Author Name
1616
* This can include full name, email address or other identifiable piece of information that would allow interested parties to contact author with questions.
1717
* Compatible vCenter version
18-
* This should be the vCenter version when the API is introduced, something like "6.5+" or "6.8.1+".
18+
* This should be the vCenter version when the API is introduced, something like "7.0"+.
1919
* Minimal/High Level Description
2020
* What does the sample do ?
2121
* Any KNOWN limitations or dependencies

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2016-2024 Broadcom, Inc.
3+
Copyright (c) 2016-2025 Broadcom, Inc.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
66

README.md

Lines changed: 26 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
# VMware vSphere Automation SDK for Python
2-
[![Build Status](https://travis-ci.com/vmware/vsphere-automation-sdk-python.svg?token=v9mEJjcpDiQ9DrYbzyaQ&branch=master)](https://travis-ci.com/vmware/vsphere-automation-sdk-python)
32

43
## Table of Contents
54
- [Abstract](#abstract)
65
- [Supported vCenter Releases](#supported-onprem-vcenter-releases)
76
- [Supported NSX-T Releases](#supported-nsx-t-releases)
8-
- [VMware Cloud on AWS Support](#vmware-cloud-on-aws-support)
97
- [Quick Start Guide](#quick-start-guide)
108
- [Run SDK Samples](#run-sdk-samples)
119
- [API Documentation](#api-documentation)
@@ -14,22 +12,24 @@
1412
- [Repository Administrator Resources](#repository-administrator-resources)
1513
- [VMware Resources](#vmware-resources)
1614

15+
## IMPORTANT NOTICE
16+
Starting with VCF release 9.0.0.0, the vSphere Automation Python SDK repository now includes only the NSX on-prem libraries.
17+
18+
Please use the official [VCF Python SDK](https://github.com/vmware/vcf-sdk-python).
19+
1720
## Abstract
1821
This document describes the vSphere Automation Python SDK samples that use the vSphere Automation
1922
python client library. Additionally, some of the samples demonstrate the combined use of the
2023
vSphere Automation and vSphere APIs. To support this combined use, the vSphere Automation Python SDK
2124
samples require the vSphere Management SDK packages (pyVmomi) to be installed on the client.
22-
The samples have been developed to work with python 3.8+
25+
The samples have been developed to work with python 3.9+
2326

2427
## Supported OnPrem vCenter Releases
25-
vCenter 7.0, 7.0U1, 7.0U2, 7.0U3 , 8.0, 8.0U1, 8.0U2, 8.0U3
28+
vCenter 7.0, 7.0U1, 7.0U2, 7.0U3 , 8.0, 8.0U1, 8.0U2, 8.0U3, 9.0.0.0
2629
Please refer to the notes in each sample for detailed compatibility information.
2730

2831
## Supported NSX-T Releases
29-
NSX-T 2.2 - 4.2.0 and VMC 1.7 - 1.24
30-
31-
## Latest VMware Cloud on AWS Release:
32-
VMC M24 (1.24) ([Release Notes](https://docs.vmware.com/en/VMware-Cloud-on-AWS/0/rn/vmc-on-aws-relnotes.html))
32+
NSX-T 2.2 - 4.2.0
3333

3434
## Quick Start Guide
3535

@@ -47,7 +47,7 @@ SDK package installation commands may differ depending on the environment where
4747
**NOTE:** The SDK also requires OpenSSL 1.0.1+ in order to support TLS1.1 & 1.2
4848

4949
##### 1. Typical Installation
50-
This is the recommended way to install the SDK. The installation is done from [PyPI](https://pypi.org/) and [Automation SDK Python Github](https://github.com/vmware/vsphere-automation-sdk-python) repositories.
50+
This is the recommended way to install the SDK. The installation is done from [PyPI](https://pypi.org/) and [Automation SDK Python GitHub](https://github.com/vmware/vsphere-automation-sdk-python) repositories.
5151

5252
Install/Update latest pip from PyPI.
5353
```cmd
@@ -65,6 +65,11 @@ pip install --upgrade git+https://github.com/vmware/vsphere-automation-sdk-pytho
6565
##### 2. Local installation
6666
Local installation can be used in an environment which either do not have Github access or users do not want to install from Github repository.
6767

68+
Install all the wheel files from SDK's lib directory.
69+
```cmd
70+
pip install -U lib/*/*.whl
71+
```
72+
Install dependencies like *lxml* and *pyvmomi* from PyPI as other requirements were installed from SDK's lib directory.
6873
```cmd
6974
pip install -U <SDK_DIRECTORY_PATH>
7075
```
@@ -73,7 +78,7 @@ e.g.
7378
```
7479
pip install -U vsphere-automation-sdk-python
7580
Or
76-
pip install -U vsphere-automation-sdk-python-8.0.0.0.zip
81+
pip install -U vsphere-automation-sdk-python-9.0.0.0.zip
7782
```
7883
##### 3. Installation in an air gap environment
7984
For this type of environment an additional step is required to ensure SDK's dependencies are available.
@@ -142,53 +147,20 @@ Type "help", "copyright", "credits" or "license" for more information.
142147

143148
**NOTE:** If you are using Bash, be sure to use single quote for username and password to preserve the values. If you use double quote, you will have to escape special characters, such as "$". See [Bash manual](http://www.gnu.org/software/bash/manual/html_node/Double-Quotes.html)
144149

145-
### Connect to VMware Cloud on AWS
146-
147-
```python
148-
from vmware.vapi.vmc.client import create_vmc_client
149-
150-
# Connect to VMware Cloud on AWS using refresh token
151-
vmc_client = create_vmc_client('<refresh_token>')
152-
153-
# Get organizations associated with calling user.
154-
vmc_client.Orgs.list()
155-
```
156-
157-
Output in a Python Interpreter:
158-
159-
```shell
160-
(venv) het-m03:vsphere-automation-sdk-python het$ python
161-
Python 3.9.8 (main, Nov 10 2021, 06:03:50)
162-
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
163-
Type "help", "copyright", "credits" or "license" for more information.
164-
>>> from vmware.vapi.vmc.client import create_vmc_client
165-
>>> vmc_client = create_vmc_client('<refresh_token>')
166-
>>> vmc_client.Orgs.list()
167-
[Organization(updated=datetime.datetime(2018, 3, 2, 16, 57, 46), user_id='77aa6e6f-3257-3637-9cd9-14fae3a25b9d', updated_by_user_id='2021b5ae-890b-3472-ba9a-bc8cff776ca7', created=datetime.datetime(2017, 4, 4, 11, 57, 48, 861), version=15, updated_by_user_name='mdreyer@vmware.com', user_name='pgifford@vmware.com', id='2a8ac0ba-c93d-4748-879f-7dc9918beaa5', display_name='VMC-SET', name='j13hqg73', sla='VMC_INTERNAL', project_state='CREATED', properties=OrgProperties(values={'defaultAwsRegions': 'US_WEST_2,US_EAST_1', 'sddcLimit': '5', 'planVersion': '3.0', 'defaultHostsPerSddc': '4', 'invitationCode': '/csp/gateway/slc/api/service-invitations/aa7203c3617bbe755597b8b0ad652', 'enableAWSCloudProvider': 'true', 'enableZeroCloudCloudProvider': 'true', 'accountLinkingOptional': 'false', 'defaultPDXDatacenter': 'pdx2', 'skipSubscriptionCheck': 'true', 'minHostsPerSddc': '4', 'maxHostsPerSddc': '8', 'hostLimit': '16', 'maxHostsPerSddcOnCreate': '4', 'isAllAccess': 'true', 'enabledAvailabilityZones': '{"us-east-1":["iad6","iad7","iad12"],"us-west-2":["pdx1", "pdx4", "pdx2"]}'}), cloud_configurations={'AWS': AwsOrgConfiguration(provider='AWS')})
168-
...]
169-
```
170-
171150
## Run SDK Samples
172151

173-
In this section we will walk you through the steps to run the sample code for vSphere
174-
and VMware Cloud on AWS APIs.
152+
In this section we will walk you through the steps to run the sample code for vSphere.
175153

176154
### First, set PYTHONPATH to use SDK helper methods
177155

178156
* Linux/Mac:
179157

180-
export PYTHONPATH=${PWD}:$PYTHONPATH
158+
export PYTHONPATH=\$\{PWD\}:\$PYTHONPATH
181159

182160
* Windows:
183161

184162
set PYTHONPATH=%cd%;%PYTHONPATH%
185163

186-
### Run VMware Cloud on AWS Samples
187-
188-
```cmd
189-
$ python samples/vmc/orgs/organization_operations.py -r <refresh_token>
190-
```
191-
192164
### Run vSphere Samples
193165

194166
A vSphere test environment is required with the following configuration:
@@ -209,7 +181,7 @@ Before executing the samples we'll need to setup the vSphere test environment us
209181
* Create a Distributed Switch
210182
* Create a Distributed Portgroup
211183
* Attach the NFS datastore (if Selected) to the hosts
212-
* Copy the [Photon OS](https://vmware.github.io/photon/) ISO image downloaded from [VMware's bintray server](https://dl.bintray.com/vmware/photon) to the datastore
184+
* Copy the [Photon OS](https://vmware.github.io/photon/) ISO image downloaded from [VMware's bintray server](https://github.com/vmware/photon/wiki/Downloading-Photon-OS#downloading-photon-os-50-ga) to the datastore
213185
* Create directories to add sample ports
214186

215187
First, edit settings in samples/vsphere/vcenter/setup/testbed.py and replace everything in < > brackets with your environment information. Leave the rest of the settings in this file at their default values.
@@ -260,27 +232,18 @@ $ python samples/vsphere/vcenter/vm/list_vms.py -v
260232
### vSphere API Documentation
261233

262234
* [VMware vSphere REST API Reference documentation](https://developer.broadcom.com/xapis/vsphere-automation-api/latest/)
263-
* [vSphere 8.0 U3 Python APIs (latest)](https://vmware.github.io/vsphere-automation-sdk-python/vsphere/8.0.3.0/)
264-
* Previous Releases: vSphere [8.0 U2](https://vmware.github.io/vsphere-automation-sdk-python/vsphere/8.0.2.0/)
265-
[8.0 U1](https://vmware.github.io/vsphere-automation-sdk-python/vsphere/8.0.1.0/)
266-
[8.0 GA](https://vmware.github.io/vsphere-automation-sdk-python/vsphere/8.0.0.1/)
235+
* Previous Releases:
236+
[8.0 U3](https://vmware.github.io/vsphere-automation-sdk-python/vsphere/8.0.3.0/),
237+
[8.0 U2](https://vmware.github.io/vsphere-automation-sdk-python/vsphere/8.0.2.0/),
238+
[8.0 U1](https://vmware.github.io/vsphere-automation-sdk-python/vsphere/8.0.1.0/),
239+
[8.0 GA](https://vmware.github.io/vsphere-automation-sdk-python/vsphere/8.0.0.1/),
267240
[8.0.0.0](https://vmware.github.io/vsphere-automation-sdk-python/vsphere/8.0.0.0/),
268-
[7.0 U3](https://vmware.github.io/vsphere-automation-sdk-python/vsphere/7.0.3.0/)
241+
[7.0 U3](https://vmware.github.io/vsphere-automation-sdk-python/vsphere/7.0.3.0/),
269242
[7.0 U2](https://vmware.github.io/vsphere-automation-sdk-python/vsphere/7.0.2.0/), [7.0 U1](https://vmware.github.io/vsphere-automation-sdk-python/vsphere/7.0.1.0/), [7.0](https://vmware.github.io/vsphere-automation-sdk-python/vsphere/7.0.0.1/).
270243

271-
### VMware Cloud on AWS API Documentation
272-
273-
* [VMware Cloud on AWS REST APIs](https://developer.broadcom.com/xapis/vmware-cloud-on-aws-api-reference/latest/)
274-
* [VMware Cloud on AWS Console Python APIs](https://vmware.github.io/vsphere-automation-sdk-python/vmc/index.html)
275-
* [VMware Cloud on AWS Disaster Recovery as a Service (DRaaS) Python APIs](https://vmware.github.io/vsphere-automation-sdk-python/vmc-draas/index.html)
276-
277244

278245
### NSX API Documentation
279-
* [NSX-T Data Center](https://docs.vmware.com/en/VMware-NSX-T-Data-Center/index.html)
280-
* [NSX Manager Python APIs](https://vmware.github.io/vsphere-automation-sdk-python/nsx/nsx/index.html) - API for managing NSX-T cluster and transport nodes for on-prem customers
281-
* [NSX Policy Python APIs](https://vmware.github.io/vsphere-automation-sdk-python/nsx/nsx_policy/index.html) - primary API for managing logical networks for on-prem customers
282-
* [NSX VMC Policy Python APIs](https://vmware.github.io/vsphere-automation-sdk-python/nsx/nsx_vmc_policy/index.html) - primary API for managing logical networks for VMC customers
283-
* [NSX VMC AWS Integration Python APIs](https://vmware.github.io/vsphere-automation-sdk-python/nsx/nsx_vmc_aws_integration/index.html) - API for managing AWS underlay networks for VMC customers
246+
* [VMware NSX-T Data Center REST API](https://developer.broadcom.com/xapis/nsx-t-data-center-rest-api/latest/)
284247

285248
## Troubleshooting
286249

@@ -307,9 +270,5 @@ Members:
307270

308271
## VMware Resources
309272

310-
* [vSphere Automation SDK Overview](http://pubs.vmware.com/vsphere-65/index.jsp#com.vmware.vapi.progguide.doc/GUID-AF73991C-FC1C-47DF-8362-184B6544CFDE.html)
311-
* [VMware Sample Exchange](https://code.vmware.com/samples) It is highly recommended to add any and all submitted samples to the VMware Sample Exchange
312-
* [VMware Code](https://code.vmware.com/home)
313-
* [VMware Developer Community](https://communities.vmware.com/community/vmtn/developer)
314273
* VMware vSphere [REST API Reference documentation](https://developer.broadcom.com/xapis/vsphere-automation-api/latest/).
315-
* [VMware Python forum](https://code.vmware.com/forums/7508/vsphere-automation-sdk-for-python)
274+
* [VMware Developer Community](https://community.broadcom.com/vmware-code/home)

lib/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1+
12
# SDK libraries
23

34
For python developers, client libraries are supplied for testing and development purposes. All the supplied libraries are located under lib directory.
45

56
Name | Description
67
------------------------------------| -------------
7-
vmwarecloud_aws | Client stubs for VMware Cloud on AWS Console APIs
8-
vmwarecloud_draas | Client stubs for VMware Cloud (VMC) Disaster Recovery as a Service (DRaaS) APIs
98
nsx-python-sdk | Client stubs for VMware NSX-T APIs
10-
nsx-vmc-policy-python-sdk | Client stubs for VMware NSX-T on VMC Policy APIs
11-
nsx-vmc-aws-integration-python-sdk | Client stubs for VMware NSX-T AWS integration app APIs (for AWS underlay management)
9+
nsx-policy-python-sdk | Client stubs for VMware NSX-T Policy APIs

lib/index.html

Lines changed: 0 additions & 13 deletions
This file was deleted.

lib/nsx-vmc-aws-integration-python-sdk/index.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

lib/nsx-vmc-policy-python-sdk/index.html

Lines changed: 0 additions & 1 deletion
This file was deleted.
Binary file not shown.
-132 KB
Binary file not shown.

0 commit comments

Comments
 (0)