18.08.2013 Views

vSphere SDK for Perl Programming Guide - Documentation - VMware

vSphere SDK for Perl Programming Guide - Documentation - VMware

vSphere SDK for Perl Programming Guide - Documentation - VMware

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>vSphere</strong> <strong>SDK</strong> <strong>for</strong> <strong>Perl</strong> <strong>Programming</strong> <strong>Guide</strong><br />

Argument Description<br />

role (optional) Role that the object plays in the association class. The method filters the results<br />

according to the role.<br />

resultclassname (optional) Result class name, which must be present in the association. The method<br />

returns only those instances.<br />

resultrole (optional) Role that the result class plays in this instance. The method returns the results<br />

based on resultrole.<br />

includeresult (optional) Further filters query results based on properties of the instances. You can pass<br />

in properties as a name‐value hash, then pass in a reference to this hash in the<br />

includeresult named argument.<br />

namespace Default CIM namespace. Default is root/cimv2.<br />

If the namespace is not root/cimv2, you must pass in the namespace of the<br />

class in this argument.<br />

Example<br />

$client->EnumerateAssociatedInstances(<br />

EnumerateAssociatedInstanceNames<br />

class_name => 'CIM_Foo',<br />

selectors => \%hash;<br />

associationclassname => 'CIM_Bar', #optional<br />

role => 'CIM_Baz', #optional<br />

resultclassname => 'CIM_Bat', #optional<br />

resultrole => 'CIM_Quux', #optional<br />

includeresult => \%hash, #optional<br />

namespace => 'root/cimv2' #optional<br />

Returns objects with only the key values of the associated instance populated. The usage is the same as <strong>for</strong><br />

EnumerateAssociatedInstances.<br />

EnumerateAssociationInstances<br />

Returns objects containing association instances of which the class is a part. The usage is the same as <strong>for</strong><br />

EnumerateAssociatedInstances.<br />

EnumerateAssociationInstanceNames<br />

Returns objects containing key values of the association instances of which the class is a part. The usage is the<br />

same as <strong>for</strong> EnumerateAssociatedInstances.<br />

GetInstance<br />

Retrieves a particular instance of a class.<br />

Arguments<br />

Accepts the following named arguments:<br />

Argument Description<br />

class_name Name of the class whose instance you want to retrieve, passed as a string<br />

options Keys <strong>for</strong> the instance on which you want to per<strong>for</strong>m the GetInstance operation. The argument is<br />

passed as a reference to a hash containing the keys in name‐value pairs.<br />

namespace Default CIM namespace. Default is root/cimv2.<br />

If the namespace is not root/cimv2, you must pass in the namespace of the class in this argument.<br />

Returns<br />

Prints a fault string or returns the result in a hash.<br />

60 <strong>VMware</strong>, Inc.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!