3.0

Table Of Contents
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:
1Poweron.Turnsonaconfiguration.
2Poweroff.Turnsoffaconfiguration.Nothingissaved.
3Suspend.FreezestheCPUandstateofaconfiguration.
4Resume.Resumesasuspendedconfiguration.
5Reset.Rebootsaconfiguration.
6Snapshot.Savesaconfigurationstateataspecificpointintime.
7Revert.Returnstheconfigurationtoasnapshotstate.
8Shutdown.Shutsdownaconfigurationbeforeturningitoff.