Class: OvirtSDK4::VmWatchdogService

Inherits:
Service
  • Object
show all
Defined in:
lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb

Instance Method Summary collapse

Methods inherited from Service

#inspect, #to_s

Instance Method Details

#get(opts = {}) ⇒ Watchdog

Returns the information about the watchdog.

Parameters:

  • opts (Hash) (defaults to: {})

    Additional options.

Options Hash (opts):

  • :follow (String)

    Indicates which inner links should be followed. The objects referenced by these links will be fetched as part of the current request. See here for details.

  • :headers (Hash) — default: {}

    Additional HTTP headers.

  • :query (Hash) — default: {}

    Additional URL query parameters.

  • :timeout (Integer) — default: nil

    The timeout for this request, in seconds. If no value is explicitly given then the timeout set globally for the connection will be used.

  • :wait (Boolean) — default: true

    If true wait for the response.

Returns:



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

Parameters:

  • opts (Hash) (defaults to: {})

    Additional options.

Options Hash (opts):

  • :async (Boolean)

    Indicates if the remove should be performed asynchronously.

  • :headers (Hash) — default: {}

    Additional HTTP headers.

  • :query (Hash) — default: {}

    Additional URL query parameters.

  • :timeout (Integer) — default: nil

    The timeout for this request, in seconds. If no value is explicitly given then the timeout set globally for the connection will be used.

  • :wait (Boolean) — default: true

    If true wait for the response.



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.

Parameters:

  • path (String)

    The path of the service.

Returns:

  • (Service)

    A reference to the service.

Raises:



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>

Parameters:

  • watchdog (Watchdog)

    The information about the watchdog.

    The request data must contain at least one of model and action elements. The response data contains complete information about the updated watchdog.

  • opts (Hash) (defaults to: {})

    Additional options.

Options Hash (opts):

  • :async (Boolean)

    Indicates if the update should be performed asynchronously.

  • :headers (Hash) — default: {}

    Additional HTTP headers.

  • :query (Hash) — default: {}

    Additional URL query parameters.

  • :timeout (Integer) — default: nil

    The timeout for this request, in seconds. If no value is explicitly given then the timeout set globally for the connection will be used.

  • :wait (Boolean) — default: true

    If true wait for the response.

Returns:



35489
35490
35491
# File 'lib/ovirtsdk4/services.rb', line 35489

def update(watchdog, opts = {})
  internal_update(watchdog, Watchdog, UPDATE, opts)
end