4.0
Table Of Contents
- Lab Manager SOAP API Reference
- Contents
- About This Book
- Introducing VMware vCenter 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
- GetCurrentOrganizationName
- GetCurrentWorkspaceName
- GetMachine
- GetMachineByName
- GetSingleConfigurationByName
- ListConfigurations
- ListMachines
- LiveLink
- MachinePerformAction
- SetCurrentOrganizationByName
- SetCurrentWorkspaceByName
- Index
Lab Manager SOAP API Reference
42 VMware, Inc.
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++)
{
//**
//** Check status—if machine is suspended, then resume it
//**
if (machines[i].status == 3)
{
binding.MachinePerformAction(machines[i].id, 4);
}
}
}
}
catch (Exception e)
{
Console.WriteLine("Error: " + e.Message);
Console.ReadLine();
}
SetCurrentOrganizationByName
Setstheorganizationtobeusedforeachsuccessivelogin.Thismethodworkswhentheorganizationnameis
emptyintheauthorizationheader.
Syntax
SetCurrentOrganizationByName(“MyOrganization”);
Arguments
C# Sample Code
try
{
LabManagerSoap.LabManagerSOAPinterface binding = new
LabManagerSoap.LabManagerSOAPinterface();
binding.AuthenticationHeaderValue = new
LabManagerSoap.AuthenticationHeader();
binding.AuthenticationHeaderValue.username = "jaya";
binding.AuthenticationHeaderValue.password = "Lab Manager";
// This field must be empty for SetCurrentOrganization to work
binding.AuthenticationHeaderValue.organizationname = "";
ServicePointManager.CertificatePolicy = new CertificateAccepter();
SetCurrentOrganizationByName(“MyOrganization”);
Field Data Type Description
orgName string organizationofwhichyouarea
member