From 65fa21f5e79114fa861d99eae154baad35ce2f11 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 30 Jun 2020 16:52:00 +0200 Subject: ifconfig: T2653: move pppoe interface to get_config_dict() --- python/vyos/configverify.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'python') diff --git a/python/vyos/configverify.py b/python/vyos/configverify.py index e2fffeca7..528428e03 100644 --- a/python/vyos/configverify.py +++ b/python/vyos/configverify.py @@ -32,7 +32,6 @@ def verify_bridge_vrf(config): 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}" ' @@ -69,6 +68,10 @@ def verify_source_interface(config): perform recurring validation of the existence of a source-interface required by e.g. peth/MACvlan, MACsec ... """ + from netifaces import interfaces if not 'source_interface' in config.keys(): raise ConfigError('Physical source-interface required for ' 'interface "{ifname}"'.format(**config)) + if not config['source_interface'] in interfaces(): + raise ConfigError(f'Source interface {source_interface} does not ' + f'exist'.format(**config)) -- cgit v1.2.3