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.
3295 3296 3297 |
# File 'lib/ovirtsdk4/services.rb', line 3295 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.
3306 3307 3308 |
# File 'lib/ovirtsdk4/services.rb', line 3306 def role_service(id) RoleService.new(self, id) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 |
# File 'lib/ovirtsdk4/services.rb', line 3317 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 |