Class: OvirtSDK4::TemplateWatchdogsService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#add(watchdog, opts = {}) ⇒ Watchdog
Add a watchdog to the template identified by the given id.
-
#list(opts = {}) ⇒ Array<Watchdog>
Returns the list of watchdogs.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
-
#watchdog_service(id) ⇒ TemplateWatchdogService
Locates the
watchdog
service.
Methods inherited from Service
Instance Method Details
#add(watchdog, opts = {}) ⇒ Watchdog
Add a watchdog to the template identified by the given id.
26959 26960 26961 |
# File 'lib/ovirtsdk4/services.rb', line 26959 def add(watchdog, opts = {}) internal_add(watchdog, Watchdog, ADD, opts) end |
#list(opts = {}) ⇒ Array<Watchdog>
Returns the list of watchdogs.
The order of the returned list of watchdogs isn’t guaranteed.
26993 26994 26995 |
# File 'lib/ovirtsdk4/services.rb', line 26993 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
27015 27016 27017 27018 27019 27020 27021 27022 27023 27024 |
# File 'lib/ovirtsdk4/services.rb', line 27015 def service(path) if path.nil? || path == '' return self end index = path.index('/') if index.nil? return watchdog_service(path) end return watchdog_service(path[0..(index - 1)]).service(path[(index +1)..-1]) end |
#watchdog_service(id) ⇒ TemplateWatchdogService
Locates the watchdog
service.
27004 27005 27006 |
# File 'lib/ovirtsdk4/services.rb', line 27004 def watchdog_service(id) TemplateWatchdogService.new(self, id) end |