3.0
Table Of Contents
- SOAP API Guide
- Contents
- About This Book
- 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
Lab Manager SOAP API Guide
56 VMware, Inc.
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";
binding.AuthenticationHeaderValue.organizationname = "MyOrg";
binding.Url =
"https://demo18.LabManager.com/LabManager/SOAP/LabManager.asmx";
binding.Timeout = 10 * 60 * 1000; // 10 minutes
ServicePointManager.CertificatePolicy = new CertificateAccepter();
//** Get Configuration object
LabManagerSoap.Configuration Config =
binding.GetSingleConfigurationByName("Win2kBEA");
//** If configuration is deployed, livelink it
if (Config.isDeployed)
{
string captureName= "Win2kBEA" + DateTime.Now.ToString();
string url = binding.LiveLink(Config.name);
Console.WriteLine("LiveLink URL="+url);
Console.ReadLine();
}
}
catch (Exception e)
{
Console.WriteLine("Error="+e.Message);
Console.ReadLine();
}
MachinePerformAction
Thismethodperformsoneofthefollowingmachineactionsasindicatedbytheaction
identifier:
1–Poweron.Turnsonamachine.
2–Poweroff.Turnsoffamachine.Nothingissaved.
3–Suspend.FreezesamachineCPUandstate.
4–Resume.Resumesasuspendedmachine.