|
|
@ -256,6 +256,9 @@ def _quaggaFindNeighbors(info):
|
|
|
|
neighborDict = OrderedDict()
|
|
|
|
neighborDict = OrderedDict()
|
|
|
|
for raw in rawNeighbors:
|
|
|
|
for raw in rawNeighbors:
|
|
|
|
descrIdx = 1 if raw[1][0] == "Description:" else 0
|
|
|
|
descrIdx = 1 if raw[1][0] == "Description:" else 0
|
|
|
|
|
|
|
|
if raw[descrIdx + 1][0] == "Hostname:":
|
|
|
|
|
|
|
|
descrIdx += 1
|
|
|
|
|
|
|
|
|
|
|
|
peerdict = {
|
|
|
|
peerdict = {
|
|
|
|
"neighbor_address": raw[0][3].rstrip(","),
|
|
|
|
"neighbor_address": raw[0][3].rstrip(","),
|
|
|
|
"neighbor_as": int(raw[0][6].rstrip(",")),
|
|
|
|
"neighbor_as": int(raw[0][6].rstrip(",")),
|
|
|
@ -321,7 +324,7 @@ def _quaggaFindRoutes(raw):
|
|
|
|
foundTable = True
|
|
|
|
foundTable = True
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
if line != '':
|
|
|
|
if line != '':
|
|
|
|
if line.startswith("Total number of prefixes"):
|
|
|
|
if line.startswith("Total number of prefixes") or line.startswith("Displayed "):
|
|
|
|
break
|
|
|
|
break
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
# parse one route line
|
|
|
|
# parse one route line
|
|
|
|