stumpr
Virtuoso
Virtuoso

I would pre-fetch the DVS items:

my $dv_switches = Vim::find_entity_views(view_type => 'DistributedVirtualSwitch', properties => ['name', 'uuid']);

Then, you can look it up by UUID:

($this_dvs) = grep {$_->{'uuid'} eq $the_uuid} @$dv_switches;

This will give you the best performance as well, since you don't have to hit the API for every query (just the efficient first all DVS query).  You can add additional data from the DVSwitch object if you need it in your logic.

Reuben Stump | http://www.virtuin.com | @ReubenStump

View solution in original post

Reply
0 Kudos