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

Merge pull request #2134 from nosborn/vcloud_director_multiple_orgs

[vcloud_director] Allow for multiple Orgs.
This commit is contained in:
Wesley Beary 2013-09-12 11:07:15 -07:00
commit 0446a0ab2c

View file

@ -20,12 +20,12 @@ module Fog
def item_list
data = service.get_organizations.body
org = data[:Org] # there is only a single Org
service.add_id_from_href!(org)
[org]
orgs = data[:Org].is_a?(Hash) ? [data[:Org]] : data[:Org]
orgs.each {|org| service.add_id_from_href!(org)}
orgs
end
end
end
end
end
end