From 5841100d75321150c82c1e284b83cf777cd69ede Mon Sep 17 00:00:00 2001 From: Christian Dickmann Date: Wed, 9 Nov 2011 19:13:37 -0800 Subject: [PATCH] no need to create unique names for the traversal specs --- lib/rbvmomi/vim/ManagedEntity.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/rbvmomi/vim/ManagedEntity.rb b/lib/rbvmomi/vim/ManagedEntity.rb index 331f4660..3cf1fcc8 100644 --- a/lib/rbvmomi/vim/ManagedEntity.rb +++ b/lib/rbvmomi/vim/ManagedEntity.rb @@ -8,20 +8,18 @@ def path # Retrieve the ancestors of a list of entries. # @return [Hash] Object-indexed hash of ancestors of entities, starting with the root. def self.paths objs - i = 0 filterSpec = RbVmomi::VIM.PropertyFilterSpec( :objectSet => objs.map do |obj| - i += 1 RbVmomi::VIM.ObjectSpec( :obj => obj, :selectSet => [ RbVmomi::VIM.TraversalSpec( - :name => "tsME-#{i}", + :name => "tsME", :type => 'ManagedEntity', :path => 'parent', :skip => false, :selectSet => [ - RbVmomi::VIM.SelectionSpec(:name => "tsME-#{i}") + RbVmomi::VIM.SelectionSpec(:name => "tsME") ] ) ]