diff options
| author | Thomas Mangin <thomas.mangin@exa.net.uk> | 2020-03-24 18:14:49 +0000 |
|---|---|---|
| committer | Thomas Mangin <thomas.mangin@exa.net.uk> | 2020-03-24 18:14:49 +0000 |
| commit | 8a4dd6c2816bf2289ad4af37ba301b31efdf30a8 (patch) | |
| tree | 5974407307b60984e2b1c71ecf949b1ca182c0f2 /python/vyos/ifconfig/bridge.py | |
| parent | 09f8e57535849aab83df6947fbe94a0e7228ed40 (diff) | |
| download | veeos-1x-8a4dd6c2816bf2289ad4af37ba301b31efdf30a8.tar.gz veeos-1x-8a4dd6c2816bf2289ad4af37ba301b31efdf30a8.zip | |
ifconfig: T2057: add class Register
Diffstat (limited to 'python/vyos/ifconfig/bridge.py')
| -rw-r--r-- | python/vyos/ifconfig/bridge.py | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/python/vyos/ifconfig/bridge.py b/python/vyos/ifconfig/bridge.py index 90c44af13..94b0075d8 100644 --- a/python/vyos/ifconfig/bridge.py +++ b/python/vyos/ifconfig/bridge.py @@ -18,6 +18,8 @@ from vyos.ifconfig.interface import Interface from vyos.validate import * + +@Interface.register class BridgeIf(Interface): """ A bridge is a way to connect two Ethernet segments together in a protocol @@ -28,6 +30,18 @@ class BridgeIf(Interface): The Linux bridge code implements a subset of the ANSI/IEEE 802.1d standard. """ + default = { + 'type': 'bridge', + } + definition = { + **Interface.definition, + **{ + 'section': 'bridge', + 'prefixes': ['br', ], + 'broadcast': True, + }, + } + _sysfs_set = {**Interface._sysfs_set, **{ 'ageing_time': { 'validate': assert_positive, @@ -72,9 +86,6 @@ class BridgeIf(Interface): }, }} - default = { - 'type': 'bridge', - } def set_ageing_time(self, time): """ |
