Class: Keystone::V2_0::TenantManager

Inherits:
Openstack::Client::Manager show all
Defined in:
lib/keystone/v2_0/tenants.rb

Constant Summary collapse

RESOURCE_CLASS =
Keystone::V2_0::Tenant

Instance Attribute Summary

Attributes inherited from Openstack::Client::Manager

#api, #resource_class

Instance Method Summary collapse

Methods inherited from Openstack::Client::Manager

#_create, #_delete, #_get, #_list, #_update, #get_id, #url_with_params

Constructor Details

#initialize(api) ⇒ TenantManager

Returns a new instance of TenantManager.



17
18
19
# File 'lib/keystone/v2_0/tenants.rb', line 17

def initialize api
  super
end

Instance Method Details

#get(tenant) ⇒ Object



21
22
23
# File 'lib/keystone/v2_0/tenants.rb', line 21

def get tenant
  self._get("/tenants/#{get_id(tenant)}", 'tenant')
end

#list(limit = nil, marker = nil) ⇒ Object



25
26
27
28
29
30
31
# File 'lib/keystone/v2_0/tenants.rb', line 25

def list limit=nil, marker=nil
  params = {}
  params['limit']   = limit   if limit
  params['marker']  = marker  if marker

  self._list(url_with_params("/tenants", params), 'tenants')
end