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
VMware, Inc. 29
Chapter 4 Lab Manager API Method Reference
ConfigurationPerformAction
Thismethodperformsoneofthefollowingconfigurationactionsasindicatedbytheactionidentifier:
1=Poweron.Turnsonaconfiguration.
2=Poweroff.Turnsoffaconfiguration.Nothingissaved.
3=Suspend.FreezestheCPUandstateofaconfiguration.
4=Resume.Resumesasuspendedconfiguration.
5=Reset.Rebootsaconfiguration.
6=Snapshot.Savesaconfigurationstateataspecificpointintime.
7=Revert.Returnstheconfigurationtoasnapshotstate.
8=Shutdown.Shutsdownaconfigurationbeforeturningitoff.
Syntax
ConfigurationPerformAction(int configurationID, int action);
Arguments
Response
Noresponse.
C# Sample Code
try
{
LabManagerSoap.LabManagerSOAPinterface binding = new
LabManagerSoap.LabManagerSOAPinterface();
binding.AuthenticationHeaderValue = new
LabManagerSoap.AuthenticationHeader();
binding.AuthenticationHeaderValue.username = "jaya";
binding.AuthenticationHeaderValue.password = "Lab Manager";
binding.AuthenticationHeaderValue.organizationname = "MyOrg";
binding.AuthenticationHeaderValue.workspacename = "MyWorkspace";
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++)
{
binding.ConfigurationPerformAction(configurations[j].id,4/*Resume*/);
}
}
Field Data Type Description
action int Actiontotakeontheconfiguration.
configurationID int Configurationidentifier.