server/lib/deltacloud/drivers/vsphere/vsphere_client.rb
# This helper will traverse across all datacenters and folders and gather
# all datastores available on vSphere
#
This helper will traverse across all datacenters and folders and gather
all datastores available on vSphere
This helper will traverse across all datacenters and folders and gather all datastores available on vSphere
def list_datastores(df)
      datastores = []
      df.childEntity.each do |object|
        if object.class.to_s == 'Folder'
          datastores += list_datastores(object)
        elsif object.class.to_s == 'StoragePod'
          datastores += list_datastores(object)
        else
          datastores << object
        end
      end
      datastores
    end
def list_datastores ( df ) datastores = [ ] df . childEntity . each do | object | if object . class . to_s == 'Folder' datastores += list_datastores ( object ) elsif object . class . to_s == 'StoragePod' datastores += list_datastores ( object ) else datastores << object end end datastores end
This helper will traverse across all datacenters and folders and gather
all datastores available on vSphere
This helper will traverse across all datacenters and folders and gather all datastores available on vSphere
df
<not_specific>