Skip to content

Commit

Permalink
Merge pull request #1457 from minefuto/iosxr-netconf-bgp-flapcount
Browse files Browse the repository at this point in the history
Fix bgp flap_count issue for iosxr_netconf
  • Loading branch information
mirceaulinic authored Jun 14, 2021
2 parents d72e194 + 0001219 commit cc0c4d2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
6 changes: 1 addition & 5 deletions napalm/iosxr_netconf/iosxr_netconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -1855,7 +1855,7 @@ def get_vrf_neighbors_detail(
),
0,
)
connection_down_count = napalm.base.helpers.convert(
flap_count = napalm.base.helpers.convert(
int,
self._find_txt(
neighbor,
Expand Down Expand Up @@ -1995,10 +1995,6 @@ def get_vrf_neighbors_detail(
),
0,
)
flap_count = int(connection_down_count / 2)
if up:
flap_count -= 1

if remote_as not in bgp_vrf_neighbors_detail[vrf_name].keys():
bgp_vrf_neighbors_detail[vrf_name][remote_as] = []
bgp_vrf_neighbors_detail[vrf_name][remote_as].append(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"configured_keepalive": 60,
"connection_state": "Established",
"export_policy": "EBGP-OUT-POLICY",
"flap_count": -1,
"flap_count": 0,
"holdtime": 180,
"import_policy": "EBGP-IN-POLICY",
"input_messages": 0,
Expand Down Expand Up @@ -83,7 +83,7 @@
"configured_keepalive": 60,
"connection_state": "Established",
"export_policy": "IBGPv6-OUT-POLICY",
"flap_count": -1,
"flap_count": 0,
"holdtime": 180,
"import_policy": "IBGPv6-IN-POLICY",
"input_messages": 0,
Expand Down Expand Up @@ -161,7 +161,7 @@
"configured_keepalive": 60,
"connection_state": "Established",
"export_policy": "IBGP-OUT-POLICY",
"flap_count": 0,
"flap_count": 2,
"holdtime": 180,
"import_policy": "",
"input_messages": 0,
Expand Down Expand Up @@ -198,7 +198,7 @@
"configured_keepalive": 60,
"connection_state": "Established",
"export_policy": "IBGP-OUT-POLICY",
"flap_count": -1,
"flap_count": 0,
"holdtime": 180,
"import_policy": "",
"input_messages": 0,
Expand Down

0 comments on commit cc0c4d2

Please sign in to comment.