diff options
author | Jernej Jakob <jernej.jakob@gmail.com> | 2020-05-01 18:01:14 +0200 |
---|---|---|
committer | Jernej Jakob <jernej.jakob@gmail.com> | 2020-05-04 22:59:39 +0200 |
commit | 571b162345aa18f440ccd3f02f8b9f4b62a16c8a (patch) | |
tree | e3f1b0ffb1c28d4564f78963ff07a61cb9d46398 /src | |
parent | 0ea1abae11dfa5d376f4aff80cd87486370211ed (diff) | |
download | vyos-1x-571b162345aa18f440ccd3f02f8b9f4b62a16c8a.tar.gz vyos-1x-571b162345aa18f440ccd3f02f8b9f4b62a16c8a.zip |
dummy: T2241: make address and bridge membership mutually exclusive
Bridge members should not have any addresses assigned.
Diffstat (limited to 'src')
-rwxr-xr-x | src/conf_mode/interfaces-dummy.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/conf_mode/interfaces-dummy.py b/src/conf_mode/interfaces-dummy.py index 712f867e1..7d266e693 100755 --- a/src/conf_mode/interfaces-dummy.py +++ b/src/conf_mode/interfaces-dummy.py @@ -101,6 +101,11 @@ def verify(dummy): f'"{dummy["vrf"]}" and bridge "{dummy["is_bridge_member"]}" ' f'at the same time!')) + if dummy['is_bridge_member'] and dummy['address']: + raise ConfigError(( + f'Cannot assign address to interface "{dummy["intf"]}" ' + f'as it is a member of bridge "{dummy["is_bridge_member"]}"!')) + return None def generate(dummy): |