class Fog::Identity::OpenStack::Tenants

Public Instance Methods

all() click to toggle source
# File lib/fog/openstack/models/identity/tenants.rb, line 10
def all
  load(connection.list_tenants.body['tenants'])
end
destroy(id) click to toggle source
# File lib/fog/openstack/models/identity/tenants.rb, line 20
def destroy(id)
  tenant = self.find_by_id(id)
  tenant.destroy
end
find_by_id(id) click to toggle source
# File lib/fog/openstack/models/identity/tenants.rb, line 14
def find_by_id(id)
  self.find {|tenant| tenant.id == id} ||
    Fog::Identity::OpenStack::Tenant.new(
      connection.get_tenant(id).body['tenant'])
end