vSphere SDK for Perl Programming Guide - Documentation - VMware
vSphere SDK for Perl Programming Guide - Documentation - VMware
vSphere SDK for Perl Programming Guide - Documentation - VMware
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Contents<br />
About This Book 7<br />
Revision History 7<br />
Intended Audience 7<br />
1 Getting Started with <strong>vSphere</strong> <strong>SDK</strong> <strong>for</strong> <strong>Perl</strong> 9<br />
<strong>vSphere</strong> <strong>SDK</strong> <strong>for</strong> <strong>Perl</strong> Architecture 9<br />
Using <strong>vSphere</strong> <strong>SDK</strong> <strong>for</strong> <strong>Perl</strong> 10<br />
Getting Started 10<br />
Common <strong>vSphere</strong> <strong>SDK</strong> <strong>for</strong> <strong>Perl</strong> Tasks 11<br />
<strong>vSphere</strong> <strong>SDK</strong> <strong>for</strong> <strong>Perl</strong> <strong>Programming</strong> Conventions 12<br />
<strong>vSphere</strong> <strong>SDK</strong> <strong>for</strong> <strong>Perl</strong> Common Options 12<br />
Specifying Options 13<br />
Using a Session File 13<br />
Passing Parameters at the Command Line 14<br />
Setting Environment Variables 14<br />
Using a Configuration File 14<br />
Using Microsoft Windows Security Support Provider Interface (SSPI) 15<br />
Common Options Reference 15<br />
Hello Host: Running Your First Script 17<br />
2 Writing <strong>vSphere</strong> <strong>SDK</strong> <strong>for</strong> <strong>Perl</strong> Scripts 19<br />
Basic <strong>vSphere</strong> <strong>SDK</strong> <strong>for</strong> <strong>Perl</strong> Script 19<br />
Step 1: Import the <strong>vSphere</strong> <strong>SDK</strong> <strong>for</strong> <strong>Perl</strong> Modules 20<br />
Step 2: (Optional) Define Script‐Specific Command‐Line Options 20<br />
Step 3: Connect to the Server 22<br />
Step 4: Obtain View Objects of Server‐Side Managed Objects 22<br />
Step 5: Process Views and Report Results 22<br />
Step 6: Close the Server Connection 23<br />
Understanding Server‐Side Objects 24<br />
Use the Managed Object Browser to Explore Server‐Side Objects 24<br />
Types of Managed Objects and the Managed Object Hierarchy 25<br />
Managed Object Hierarchy 26<br />
Managed Entities in the Inventory 26<br />
Accessing Server‐Side Inventory Objects 27<br />
Understanding <strong>Perl</strong> View Objects 28<br />
Working with View Object Property Values 29<br />
Accessing Property Values 29<br />
Accessing Simple Property Values 29<br />
Accessing Enumeration Property Values 29<br />
Modifying Property Values 29<br />
Creating Data Objects with Properties 30<br />
Understanding Operations and Methods 30<br />
Non‐Blocking and Blocking Methods 31<br />
Examples of Operations 31<br />
Calling Methods 31<br />
Omitting Optional Arguments in Method Calls 32<br />
Updating View Objects 32<br />
<strong>VMware</strong>, Inc. 3