From e916b95feb2ee886c386e75e2a6b76b338addff3 Mon Sep 17 00:00:00 2001 From: dafe84 <109045779+dafe84@users.noreply.github.com> Date: Tue, 4 Jul 2023 13:44:47 +0200 Subject: [PATCH] Update show_hsrp.py Parsing fails if the p9.match(line) parses the second case of your example (bfd enabled but interface unknown) hsrp_detail_dict[interface]['bfd']['enabled'] gets set in line 668 but line 669 will prevent that hsrp_detail_dict[interface]['bfd']['detection_multiplier'] & hsrp_detail_dict[interface]['bfd']['interval'] gets written. Therefore the later 2 should be optional. --- src/genie/libs/parser/iosxr/show_hsrp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/genie/libs/parser/iosxr/show_hsrp.py b/src/genie/libs/parser/iosxr/show_hsrp.py index 9d12c73947..465df00692 100644 --- a/src/genie/libs/parser/iosxr/show_hsrp.py +++ b/src/genie/libs/parser/iosxr/show_hsrp.py @@ -229,8 +229,8 @@ class ShowHsrpDetailSchema(MetaParser): 'interface': str, Optional('bfd'): { 'enabled': bool, - 'detection_multiplier': int, - 'interval': int, + Optional('detection_multiplier'): int, + Optional('interval'): int, }, Optional('use_bia'): bool, Optional('delay'): { 'minimum_delay': int,