From fbb4f315eee8cd701aade8845ea842567a56dc64 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Mon, 3 Jul 2023 20:58:59 +0200 Subject: ospf: T5334: add support for external route summarisation Type-5 and Type-7 LSAs * set protocols ospf aggregation timer * set protocols ospf summary-address x.x.x.x/x [tag 1-4294967295] * set protocols ospf summary-address x.x.x.x/x no-advertise --- src/conf_mode/protocols_ospf.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/conf_mode/protocols_ospf.py b/src/conf_mode/protocols_ospf.py index b73483470..460c9f1a4 100755 --- a/src/conf_mode/protocols_ospf.py +++ b/src/conf_mode/protocols_ospf.py @@ -250,6 +250,13 @@ def verify(ospf): raise ConfigError(f'Segment routing prefix {prefix} cannot have both explicit-null '\ f'and no-php-flag configured at the same time.') + # Check route summarisation + if 'summary_address' in ospf: + for prefix, prefix_options in ospf['summary_address'].items(): + if {'tag', 'no_advertise'} <= set(prefix_options): + raise ConfigError(f'Can not set both "tag" and "no-advertise" for Type-5 '\ + f'and Type-7 route summarisation of "{prefix}"!') + return None def generate(ospf): -- cgit v1.2.3