4.0

Table Of Contents
VMware, Inc. 25
Chapter 4 Lab Manager API Method Reference
ConfigurationCheckout
Thismethodchecksoutaconfigurationfromthelibraryandmovesittotheworkspaceunderadifferentname.
Syntax
int result = ConfigurationCheckout(7, “Config7May10”);
Arguments
Response
C# Sample Code
try
{
//
//** LMSoap is the name of the Web reference in Visual Studio.
//
LabManagerSoap.LabManagerSOAPinterface binding = new
LabManagerSoap.LabManagerSOAPinterface();
//
//** Create login
//
binding.AuthenticationHeaderValue = new
LabManagerSoap.AuthenticationHeader();
binding.AuthenticationHeaderValue.username = "jaya";
binding.AuthenticationHeaderValue.password = "Lab Manager";
binding.AuthenticationHeaderValue.organizationname = "MyOrg";
binding.AuthenticationHeaderValue.workspacename = "MyWorkspace";
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());
Field Data Type Description
configurationID int Numericidentifieroftheconfigurationintheconfiguration
library.
workspaceName string Thecheckedoutconfigurationname.
Field Data Type Description
configurationID int Numericidentifieroftheconfigurationintheworkspace.