forked from mirrors/thatmattlove-hyperglass
fix juniper route table parsing error
This commit is contained in:
parent
e4426873cc
commit
d4652a167c
1 changed files with 3 additions and 1 deletions
|
|
@ -15,7 +15,9 @@ def parse_juniper(output):
|
|||
data = {}
|
||||
for i, response in enumerate(output):
|
||||
try:
|
||||
parsed = xmltodict.parse(response, force_list=("rt", "rt-entry"))
|
||||
parsed = xmltodict.parse(
|
||||
response, force_list=("rt", "rt-entry", "community")
|
||||
)
|
||||
|
||||
if "rpc-reply" in parsed.keys():
|
||||
parsed = parsed["rpc-reply"]["route-information"]["route-table"]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue