Class: Fog::Compute::OpenStack::Tenants

Inherits:
Fog::Collection
  • Object
show all
Defined in:
lib/fog/openstack/models/compute/tenants.rb

Instance Method Summary collapse

Instance Method Details

#allObject



10
11
12
# File 'lib/fog/openstack/models/compute/tenants.rb', line 10

def all
  load(service.list_tenants.body['tenants'])
end

#get(id) ⇒ Object Also known as: find_by_id



18
19
20
# File 'lib/fog/openstack/models/compute/tenants.rb', line 18

def get(id)
  self.find {|tenant| tenant.id == id}
end

#usages(start_date = nil, end_date = nil, details = false) ⇒ Object



14
15
16
# File 'lib/fog/openstack/models/compute/tenants.rb', line 14

def usages(start_date = nil, end_date = nil, details = false)
  service.list_usages(start_date, end_date, details).body['tenant_usages']
end