Class: OvirtSDK4::AssignedRolesService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#list(opts = {}) ⇒ Array<Role>
Returns the roles assigned to the permission.
-
#role_service(id) ⇒ RoleService
Sub-resource locator method, returns individual role resource on which the remainder of the URI is dispatched.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
Methods inherited from Service
Instance Method Details
#list(opts = {}) ⇒ Array<Role>
Returns the roles assigned to the permission.
The order of the returned roles isn’t guaranteed.
3307 3308 3309 |
# File 'lib/ovirtsdk4/services.rb', line 3307 def list(opts = {}) internal_get(LIST, opts) end |
#role_service(id) ⇒ RoleService
Sub-resource locator method, returns individual role resource on which the remainder of the URI is dispatched.
3318 3319 3320 |
# File 'lib/ovirtsdk4/services.rb', line 3318 def role_service(id) RoleService.new(self, id) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 |
# File 'lib/ovirtsdk4/services.rb', line 3329 def service(path) if path.nil? || path == '' return self end index = path.index('/') if index.nil? return role_service(path) end return role_service(path[0..(index - 1)]).service(path[(index + 1)..-1]) end |