Add the beginning of a test_qinx() suite, will complete after a refactor in an upcoming commit

This commit is contained in:
Pim van Pelt
2022-03-20 23:32:59 +00:00
parent e44db47989
commit 5247e3a241
4 changed files with 17 additions and 5 deletions

View File

@ -1,6 +1,7 @@
import unittest
import yaml
import validator.lcp as lcp
import validator.interface as interface
class TestLCPMethods(unittest.TestCase):
def setUp(self):
@ -13,3 +14,13 @@ class TestLCPMethods(unittest.TestCase):
## TODO(pim) - ensure that is_unique also takes synthesized LCPs into account
## self.assertFalse(lcp.is_unique(self.cfg, "e1.1000"))
def test_qinx(self):
qinq_iface = interface.get_by_name(self.cfg, "GigabitEthernet1/0/1.201")
mid_iface = interface.get_qinx_parent_by_name(self.cfg, "GigabitEthernet1/0/1.201")
parent_iface = interface.get_parent_by_name(self.cfg, "GigabitEthernet1/0/1.201")
# TODO(pim) - complete once get_*_by_name() returns a dict
# print("qinq", qinq_iface)
# print("mid", mid_iface)
# print("parent", parent_iface)