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.
34579 34580 34581 |
# File 'lib/ovirtsdk4/services.rb', line 34579 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
34611 34612 34613 |
# File 'lib/ovirtsdk4/services.rb', line 34611 def remove(opts = {}) internal_remove(REMOVE, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
34678 34679 34680 34681 34682 34683 |
# File 'lib/ovirtsdk4/services.rb', line 34678 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>
34667 34668 34669 |
# File 'lib/ovirtsdk4/services.rb', line 34667 def update(watchdog, opts = {}) internal_update(watchdog, Watchdog, UPDATE, opts) end |