| Class | Description |
|---|---|
| Browser |
Browser
This sample prints managed entity, its type, reference value,
property name, Property Value, Inner Object Type, its Inner Reference Value
and inner property value
Parameters:
url [required] : url of the web service
username [required] : username for the authentication
password [required] : password for the authentication
Command Line:
run.bat com.vmware.general.Browser --url [webserviceurl]
--username [username] --password [password]
|
| Connect |
Connect
This sample simply connects to an ESX server or to vCenter server
Parameters:
url [required] : url of the web service
username [required] : username for the authentication
password [required] : password for the authentication
Command Line:
run.bat com.vmware.general.Connect --url [webserviceurl]
--username [username] --password [password]
|
| Create |
Create
This sample creates managed entity like Host-Standalone Cluster
Datacenter, and folder
Parameters:
url [required] : url of the web service
username [required] : username for the authentication
password [required] : password for the authentication
parentname [required] : specifies the name of the parent folder
itemtype [required] : Type of the object to be added
e.g.
|
| Delete |
Delete
This sample deletes the specified managed entity from the inventory tree
The managed entity can be a virtual machine, ClusterComputeResource or a Folder
Parameters
url [required] : url of the web service
username [required] : username for the authentication
password [required] : password for the authentication
entityname [required] : Virtual Machine|ClusterComputeResource|Folder
Command Line:
To delete a folder named 'testFolder'
run.bat com.vmware.general.Delete --url [webserviceurl]
--username [username] --password [password] --entityname [testFolder]
To delete a datacenter named myData
run.bat com.vmware.general.Delete --url [webserviceurl]
--username [username] --password [password] --entityname [myData]
|
| GetCurrentTime |
GetCurrentTime
This sample gets the current time of the vSphere Server
Parameters:
url [required] : url of the web service
username [required] : username for the authentication
password [required] : password for the authentication
Command Line:
run.bat com.vmware.general.GetCurrentTime
--url [webservicesurl] --username [Username] --password [password]
|
| GetHostName |
GetHostName
This sample gets the hostname and additional details of the ESX Servers
in the inventory
Parameters:
url [required] : url of the web service
username [required] : username for the authentication
password [required] : password for the authentication
Command Line:
run.bat com.vmware.general.GetHostName
--url [webservicesurl] --username [username] --password [password]
|
| GetUpdates |
GetUpdates
This sample demonstrates how to use the PropertyCollector to monitor one or more
properties of one or more managed objects.
|
| Info |
Demonstrates how to use the AboutInfo object to find out more about the
vSphere WS API end-point you are currently connected to.
|
| LicenseManager |
LicenseManager
Demonstrates uses of the Licensing API using License Manager
Reference.
|
| Move |
Move
This sample moves a managed entity from its current
location in the inventory to a new location, in a specified folder.
|
| PropertyCollector |
PropertyCollector
This sample illustrates the property collector features added in version 4.1
Parameters:
url [required] : url of the web service.");
username [required] : username for the authentication");
password [required] : password for the authentication");
extension [required] : Extension to be demonstrated [retrieveproperties |
updates | filterspec | propertycollector]
vmname [optional] : Name of the virtual machine
maxobjects [optional] : The maximum number of ObjectContent data objects
that should be returned in a single result
updatetype [optional] : waitforupdates | checkforupdates| extension
nooftasks [optional] : Number of tasks to be created
Command Line:
Retrieve Properties Extension
run.bat com.vmware.general.PropertyCollector --url [webserviceurl]
--username [username] --password [password] --extension retrieveproperties
--maxobjects [maxobjects]
Updates Extension
run.bat com.vmware.general.PropertyCollector --url [webserviceurl]
--username [username] --password [password] --extension updates
--vmname [vm name] --updatetype [waitforupdates | checkforupdates| extension]
Filter Spec Extension
run.bat com.vmware.general.PropertyCollector --url [webserviceurl]
--username [username] --password [password] --extension filterspec
--vmname [vm name] --noofTasks [Number of tasks to be created]
Property Collector Extension
run.bat com.vmware.general.PropertyCollector --url [webserviceurl]
--username [username] --password [password] --extension propertycollector
|
| RemoveManagedObject |
This sample demonstrates Destroy or Unregister
Managed Inventory Object like a Host, VM, Folder, etc
Parameters:
url [required] : url of the web service
username [required] : username for the authentication
password [required] : password for the authentication
objtype [required] : type of managedobject to remove or unregister");
e.g.
|
| Rename |
Rename
This sample demonstrates renaming a manged entity
Parameters:
url [required] : url of the web service
username [required] : username for the authentication
password [required] : password for the authentication
entityname [required] : name of the inventory object - a managed entity
newname [required] : new name of the inventory object - a managed entity
Command Line:
Rename a virtual machine VM to new name VM2
run.bat com.vmware.general --url [webserviceurl]
--username [username] --password [password] --entityname VM
--newname VM2
Rename a resource pool named Rp to new name pool
java com.vmware.general --url [webserviceurl]
--username [username] --password [password] --entityname Rp
--newname pool
|
| SearchIndex |
SearchIndex
This sample demonstrates the SearchIndex API
Parameters:
url [required] : url of the web service
username [required] : username for the authentication
password [required] : password for the authentication
dcname [required] : name of the datacenter
vmdnsname [optional] : Dns of a virtual machine
hostdnsname [optional] : Dns of the ESX host
vmpath [optional] : Inventory path of a virtual machine
vmip [optional] : IP Address of a virtual machine
Command Line:
Run the search index with dcName myDatacenter
run.bat com.vmware.general.SearchIndex --url [webserviceurl]
--username [username] --password [password] --dcName myDatacenter
Run the search index with dcName myDatacenter and vmpath to virtual machine named Test
run.bat com.vmware.general.SearchIndex --url [webserviceurl]
--username [username] --password [password] --dcName myDatacenter
--vmpath //DatacenterName//vm//Test
Run the search index with dcName myDatacenter and hostdns 'abc.bcd.com'
run.bat com.vmware.general.SearchIndex --url [webserviceurl]
--username [username] --password [password]
--dcName myDatacenter --hostDns abc.bcd.com
Run the search index with dcName myDatacenter and ip of the vm as 111.123.155.21
run.bat com.vmware.general.SearchIndex --url [webserviceurl]
--username [username] --password [password]
--dcName myDatacenter --vmIP 111.123.155.21
|
| SimpleClient |
SimpleClient
This sample lists the inventory contents (managed entities)
Parameters:
url [required] : url of the web service
username [required] : username for the authentication
password [required] : password for the authentication
Command Line:
run.bat com.vmware.general.SimpleClient
--url [webserviceurl] --username [username] --password [password]
|
| TaskList |
TaskList
This sample prints out a list of tasks if any are running
The sample display the tasks in the following format:
Operation:
Name:
Type:
State:
Error:
Parameters:
url [required] : url of the web service
username [required] : username for the authentication
password [required] : password for the authentication
Command Line:
run.bat com.vmware.general.TaskList --url [webserviceurl]
--username [username] --password [password]
|