summaryrefslogtreecommitdiff
path: root/tests/unittests/test_net.py
diff options
context:
space:
mode:
authorEduardo Otubo <otubo@redhat.com>2020-09-15 18:00:00 +0200
committerGitHub <noreply@github.com>2020-09-15 12:00:00 -0400
commit8439b191ec2f336d544cab86dba2860f969cd5b8 (patch)
treeda218a3e9c514c16c94e49fbc44ade016ea5298d /tests/unittests/test_net.py
parente56b55452549cb037da0a4165154ffa494e9678a (diff)
downloadvyos-cloud-init-8439b191ec2f336d544cab86dba2860f969cd5b8.tar.gz
vyos-cloud-init-8439b191ec2f336d544cab86dba2860f969cd5b8.zip
network: Fix type and respect name when rendering vlan in sysconfig. (#541)
Prior to this change, vlans were rendered in sysconfig with 'TYPE=Ethernet', and incorrectly rendered the PHYSDEV based on the name of the vlan device rather than the 'link' provided in the network config. The change here fixes: * rendering of TYPE=Ethernet for a vlan * adds a warning if the configured device name is not supported per the RHEL 7 docs "11.5. Naming Scheme for VLAN Interfaces" LP: #1788915 LP: #1826608 RHBZ: #1861871
Diffstat (limited to 'tests/unittests/test_net.py')
-rw-r--r--tests/unittests/test_net.py4
1 files changed, 0 insertions, 4 deletions
diff --git a/tests/unittests/test_net.py b/tests/unittests/test_net.py
index 54cc8469..207e47bb 100644
--- a/tests/unittests/test_net.py
+++ b/tests/unittests/test_net.py
@@ -1633,7 +1633,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true
NM_CONTROLLED=no
ONBOOT=yes
PHYSDEV=bond0
- TYPE=Ethernet
USERCTL=no
VLAN=yes"""),
'ifcfg-br0': textwrap.dedent("""\
@@ -1677,7 +1676,6 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true
NM_CONTROLLED=no
ONBOOT=yes
PHYSDEV=eth0
- TYPE=Ethernet
USERCTL=no
VLAN=yes"""),
'ifcfg-eth1': textwrap.dedent("""\
@@ -2286,7 +2284,6 @@ iface bond0 inet6 static
NM_CONTROLLED=no
ONBOOT=yes
PHYSDEV=en0
- TYPE=Ethernet
USERCTL=no
VLAN=yes"""),
},
@@ -3339,7 +3336,6 @@ USERCTL=no
NM_CONTROLLED=no
ONBOOT=yes
PHYSDEV=eno1
- TYPE=Ethernet
USERCTL=no
VLAN=yes
""")