summaryrefslogtreecommitdiff
path: root/smoketest
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-04-26 06:59:52 +0200
committerChristian Poessinger <christian@poessinger.com>2022-04-26 07:00:17 +0200
commit7d5d19e032c32d092f6003d7705f1806680d3405 (patch)
treebaa9720cd8fdc8e974fee6e669d57c6afe9184a2 /smoketest
parent8c5da8889cc2c2bb31765545e2c60c3f403d85d5 (diff)
downloadvyos-1x-7d5d19e032c32d092f6003d7705f1806680d3405.tar.gz
vyos-1x-7d5d19e032c32d092f6003d7705f1806680d3405.zip
smoketest: ethernet: bugfix - NameError: name 'af' is not defined
Diffstat (limited to 'smoketest')
-rwxr-xr-xsmoketest/scripts/cli/test_interfaces_ethernet.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/smoketest/scripts/cli/test_interfaces_ethernet.py b/smoketest/scripts/cli/test_interfaces_ethernet.py
index e8bccd200..05d2ae5f5 100755
--- a/smoketest/scripts/cli/test_interfaces_ethernet.py
+++ b/smoketest/scripts/cli/test_interfaces_ethernet.py
@@ -30,6 +30,7 @@ from vyos.template import is_ipv6
from vyos.util import cmd
from vyos.util import process_named_running
from vyos.util import read_file
+from vyos.validate import is_ipv6_link_local
server_ca_root_cert_data = """
MIIBcTCCARagAwIBAgIUDcAf1oIQV+6WRaW7NPcSnECQ/lUwCgYIKoZIzj0EAwIw
@@ -145,20 +146,19 @@ class EthernetInterfaceTest(BasicInterfaceTest.TestCase):
self.cli_set(self._base_path + [interface, 'speed', 'auto'])
self.cli_set(self._base_path + [interface, 'hw-id', self._macs[interface]])
+ self.cli_commit()
+
# Verify that no address remains on the system as this is an eternal
# interface.
for intf in self._interfaces:
self.assertNotIn(AF_INET, ifaddresses(intf))
# required for IPv6 link-local address
self.assertIn(AF_INET6, ifaddresses(intf))
- for addr in ifaddresses(intf)[af]:
- if is_ipv6(addr):
- # checking link local addresses makes no sense
- if is_ipv6_link_local(addr['addr']):
- continue
- self.assertFalse(is_intf_addr_assigned(intf, addr['addr']))
-
- self.cli_commit()
+ for addr in ifaddresses(intf)[AF_INET6]:
+ # checking link local addresses makes no sense
+ if is_ipv6_link_local(addr['addr']):
+ continue
+ self.assertFalse(is_intf_addr_assigned(intf, addr['addr']))
def test_offloading_rps(self):
# enable RPS on all available CPUs, RPS works woth a CPU bitmask,