Class: OvirtSDK4::GlusterHooksService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#hook_service(id) ⇒ GlusterHookService
Locates the
hook
service. -
#list(opts = {}) ⇒ Array<GlusterHook>
Returns the list of hooks.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
Methods inherited from Service
Instance Method Details
#hook_service(id) ⇒ GlusterHookService
Locates the hook
service.
11622 11623 11624 |
# File 'lib/ovirtsdk4/services.rb', line 11622 def hook_service(id) GlusterHookService.new(self, id) end |
#list(opts = {}) ⇒ Array<GlusterHook>
Returns the list of hooks.
The order of the returned list of hooks isn’t guaranteed.
11611 11612 11613 |
# File 'lib/ovirtsdk4/services.rb', line 11611 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
11633 11634 11635 11636 11637 11638 11639 11640 11641 11642 |
# File 'lib/ovirtsdk4/services.rb', line 11633 def service(path) if path.nil? || path == '' return self end index = path.index('/') if index.nil? return hook_service(path) end return hook_service(path[0..(index - 1)]).service(path[(index + 1)..-1]) end |