6.0
Table Of Contents
- vSphere SDK for Perl Programming Guide
- Contents
- Getting Started with vSphere SDK for Perl
- Writing vSphere SDK for Perl Scripts
- Refining vSphere SDK for Perl Scripts
- Creating and Using Filters
- Filtering Views Selectively Using Properties
- Retrieving the ServiceInstance Object on a vSphere Host
- Saving and Using Sessions
- Using Multiple Sessions
- Learning About Object Structure Using Data::Dumper
- Specifying Untyped Arguments in Scheduled Tasks and Callbacks
- Using Advanced Subroutines
- vSphere SDK for Perl Subroutine Reference
- Web Services for Management Perl Library
- Credential Store Perl Library
VMware, Inc. 51
A
WebServicesforManagement(WS‐Management)providesacommonwayforsystemstoaccessandexchange
managementinformationacrosstheITinfrastructure.
ESX/ESXversion3.5andlatersupportsWS‐ManagementbyimplementingoveradozenCIM(Common
InformationModel)profiles.CIMprofilesareasetofobject‐orientedschemasdefinedby
theDTMF
(DistributedManagementTaskForce).CIMdefineshowmanagedelementsinanetworkedenvironmentare
representedasacommonsetofobjectsandrelationshipsthatuserscanview,share,andcontrol.Forexample,
systemmanagementclientapplicationsmightbeabletocheckthestatusofservercomponentssuchas
CPU,
fans,powersupplies,andso on.
TheWS‐ManagementPerllibraryallowsyoutowritescriptsthatretrieveCIMdatafromtheESX/ESXihost
usingCIMOM,aservicethatprovidesstandardCIMmanagementfunctionsoveraWBEM(Web‐Based
EnterpriseManagement).WBEMisastandardprotocolforpassingCIM‐XMLmessages
overHTTP.
AlthoughyoucanusetheWS‐ManagementlibrarywithotheravailableWS‐Management‐enabledCIMOMs,
thisappendixlimitsdiscussiontousingthelibrarywiththeCIMOMavailableonESX/ESXiversion3.5and
laterandVirtualCenter2.5andlater.
Thisappendixincludesthesetopics:
“WebServicesforManagementOverview”onpage 51
“RequiredPerlModules”onpage 52
“SampleScripts”onpage 53
“SOAPMessageConstructionwithWSMan::WSBasic”onpage 53
“GenericCIMOperationswithWSMan::GenericOps”onpage 57
Web Services for Management Overview
TheSMASH(SystemsManagementArchitectureforServerHardware)initiativeisoneofseveralrelated
standardsinitiativesoftheDMTF.TheSMASHprofilesbuildonotherDMTFstandards,includingthe
CommonInformationModel(CIM),an object‐orientedapproachtomodelingmanagedresourcesthroughout
thedistributedcomputingenvironment.CIMSchemasdefineclassesand
associationsamongtheclassesin
severalkeyareas.CIMSchemasbuildaroundacoreschema,includingdevices,applications,network,andthe
systemitself.ACIMobjectmanagerbrokersrequestsfordatafromanyofthemanagedelements.
ClientscanusetheCIM‐XMLprotocolforCIMOMaccess.Clientscanalsouse
WebServicesforManagement
(WS‐Management),aSOAP‐basedprotocolforaccessingCIMdata.ThePerllibrarydiscussedinthisappendix
isanimplementationofWS‐Managementclientartifacts(stubs,bindings)forconnectingtoa
WS‐ManagementserverandobtainingCIMdata.
ForinformationaboutCIM,SMASH,andWS‐Management,
visitthedmtf.orgWebsite.SeetheCIM
SMASH/ServerManagementAPIProgrammingGuideforinformationonCIM/SMASHandESX/ESXi.
Web Services for Management Perl
Library
A