Add get_bondethernets()

This commit is contained in:
Pim van Pelt
2022-03-24 16:34:45 +00:00
parent de95e522ab
commit 29a8bae899
2 changed files with 16 additions and 0 deletions

View File

@ -28,3 +28,10 @@ class TestBondEthernetMethods(unittest.TestCase):
self.assertTrue(bondethernet.is_bondethernet(self.cfg, "BondEthernet0"))
self.assertFalse(bondethernet.is_bondethernet(self.cfg, "BondEthernet-notexist"))
self.assertFalse(bondethernet.is_bondethernet(self.cfg, "GigabitEthernet1/0/0"))
def test_enumerators(self):
ifs = bondethernet.get_bondethernets(self.cfg)
self.assertEqual(len(ifs), 1)
self.assertIn("BondEthernet0", ifs)
self.assertNotIn("BondEthernet-noexist", ifs)