mirror of
https://github.com/vmware/vsphere-automation-sdk-python.git
synced 2024-11-22 01:39:58 -05:00
remove bin directory
This commit is contained in:
parent
58b044feec
commit
ade24a262f
18
README.md
18
README.md
@ -70,11 +70,15 @@ Please have the details of these available but do not have any configuration pre
|
||||
### Running the SDK Sample Setup Script
|
||||
Before executing the samples we'll need to setup the vSphere test environment using one of the sample scripts. Before we run the script we'll need to edit one of the files and provide IP addresses for the various machine instances.
|
||||
|
||||
First, from the command line change to the SDK ./bin folder.
|
||||
First, set PYTHONPATH to use SDK helper methods
|
||||
|
||||
```cmd
|
||||
$ cd /path/to/vsphere-automation-sdk-python-samples/bin
|
||||
```
|
||||
* Linux/Mac:
|
||||
|
||||
export PYTHONPATH=${PWD}:$PYTHONPATH
|
||||
|
||||
* Windows:
|
||||
|
||||
set PYTHONPATH=%cd%;%PYTHONPATH%
|
||||
|
||||
Next, using a text editor open ../samples/vsphere/vcenter/setup/testbed.py and edit the following settings replace everything in < > brackets with your environment information. Leave the rest of the settings in this file at their default values.
|
||||
|
||||
@ -114,13 +118,13 @@ This script will perform the following:
|
||||
**To view the available command-line options:**
|
||||
|
||||
```cmd
|
||||
$ ./run_sample.sh ../samples/vsphere/vcenter/setup/main.py -h
|
||||
$ python ../samples/vsphere/vcenter/setup/main.py -h
|
||||
```
|
||||
|
||||
**To run the setup script:**
|
||||
|
||||
```cmd
|
||||
$ ./run_sample.sh ../samples/vsphere/vcenter/setup/main.py -sv
|
||||
$ python ../samples/vsphere/vcenter/setup/main.py -sv
|
||||
```
|
||||
|
||||
After completion you will see from the output and also the vSphere Webclient that the environment has now been fully setup and is ready to easily run further samples.
|
||||
@ -131,7 +135,7 @@ This SDK includes a sample script which can be used to perform a number of actio
|
||||
**Run the vAPI vCenter sample suite:**
|
||||
|
||||
```cmd
|
||||
$ ./run_sample.sh ../samples/vsphere/vcenter/setup/main.py -riv
|
||||
$ python ../samples/vsphere/vcenter/setup/main.py -riv
|
||||
```
|
||||
|
||||
## API Documentation
|
||||
|
@ -1,11 +0,0 @@
|
||||
@echo off
|
||||
setlocal ENABLEDELAYEDEXPANSION
|
||||
:: Clear the command-prompt screen
|
||||
cls
|
||||
set SRCDIR=%cd%\..\
|
||||
set LIBDIR=%cd%\..\lib
|
||||
set PYTHONPATH=%PYTHONPATH%;%SRCDIR%
|
||||
setlocal DisableDelayedExpansion
|
||||
:: Run the sample
|
||||
python %*
|
||||
endlocal
|
@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
SCRIPTDIR=`dirname $0`
|
||||
cd $SCRIPTDIR
|
||||
PATHDIR=`pwd`
|
||||
PROJECT_ROOT=$PATHDIR/..
|
||||
SRCDIR=$PROJECT_ROOT/
|
||||
LIBDIR=$PROJECT_ROOT/lib
|
||||
|
||||
# add the src directory to the python path
|
||||
export PYTHONPATH=$PYTHONPATH:$SRCDIR
|
||||
|
||||
# run the sample
|
||||
python $@
|
@ -10,8 +10,7 @@ This directory contains samples for Content Library APIs:
|
||||
|
||||
Running the samples
|
||||
|
||||
$ cd /path/to/vsphere-automation-sdk-python-samples/bin
|
||||
$ ./run_sample.sh ../samples/vsphere/contentlibrary/<sample-dir>/<sample>.py --server <vCenter Server IP> --username <username> --password <password> <additional-sample-parameters>
|
||||
$ python <sample-dir>/<sample>.py --server <vCenter Server IP> --username <username> --password <password> <additional-sample-parameters>
|
||||
|
||||
The additional sample parameters are as follows (all parameters can be displayed for any sample using option --help)
|
||||
|
||||
|
@ -7,8 +7,7 @@ for accessing the lookup service. The Lookup Service WSDL files are located in w
|
||||
|
||||
Running the samples
|
||||
```cmd
|
||||
$ cd /path/to/vsphere-automation-sdk-python-samples/bin
|
||||
$ ./run_sample.sh ../samples/vsphere/sso/external_psc_sso_workflow.py --lsurl https://<server>/lookupservice/sdk -u 'administrator@vsphere.local' -p 'Admin!23' -v
|
||||
$ python external_psc_sso_workflow.py --lsurl https://<server>/lookupservice/sdk -u 'administrator@vsphere.local' -p 'Admin!23' -v
|
||||
```
|
||||
* Testbed Requirement:
|
||||
- 1 vCenter Server
|
||||
|
@ -2,8 +2,7 @@ This directory contains samples for Tagging APIs:
|
||||
|
||||
Running the samples
|
||||
|
||||
$ cd /path/to/vsphere-automation-sdk-python-samples/bin
|
||||
$ ./run_sample.sh ../samples/vsphere/tagging/tagging_workflow.py --server <vCenter Server IP> --username <username> --password <password> --clustername <clustername> --categoryname <categoryname> --categorydesc <categorydesc> --tagname <tagname> -tagdesc <tagdesc> -v
|
||||
$ python tagging_workflow.py --server <vCenter Server IP> --username <username> --password <password> --clustername <clustername> --categoryname <categoryname> --categorydesc <categorydesc> --tagname <tagname> -tagdesc <tagdesc> -v
|
||||
|
||||
* Testbed Requirement:
|
||||
- 1 vCenter Server
|
||||
|
@ -8,8 +8,8 @@ This directory contains samples for the vSphere infrastructure and virtual machi
|
||||
|
||||
* with the testbed settings specified in testbed.py in a Linux machine:
|
||||
|
||||
$ ./run_sample.sh ../samples/vsphere/vcenter/vm/create/create_default_vm.py -v
|
||||
$ python samples/vsphere/vcenter/vm/create/create_default_vm.py -v
|
||||
|
||||
* Or specify the credentials using command line parameters:
|
||||
|
||||
$ ./run_sample.sh ../samples/vsphere/vcenter/vm/create/create_default_vm.py -s \<server> -u \<username> -p \<password> -v
|
||||
$ python samples/vsphere/vcenter/vm/create/create_default_vm.py -s <server> -u <username> -p <password> -v
|
||||
|
Loading…
Reference in New Issue
Block a user