summaryrefslogtreecommitdiff
path: root/smoketest/scripts
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-09-20 13:12:16 +0200
committerChristian Poessinger <christian@poessinger.com>2020-09-20 14:29:32 +0200
commite64ab9ec34ce8cb221f3c82787d3641efa30aac0 (patch)
treefa4d6f7296fdf7c1099ce812688ccbe658229bbf /smoketest/scripts
parentdeb3fba81b6219a18d72eea48c644ec3c2cb724a (diff)
downloadvyos-1x-e64ab9ec34ce8cb221f3c82787d3641efa30aac0.tar.gz
vyos-1x-e64ab9ec34ce8cb221f3c82787d3641efa30aac0.zip
smoketest: T2903: test 802.1ad (Q-in-Q) ethertype
Diffstat (limited to 'smoketest/scripts')
-rw-r--r--smoketest/scripts/cli/base_interfaces_test.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/base_interfaces_test.py b/smoketest/scripts/cli/base_interfaces_test.py
index 14ec7e137..047c19dd0 100644
--- a/smoketest/scripts/cli/base_interfaces_test.py
+++ b/smoketest/scripts/cli/base_interfaces_test.py
@@ -14,12 +14,15 @@
import os
import unittest
+import json
from netifaces import ifaddresses, AF_INET, AF_INET6
from vyos.configsession import ConfigSession
from vyos.ifconfig import Interface
from vyos.util import read_file
+from vyos.util import cmd
+from vyos.util import vyos_dict_search
from vyos.validate import is_intf_addr_assigned, is_ipv6_link_local
class BasicInterfaceTest:
@@ -212,8 +215,12 @@ class BasicInterfaceTest:
self.session.set(base + ['address', address])
self.session.commit()
+
for interface in self._interfaces:
for vif_s in self._qinq_range:
+ tmp = json.loads(cmd(f'ip -d -j link show dev {interface}.{vif_s}'))[0]
+ self.assertEqual(vyos_dict_search('linkinfo.info_data.protocol', tmp), '802.1ad')
+
for vif_c in self._vlan_range:
vif = f'{interface}.{vif_s}.{vif_c}'
for address in self._test_addr: