6.0

Table Of Contents
VMware, Inc. 3
Contents
AboutThisBook 7
RevisionHistory 7
IntendedAudience 7
1 GettingStartedwithvSphere SDK for Perl 9
vSphereSDKforPerlArchitecture 9
UsingvSphereSDKforPerl 10
GettingStarted 10
CommonvSphereSDKforPerlTasks 11
vSphereSDKforPerlProgrammingConventions 11
vSphereSDKforPerlCommonOptions 12
SpecifyingOptions 12
AuthenticatingThroughvCenterServerandvCenterSingleSignOn 13
Example 13
UsingaSessionFile 13
PassingParametersattheCommandLine 14
SettingEnvironmentVariables 14
Usinga
ConfigurationFile 15
UsingMicrosoftWindowsSecuritySupportProviderInterface(SSPI) 15
CommonOptionsReference 16
HelloHost:RunningYourFirstScript 17
2 WritingvSphereSDKforPerlScripts 19
BasicvSphereSDKforPerlScript 19
Step1:ImportthevSphereSDKforPerlModules 20
Step2:(Optional)DefineScriptSpecificCommandLineOptions 20
Step3:ConnecttotheServer 22
Step4:ObtainViewObjectsofServerSideManagedObjects 22
Step5:ProcessViewsandReportResults 22
Step6:ClosetheServerConnection 23
Understanding
ServerSideObjects 24
UsetheManagedObjectBrowsertoExploreServerSideObjects 24
TypesofManagedObjectsandtheManagedObjectHierarchy 25
ManagedObjectHierarchy 26
ManagedEntitiesintheInventory 26
AccessingServerSideInventoryObjects 27
UnderstandingPerlViewObjects 28
WorkingwithViewObjectPropertyValues 28
AccessingPropertyValues 28
AccessingSimplePropertyValues 29
AccessingEnumerationPropertyValues 29
ModifyingPropertyValues 29
CreatingDataObjectswithProperties 30
UnderstandingOperationsandMethods 30
NonBlockingandBlockingMethods 30
ExamplesofOperations 31
CallingMethods 31