Skip vCenter datastores not associated to any host

(cherry picked from commit 7b4598452b)
This commit is contained in:
Tino Vazquez authored and Ruben S. Montero committed 2016-07-14 11:34:07 +02:00
1 parent 8851c958d7
commit 59cf350a7f
1 file changed
+1
@@ -591,6 +591,7 @@ class VIClient
datastores.each { |ds|
next if !ds.is_a? RbVmomi::VIM::Datastore
# Find the Cluster from which to access this ds
next if !ds.host[0]
cluster_name = ds.host[0].key.parent.name
if !dspool["DATASTORE[NAME=\"#{ds.name}\"]"] and