Class: OvirtSDK4::HostHooksService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#hook_service(id) ⇒ HostHookService
Locates the
hookservice. -
#list(opts = {}) ⇒ Array<Hook>
Returns the list of hooks configured for the host.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
Methods inherited from Service
Instance Method Details
#hook_service(id) ⇒ HostHookService
Locates the hook service.
12199 12200 12201 |
# File 'lib/ovirtsdk4/services.rb', line 12199 def hook_service(id) HostHookService.new(self, id) end |
#list(opts = {}) ⇒ Array<Hook>
Returns the list of hooks configured for the host.
The order of the returned list of hooks is random.
12188 12189 12190 |
# File 'lib/ovirtsdk4/services.rb', line 12188 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
12210 12211 12212 12213 12214 12215 12216 12217 12218 12219 |
# File 'lib/ovirtsdk4/services.rb', line 12210 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 |