summaryrefslogtreecommitdiff
path: root/scripts/cli
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-01-25 12:01:15 +0100
committerChristian Poessinger <christian@poessinger.com>2020-01-25 12:01:15 +0100
commitc8814cf9692577c6bf963d2cfc4118f9ee1cd32a (patch)
tree9a1c758b7da3331975c66cdc762629fac40ac127 /scripts/cli
parentecd4207f5620795356768f4235d0af8c6ab90248 (diff)
downloadvyos-1x-c8814cf9692577c6bf963d2cfc4118f9ee1cd32a.tar.gz
vyos-1x-c8814cf9692577c6bf963d2cfc4118f9ee1cd32a.zip
interface: add test for bridge member interfaces
Diffstat (limited to 'scripts/cli')
-rwxr-xr-xscripts/cli/test_interfaces.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/cli/test_interfaces.py b/scripts/cli/test_interfaces.py
index 8b1318791..0e7c4dc07 100755
--- a/scripts/cli/test_interfaces.py
+++ b/scripts/cli/test_interfaces.py
@@ -90,6 +90,23 @@ class BridgeInterfaceTest(BasicInterfaceTest.BaseTest):
self._base_path = ['interfaces', 'bridge']
self._interfaces = ['br0']
+ def test_add_remove_member(self):
+ members = list_interfaces_of_type("ethernet")
+
+ for intf in self._interfaces:
+ cost = 1000
+ priority = 10
+
+ self.session.set(self._base_path + [intf, 'stp'])
+ for member in members:
+ self.session.set(self._base_path + [intf, 'member', 'interface', member])
+ self.session.set(self._base_path + [intf, 'member', 'interface', member, 'cost', str(cost)])
+ self.session.set(self._base_path + [intf, 'member', 'interface', member, 'priority', str(priority)])
+ cost += 1
+ priority += 1
+
+ self.session.commit()
+
if __name__ == '__main__':
unittest.main()