Executes the `activate` method.
@param opts [Hash] Additional options.
@option opts [Boolean] :async Indicates if the activation should be performed asynchronously.
@option opts [Hash] :headers ({}) Additional HTTP headers.
@option opts [Hash] :query ({}) Additional URL query parameters.
@option opts [Integer] :timeout (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.
@option opts [Boolean] :wait (true) If `true` wait for the response.
# File lib/ovirtsdk4/services.rb, line 26269 def activate(opts = {}) internal_action(:activate, nil, opts) end
Executes the `deactivate` method.
@param opts [Hash] Additional options.
@option opts [Boolean] :async Indicates if the deactivation should be performed asynchronously.
@option opts [Hash] :headers ({}) Additional HTTP headers.
@option opts [Hash] :query ({}) Additional URL query parameters.
@option opts [Integer] :timeout (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.
@option opts [Boolean] :wait (true) If `true` wait for the response.
# File lib/ovirtsdk4/services.rb, line 26289 def deactivate(opts = {}) internal_action(:deactivate, nil, opts) end
Returns the representation of the object managed by this service.
@param opts [Hash] Additional options.
@option opts [Hash] :headers ({}) Additional HTTP headers.
@option opts [Hash] :query ({}) Additional URL query parameters.
@option opts [Integer] :timeout (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.
@option opts [Boolean] :wait (true) If `true` wait for the response.
@return [Nic]
# File lib/ovirtsdk4/services.rb, line 26314 def get(opts = {}) internal_get(GET, opts) end
Removes the NIC.
For example, to remove the NIC with id `456` from the virtual machine with id `123` send a request like this:
DELETE /ovirt-engine/api/vms/123/nics/456
The hotplugging feature only supports virtual machine operating systems with hotplugging operations. Example operating systems include:
Red Hat Enterprise Linux 6
Red Hat Enterprise Linux 5
Windows Server 2008 and
Windows Server 2003
@param opts [Hash] Additional options.
@option opts [Boolean] :async Indicates if the remove should be performed asynchronously. @option opts [Hash] :headers ({}) Additional HTTP headers.
@option opts [Hash] :query ({}) Additional URL query parameters.
@option opts [Integer] :timeout (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.
@option opts [Boolean] :wait (true) If `true` wait for the response.
# File lib/ovirtsdk4/services.rb, line 26357 def remove(opts = {}) internal_remove(REMOVE, opts) end
Locates the `reported_devices` service.
@return [VmReportedDevicesService] A reference to `reported_devices` service.
# File lib/ovirtsdk4/services.rb, line 26425 def reported_devices_service @reported_devices_service ||= VmReportedDevicesService.new(self, 'reporteddevices') end
Locates the service corresponding to the given path.
@param path [String] The path of the service.
@return [Service] A reference to the service.
# File lib/ovirtsdk4/services.rb, line 26445 def service(path) if path.nil? || path == '' return self end if path == 'reporteddevices' return reported_devices_service end if path.start_with?('reporteddevices/') return reported_devices_service.service(path[16..-1]) end if path == 'statistics' return statistics_service end if path.start_with?('statistics/') return statistics_service.service(path[11..-1]) end raise Error.new("The path \"#{path}\" doesn't correspond to any service") end
Locates the `statistics` service.
@return [StatisticsService] A reference to `statistics` service.
# File lib/ovirtsdk4/services.rb, line 26434 def statistics_service @statistics_service ||= StatisticsService.new(self, 'statistics') end
Updates the NIC.
For example, to update the NIC having with `456` belonging to virtual the machine with id `123` send a request like this:
PUT /ovirt-engine/api/vms/123/nics/456
With a request body like this:
<nic>
<name>mynic</name> <interface>e1000</interface> <vnic_profile id='789'/>
</nic>
The hotplugging feature only supports virtual machine operating systems with hotplugging operations. Example operating systems include:
Red Hat Enterprise Linux 6
Red Hat Enterprise Linux 5
Windows Server 2008 and
Windows Server 2003
@param nic [Nic] The `nic` to update. @param opts [Hash] Additional options.
@option opts [Boolean] :async Indicates if the update should be performed asynchronously.
@option opts [Hash] :headers ({}) Additional HTTP headers.
@option opts [Hash] :query ({}) Additional URL query parameters.
@option opts [Integer] :timeout (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.
@option opts [Boolean] :wait (true) If `true` wait for the response.
@return [Nic]
# File lib/ovirtsdk4/services.rb, line 26416 def update(nic, opts = {}) internal_update(nic, Nic, UPDATE, opts) end