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

remove bin directory

This commit is contained in:
Tianhao He 2017-08-16 22:40:55 -07:00
parent 58b044feec
commit ade24a262f
7 changed files with 16 additions and 39 deletions

View File

@ -70,11 +70,15 @@ Please have the details of these available but do not have any configuration pre
### Running the SDK Sample Setup Script ### 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. 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 * Linux/Mac:
$ cd /path/to/vsphere-automation-sdk-python-samples/bin
``` 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. 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:** **To view the available command-line options:**
```cmd ```cmd
$ ./run_sample.sh ../samples/vsphere/vcenter/setup/main.py -h $ python ../samples/vsphere/vcenter/setup/main.py -h
``` ```
**To run the setup script:** **To run the setup script:**
```cmd ```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. 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:** **Run the vAPI vCenter sample suite:**
```cmd ```cmd
$ ./run_sample.sh ../samples/vsphere/vcenter/setup/main.py -riv $ python ../samples/vsphere/vcenter/setup/main.py -riv
``` ```
## API Documentation ## API Documentation

View File

@ -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

View File

@ -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 $@

View File

@ -10,8 +10,7 @@ This directory contains samples for Content Library APIs:
Running the samples Running the samples
$ cd /path/to/vsphere-automation-sdk-python-samples/bin $ python <sample-dir>/<sample>.py --server <vCenter Server IP> --username <username> --password <password> <additional-sample-parameters>
$ ./run_sample.sh ../samples/vsphere/contentlibrary/<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) The additional sample parameters are as follows (all parameters can be displayed for any sample using option --help)

View File

@ -7,8 +7,7 @@ for accessing the lookup service. The Lookup Service WSDL files are located in w
Running the samples Running the samples
```cmd ```cmd
$ cd /path/to/vsphere-automation-sdk-python-samples/bin $ python external_psc_sso_workflow.py --lsurl https://<server>/lookupservice/sdk -u 'administrator@vsphere.local' -p 'Admin!23' -v
$ ./run_sample.sh ../samples/vsphere/sso/external_psc_sso_workflow.py --lsurl https://<server>/lookupservice/sdk -u 'administrator@vsphere.local' -p 'Admin!23' -v
``` ```
* Testbed Requirement: * Testbed Requirement:
- 1 vCenter Server - 1 vCenter Server

View File

@ -2,8 +2,7 @@ This directory contains samples for Tagging APIs:
Running the samples Running the samples
$ cd /path/to/vsphere-automation-sdk-python-samples/bin $ python tagging_workflow.py --server <vCenter Server IP> --username <username> --password <password> --clustername <clustername> --categoryname <categoryname> --categorydesc <categorydesc> --tagname <tagname> -tagdesc <tagdesc> -v
$ ./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
* Testbed Requirement: * Testbed Requirement:
- 1 vCenter Server - 1 vCenter Server

View File

@ -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: * 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: * 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