6.5

Table Of Contents
vSphere SDK for Perl Programming Guide
46 VMware, Inc.
Parameters
Returns
Referencetoaviewobjectcontainingthesamepropertiesasthemanagedentity.Ifmorethanonemanaged
entitymatchesthespecifiedentitytype,thesubroutinereturnsonlythefirstmanagedentityfound.Ifno
matchingmanagedentitiesarefound,thesubroutinereturnsundef.
find_entity_views
Searchestheinventorytreeformanagedobjectsthatmatchthespecifiedentitytype.
Toavoidperformanceproblems,usethiscommandwithafilterorspecifythepropertiesargument.By
default,thissubroutineretrievesallpropertiesofanentity.See“CreatingandUsingFilters”onpage 33and
“FilteringViewsSelectivelyUsingProperties”
onpage 34.
SeethevSphereSDKforPerlAPIReferenceforalistofproperties.Youcanspecifypropertiesinheritedfrom
ManagedEntityorlocaltoaspecificentitytype.
Parameters
Parameter Description
view_type Managedentitytypespecifiedasoneofthesestrings:
“ClusterComputeResource”
“ComputeResource”
“Datacenter”
“Datastore”
“DistributedVirtualSwitch”
“Folder”
“HostSystem”
“Network”
“ResourcePool”
“VirtualApp”
“VirtualMachine”
begin_entity
(optional)
Managedobjectreferencethatspecifiesthestartingpointforthesearchintheinventory.This
parameterhelpsyounarrowthescope.
filter Hashofoneormorenamevaluepairs.Thenamerepresentsthepropertyvaluetotestandthevalue
representsapatternthatthepropertymustmatch.
Ifmorethanonepairisspecified,allthepatterns
mustmatch.
Usefilterstoavoidperformanceproblems.See“CreatingandUsingFilters”onpage 33and
“FilteringViewsSelectivelyUsingProperties”onpage 34.
Parameter Description
view_type Managedentitytypespecifiedasoneofthesestrings:
“ClusterComputeResource”
“ComputeResource”
“Datacenter”
“Datastore”
“DistributedVirtualSwitch”
“Folder”
“HostSystem”
“Network”
“ResourcePool”
“VirtualApp”
“VirtualMachine”
begin_entity
(optional)
Managedobjectreferencethatspecifiesthestartingpointforsearchintheinventory.Thisparameter
helpsyounarrowthescope.