1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/vcloudng/models/compute/organizations.rb

24 lines
551 B
Ruby
Raw Normal View History

2013-06-18 17:29:42 +02:00
require 'fog/core/collection'
require 'fog/vcloudng/models/compute/organization'
module Fog
module Compute
class Vcloudng
class Organizations < Fog::Collection
model Fog::Compute::Vcloudng::Organization
def all
data = service.get_organizations.body
load(data['OrgList'])
end
def get(organization_id)
if organization_id
self.class.new(:service => service).all.detect {|org| org.id == organization_id}
end
end
end
end
end
end