6.5

Table Of Contents
VMware, Inc. 55
Chapter A Web Services for Management Perl Library
Example
$client->register_xml_ns((wsen => 'http://www.dmtf.org/wsen'));
DeclaresaprefixwsenwiththeURLhttp://www.dmtf.org/wsenintheglobalXMLnamespace.
register_class_ns
RegistersextraResourceURIsthattheWSManagementservermightrequire.Bydefault,theconstructor
providesasetofResourceURIsonlyforclassesintheCIMschema.Classeswithotherschemanames,suchas
VMware_*classes,requireadifferentResourceURIwhenenumeratedusingthevSphereSDKforPerl.
Youcanfindthe
ResourceURIscorrespondingtoothersupportedschemasintheOpenWSManconfiguration
file,whichislocatedintheserverʹsfilesystemat/etc/openwsman/openwsman.conf.TheResourceURIsare
listedinthevalueofthevendor_namespacesconfigurationparameter.
Arguments
Ahash.Keysaretheprefixes,valuesaretherelativeURLsasvalues.
Example
$client->register_class_ns((OMC => 'http://schema.omc-project.org/wbem/wscim/1/cim-schema/2',
VMware => 'http://schemas.vmware.com/wbem/wscim/1/cim-schema/2'));
RegisterstheResourceURIsneededtoenumerateclassesintheOMCandVMwareschemas.
Identify
Performsthewsmid:Identifyoperation,whichcausestheWSManagementservertoidentifyitself.Helps
youdeterminewhethertheserverisupandrunning.
Arguments
Noarguments.
Returns
ReturnsaSOAP::SOMobject,whichyoucanusetoparsetheresultsordoerrorcorrection.
Enumerate
Filtersresultsdependingontheargumentsyoupassin.Severalargumentsperformgenericoperationsthat
areimplementedinanotherclass,asdescribedin“GenericCIMOperationswithWSMan::GenericOps”on
page 57.Otherargumentsimplementenumerationfornonstandardcompliantservers.Thisdocument
discussesthemostcommonarguments.LookatthePerlcode
forinformationonotherarguments.
Arguments
Acceptsthefollowingarguments:
Argument Description
class_name Specifiestheclassthatyouwanttoenumerate.Thisargumentispassedasastring.
namespace DefaultCIMnamespace.Defaultisroot/cimv2.
Ifthenamespaceisnotroot/cimv2,youmustpassinthenamespaceoftheclassinthis
argument.
enummode (optional) SpecifiesanenumerationmodesuchasEnumerateEPRorEnumerateEPRandObject.
This
argumentispassedasastring.
polymorphism (optional) Specifiespolymorphismmodes,passedinasastring.Forexample
IncludeSubClassProperties,ExcludeSubClassProperties,andNone.