Class: OvirtSDK4::HostNicService
- Inherits:
-
MeasurableService
- Object
- Service
- MeasurableService
- OvirtSDK4::HostNicService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#get(opts = {}) ⇒ HostNic
Returns the representation of the object managed by this service.
-
#link_layer_discovery_protocol_elements_service ⇒ LinkLayerDiscoveryProtocolService
A reference to information elements received by LLDP on the NIC.
-
#network_attachments_service ⇒ NetworkAttachmentsService
Reference to the service that manages the network attachments assigned to this network interface.
-
#network_labels_service ⇒ NetworkLabelsService
Reference to the service that manages the network labels assigned to this network interface.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
-
#statistics_service ⇒ StatisticsService
Locates the
statistics
service. -
#update_virtual_functions_configuration(opts = {}) ⇒ Object
The action updates virtual function configuration in case the current resource represents an SR-IOV enabled NIC.
-
#virtual_function_allowed_labels_service ⇒ NetworkLabelsService
Retrieves sub-collection resource of network labels that are allowed on an the virtual functions in case that the current resource represents an SR-IOV physical function NIC.
-
#virtual_function_allowed_networks_service ⇒ VirtualFunctionAllowedNetworksService
Retrieves sub-collection resource of networks that are allowed on an the virtual functions in case that the current resource represents an SR-IOV physical function NIC.
Methods inherited from Service
Instance Method Details
#get(opts = {}) ⇒ HostNic
Returns the representation of the object managed by this service.
37372 37373 37374 |
# File 'lib/ovirtsdk4/services.rb', line 37372 def get(opts = {}) internal_get(GET, opts) end |
#link_layer_discovery_protocol_elements_service ⇒ LinkLayerDiscoveryProtocolService
A reference to information elements received by LLDP on the NIC.
37416 37417 37418 |
# File 'lib/ovirtsdk4/services.rb', line 37416 def link_layer_discovery_protocol_elements_service @link_layer_discovery_protocol_elements_service ||= LinkLayerDiscoveryProtocolService.new(self, 'linklayerdiscoveryprotocolelements') end |
#network_attachments_service ⇒ NetworkAttachmentsService
Reference to the service that manages the network attachments assigned to this network interface.
37425 37426 37427 |
# File 'lib/ovirtsdk4/services.rb', line 37425 def @network_attachments_service ||= NetworkAttachmentsService.new(self, 'networkattachments') end |
#network_labels_service ⇒ NetworkLabelsService
Reference to the service that manages the network labels assigned to this network interface.
37434 37435 37436 |
# File 'lib/ovirtsdk4/services.rb', line 37434 def network_labels_service @network_labels_service ||= NetworkLabelsService.new(self, 'networklabels') end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
37474 37475 37476 37477 37478 37479 37480 37481 37482 37483 37484 37485 37486 37487 37488 37489 37490 37491 37492 37493 37494 37495 37496 37497 37498 37499 37500 37501 37502 37503 37504 37505 37506 37507 37508 37509 37510 37511 37512 37513 37514 37515 |
# File 'lib/ovirtsdk4/services.rb', line 37474 def service(path) if path.nil? || path == '' return self end if path == 'linklayerdiscoveryprotocolelements' return link_layer_discovery_protocol_elements_service end if path.start_with?('linklayerdiscoveryprotocolelements/') return link_layer_discovery_protocol_elements_service.service(path[35..-1]) end if path == 'networkattachments' return end if path.start_with?('networkattachments/') return .service(path[19..-1]) end if path == 'networklabels' return network_labels_service end if path.start_with?('networklabels/') return network_labels_service.service(path[14..-1]) end if path == 'statistics' return statistics_service end if path.start_with?('statistics/') return statistics_service.service(path[11..-1]) end if path == 'virtualfunctionallowedlabels' return virtual_function_allowed_labels_service end if path.start_with?('virtualfunctionallowedlabels/') return virtual_function_allowed_labels_service.service(path[29..-1]) end if path == 'virtualfunctionallowednetworks' return virtual_function_allowed_networks_service end if path.start_with?('virtualfunctionallowednetworks/') return virtual_function_allowed_networks_service.service(path[31..-1]) end raise Error.new("The path \"#{path}\" doesn't correspond to any service") end |
#statistics_service ⇒ StatisticsService
Locates the statistics
service.
37443 37444 37445 |
# File 'lib/ovirtsdk4/services.rb', line 37443 def statistics_service @statistics_service ||= StatisticsService.new(self, 'statistics') end |
#update_virtual_functions_configuration(opts = {}) ⇒ Object
The action updates virtual function configuration in case the current resource represents an SR-IOV enabled NIC. The input should be consisted of at least one of the following properties:
-
allNetworksAllowed
-
numberOfVirtualFunctions
Please see the HostNicVirtualFunctionsConfiguration
type for the meaning of the properties.
37407 37408 37409 |
# File 'lib/ovirtsdk4/services.rb', line 37407 def update_virtual_functions_configuration(opts = {}) internal_action(:updatevirtualfunctionsconfiguration, nil, UPDATE_VIRTUAL_FUNCTIONS_CONFIGURATION, opts) end |
#virtual_function_allowed_labels_service ⇒ NetworkLabelsService
Retrieves sub-collection resource of network labels that are allowed on an the virtual functions in case that the current resource represents an SR-IOV physical function NIC.
37453 37454 37455 |
# File 'lib/ovirtsdk4/services.rb', line 37453 def virtual_function_allowed_labels_service @virtual_function_allowed_labels_service ||= NetworkLabelsService.new(self, 'virtualfunctionallowedlabels') end |
#virtual_function_allowed_networks_service ⇒ VirtualFunctionAllowedNetworksService
Retrieves sub-collection resource of networks that are allowed on an the virtual functions in case that the current resource represents an SR-IOV physical function NIC.
37463 37464 37465 |
# File 'lib/ovirtsdk4/services.rb', line 37463 def virtual_function_allowed_networks_service @virtual_function_allowed_networks_service ||= VirtualFunctionAllowedNetworksService.new(self, 'virtualfunctionallowednetworks') end |