User`s guide
Table 4-1. Summary of Example Programs and Required Permissions (Continued)
Example Name Description Required Permissions
createprovidervdc.php
Creates a provider vDC from vSphere
resources.
System Administrator.
importvm.php
Imports a virtual machine from
vCenter to create a vApp in the
specified vDC.
System Administrator.
host.php
Prepares an ESX/ESXi host for use
with vCloud Director.
System Administrator.
vimserver.php
Register, unregister, enable, or disable
a vCenter server for use with vCloud
Director.
System Administrator.
recomposevapp.php
Add a virtual machine from a
vAppTemplate to an existing vApp.
System Administrator.
query.php
Use the query service. System Administrator.
callout.php
Use notifications and blocking tasks. System Administrator.
enableblockingtasks.php
Enable or disable blocking tasks. System Administrator.
edgegatewaycrud.php
Create, retrieve, update, or delete an
edge gateway.
System Administrator.
externalnetworkcrud.php
Create, retrieve, update, or delete an
external network.
System Administrator.
networkpoolcrud.php
Create, retrieve, update, or delete a
network pool.
System Administrator.
providervdccrud.php
Create, retrieve, update, or delete a
provider vDC.
System Administrator.
This chapter includes the following topics:
n
“Running the HellovCloud Example,” on page 28
n
“Understanding the HellovCloud Example,” on page 29
n
“Run the Other Example Programs,” on page 30
Running the HellovCloud Example
The hellovcloud.php example program, included in the samples folder of the SDK, demonstrates a number of
the operations that the vCloud SDK for PHP supports.
The hellovcloud.php example demonstrates the following operations:
n
Logging in to the cloud and getting an organization list
n
Finding a vDC and a catalog
n
Uploading an OVF package to create a vApp template in the catalog
n
Instantiating the vApp template to create a vApp
n
Operating the vApp
Like all of the example programs in this SDK, hellovcloud.php is liberally commented. Read the comments
for more information about how this example uses the features of the SDK to implement a structured workflow
through the lifecycle of a vApp.
Procedure
1 Open a console or shell in the samples folder.
vCloud SDK for PHP Developer's Guide
28 VMware, Inc.