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.
10411 10412 10413 |
# File 'lib/ovirtsdk4/services.rb', line 10411 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.
10400 10401 10402 |
# File 'lib/ovirtsdk4/services.rb', line 10400 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
10422 10423 10424 10425 10426 10427 10428 10429 10430 10431 |
# File 'lib/ovirtsdk4/services.rb', line 10422 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 |