Skip to content

Commit

Permalink
no need to create unique names for the traversal specs
Browse files Browse the repository at this point in the history
  • Loading branch information
cdickmann committed Nov 10, 2011
1 parent 53d68c9 commit 5841100
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/rbvmomi/vim/ManagedEntity.rb
Expand Up @@ -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")
]
)
]
Expand Down

0 comments on commit 5841100

Please sign in to comment.