Skip to content

Commit 0936957

Browse files
authored
Merge pull request #218 from anusha94/master
New bindings and samples for vSphere 7.0
2 parents 115787a + c34bd3d commit 0936957

29 files changed

+932
-230
lines changed

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ samples require the vSphere Management SDK packages (pyVmomi) to be installed on
2121
The samples have been developed to work with python 2.7.x and 3.3+
2222

2323
## Supported OnPrem vCenter Releases
24-
vCenter 6.0, 6.5 and 6.7.
24+
vCenter 6.0, 6.5, 6.7 and 7.0.
2525
Certain APIs and samples that are introduced in 6.5 release, such as vCenter, Virtual Machine and Appliance Management. Please refer to the notes in each sample for detailed compatibility information.
2626

2727
## Supported NSX-T Releases
28-
NSX-T 2.2, 2.3, 2.5, VMC 1.7
28+
NSX-T 2.2, 2.3, 3.0 and VMC 1.7, 1.8, 1.9
2929

3030
## VMware Cloud on AWS Support
3131
The VMware Cloud on AWS API and samples are currently available as a preview and are subject to change in the future.
@@ -214,16 +214,17 @@ $ python samples/vsphere/vcenter/vm/list_vms.py -v
214214
### vSphere API Documentation
215215

216216
* [VMware Cloud on AWS vSphere (latest version)](https://vmware.github.io/vsphere-automation-sdk-python/vsphere/cloud/index.html)
217-
* [vSphere 6.7.1 (latest)](https://vmware.github.io/vsphere-automation-sdk-python/vsphere/6.7.1/)
218-
* Previous releases: [6.7.0](https://vmware.github.io/vsphere-automation-sdk-python/vsphere/6.7.0) [6.6.1](https://vmware.github.io/vsphere-automation-sdk-python/vsphere/6.6.1) [6.5](https://vmware.github.io/vsphere-automation-sdk-python/vsphere/6.5) [6.0](https://vmware.github.io/vsphere-automation-sdk-python/vsphere/6.0)
217+
* [vSphere 7.0 (latest)](https://vmware.github.io/vsphere-automation-sdk-python/vsphere/7.0.0.1/)
218+
* Previous releases: [6.7.1](https://vmware.github.io/vsphere-automation-sdk-python/vsphere/6.7.1/) [6.7.0](https://vmware.github.io/vsphere-automation-sdk-python/vsphere/6.7.0) [6.6.1](https://vmware.github.io/vsphere-automation-sdk-python/vsphere/6.6.1) [6.5](https://vmware.github.io/vsphere-automation-sdk-python/vsphere/6.5) [6.0](https://vmware.github.io/vsphere-automation-sdk-python/vsphere/6.0)
219219

220220
### VMware Cloud on AWS API Documentation
221221

222222
* [VMware Cloud on AWS Console API](https://vmware.github.io/vsphere-automation-sdk-python/vmc/index.html)
223223
* [VMware Cloud on AWS Disaster Recovery as a Service (DRaaS) API](https://vmware.github.io/vsphere-automation-sdk-python/vmc-draas/index.html)
224224

225-
### NSX API Documentation
226225

226+
### NSX API Documentation
227+
* [NSX-T Data Center](https://docs.vmware.com/en/VMware-NSX-T-Data-Center/index.html)
227228
* [NSX Manager 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
228229
* [NSX Policy](https://vmware.github.io/vsphere-automation-sdk-python/nsx/nsx_policy/index.html) - primary API for managing logical networks for on-prem customers
229230
* [NSX VMC Policy](https://vmware.github.io/vsphere-automation-sdk-python/nsx/nsx_vmc_policy/index.html) - primary API for managing logical networks for VMC customers
@@ -240,7 +241,7 @@ Common issues you may run into while installing the sdk and running samples are
240241
Board members are volunteers from the SDK community and VMware staff members, board members are not held responsible for any issues which may occur from running of samples from this repository.
241242

242243
Members:
243-
* Tianhao He (VMware)
244+
* Anusha Hegde (VMware)
244245
* Pavan Bidkar (VMware)
245246

246247
## VMware Resources

lib/vapi-client-bindings/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<a href='vapi_client_bindings-3.2.0-py2.py3-none-any.whl'>vapi_client_bindings-3.2.0-py2.py3-none-any.whl</a><br />
1+
<a href='vapi_client_bindings-3.3.0-py2.py3-none-any.whl'>vapi_client_bindings-3.3.0-py2.py3-none-any.whl</a><br />
Binary file not shown.

lib/vapi-common-client/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<a href='vapi_common_client-2.14.0-py2.py3-none-any.whl'>vapi_common_client-2.14.0-py2.py3-none-any.whl</a><br />
1+
<a href='vapi_common_client-2.15.0-py2.py3-none-any.whl'>vapi_common_client-2.15.0-py2.py3-none-any.whl</a><br />
Binary file not shown.

lib/vapi-runtime/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<a href='vapi_runtime-2.14.0-py2.py3-none-any.whl'>vapi_runtime-2.14.0-py2.py3-none-any.whl</a><br />
1+
<a href='vapi_runtime-2.15.0-py2.py3-none-any.whl'>vapi_runtime-2.15.0-py2.py3-none-any.whl</a><br />
Binary file not shown.

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ lxml >= 4.3.0
22
pyVmomi >= 6.7
33
suds ; python_version < '3'
44
suds-jurko ; python_version >= '3.0'
5-
vapi-client-bindings == 3.2.0
5+
vapi-client-bindings == 3.3.0
66
vmc-client-bindings
77
nsx-python-sdk
88
nsx-policy-python-sdk

samples/vsphere/vcenter/converge/converge_sample.py

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

samples/vsphere/vcenter/converge/decommission_sample.py

Lines changed: 0 additions & 110 deletions
This file was deleted.
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
This directory contains samples for the Discovery and Plan APIs. Discovery and Plan is a new feature for the VCSA. VMware Discovery and Plan solution consists of vSphere, vSAN, esx, drivers frimware, 2nd party products (NSX, VRA, ETC) and 3rd party products. Though it's a tightly integrated software stack, it's complex process to patch software for Clusters, including ESXi hosts and vCenter.
2+
3+
For more information, please review the official release notes.
4+
5+
Discovery and Plan having the followings APIs:
6+
* Discovery: Provides the user options to choose from, to add VMware products manually
7+
* Report: To download the report generated by the interop, precheck, etc operations.
8+
* Update client: Listing all available updates and upgrades for the products installed in the user( at the Moment we only do it for ESX and vCenter). Later on the user can select one of the patches available and can plan an actual patch or upgrade for the selected version.
9+
10+
Overview of the directory code samples:
11+
12+
* discovery_sample.py - running a simple workflow to discover the products . It's having below APIs.
13+
GET https://{server}/lcm/rest/vcenter/lcm/discovery/product-catalog
14+
GET https://{server}/lcm/rest/vcenter/lcm/discovery/associated-products
15+
POST https://{server}/lcm/rest/vcenter/lcm/discovery/associated-products. Create spec as below.
16+
CreateSpec {
17+
/**
18+
* The name of the product.
19+
*/
20+
String productName;
21+
22+
/**
23+
* Current product version.
24+
*/
25+
String version;
26+
27+
/**
28+
* The list of hostname/IPs of the instances of the VMware products
29+
* deployed in the customer environment.
30+
*/
31+
Optional<List<String>> deployments;
32+
}
33+
GET https://{server}/lcm/rest/vcenter/lcm/discovery/associated-products/{product-id}
34+
PATCH https://{server}/lcm/rest/vcenter/lcm/discovery/associated-products/{product-id}. Update spec as below.
35+
UpdateSpec {
36+
/**
37+
* The list of hostname/IPs of the instances of the VMware products
38+
* deployed in the customer environment.
39+
*/
40+
Optional<List<String>> deployments;
41+
42+
}
43+
DELETE https://{server}/lcm/rest/vcenter/lcm/discovery/associated-products/{product-id}
44+
* lcm_sample.py - running a simple workflow to download report.
45+
GET https://{server}/lcm/rest/vcenter/lcm/reports/{report}
46+
* update_sample.py - running a simple workflow to find updates and upgrades
47+
GET https://{server}/lcm/rest/vcenter/lcm/update/pending
48+
GET https://{server}/lcm/rest/vcenter/lcm/update/pending/{version}
49+
POST https://{server}/rest/vcenter/lcm/update/pending/{version}/pre-upgrade-checks
50+
51+
To view the available command-line options:
52+
53+
$ python discovery_sample.py --help
54+
$ python lcm_sample.py --help
55+
$ python update_sample.py --help
56+
57+
Running the samples:
58+
59+
$ python discovery_sample.py --server <vCenter Server IP> --username <username> --password <password> --skipverification
60+
$ python lcm_sample.py --server <vCenter Server IP> --username <username> --password <password> --skipverification
61+
$ python update_sample.py --server <vCenter Server IP> --username <username> --password <password> --skipverification
62+
63+
64+
Testbed Requirement:
65+
66+
* 1 vCenter Server appliance version 7.0 or above are supported.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
"""
2+
* *******************************************************
3+
* Copyright VMware, Inc. 2019. All Rights Reserved.
4+
* SPDX-License-Identifier: MIT
5+
* *******************************************************
6+
*
7+
* DISCLAIMER. THIS PROGRAM IS PROVIDED TO YOU "AS IS" WITHOUT
8+
* WARRANTIES OR CONDITIONS OF ANY KIND, WHETHER ORAL OR WRITTEN,
9+
* EXPRESS OR IMPLIED. THE AUTHOR SPECIFICALLY DISCLAIMS ANY IMPLIED
10+
* WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY,
11+
* NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
12+
"""
13+
14+
15+
__author__ = 'VMware, Inc.'
16+
__copyright__ = 'Copyright 2019 VMware, Inc. All rights reserved.'
17+
18+
19+
# Required to distribute different parts of this
20+
# package as multiple distribution
21+
try:
22+
import pkg_resources
23+
pkg_resources.declare_namespace(__name__)
24+
except ImportError:
25+
from pkgutil import extend_path
26+
__path__ = extend_path(__path__, __name__) # @ReservedAssignment

0 commit comments

Comments
 (0)