2.4

Table Of Contents
VMware, Inc. 25
Chapter 2 Getting Started with the Lab Manager SOAP API
//** name it(configname)
//
int newCheckoutID = binding.ConfigurationCheckout(config.id,
configname);
Console.WriteLine("Deploy configuratioin "+ srcconfig);
//
//** Deploy Configuration
//** false = Do not run images from Managed Server
//** 1 = Fenced mode, traffic blocked in and out
//
binding.ConfigurationDeploy(newCheckoutID, false, 1);
Console.WriteLine("Deploy is completed");
return configname;
}
///<summary>
/// The CaptureUndeployConfiguration() method saves the configuration
/// to the Lab Manager Library and un-deploys it from the workspace.
///</summary>
static void CaptureUndeployConfiguration(string configname)
{
//
//** Bind to Lab Manager SOAP Web Service
//
LabManagerSoap.VMwareLabManagerSOAPinterface binding = GetLMAPI();
LabManagerSoap.Configuration config =
binding.GetSingleConfigurationByName(configname);
if ( perform_capture.Equals("Yes") )
{
Console.WriteLine("Capture configuration "+ configname);
int newConfigCaptureID = binding.ConfigurationCapture(config.id,
configname);
}
Console.WriteLine("Undeploy configuration "+ configname);
binding.ConfigurationUndeploy(config.id);
Console.WriteLine("Undeploy is completed");
}
/// <summary>
///The GetLMAPI() method creates a new binding to the Lab Manager API
///and sets up authentication and other basic parameters. This method
///returns a CertificateAcceptor object.
/// </summary>
static LabManagerSoap.VMwareLabManagerSOAPinterface GetLMAPI()
{
//
//** Bind to SOAP interface