Explain vlan setup with interface names
We have some reasonably complicated handling for interface names when using vlans and none of it is terribly well explained. Try to add comments that explain what is going on. Change-Id: I1cbf84d1eda1e13d98b4ec6ff41f8520bf04df02
This commit is contained in:
parent
1d9204f820
commit
ed8127c73c
|
@ -133,6 +133,8 @@ def write_redhat_interfaces(interfaces, sys_interfaces):
|
|||
continue
|
||||
|
||||
if 'vlan_id' in interface:
|
||||
# raw_macs will have a single entry if the vlan device is a
|
||||
# phsical device and >1 when it is a bond device.
|
||||
if len(raw_macs) == 1:
|
||||
vlan_raw_device = sys_interfaces.get(raw_macs[0])
|
||||
else:
|
||||
|
@ -360,6 +362,8 @@ def write_debian_interfaces(interfaces, sys_interfaces):
|
|||
|
||||
vlan_raw_device = None
|
||||
if 'vlan_id' in interface:
|
||||
# raw_macs will have a single entry if the vlan device is a
|
||||
# phsical device and >1 when it is a bond device.
|
||||
if len(raw_macs) == 1:
|
||||
vlan_raw_device = sys_interfaces.get(raw_macs[0])
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue