2.4

Table Of Contents
VMware, Inc. 57
Chapter 4 Lab Manager API Method Reference
Arguments
Response
none
Sample Code: C#
try
{
LabManagerSoap.VMwareLabManagerSOAPinterface binding = new
LabManagerSoap.VMwareLabManagerSOAPinterface();
binding.AuthenticationHeaderValue = new
LabManagerSoap.AuthenticationHeader();
binding.AuthenticationHeaderValue.username = "jaya";
binding.AuthenticationHeaderValue.password = "Lab Manager";
ServicePointManager.CertificatePolicy = new CertificateAccepter();
int configurationType = 1; //** Get workspace configuration
//**
//** Get array of all configurations
//**
LabManagerSoap.Configuration [] configurations =
binding.ListConfigurations(configurationType);
//**
//** Loop through all configurations.
//**
for (int j=0; j < configurations.Length; j++)
{
//**
//** Get array of all machines in configurations
//**
LabManagerSoap.Machine [] machines =
binding.ListMachines(configurations[j].id);
//**
//** Loop through all machines
//**
for (int i=0; i < machines.Length; i++)
{
Table 4-29. Arguments
Field Data Type Description
machineID int Machineidentifier.
action int Actiontotakeonthe
machine.