1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-29 18:50:08 +03:00

L #-: vf.rb

(cherry picked from commit 5cf34d426e2f037e811c178fa65a65c185de702b)
This commit is contained in:
Ruben S. Montero 2023-08-07 10:35:35 +02:00
parent a24f3f8e6c
commit c5d6ff1555
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87

View File

@ -19,6 +19,7 @@
# Module to use as mixin for configuring VFs
###########################################################################
module VNMMAD::VirtualFunction
# Attributes that can be updated on update_nic action
SUPPORTED_UPDATE = [
:vlan_id,
@ -169,12 +170,13 @@ module VNMMAD::VirtualFunction
pf_dev.strip!
return pf_dev, m[1]
[pf_dev, m[1]]
end
# Generate ip link attributes for the VF
# rubocop:disable Naming/AccessorMethodName
def set_ip_links(pci)
cmd = ""
cmd = ''
# if no vlan id is set use 0 to reset it
vlan_id = if pci[:vlan_id]
@ -190,6 +192,7 @@ module VNMMAD::VirtualFunction
cmd
end
# rubocop:enable Naming/AccessorMethodName
end
# rubocop:enable Style/ClassAndModuleChildren