2.5
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. 21
Chapter 2 Getting Started with the Lab Manager SOAP API
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 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.
Thesetasksareaccomplishedinthesamplecodebymeansofthesethreemethods:
TheCheckoutDeployConfiguration()method(page 24)obtainstheconfiguration
fromthelibraryanddeploysittotheLab ManagerWorkspace.
TheRunQCTestset()method(page 23)runsaseriesofpredefinedMercury
InteractiveQualityCentertests.(Formoreinformationaboutthepredefinedtests,
seetheMercuryInteractiveQualityCenterdocumentation.)
TheCaptureUndeployConfiguration()method(page 25)undeploysthe
configurationandcapturesittothelibrary.
Inaddition,theGetLMAPI()method(seecodeonpage 26)createsanewbindingtothe
Lab ManagerAPIandsetsupauthenticationparameters.Thismethodconfiguresthe
certificatepolicyforthe.NETservicepointmanagertoacceptany
certificate
programmatically.GetLMAPI()returnsaninstanceoftheLab Managerbinding.
using System;
using System.Configuration;
using System.Collections.Specialized;