Define a directory for NSX-T sample code. Add a basic
example that shows how to authenticate to VMC/NSX-T and
make a simple read call.
Signed-Off-By: Gordon Good <ggood@vmware.com>
There is an bug in the catch block where the exception didn't get
re-raised when cleanup is false. When something goes wrong, it's better
to leave the setup as is for dubugging. Thus removing the try/catch.
Signed-off-by: Tianhao He <het@vmware.com>
Updated VMware Cloud on AWS Console API bindings
Updated VMware Cloud on AWS SDDC API bindings
Added Compute Policy API bindings
Add compute Policy API samples
Remove doc folder. The API specs are hosted on gh-pages branch now. The API doc links can be found on the main README.
Signed-off-by: het <het@vmware.com>
Sample output:
VM ID VM Name
------- ----------------------------------------------------------
vm-35 vcenter
vm-50 nsx-manager
vm-51 Node-7c1f558c-d026-4e48-be2b-f0bb6e6c220f-NSX-controller-1
vm-52 Node-db8fda3f-f611-4631-a3ac-700ab6412ea0-NSX-controller-2
vm-53 Node-844750bc-0191-45da-9a0d-1f849de2ea08-NSX-controller-3
Signed-off-by: Tianhao He <het@vmware.com>
Adding a standalone list_sddc function, parameters to handle the
calling of whether or not the intended action be a list, create, and/or
delete method, added a standard output function to match what’s
available as part of the logical network example.
Not every logical switch contains DHCP IP Pool information. Removing
the DHCP column from being output.
Resolving the Following Error:
(VMWonAWSDemo) kruddy-m02:vsphere-automation-sdk-python kyleruddy$
python3 ./samples/vmc/networks/logical_network_crud.py -r $refreshtoken
-o $orgid -s $sddcid --network-name 'Python-SDK-LogicalNetwork' -c
# Example: Add a logical network to the compute gateway
Compute Gateway ID: edge-2
# New logical network "Python-SDK-LogicalNetwork" is added
# Example: List all logical networks
Traceback (most recent call last):
File "./samples/vmc/networks/logical_network_crud.py", line 208, in
<module>
main()
File "./samples/vmc/networks/logical_network_crud.py", line 201, in
main
logical_network_crud.get_logical_network()
File "./samples/vmc/networks/logical_network_crud.py", line 134, in
get_logical_network
self.print_output(networks)
File "./samples/vmc/networks/logical_network_crud.py", line 192, in
print_output
network.dhcp_configs.ip_pools[0].ip_range])
AttributeError: 'NoneType' object has no attribute 'ip_pools'