Skip to content
Snippets Groups Projects
Commit bab2cbce authored by Erik Reid's avatar Erik Reid
Browse files

allow additional args to be passed to bgp output parser

parent a4284757
No related branches found
No related tags found
No related merge requests found
......@@ -102,10 +102,16 @@ def shell_commands():
"parser": lambda _: None
}
def _parse_bgp_output(txt, **args):
if txt:
return list(neighbors(_loads(txt), **args))
else:
return {}
yield {
"command": 'show configuration routing-instances IAS protocols bgp | display json',
"key": "bgp",
"parser": lambda txt: list(neighbors(_loads(txt))) if txt else {}
"parser": _parse_bgp_output
}
yield {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment