1
0
mirror of https://github.com/vmware/vsphere-automation-sdk-python.git synced 2024-11-21 17:29:59 -05:00
vsphere-automation-sdk-python/samples/vmc
Kyle Ruddy b8554584c2 Remove DHCP Column from Output
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'
2018-03-21 17:34:28 -04:00
..
helpers Add VMware Cloud on AWS APIs 2017-12-05 16:24:30 -08:00
networks Remove DHCP Column from Output 2018-03-21 17:34:28 -04:00
orgs VMware Cloud on AWS M3 release 2018-03-08 13:15:46 -08:00
sddc Add exception handling for sddc samples to get detailed error message 2018-03-13 17:35:12 -07:00
__init__.py Add VMware Cloud on AWS APIs 2017-12-05 16:24:30 -08:00
README.md VMware Cloud on AWS M3 release 2018-03-08 13:15:46 -08:00

Samples for VMware Cloud on AWS APIs (currently in preview)

The following table shows the sample sub-directories and their contents.

Directory Description
orgs Samples for operations on organizations
sddc Samples for operations on SDDCs
networks Samples for networking APIs
helpers Helper methods used by VMware Cloud on AWS API samples