From 0eb4168aaec0ab3416d8b02eaa1be721b96ee7a8 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Wed, 14 Feb 2024 20:29:05 +0100 Subject: eigrp: T2472: improve code for later tests --- src/conf_mode/protocols_eigrp.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/conf_mode/protocols_eigrp.py b/src/conf_mode/protocols_eigrp.py index 609b39065..c13e52a3d 100755 --- a/src/conf_mode/protocols_eigrp.py +++ b/src/conf_mode/protocols_eigrp.py @@ -19,6 +19,7 @@ from sys import argv from vyos.config import Config from vyos.configdict import dict_merge +from vyos.configverify import verify_vrf from vyos.template import render_to_string from vyos import ConfigError from vyos import frr @@ -72,7 +73,14 @@ def get_config(config=None): return eigrp def verify(eigrp): - pass + if not eigrp or 'deleted' in eigrp: + return + + if 'system_as' not in eigrp: + raise ConfigError('EIGRP system-as must be defined!') + + if 'vrf' in eigrp: + verify_vrf(eigrp) def generate(eigrp): if not eigrp or 'deleted' in eigrp: -- cgit v1.2.3