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.
3289 3290 3291 |
# File 'lib/ovirtsdk4/services.rb', line 3289 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.
3300 3301 3302 |
# File 'lib/ovirtsdk4/services.rb', line 3300 def role_service(id) RoleService.new(self, id) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 |
# File 'lib/ovirtsdk4/services.rb', line 3311 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 |