4.0

Table Of Contents
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.