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

[vcloud_director] Allow for multiple Orgs.

This commit is contained in:
Nick Osborn 2013-09-05 11:07:58 +01:00
parent f1323c1986
commit 85f7b1568c

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?(Array) ? data[:Org] : [data[:Org]]
orgs.each {|org| service.add_id_from_href!(org)}
orgs
end
end
end
end
end
end