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. 19
Chapter 2 Getting Started with the Lab Manager SOAP API
public class CertificateAccepter : System.Net.ICertificatePolicy
{
public CertificateAccepter() {}
public bool CheckValidationResult(
System.Net.ServicePoint servicePoint,
System.Security.Cryptography.X509Certificates.X509Certificate
cert,
System.Net.WebRequest webRequest, int iProblem)
{
return true;
}
}
} //** end Namespace}
Advanced C# Sample: Integrating Lab Manager and Quality
Center
TheC#.NETexampleinthissectionisamoreextensive—andmorepractical—example
ofusingtheLab ManagerSOAPAPI.Thissampleshowstheintegrationofthe
Lab ManagerSOAPAPIcallswithMercuryInteractiveCorporationQualityCenter
product.Thesamplecodeperformsthesetasks:
MakesLab ManagerAPI(Lab ManagerSOAPAPI)callstocheckouta
configurationfromtheLibraryanddeployit.
RunsaseriesofpredefinedtestsonthedeployedconfigurationusingMercury
QualityCenter.
MakesLab ManagerSOAPAPIcallstocapturetheconfigurationandundeployit
fromtheWorkspace.
Thesetasksareaccomplishedinthesamplecodeusingthesethreemethods:
CheckoutDeployConfiguration()method–Obtainstheconfigurationfromthe
LibraryanddeploysittotheLab ManagerWorkspace.
RunQCTestset()method–RunsaseriesofpredefinedMercuryInteractiveQuality
Centertests.(Formoreinformationaboutthepredefinedtests,seetheMercury
InteractiveQualityCenterdocumentation.)
CaptureUndeployConfiguration()method–Undeploystheconfigurationand
capturesittotheLibrary.
Inaddition,theGetLMAPI()methodcreatesanewbindingtotheLab ManagerAPI
andsetsupauthenticationparameters.Thismethodconfiguresthecertificatepolicyfor
the.NETservicepointmanagertoacceptanycertificateprogrammatically.
GetLMAPI()returnsaninstance
oftheLab Managerbinding.