Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

no need to create unique names for the traversal specs

  • Loading branch information...
commit 5841100d75321150c82c1e284b83cf777cd69ede 1 parent 53d68c9
Christian Dickmann authored
Showing with 2 additions and 4 deletions.
  1. +2 −4 lib/rbvmomi/vim/ManagedEntity.rb
View
6 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")
]
)
]
Please sign in to comment.
Something went wrong with that request. Please try again.