class OvirtSDK4::VmNicService
Constants
- ACTIVATE
- DEACTIVATE
- GET
- REMOVE
- UPDATE
Public Instance Methods
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 34097 def activate(opts = {}) internal_action(:activate, nil, ACTIVATE, 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 34123 def deactivate(opts = {}) internal_action(:deactivate, nil, DEACTIVATE, opts) end
Returns the representation of the object managed by this service.
@param opts [Hash] Additional options.
@option opts [String] :follow Indicates which inner links should be followed. The objects referenced by these links will be fetched as part
of the current request. See <<documents/003_common_concepts/follow, here>> for details.
@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 34152 def get(opts = {}) internal_get(GET, opts) end
Reference to the service that manages the network filter parameters of the NIC.
A single top-level network filter may assigned to the NIC by the NIC's xref:types-vnic_profile[vNIC Profile].
@return [NicNetworkFilterParametersService] A reference to `network_filter_parameters` service.
# File lib/ovirtsdk4/services.rb, line 34265 def network_filter_parameters_service @network_filter_parameters_service ||= NicNetworkFilterParametersService.new(self, 'networkfilterparameters') 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:
- source
DELETE /ovirt-engine/api/vms/123/nics/456
- IMPORTANT
-
¶ ↑
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 34195 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 34274 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 34294 def service(path) if path.nil? || path == '' return self end if path == 'networkfilterparameters' return network_filter_parameters_service end if path.start_with?('networkfilterparameters/') return network_filter_parameters_service.service(path[24..-1]) 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 34283 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:
- source
PUT /ovirt-engine/api/vms/123/nics/456
With a request body like this:
- source,xml
<nic>
<name>mynic</name> <interface>e1000</interface> <vnic_profile id='789'/>
</nic>
- IMPORTANT
-
¶ ↑
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 34254 def update(nic, opts = {}) internal_update(nic, Nic, UPDATE, opts) end