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. 41
Chapter 4 Lab Manager API Method Reference
binding.AuthenticationHeaderValue.organizationname = "MyOrg";
ServicePointManager.CertificatePolicy = new CertificateAccepter();
//** Get Configuration object
LabManagerSoap.Configuration Config =
binding.GetSingleConfigurationByName("Config24");
//** Get configuration identifier and deployed status from object
int configurationId = Config.id;
bool deployed = Config.isDeployed;
//** Deploy configuration if it isn’t already.
if (!deployed)
{
//** Deploy in fenced mode and run from ESX hosts
binding.ConfigurationDeploy(configurationId, true, 1);
}
}
catch (Exception e)
{
Console.WriteLine("Error: " + e.Message);
Console.ReadLine();
}
ConfigurationPerformAction
Thismethodperformsoneofthefollowingconfigurationactionsasindicatedbythe
actionidentifier:
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.