Class: OvirtSDK4::VmWatchdogService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#get(opts = {}) ⇒ Watchdog
Returns the information about the watchdog.
-
#remove(opts = {}) ⇒ Object
Removes the watchdog from the virtual machine.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
-
#update(watchdog, opts = {}) ⇒ Watchdog
Updates the information about the watchdog.
Methods inherited from Service
Instance Method Details
#get(opts = {}) ⇒ Watchdog
Returns the information about the watchdog.
35401 35402 35403 |
# File 'lib/ovirtsdk4/services.rb', line 35401 def get(opts = {}) internal_get(GET, opts) end |
#remove(opts = {}) ⇒ Object
Removes the watchdog from the virtual machine.
For example, to remove a watchdog from a virtual machine, send a request like this:
DELETE /ovirt-engine/api/vms/123/watchdogs/00000000-0000-0000-0000-000000000000
35433 35434 35435 |
# File 'lib/ovirtsdk4/services.rb', line 35433 def remove(opts = {}) internal_remove(REMOVE, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
35500 35501 35502 35503 35504 35505 |
# File 'lib/ovirtsdk4/services.rb', line 35500 def service(path) if path.nil? || path == '' return self end raise Error.new("The path \"#{path}\" doesn't correspond to any service") end |
#update(watchdog, opts = {}) ⇒ Watchdog
Updates the information about the watchdog.
You can update the information using action
and model
elements.
For example, to update a watchdog, send a request like this:
PUT /ovirt-engine/api/vms/123/watchdogs
<watchdog>
<action>reset</action>
</watchdog>
with response body:
<watchdog href="/ovirt-engine/api/vms/123/watchdogs/00000000-0000-0000-0000-000000000000" id="00000000-0000-0000-0000-000000000000">
<vm href="/ovirt-engine/api/vms/123" id="123"/>
<action>reset</action>
<model>i6300esb</model>
</watchdog>
35489 35490 35491 |
# File 'lib/ovirtsdk4/services.rb', line 35489 def update(watchdog, opts = {}) internal_update(watchdog, Watchdog, UPDATE, opts) end |