1
0
mirror of https://github.com/vmware/vsphere-automation-sdk-python.git synced 2024-11-27 03:30:00 -05:00
vsphere-automation-sdk-python/samples/vsphere/vcenter/README.md

16 lines
986 B
Markdown
Raw Normal View History

2017-01-24 20:24:49 -05:00
This directory contains samples for the vSphere infrastructure and virtual machine APIs. You have two options to run samples inside this package:
2017-01-24 20:10:03 -05:00
2017-01-24 20:23:27 -05:00
* Run all samples under vcenter folder using main.py in samples.vsphere.vcenter.setup package. Please see the [README](../../../README.md#running-a-complex-sample) for more details.
2017-01-24 20:10:03 -05:00
2017-01-24 20:29:00 -05:00
* Run an individual sample in an existing environment. You can either pass the environment parameters through command line arguments or specify them in testbed.py in the setup package.
2017-01-24 20:23:27 -05:00
For example, to run the create_default_vm sample in the vsphere.samples.vcenter.vm.create package:
2017-01-24 20:10:03 -05:00
2017-01-24 20:23:27 -05:00
* with the testbed settings specified in testbed.py in a Linux machine:
2017-01-24 20:10:03 -05:00
2017-01-24 20:23:27 -05:00
$ ./run_sample.sh ../samples/vsphere/vcenter/vm/create/create_default_vm.py -v
2017-01-24 20:10:03 -05:00
2017-01-24 20:23:27 -05:00
* Or specify the credentials using command line parameters:
2017-01-24 20:10:03 -05:00
2017-01-24 20:25:28 -05:00
$ ./run_sample.sh ../samples/vsphere/vcenter/vm/create/create_default_vm.py -s \<server> -u \<username> -p \<password> -v