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
VMware, Inc. 53
Chapter 4 Lab Manager API Method Reference
Sample Code: C#
try
{
//**
//** LabManagerSoap 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.AuthenticationHeaderValue.organizationname = "MyOrg";
ServicePointManager.CertificatePolicy = new CertificateAccepter();
//** Get Configurations in Workspace.
int configurationType = 1; //** 1=Workspace
LabManagerSoap.Configuration [] WSconfigurations =
binding.ListConfigurations(configurationType);
//** Write to the console all configurations
for (int i=0; i < WSconfigurations.Length; i++)
{
Console.WriteLine("Configuration name = " +
WSconfigurations[i].name);
Console.WriteLine("id = " + WSconfigurations[i].id.ToString());
Console.WriteLine("description = "
+WSconfigurations[i].description);
Console.WriteLine("isPublic = " +
WSconfigurations[i].isPublic.ToString());
Console.WriteLine("isDeployed = "+
WSconfigurations[i].isDeployed.ToString());
Console.WriteLine("fenceMode = " +
WSconfigurations[i].fenceMode.ToString());
Console.WriteLine("type = " + WSconfigurations[i].type.ToString());
Console.WriteLine("owner = " + WSconfigurations[i].owner);
Console.WriteLine("dateCreated = " +
WSconfigurations[i].dateCreated.ToString());
Console.WriteLine();
}
Console.ReadLine();
}
catch (Exception e)
{
Console.WriteLine("Error: " + e.Message);
Console.ReadLine();
}