From 9afc69f83f5e6f44751c3d6c546ea7614baff41c Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 30 Jun 2020 17:20:26 +0200 Subject: ifconfig: T2653: use better names for vyos.configverify functions --- python/vyos/configverify.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'python/vyos/configverify.py') 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 -- cgit v1.2.3