summaryrefslogtreecommitdiff
path: root/python/vyos/configverify.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-06-30 17:20:26 +0200
committerChristian Poessinger <christian@poessinger.com>2020-07-01 19:06:56 +0200
commit9afc69f83f5e6f44751c3d6c546ea7614baff41c (patch)
treeb1120fdfb2257037f3ba323a3550d7ee9dd787bf /python/vyos/configverify.py
parent65fa21f5e79114fa861d99eae154baad35ce2f11 (diff)
downloadvyos-1x-9afc69f83f5e6f44751c3d6c546ea7614baff41c.tar.gz
vyos-1x-9afc69f83f5e6f44751c3d6c546ea7614baff41c.zip
ifconfig: T2653: use better names for vyos.configverify functions
Diffstat (limited to 'python/vyos/configverify.py')
-rw-r--r--python/vyos/configverify.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/python/vyos/configverify.py b/python/vyos/configverify.py
index 528428e03..32129a048 100644
--- a/python/vyos/configverify.py
+++ b/python/vyos/configverify.py
@@ -23,22 +23,23 @@
from vyos import ConfigError
-def verify_bridge_vrf(config):
+def verify_vrf(config):
"""
- Common helper function used by interface implementations to
- perform recurring validation of VRF configuration
+ Common helper function used by interface implementations to perform
+ recurring validation of VRF configuration.
"""
from netifaces import interfaces
if 'vrf' in config.keys():
if config['vrf'] not in interfaces():
raise ConfigError('VRF "{vrf}" does not exist'.format(**config))
+
if 'is_bridge_member' in config.keys():
raise ConfigError(
'Interface "{ifname}" cannot be both a member of VRF "{vrf}" '
'and bridge "{is_bridge_member}"!'.format(**config))
-def verify_bridge_address(config):
+def verify_address(config):
"""
Common helper function used by interface implementations to
perform recurring validation of IP address assignmenr