Hello Vcloud: A Structured Workflow Example - VMware VCLOUD SDK 1.0 - FOR PHP DEVELOPERS GUIDE Manual

Vcloud sdk for php developer’s guide
Hide thumbs Also See for VCLOUD SDK 1.0 - FOR PHP DEVELOPERS GUIDE:
Table of Contents

Advertisement

3
Hello vCloud: A Structured Workflow
Example
This chapter presents an example of using the vCloud SDK for PHP to implement a structured workflow 
through the lifecycle of a vApp.
The helloVCloud.php example, included in the samples folder of the SDK, demonstrates these operations 
supported by the vCloud SDK for PHP:
Logging in to a vCloud organization
Browsing the organization to find a vDC and a catalog
Instantiating a vApp template from the catalog to create a vApp
Operating the vApp
Logging out
Like all example the programs, helloVCloud.php is liberally commented. Read the comments for more 
information about how this example uses the features of the vCloud SDK for PHP. Unlike the other example 
programs, helloVCloud.php does not read its runtime options from the file config.php. You must supply 
runtime options on the command line. To see a summary of helloVCloud.php options, use the following 
command:
php helloVCloud.php --help
To run the helloVCloud.php example, use the following command:
php helloVCloud.php -s
=vdcName
=catalogName
-d
-g
The following options are required:
server is the hostname or IP address of a vCloud Director server.
username is the name of a vCloud Director user, in the form user@vcloudOrganization, who has rights to 
create and operate vApps.
password is the user's password.
The following options are optional:
config is a set of HTTP connection parameters in the form of a PHP array. If you omit this option, 
helloVCloud.php accepts any server certificate. The following specification of config enables certificate 
validation, using a certificate stored in /tmp/cert.crt:
-c='ssl_verify_peer=>true, ssl_verify_host=>true, ssl_cafile=>/tmp/cert.crt'
orgName is the name of the organization to which the user is authenticating.
vdcName is the name of a vDC in that organization where the user can instantiate and deploy the vApp.
catalogName is the name of a catalog in the user's organization.
VMware, Inc.
server
-u
user@vcloudOrganization
=item
=vAppName
-i
-a
-p
password
-c
config
-o
3
=orgName
15

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the VCLOUD SDK 1.0 - FOR PHP DEVELOPERS GUIDE and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Vcloud sdk 1.0

Table of Contents