4.0

Table Of Contents
VMware, Inc. 31
Chapter 4 Lab Manager API Method Reference
ConfigurationUndeploy
Undeploysaconfigurationintheworkspaceanddiscardsitsstate.
Syntax
ConfigurationUndeploy(10);
Arguments
Response
Noresponse.
C# Sample Code
try
{
LabManagerSoap.LabManagerSOAPinterface binding = new
LabManagerSoap.LabManagerSOAPinterface();
binding.Url =
"https://demo18.LabManager.com/LabManager/SOAP/LabManager.asmx";
binding.Timeout = 10 * 60 * 1000; // 10 minutes
ServicePointManager.CertificatePolicy = new CertificateAccepter();
binding.AuthenticationHeaderValue = new
LabManagerSoap.AuthenticationHeader();
binding.AuthenticationHeaderValue.username = "jaya";
binding.AuthenticationHeaderValue.password = "Lab Manager";
binding.AuthenticationHeaderValue.organizationname = "MyOrg";
binding.AuthenticationHeaderValue.workspacename = "MyWorkspace";
//
//* Get configurations in Workspace, not Library
//
int configurationType= 1;
LabManagerSoap.Configuration[] configurations =
binding.ListConfigurations(configurationType);
//
//** Undeploy all deployed configurations I own
//
for (int i=0; i < configurations.Length; i++)
{
if (configurations[i].owner.Equals("jaya"))
{
binding.ConfigurationUndeploy(configurations[i].id);
}
}
}
catch (Exception e)
{
Console.WriteLine("Error: " + e.Message);
Console.ReadLine();
}
Field Data Type Description
configurationID int Configurationnumericidentifier.