vSphere SDK for Perl Programming Guide
About This Book
Getting Started with vSphere SDK for Perl
vSphere SDK for Perl Architecture
Using vSphere SDK for Perl
Typical Usage Scenarios
Common vSphere SDK for Perl Tasks
vSphere SDK for Perl Programming Conventions
vSphere SDK for Perl Common Options
Specifying Options
Authenticating Through vCenter Server and vCenter Single Sign-On
Use a Session File
Passing Parameters at the Command Line
Setting Environment Variables
Using a Configuration File
Using Microsoft Windows Security Support Provider Interface (SSPI)
Common Options Reference
Run Your First Script
Writing vSphere SDK for Perl Scripts
Basic vSphere SDK for Perl Script
Step 1: Import the vSphere SDK for Perl Modules
Step 2: (Optional) Define Script-Specific Command-Line Options
Step 3: Connect to the Server
Step 4: Obtain View Objects of Server-Side Managed Objects
Step 5: Process Views and Report Results
Step 6: Close the Server Connection
Understanding Server-Side Objects
Using the Managed Object Browser to Explore Server-Side Objects
Enable the MOB on ESXi 6.0 and Later Systems
Access the MOB on Any ESXi or vCenter Server System
Types of Managed Objects and the Managed Object Hierarchy
Managed Object Hierarchy
View Documentation for Server-side Objects
Managed Entities in the Inventory
Accessing Server-Side Inventory Objects
Understanding Perl View Objects
Working with View Object Property Values
Accessing Property Values
Accessing Simple Property Values
Accessing Enumeration Property Values
Modifying Property Values
Creating Data Objects with Properties
Understanding Operations and Methods
Non-Blocking and Blocking Methods
Examples of Operations
Calling Methods
Omitting Optional Arguments in Method Calls
Updating View Objects
Refining vSphere SDK for Perl Scripts
Creating and Using Filters
Using Filters with Vim::find_entity_view() or Vim::find_entity_views()
Filtering Views Selectively Using Properties
Using View Subroutines with a Properties Argument
Using Filters on the Utility Application Command Line
Retrieve the ServiceInstance Object on a vSphere Host
Saving and Using Sessions
Saving Sessions
Loading 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
Subroutines in the Opts Package
add_options
get_option
option_is_set
parse
validate
usage
Subroutines in the Util Package
connect
disconnect
get_inventory_path
trace
Subroutines in the Vim Package
clear_session
find_entity_view
find_entity_views
get_service_instance
get_service_content
get_session_id
get_view
get_views
load_session
login
logout
save_session
update_view_data
Web Services for Management Perl Library
Web Services for Management Overview
Required Perl Modules
Install Required Perl Modules on a Windows System
Install Required Perl Modules on a Linux System
Using Sample Scripts
SOAP Message Construction with WSMan::WSBasic
WSMan::WSBasic->new
register_xml_ns
register_class_ns
Identify
Enumerate
PullRelease
Get
WSMan::WSBasic Examples
Generic CIM Operations with WSMan::GenericOps
WSMan::GenericOps->new
register_xml_ns
register_class_ns
Identify
EnumerateInstances
EnumerateInstanceNames
EnumerateAssociatedInstances
EnumerateAssociatedInstanceNames
EnumerateAssociationInstances
EnumerateAssociationInstanceNames
GetInstance
Credential Store Perl Library
Credential Store Overview
Credential Store Components
Managing the Credential Store
Using the Credential Store
vSphere Credential Store Subroutine Reference
init
get_password
add_password
remove_password
clear_passwords
get_hosts
get_usernames
close
credstore_admin.pl Utility Application