1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[vSphere] fixed bug that datastores in subfolders would not be found.

This commit is contained in:
Marc Grimme 2013-05-05 13:57:07 +02:00
parent 81fd0fcf44
commit fbd2fc28e8

View file

@ -12,7 +12,12 @@ module Fog
def get_raw_datastore(name, datacenter_name)
dc = find_raw_datacenter(datacenter_name)
dc.datastoreFolder.find(name)
@connection.serviceContent.viewManager.CreateContainerView({
:container => dc.datastoreFolder,
:type => ["Datastore"],
:recursive => true
}).view.select{|ds| ds.name == name}.first
end
end