Solve recursion problem in vCenter driver for hierarchy function

(cherry picked from commit ab35b92bab)
This commit is contained in:
Tino Vazquez committed 2014-11-17 15:32:33 +01:00
1 parent 2cac660e73
commit 2d05f1f2ea
1 file changed
+3 -4
@@ -156,11 +156,10 @@ class VIClient
def hierarchy
vc_hosts = {}
@root.childEntity.each { |dc|
ccrs = dc.hostFolder.childEntity.grep(
RbVmomi::VIM::ClusterComputeResource)
datacenters = get_entities(@root, 'Datacenter')
datacenters.each { |dc|
ccrs = get_entities(dc.hostFolder, 'ClusterComputeResource')
vc_hosts[dc.name] = ccrs.collect { |c| c.name }
}