2.5
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
VMware, Inc. 37
Chapter 4 Lab Manager API Method Reference
Sample Code: C#
try
{
//
//** LMSoap is the name of the Web reference in Visual Studio.
//
LabManagerSoap.VMwareLabManagerSOAPinterface binding = new
LabManagerSoap.VMwareLabManagerSOAPinterface();
//
//** Create login
//
binding.AuthenticationHeaderValue = new
LabManagerSoap.AuthenticationHeader();
binding.AuthenticationHeaderValue.username = "jaya";
binding.AuthenticationHeaderValue.password = "Lab Manager";
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("Win2K3Exchange");
int configurationId = Config.id;
//
//** Timestamp library configuration name as new Workspace name
//
string checkoutName=Config.name + DateTime.Now.ToString();
//
//** Check out and move to Workspace
//
int newConfigID = binding.ConfigurationCheckout(Config.id,
checkoutName);
Console.WriteLine("New Config ID=" + newConfigID.ToString());
Console.ReadLine();
}
catch (Exception e)
{
Console.WriteLine("Error="+e.Message);
Console.ReadLine();
}