2.4
Table Of Contents
- VMware® Lab Manager SOAP API Guide
- Contents
- Preface
- Introducing VMware Lab Manager SOAP API
- Getting Started with the Lab Manager SOAP API
- Lab Manager API Data Types
- Lab Manager API Method Reference
- ConfigurationCapture
- ConfigurationCheckout
- ConfigurationClone
- ConfigurationDelete
- ConfigurationDeploy
- ConfigurationPerformAction
- ConfigurationSetPublicPrivate
- ConfigurationUndeploy
- GetConfiguration
- GetConfigurationByName
- GetMachine
- GetMachineByName
- GetSingleConfigurationByName
- ListConfigurations
- ListMachines
- LiveLink
- MachinePerformAction
- Index
VMware, Inc. 41
Chapter 4 Lab Manager API Method Reference
Sample Code: C#
try
{
LabManagerSoap.VMwareLabManagerSOAPinterface binding = new
LabManagerSoap.VMwareLabManagerSOAPinterface();
//** Create login
binding.AuthenticationHeaderValue = new
LabManagerSoap.AuthenticationHeader();
binding.AuthenticationHeaderValue.username = "jaya";
binding.AuthenticationHeaderValue.password = "Lab Manager";
ServicePointManager.CertificatePolicy = new CertificateAccepter();
//** Get Configuration object
LabManagerSoap.Configuration Config =
binding.GetSingleConfigurationByName("Config24");
//** Get configuration identifier and deployed status from object
int configurationId = Config.id;
bool deployed = Config.isDeployed;
//** Deploy configuration if it isn’t already.
if (!deployed)
{
//** Deploy in fenced mode and run from Managed Servers
binding.ConfigurationDeploy(configurationId, true, 1);
}
}
catch (Exception e)
{
Console.WriteLine("Error: " + e.Message);
Console.ReadLine();
}
ConfigurationPerformAction
Thismethodperformsoneofthefollowingconfigurationactionsasindicatedbythe
actionidentifier:
1—PowerOn.Turnsonaconfiguration.
2—PowerOff.Turnsoffaconfiguration.Nothingissaved.
3—Suspend.FreezestheCPUandstateofaconfiguration.
4—Resume.Resumesasuspendedconfiguration.
5—Reset.Rebootsaconfiguration.
6—Snapshot.Savesaconfigurationstateataspecificpointintime.