6.5

Table Of Contents
vSphere SDK for Perl Programming Guide
48 VMware, Inc.
get_session_id
RetrievesthesessionIDcorrespondingtothecurrentsession.
Parameters
Noparameters.
Returns
SessionIDcookieforusebyload_session().
get_view
Retrievesthepropertiesofasinglemanagedobject.
Parameters
Returns
Viewobjectcontainingstaticcopiesofamanagedobject’spropertyvalues.
get_views
Retrievesthepropertiesofasetofmanagedobjects.
Parameters
Returns
Referencetoanarrayofviewobjectscontainingcopiesofpropertyvaluesformultiplemanagedobjects.
Notes
TheVim::get_views()subroutinetakesareferencetoanarrayofmanagedobjectreferencesandreturnsa
referencetoanarrayofviewobjects.Althoughthe
arraycancontainmultiplemanagedobjecttypes,objects
ofonlyonetypecanbeobtainedatthesametime.
load_session
Usesasavedsessionfileorsessioncookieforconnectingtoaserver.UseUtil::connect()insteadof
Vim::login()afterloadingthesession.
Youcanusesave_session()togetasessionfileorget_session_id()togetasessionID.
Parameter Description
mo_ref Managedobjectreferenceobtainedfromapropertyofanothermanagedobjectoraview.
view_type(optional) Typeofviewtoconstructfromthemanagedobject.Iftheparameterisabsent,thesubroutine
constructsaviewwithatypethatmatchesthemanagedobjecttypename.
Parameter Description
mo_ref_array Referencetoanarrayofmanagedobjectreferences.
view_type(optional) Typeofviewtoconstructfromthemanagedobject.Iftheparameterisabsent,thesubroutine
constructsaviewwithatypethatmatchesthenameofthemanagedobjecttype.