2012-02-22 09:40:32 -05:00
|
|
|
require 'fog/core/collection'
|
|
|
|
require 'fog/openstack/models/identity/role'
|
|
|
|
|
|
|
|
module Fog
|
|
|
|
module Identity
|
|
|
|
class OpenStack
|
|
|
|
class Roles < Fog::Collection
|
|
|
|
model Fog::Identity::OpenStack::Role
|
|
|
|
|
|
|
|
def all
|
2012-12-22 18:24:36 -05:00
|
|
|
load(service.list_roles.body['roles'])
|
2012-02-22 09:40:32 -05:00
|
|
|
end
|
2012-02-24 06:38:05 -05:00
|
|
|
|
2012-02-26 21:43:42 -05:00
|
|
|
def get(id)
|
2012-12-22 18:24:36 -05:00
|
|
|
service.get_role(id)
|
2012-02-24 06:38:05 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
2012-02-22 09:40:32 -05:00
|
|
|
end # class OpenStack
|
|
|
|
end # module Compute
|
|
|
|
end # module Fog
|