1
0
mirror of https://github.com/vmware/vsphere-automation-sdk-python.git synced 2024-11-22 09:39:58 -05:00
Commit Graph

3 Commits

Author SHA1 Message Date
Tianhao He
4959e85281 add expose vm to public internet sample
Sample execution output:

/Users/het/virenv/py36/bin/python /Users/het/github/vsphere-automation-sdk-python/samples/vmc/networks/expose_public_ip.py -r <refreh_token> -o <org_id> -s <sddc_id> --i <private_ip> -c

Wait for task ff09bd7b-22bd-439f-b4cd-154c270a5937 to finish
Checking task status every 2 seconds
Estimated time remaining: -1 minutes

Task ff09bd7b-22bd-439f-b4cd-154c270a5937 finished successfully

 # New firewall rule "Sample firewall rule 100" is added

 # New NAT rule "Sample NAT rule 72" is added

Signed-off-by: Tianhao He <het@vmware.com>
2018-04-23 19:02:20 -07:00
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
Tianhao He
aae89a9af0 VMware Cloud on AWS M3 release
* Support VMware Cloud on AWS Networking APIs and add a few samples.
* Added vsphere_client module to simplify login and API invocation.
* Modified existing samples to use vsphere_client.
* Update on vm template APIs.

Signed-off-by: Tianhao He <het@vmware.com>
2018-03-08 13:15:46 -08:00