Class: Keystone::V2_0::Manager::Role
- Defined in:
- lib/keystone/v2_0/manager/role.rb
Constant Summary collapse
- @@url_endpoint =
"OS-KSADM/roles"
Instance Attribute Summary
Attributes inherited from Base
#auth_url, #token, #url_endpoint
Instance Method Summary collapse
-
#initialize(auth_url) ⇒ Role
constructor
A new instance of Role.
- #list ⇒ Object
Constructor Details
#initialize(auth_url) ⇒ Role
Returns a new instance of Role.
10 11 12 |
# File 'lib/keystone/v2_0/manager/role.rb', line 10 def initialize(auth_url) super auth_url, @@url_endpoint end |
Instance Method Details
#list ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/keystone/v2_0/manager/role.rb', line 14 def list roles = super role_list = [] # map role hash to array of Role objects unless roles.nil? roles["roles"].each do |role_data| role_resource = Keystone::V2_0::Resource::Role.new(role_data) role_list << role_resource end return role_list else return nil end end |