class Keystone::V2_0::Manager::Tenant

Public Class Methods

new(auth_url) click to toggle source
Calls superclass method Keystone::V2_0::Manager::Base::new
# File lib/keystone/v2_0/manager/tenant.rb, line 10
def initialize(auth_url)
  super auth_url, @@url_endpoint
end

Public Instance Methods

list() click to toggle source
Calls superclass method Keystone::V2_0::Manager::Base#list
# File lib/keystone/v2_0/manager/tenant.rb, line 14
def list
  tenants     = super
  tenant_list = []

  # map role hash to array of Tenant objects
  unless tenants.nil?
    tenants["tenants"].each do |tenant_data|
      tenant_resource = Keystone::V2_0::Resource::Tenant.new(tenant_data)
      tenant_list << tenant_resource
    end

    return tenant_list
  else
    return nil
  end
end