mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
24 lines
551 B
Ruby
24 lines
551 B
Ruby
![]() |
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
|