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. 41
Chapter 4 Lab Manager API Method Reference
string url = binding.LiveLink(Config.name);
Console.WriteLine("LiveLink URL="+url);
Console.ReadLine();
}
}
catch (Exception e)
{
Console.WriteLine("Error="+e.Message);
Console.ReadLine();
}
MachinePerformAction
Thismethodperformsoneofthefollowingmachineactionsasindicatedbytheactionidentifier:
1=Poweron.Turnsonamachine.
2=Poweroff.Turnsoffamachine.Nothingissaved.
3=Suspend.FreezesamachineCPUandstate.
4=Resume.Resumesasuspendedmachine.
5=Reset.Rebootsamachine.
6=Snapshot.Saveamachinestateataspecificpointintime.
7=Revert.Returnsamachinetoasnapshotstate.
8=Shutdown.Shutsdownamachinebeforeturningoff.
Syntax
MachinePerformAction(1, 3);
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 =
Field Data Type Description
action int Actiontotakeonthemachine.
machineID int Machineidentifier.