Class: OvirtSDK4::VmNicService
- Inherits:
-
MeasurableService
- Object
- Service
- MeasurableService
- OvirtSDK4::VmNicService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#activate(opts = {}) ⇒ Object
Executes the
activatemethod. -
#deactivate(opts = {}) ⇒ Object
Executes the
deactivatemethod. -
#get(opts = {}) ⇒ Nic
Returns the representation of the object managed by this service.
-
#network_filter_parameters_service ⇒ NicNetworkFilterParametersService
Reference to the service that manages the network filter parameters of the NIC.
-
#remove(opts = {}) ⇒ Object
Removes the NIC.
-
#reported_devices_service ⇒ VmReportedDevicesService
Locates the
reported_devicesservice. -
#service(path) ⇒ Service
Locates the service corresponding to the given path.
-
#statistics_service ⇒ StatisticsService
Locates the
statisticsservice. -
#update(nic, opts = {}) ⇒ Nic
Updates the NIC.
Methods inherited from Service
Instance Method Details
#activate(opts = {}) ⇒ Object
Executes the activate method.
33654 33655 33656 |
# File 'lib/ovirtsdk4/services.rb', line 33654 def activate(opts = {}) internal_action(:activate, nil, ACTIVATE, opts) end |
#deactivate(opts = {}) ⇒ Object
Executes the deactivate method.
33680 33681 33682 |
# File 'lib/ovirtsdk4/services.rb', line 33680 def deactivate(opts = {}) internal_action(:deactivate, nil, DEACTIVATE, opts) end |
#get(opts = {}) ⇒ Nic
Returns the representation of the object managed by this service.
33709 33710 33711 |
# File 'lib/ovirtsdk4/services.rb', line 33709 def get(opts = {}) internal_get(GET, opts) end |
#network_filter_parameters_service ⇒ NicNetworkFilterParametersService
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 vNIC Profile.
33819 33820 33821 |
# File 'lib/ovirtsdk4/services.rb', line 33819 def network_filter_parameters_service @network_filter_parameters_service ||= NicNetworkFilterParametersService.new(self, 'networkfilterparameters') end |
#remove(opts = {}) ⇒ Object
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 HTTP/1.1
|
Important
|
The hotplugging feature only supports virtual machine operating systems with hotplugging operations. Example operating systems include:
|
33751 33752 33753 |
# File 'lib/ovirtsdk4/services.rb', line 33751 def remove(opts = {}) internal_remove(REMOVE, opts) end |
#reported_devices_service ⇒ VmReportedDevicesService
Locates the reported_devices service.
33828 33829 33830 |
# File 'lib/ovirtsdk4/services.rb', line 33828 def reported_devices_service @reported_devices_service ||= VmReportedDevicesService.new(self, 'reporteddevices') end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
33848 33849 33850 33851 33852 33853 33854 33855 33856 33857 33858 33859 33860 33861 33862 33863 33864 33865 33866 33867 33868 33869 33870 33871 |
# File 'lib/ovirtsdk4/services.rb', line 33848 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 |
#statistics_service ⇒ StatisticsService
Locates the statistics service.
33837 33838 33839 |
# File 'lib/ovirtsdk4/services.rb', line 33837 def statistics_service @statistics_service ||= StatisticsService.new(self, 'statistics') end |
#update(nic, opts = {}) ⇒ Nic
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 HTTP/1.1
With a request body like this:
<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:
|
33808 33809 33810 |
# File 'lib/ovirtsdk4/services.rb', line 33808 def update(nic, opts = {}) internal_update(nic, Nic, UPDATE, opts) end |