From 4517225286de8a957f4a2cfa1c469f074d526fec Mon Sep 17 00:00:00 2001 From: Brandon Ewing Date: Mon, 15 Jul 2024 17:09:41 -0500 Subject: [PATCH 01/22] correct typo in typing object --- napalm/base/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/napalm/base/models.py b/napalm/base/models.py index 8ddfde0d6..395c3c8dc 100644 --- a/napalm/base/models.py +++ b/napalm/base/models.py @@ -188,8 +188,8 @@ }, ) -BGPStateAdressFamilyDict = TypedDict( - "BGPStateAdressFamilyDict", +BGPStateAddressFamilyDict = TypedDict( + "BGPStateAddressFamilyDict", {"received_prefixes": int, "accepted_prefixes": int, "sent_prefixes": int}, ) @@ -203,7 +203,7 @@ "is_enabled": bool, "description": str, "uptime": int, - "address_family": Dict[str, BGPStateAdressFamilyDict], + "address_family": Dict[str, BGPStateAddressFamilyDict], }, ) From e31e5e35906e749c5589645ba4a6d5589cf3993c Mon Sep 17 00:00:00 2001 From: Brandon Ewing Date: Mon, 15 Jul 2024 17:09:51 -0500 Subject: [PATCH 02/22] rework napalm.eos.EOSDriver to use JSON Since we have dropped support for EOS < 4.23, we can use the JSON output from `show ip bgp neighbors` and related commands instead of processing text output. This eliminates many edge cases in testing, so I have re-done unit testing as well. --- napalm/eos/eos.py | 187 ++-- .../issue1168/expected_result.json | 91 -- ...S___Local_AS_Desc_BGP_state__remote_r.text | 12 - .../show_ip_bgp_summary_vrf_all.json | 37 - ...__Local_AS_Desc_BGP_state__remote_rou.text | 12 - .../show_ipv6_bgp_summary_vrf_all.json | 37 - .../issue1356/expected_result.json | 841 ------------------ ...S___Local_AS_Desc_BGP_state__remote_r.text | 234 ----- .../show_ip_bgp_summary_vrf_all.json | 465 ---------- ...__Local_AS_Desc_BGP_state__remote_rou.text | 0 .../show_ipv6_bgp_summary_vrf_all.json | 28 - .../issue1759/expected_result.json | 112 --- ...S___Local_AS_Desc_BGP_state__remote_r.text | 0 .../show_ip_bgp_summary_vrf_all.json | 76 -- ...__Local_AS_Desc_BGP_state__remote_rou.text | 30 - .../show_ipv6_bgp_summary_vrf_all.json | 76 -- .../expected_result.json | 91 -- ...S___Local_AS_Desc_BGP_state__remote_r.text | 12 - .../show_ip_bgp_summary_vrf_all.json | 37 - ...__Local_AS_Desc_BGP_state__remote_rou.text | 12 - .../show_ipv6_bgp_summary_vrf_all.json | 24 - .../issue944/expected_result.json | 91 -- ...S___Local_AS_Desc_BGP_state__remote_r.text | 12 - .../issue944/show_ip_bgp_summary_vrf_all.json | 37 - ...__Local_AS_Desc_BGP_state__remote_rou.text | 12 - .../show_ipv6_bgp_summary_vrf_all.json | 37 - .../normal/expected_result.json | 100 +-- .../normal/show_ip_bgp_neighbors_vrf_all.json | 362 ++++++++ ...S___Local_AS_Desc_BGP_state__remote_r.text | 12 - .../normal/show_ip_bgp_summary_vrf_all.json | 70 +- .../normal/show_ipv6_bgp_peers_vrf_all.json | 415 +++++++++ ...__Local_AS_Desc_BGP_state__remote_rou.text | 12 - .../normal/show_ipv6_bgp_summary_vrf_all.json | 70 +- 33 files changed, 959 insertions(+), 2685 deletions(-) delete mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/issue1168/expected_result.json delete mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/issue1168/show_ip_bgp_neighbors_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_r.text delete mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/issue1168/show_ip_bgp_summary_vrf_all.json delete mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/issue1168/show_ipv6_bgp_peers_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_rou.text delete mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/issue1168/show_ipv6_bgp_summary_vrf_all.json delete mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/issue1356/expected_result.json delete mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/issue1356/show_ip_bgp_neighbors_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_r.text delete mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/issue1356/show_ip_bgp_summary_vrf_all.json delete mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/issue1356/show_ipv6_bgp_peers_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_rou.text delete mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/issue1356/show_ipv6_bgp_summary_vrf_all.json delete mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/issue1759/expected_result.json delete mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/issue1759/show_ip_bgp_neighbors_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_r.text delete mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/issue1759/show_ip_bgp_summary_vrf_all.json delete mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/issue1759/show_ipv6_bgp_peers_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_rou.text delete mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/issue1759/show_ipv6_bgp_summary_vrf_all.json delete mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/issue58_neighbor_down/expected_result.json delete mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/issue58_neighbor_down/show_ip_bgp_neighbors_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_r.text delete mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/issue58_neighbor_down/show_ip_bgp_summary_vrf_all.json delete mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/issue58_neighbor_down/show_ipv6_bgp_peers_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_rou.text delete mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/issue58_neighbor_down/show_ipv6_bgp_summary_vrf_all.json delete mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/issue944/expected_result.json delete mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/issue944/show_ip_bgp_neighbors_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_r.text delete mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/issue944/show_ip_bgp_summary_vrf_all.json delete mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/issue944/show_ipv6_bgp_peers_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_rou.text delete mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/issue944/show_ipv6_bgp_summary_vrf_all.json create mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/normal/show_ip_bgp_neighbors_vrf_all.json delete mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/normal/show_ip_bgp_neighbors_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_r.text create mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/normal/show_ipv6_bgp_peers_vrf_all.json delete mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/normal/show_ipv6_bgp_peers_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_rou.text diff --git a/napalm/eos/eos.py b/napalm/eos/eos.py index b0a31ed19..7f08b62a5 100644 --- a/napalm/eos/eos.py +++ b/napalm/eos/eos.py @@ -34,11 +34,12 @@ import pyeapi from pyeapi.eapilib import ConnectionError, EapiConnection from netmiko import ConfigInvalidException +from typing import Dict # NAPALM base import napalm.base.helpers from napalm.base.netmiko_helpers import netmiko_args -from napalm.base.base import NetworkDriver +from napalm.base.base import NetworkDriver, models from napalm.base.utils import string_parsers from napalm.base.exceptions import ( CommitError, @@ -672,142 +673,78 @@ def get_interfaces_counters(self): ) return interface_counters - def get_bgp_neighbors(self): - def get_re_group(res, key, default=None): - """Small helper to retrieve data from re match groups""" - try: - return res.group(key) - except KeyError: - return default - - NEIGHBOR_FILTER = "vrf all | include IPv[46] (Unicast|6PE):.*[0-9]+ | grep -v ' IPv[46] Unicast:/.' | remote AS |^Local AS|Desc|BGP state |remote router ID" # noqa - output_summary_cmds = self._run_commands( - ["show ipv6 bgp summary vrf all", "show ip bgp summary vrf all"], - encoding="json", - ) - output_neighbor_cmds = self._run_commands( + def get_bgp_neighbors(self) -> Dict[str, models.BGPStateNeighborsPerVRFDict]: + cmd_outputs = self._run_commands( [ - "show ip bgp neighbors " + NEIGHBOR_FILTER, - "show ipv6 bgp peers " + NEIGHBOR_FILTER, + "show ip bgp summary vrf all", + "show ipv6 bgp summary vrf all", + "show ip bgp neighbors vrf all", + "show ipv6 bgp peers vrf all", ], - encoding="text", + encoding="json", ) - bgp_counters = defaultdict(lambda: dict(peers={})) - for summary in output_summary_cmds: - """ - Json output looks as follows - "vrfs": { - "default": { - "routerId": 1, - "asn": 1, - "peers": { - "1.1.1.1": { - "msgSent": 1, - "inMsgQueue": 0, - "prefixReceived": 3926, - "upDownTime": 1449501378.418644, - "version": 4, - "msgReceived": 59616, - "prefixAccepted": 3926, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": 1 - } - } - } - } - """ - for vrf, vrf_data in summary["vrfs"].items(): - bgp_counters[vrf]["router_id"] = vrf_data["routerId"] - for peer, peer_data in vrf_data["peers"].items(): - if peer_data["peerState"] == "Idle": + bgp_counters = defaultdict( + lambda: models.BGPStateNeighborsPerVRFDict( + peers=models.BGPStateNeighborDict() + ) + ) + # Iterate IPv4 and IPv6 neighbor details + for cmd in cmd_outputs[2:]: + for vrf_name, vrf_data in cmd["vrfs"].items(): + vrf = bgp_counters[vrf_name] + for peer in vrf_data["peerList"]: + peer_ip = napalm.base.helpers.ip(peer["peerAddress"]) + v4_summary = cmd_outputs[0]["vrfs"][vrf_name]["peers"].get( + peer_ip, {} + ) + v6_summary = cmd_outputs[1]["vrfs"][vrf_name]["peers"].get( + peer_ip, {} + ) + local_as = napalm.base.helpers.as_number(peer["localAsn"]) + remote_as = napalm.base.helpers.as_number(peer["asn"]) + remote_id = napalm.base.helpers.ip(peer["routerId"]) + if peer["state"] == "Idle": is_enabled = ( True - if peer_data["peerStateIdleReason"] != "Admin" + if peer["idleReason"] != "Administratively shut down" else False ) else: is_enabled = True - peer_info = { - "is_up": peer_data["peerState"] == "Established", - "is_enabled": is_enabled, - "uptime": int(time.time() - float(peer_data["upDownTime"])), - "description": peer_data.get("description", ""), - } - bgp_counters[vrf]["peers"][napalm.base.helpers.ip(peer)] = peer_info - lines = [] - [lines.extend(x["output"].splitlines()) for x in output_neighbor_cmds] - while lines: - """ - Raw output from the command looks like the following: - - BGP neighbor is 1.1.1.1, remote AS 1, external link - Description: Very info such descriptive - BGP version 4, remote router ID 1.1.1.1, VRF my_vrf - BGP state is Idle, Administratively shut down - IPv4 Unicast: 683 78 - IPv6 Unicast: 0 0 - Local AS is 2, local router ID 2.2.2.2 - """ - neighbor_info = re.match(self._RE_BGP_INFO, lines.pop(0)) - # this line can be either description or rid info - next_line = lines.pop(0) - desc = re.match(self._RE_BGP_DESC, next_line) - if desc is None: - rid_info = re.match(self._RE_BGP_RID_INFO, next_line) - desc = "" - else: - rid_info = re.match(self._RE_BGP_RID_INFO, lines.pop(0)) - desc = desc.group("description") - lines.pop(0) - v4_stats = re.match(self._RE_BGP_PREFIX, lines.pop(0)) - v6_stats = re.match(self._RE_BGP_PREFIX, lines.pop(0)) - local_as = re.match(self._RE_BGP_LOCAL, lines.pop(0)) - data = { - "remote_as": napalm.base.helpers.as_number(neighbor_info.group("as")), - "remote_id": napalm.base.helpers.ip( - get_re_group(rid_info, "rid", "0.0.0.0") - ), - "local_as": napalm.base.helpers.as_number(local_as.group("as")), - "description": str(desc), - "address_family": { - "ipv4": { - "sent_prefixes": int(get_re_group(v4_stats, "sent", -1)), - "received_prefixes": int( - get_re_group(v4_stats, "received", -1) + is_up = peer["state"] == "Established" + description = peer.get("description", "") + uptime = int(peer.get("establishedTime", -1)) + v4: models.BGPStateAddressFamilyDict = { + "received_prefixes": peer["prefixesReceived"], + "accepted_prefixes": ( + v4_summary["prefixAccepted"] if v4_summary else 0 ), - "accepted_prefixes": -1, - }, - "ipv6": { - "sent_prefixes": int(get_re_group(v6_stats, "sent", -1)), - "received_prefixes": int( - get_re_group(v6_stats, "received", -1) + "sent_prefixes": peer["prefixesSent"], + } + v6: models.BGPStateAddressFamilyDict = { + "received_prefixes": peer["v6PrefixesReceived"], + "accepted_prefixes": ( + v6_summary["prefixAccepted"] if v6_summary else 0 ), - "accepted_prefixes": -1, - }, - }, - } - peer_addr = napalm.base.helpers.ip(neighbor_info.group("neighbor")) - vrf = rid_info.group("vrf") - if peer_addr not in bgp_counters[vrf]["peers"]: - bgp_counters[vrf]["peers"][peer_addr] = { - "is_up": False, # if not found, means it was not found in the oper stats - # i.e. neighbor down, - "uptime": 0, - "is_enabled": True, - } - if ( - "description" in bgp_counters[vrf]["peers"][peer_addr] - and not data["description"] - ): - data["description"] = bgp_counters[vrf]["peers"][peer_addr][ - "description" - ] - bgp_counters[vrf]["peers"][peer_addr].update(data) - if "default" in bgp_counters: - bgp_counters["global"] = bgp_counters.pop("default") + "sent_prefixes": peer["v6PrefixesSent"], + } + vrf["router_id"] = napalm.base.helpers.ip(peer["localRouterId"]) + peer_data: models.BGPStateNeighborDict = { + "local_as": local_as, + "remote_as": remote_as, + "remote_id": remote_id, + "is_up": is_up, + "is_enabled": is_enabled, + "description": description, + "uptime": uptime, + "address_family": { + "ipv4": v4, + "ipv6": v6, + }, + } + vrf["peers"][peer_ip] = peer_data + bgp_counters["global"] = bgp_counters.pop("default") return dict(bgp_counters) def get_environment(self): diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/issue1168/expected_result.json b/test/eos/mocked_data/test_get_bgp_neighbors/issue1168/expected_result.json deleted file mode 100644 index a22cd863f..000000000 --- a/test/eos/mocked_data/test_get_bgp_neighbors/issue1168/expected_result.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "global": { - "router_id": "192.168.56.3", - "peers": { - "192.168.56.4": { - "is_enabled": true, - "uptime": "...", - "remote_as": 65001, - "description": "", - "remote_id": "192.168.56.3", - "local_as": 65002, - "is_up": false, - "address_family": { - "ipv4": { - "sent_prefixes": 0, - "accepted_prefixes": -1, - "received_prefixes": 0 - }, - "ipv6": { - "sent_prefixes": 0, - "accepted_prefixes": -1, - "received_prefixes": 0 - } - } - }, - "192.168.56.2": { - "is_enabled": true, - "uptime": "...", - "remote_as": 65002, - "description": "", - "remote_id": "192.168.56.2", - "local_as": 65001, - "is_up": true, - "address_family": { - "ipv4": { - "sent_prefixes": 0, - "accepted_prefixes": -1, - "received_prefixes": 0 - }, - "ipv6": { - "sent_prefixes": 0, - "accepted_prefixes": -1, - "received_prefixes": 0 - } - } - }, - "2001:7f8::f10:0:2": { - "is_enabled": true, - "uptime": "...", - "remote_as": 65002, - "description": "", - "remote_id": "192.168.56.2", - "local_as": 65001, - "is_up": true, - "address_family": { - "ipv4": { - "sent_prefixes": 0, - "accepted_prefixes": -1, - "received_prefixes": 0 - }, - "ipv6": { - "sent_prefixes": 0, - "accepted_prefixes": -1, - "received_prefixes": 0 - } - } - }, - "2001:7f8::f10:0:3": { - "is_enabled": true, - "uptime": "...", - "remote_as": 65001, - "description": "", - "remote_id": "192.168.56.3", - "local_as": 65002, - "is_up": false, - "address_family": { - "ipv4": { - "sent_prefixes": 0, - "accepted_prefixes": -1, - "received_prefixes": 0 - }, - "ipv6": { - "sent_prefixes": 0, - "accepted_prefixes": -1, - "received_prefixes": 0 - } - } - } - } - } -} diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/issue1168/show_ip_bgp_neighbors_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_r.text b/test/eos/mocked_data/test_get_bgp_neighbors/issue1168/show_ip_bgp_neighbors_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_r.text deleted file mode 100644 index 270822d7d..000000000 --- a/test/eos/mocked_data/test_get_bgp_neighbors/issue1168/show_ip_bgp_neighbors_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_r.text +++ /dev/null @@ -1,12 +0,0 @@ -BGP neighbor is 192.168.56.2, remote AS 65002, external link - BGP version 4, remote router ID 192.168.56.2, VRF default - BGP state is Established, up for 32d16h - IPv4 Unicast: 0 0 - IPv6 Unicast: 0 0 -Local AS is 65001, local router ID 192.168.56.3 -BGP neighbor is 192.168.56.4, remote AS 65001, external link - BGP version 4, remote router ID 192.168.56.3, VRF default - BGP state is Established, up for 32d16h - IPv4 Unicast: 0 0 - IPv6 Unicast: 0 0 -Local AS is 65002, local router ID 192.168.56.2 diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/issue1168/show_ip_bgp_summary_vrf_all.json b/test/eos/mocked_data/test_get_bgp_neighbors/issue1168/show_ip_bgp_summary_vrf_all.json deleted file mode 100644 index 676677875..000000000 --- a/test/eos/mocked_data/test_get_bgp_neighbors/issue1168/show_ip_bgp_summary_vrf_all.json +++ /dev/null @@ -1,37 +0,0 @@ -{ -"vrfs": { -"default": { -"routerId": "192.168.56.3", -"peers": { -"192.168.56.2": { -"msgSent": 6, -"inMsgQueue": 0, -"prefixReceived": 0, -"upDownTime": "1452680643.198489", -"version": 4, -"msgReceived": 5, -"prefixAccepted": 0, -"peerState": "Established", -"outMsgQueue": 0, -"underMaintenance": false, -"asn": 65002 -}, -"192.168.56.4": { -"msgSent": 267, -"inMsgQueue": 0, -"prefixReceived": 0, -"upDownTime": "1452696202.499104", -"version": 4, -"msgReceived": 263, -"prefixAccepted": 0, -"peerState": "Active", -"outMsgQueue": 0, -"underMaintenance": false, -"asn": 65001 -} -}, -"vrf": "default", -"asn": 65001 -} -} -} diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/issue1168/show_ipv6_bgp_peers_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_rou.text b/test/eos/mocked_data/test_get_bgp_neighbors/issue1168/show_ipv6_bgp_peers_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_rou.text deleted file mode 100644 index 6643bdc03..000000000 --- a/test/eos/mocked_data/test_get_bgp_neighbors/issue1168/show_ipv6_bgp_peers_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_rou.text +++ /dev/null @@ -1,12 +0,0 @@ -BGP neighbor is 2001:7f8::f10:0:2, remote AS 65002, external link - BGP version 4, remote router ID 192.168.56.2, VRF default - BGP state is Established, up for 32d16h - IPv4 Unicast: 0 0 - IPv6 Unicast: 0 0 -Local AS is 65001, local router ID 192.168.56.3 -BGP neighbor is 2001:7f8::f10:0:3, remote AS 65001, external link - BGP version 4, remote router ID 192.168.56.3, VRF default - BGP state is Established, up for 32d16h - IPv4 Unicast: 0 0 - IPv6 Unicast: 0 0 -Local AS is 65002, local router ID 192.168.56.2 diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/issue1168/show_ipv6_bgp_summary_vrf_all.json b/test/eos/mocked_data/test_get_bgp_neighbors/issue1168/show_ipv6_bgp_summary_vrf_all.json deleted file mode 100644 index 3252cda14..000000000 --- a/test/eos/mocked_data/test_get_bgp_neighbors/issue1168/show_ipv6_bgp_summary_vrf_all.json +++ /dev/null @@ -1,37 +0,0 @@ -{ -"vrfs": { -"default": { -"routerId": "192.168.56.3", -"peers": { -"2001:7f8::f10:0:2": { -"msgSent": 5, -"inMsgQueue": 0, -"prefixReceived": 0, -"upDownTime": "1452681618.167685", -"version": 4, -"msgReceived": 5, -"prefixAccepted": 0, -"peerState": "Established", -"outMsgQueue": 0, -"underMaintenance": false, -"asn": 65002 -}, -"2001:7f8::f10:0:3": { -"msgSent": 267, -"inMsgQueue": 0, -"prefixReceived": 0, -"upDownTime": "1452696202.499104", -"version": 4, -"msgReceived": 263, -"prefixAccepted": 0, -"peerState": "Active", -"outMsgQueue": 0, -"underMaintenance": false, -"asn": 65001 -} -}, -"vrf": "default", -"asn": 65001 -} -} -} diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/issue1356/expected_result.json b/test/eos/mocked_data/test_get_bgp_neighbors/issue1356/expected_result.json deleted file mode 100644 index 60d0b8c4d..000000000 --- a/test/eos/mocked_data/test_get_bgp_neighbors/issue1356/expected_result.json +++ /dev/null @@ -1,841 +0,0 @@ -{ - "RED": { - "peers": { - "10.10.10.1": { - "is_up": true, - "is_enabled": true, - "uptime": "...", - "remote_as": 64804, - "remote_id": "10.10.10.2", - "local_as": 65101, - "description": "TEST_DESCRIPTION", - "address_family": { - "ipv4": { - "sent_prefixes": 14, - "received_prefixes": 2, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - }, - "10.10.10.3": { - "is_up": true, - "is_enabled": true, - "uptime": "...", - "remote_as": 65066, - "remote_id": "10.10.10.4", - "local_as": 65101, - "description": "TEST_DESCRIPTION", - "address_family": { - "ipv4": { - "sent_prefixes": 3, - "received_prefixes": 11, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - }, - "10.10.10.5": { - "is_up": true, - "is_enabled": true, - "uptime": "...", - "remote_as": 64804, - "remote_id": "10.10.10.2", - "local_as": 65101, - "description": "TEST_DESCRIPTION", - "address_family": { - "ipv4": { - "sent_prefixes": 12, - "received_prefixes": 2, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - } - }, - "router_id": "10.10.10.7" - }, - "BLUE": { - "peers": { - "10.10.10.8": { - "is_up": true, - "is_enabled": true, - "uptime": "...", - "remote_as": 64805, - "remote_id": "10.10.10.9", - "local_as": 65101, - "description": "TEST_DESCRIPTION", - "address_family": { - "ipv4": { - "sent_prefixes": 12, - "received_prefixes": 2, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - }, - "10.10.10.10": { - "is_up": true, - "is_enabled": true, - "uptime": "...", - "remote_as": 64805, - "remote_id": "10.10.10.9", - "local_as": 65101, - "description": "TEST_DESCRIPTION", - "address_family": { - "ipv4": { - "sent_prefixes": 14, - "received_prefixes": 2, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - }, - "10.10.10.12": { - "is_up": true, - "is_enabled": true, - "uptime": "...", - "remote_as": 65066, - "remote_id": "10.10.10.13", - "local_as": 65101, - "description": "TEST_DESCRIPTION", - "address_family": { - "ipv4": { - "sent_prefixes": 7, - "received_prefixes": 7, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - }, - "10.10.10.14": { - "is_up": true, - "is_enabled": true, - "uptime": "...", - "remote_as": 65066, - "remote_id": "10.10.10.15", - "local_as": 65101, - "description": "TEST_DESCRIPTION", - "address_family": { - "ipv4": { - "sent_prefixes": 10, - "received_prefixes": 7, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - }, - "10.10.10.16": { - "is_up": true, - "is_enabled": true, - "uptime": "...", - "remote_as": 65066, - "remote_id": "10.10.10.13", - "local_as": 65101, - "description": "TEST_DESCRIPTION", - "address_family": { - "ipv4": { - "sent_prefixes": 14, - "received_prefixes": 7, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - } - }, - "router_id": "10.10.10.18" - }, - "GREEN": { - "peers": { - "10.10.10.19": { - "is_up": true, - "is_enabled": true, - "uptime": "...", - "remote_as": 64805, - "remote_id": "10.10.10.20", - "local_as": 65101, - "description": "TEST_DESCRIPTION", - "address_family": { - "ipv4": { - "sent_prefixes": 58, - "received_prefixes": 8, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - }, - "10.10.10.21": { - "is_up": true, - "is_enabled": true, - "uptime": "...", - "remote_as": 64805, - "remote_id": "10.10.10.20", - "local_as": 65101, - "description": "TEST_DESCRIPTION", - "address_family": { - "ipv4": { - "sent_prefixes": 58, - "received_prefixes": 8, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - }, - "10.10.10.23": { - "is_up": true, - "is_enabled": true, - "uptime": "...", - "remote_as": 65066, - "remote_id": "10.10.10.24", - "local_as": 65101, - "description": "TEST_DESCRIPTION", - "address_family": { - "ipv4": { - "sent_prefixes": 44, - "received_prefixes": 44, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - }, - "10.10.10.25": { - "is_up": true, - "is_enabled": true, - "uptime": "...", - "remote_as": 65066, - "remote_id": "10.10.10.26", - "local_as": 65101, - "description": "TEST_DESCRIPTION", - "address_family": { - "ipv4": { - "sent_prefixes": 59, - "received_prefixes": 50, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - }, - "10.10.10.30": { - "is_up": true, - "is_enabled": true, - "uptime": "...", - "remote_as": 64804, - "remote_id": "10.10.10.27", - "local_as": 65101, - "description": "TEST_DESCRIPTION", - "address_family": { - "ipv4": { - "sent_prefixes": 53, - "received_prefixes": 8, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - }, - "10.10.10.31": { - "is_up": true, - "is_enabled": true, - "uptime": "...", - "remote_as": 65066, - "remote_id": "10.10.10.26", - "local_as": 65101, - "description": "TEST_DESCRIPTION", - "address_family": { - "ipv4": { - "sent_prefixes": 24, - "received_prefixes": 50, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - }, - "10.10.10.32": { - "is_up": true, - "is_enabled": true, - "uptime": "...", - "remote_as": 65066, - "remote_id": "10.10.10.26", - "local_as": 65101, - "description": "TEST_DESCRIPTION", - "address_family": { - "ipv4": { - "sent_prefixes": 59, - "received_prefixes": 50, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - }, - "10.10.10.33": { - "is_up": true, - "is_enabled": true, - "uptime": "...", - "remote_as": 64804, - "remote_id": "10.10.10.27", - "local_as": 65101, - "description": "TEST_DESCRIPTION", - "address_family": { - "ipv4": { - "sent_prefixes": 59, - "received_prefixes": 8, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - } - }, - "router_id": "10.10.10.28" - }, - "global": { - "peers": { - "10.10.10.34": { - "is_up": true, - "is_enabled": true, - "uptime": "...", - "remote_as": 65118, - "remote_id": "10.10.10.29", - "local_as": 65101, - "description": "TEST_DESCRIPTION", - "address_family": { - "ipv4": { - "sent_prefixes": 4241, - "received_prefixes": 1620, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - }, - "10.10.10.44": { - "is_up": true, - "is_enabled": true, - "uptime": "...", - "remote_as": 65118, - "remote_id": "10.10.10.35", - "local_as": 65101, - "description": "TEST_DESCRIPTION", - "address_family": { - "ipv4": { - "sent_prefixes": 3701, - "received_prefixes": 1620, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - }, - "10.10.10.45": { - "is_up": true, - "is_enabled": true, - "uptime": "...", - "remote_as": 65118, - "remote_id": "10.10.10.39", - "local_as": 65101, - "description": "TEST_DESCRIPTION", - "address_family": { - "ipv4": { - "sent_prefixes": 3998, - "received_prefixes": 1620, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - }, - "10.10.10.46": { - "is_up": true, - "is_enabled": true, - "uptime": "...", - "remote_as": 65118, - "remote_id": "10.10.10.38", - "local_as": 65101, - "description": "TEST_DESCRIPTION", - "address_family": { - "ipv4": { - "sent_prefixes": 3919, - "received_prefixes": 1620, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - }, - "10.10.10.47": { - "is_up": true, - "is_enabled": true, - "uptime": "...", - "remote_as": 64805, - "remote_id": "10.10.10.48", - "local_as": 65101, - "description": "TEST_DESCRIPTION", - "address_family": { - "ipv4": { - "sent_prefixes": 4369, - "received_prefixes": 4, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - }, - "10.10.10.57": { - "is_up": true, - "is_enabled": true, - "uptime": "...", - "remote_as": 64805, - "remote_id": "10.10.10.48", - "local_as": 65101, - "description": "TEST_DESCRIPTION", - "address_family": { - "ipv4": { - "sent_prefixes": 4368, - "received_prefixes": 4, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - }, - "10.10.10.58": { - "is_up": false, - "is_enabled": true, - "uptime": "...", - "remote_as": 64638, - "remote_id": "10.10.10.43", - "local_as": 65101, - "description": "", - "address_family": { - "ipv4": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - }, - "10.10.10.59": { - "is_up": true, - "is_enabled": true, - "uptime": "...", - "remote_as": 65066, - "remote_id": "10.10.10.37", - "local_as": 65101, - "description": "TEST_DESCRIPTION", - "address_family": { - "ipv4": { - "sent_prefixes": 4369, - "received_prefixes": 2721, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - }, - "10.10.10.56": { - "is_up": true, - "is_enabled": true, - "uptime": "...", - "remote_as": 65066, - "remote_id": "10.10.10.37", - "local_as": 65101, - "description": "TEST_DESCRIPTION", - "address_family": { - "ipv4": { - "sent_prefixes": 3048, - "received_prefixes": 2721, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - }, - "10.10.10.55": { - "is_up": true, - "is_enabled": true, - "uptime": "...", - "remote_as": 65066, - "remote_id": "10.10.10.37", - "local_as": 65101, - "description": "TEST_DESCRIPTION", - "address_family": { - "ipv4": { - "sent_prefixes": 4219, - "received_prefixes": 2720, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - }, - "10.10.10.54": { - "is_up": true, - "is_enabled": true, - "uptime": "...", - "remote_as": 64638, - "remote_id": "10.10.10.43", - "local_as": 65101, - "description": "TEST_DESCRIPTION", - "address_family": { - "ipv4": { - "sent_prefixes": 4357, - "received_prefixes": 14, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - }, - "10.10.10.53": { - "is_up": true, - "is_enabled": true, - "uptime": "...", - "remote_as": 65066, - "remote_id": "10.10.10.37", - "local_as": 65101, - "description": "TEST_DESCRIPTION", - "address_family": { - "ipv4": { - "sent_prefixes": 3119, - "received_prefixes": 2721, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - }, - "10.10.10.52": { - "is_up": true, - "is_enabled": true, - "uptime": "...", - "remote_as": 64804, - "remote_id": "10.10.10.50", - "local_as": 65101, - "description": "TEST_DESCRIPTION", - "address_family": { - "ipv4": { - "sent_prefixes": 4366, - "received_prefixes": 4, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - }, - "10.10.10.51": { - "is_up": true, - "is_enabled": true, - "uptime": "...", - "remote_as": 64804, - "remote_id": "10.10.10.50", - "local_as": 65101, - "description": "TEST_DESCRIPTION", - "address_family": { - "ipv4": { - "sent_prefixes": 4369, - "received_prefixes": 4, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - }, - "10.10.10.49": { - "is_up": true, - "is_enabled": true, - "uptime": "...", - "remote_as": 64638, - "remote_id": "10.10.10.41", - "local_as": 65101, - "description": "", - "address_family": { - "ipv4": { - "sent_prefixes": 4369, - "received_prefixes": 14, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - }, - "10.10.10.43": { - "is_up": false, - "uptime": 0, - "is_enabled": true, - "remote_as": 64638, - "remote_id": "10.10.10.43", - "local_as": 65101, - "description": "", - "address_family": { - "ipv4": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - }, - "10.10.10.41": { - "is_up": false, - "uptime": 0, - "is_enabled": true, - "remote_as": 64638, - "remote_id": "10.10.10.41", - "local_as": 65101, - "description": "", - "address_family": { - "ipv4": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - }, - "10.10.10.29": { - "is_up": false, - "uptime": 0, - "is_enabled": true, - "remote_as": 65118, - "remote_id": "10.10.10.29", - "local_as": 65101, - "description": "", - "address_family": { - "ipv4": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - }, - "10.10.10.35": { - "is_up": false, - "uptime": 0, - "is_enabled": true, - "remote_as": 65118, - "remote_id": "10.10.10.35", - "local_as": 65101, - "description": "", - "address_family": { - "ipv4": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - }, - "10.10.10.39": { - "is_up": false, - "uptime": 0, - "is_enabled": true, - "remote_as": 65118, - "remote_id": "10.10.10.39", - "local_as": 65101, - "description": "", - "address_family": { - "ipv4": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - }, - "10.10.10.38": { - "is_up": false, - "uptime": 0, - "is_enabled": true, - "remote_as": 65118, - "remote_id": "10.10.10.38", - "local_as": 65101, - "description": "", - "address_family": { - "ipv4": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - }, - "10.10.10.37": { - "is_up": false, - "uptime": 0, - "is_enabled": true, - "remote_as": 65066, - "remote_id": "10.10.10.37", - "local_as": 65101, - "description": "", - "address_family": { - "ipv4": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - }, - "10.10.10.36": { - "is_up": false, - "uptime": 0, - "is_enabled": true, - "remote_as": 65066, - "remote_id": "10.10.10.37", - "local_as": 65101, - "description": "", - "address_family": { - "ipv4": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 0, - "received_prefixes": 0, - "accepted_prefixes": -1 - } - } - } - }, - "router_id": "2.2.2.2" - } -} diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/issue1356/show_ip_bgp_neighbors_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_r.text b/test/eos/mocked_data/test_get_bgp_neighbors/issue1356/show_ip_bgp_neighbors_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_r.text deleted file mode 100644 index e8d38e423..000000000 --- a/test/eos/mocked_data/test_get_bgp_neighbors/issue1356/show_ip_bgp_neighbors_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_r.text +++ /dev/null @@ -1,234 +0,0 @@ -BGP neighbor is 10.10.10.52, remote AS 64804, external link - BGP version 4, remote router ID 10.10.10.50, VRF default - BGP state is Established, up for 55d22h - IPv4 Unicast: 4366 4 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 2.2.2.2 -BGP neighbor is 10.10.10.51, remote AS 64804, external link - BGP version 4, remote router ID 10.10.10.50, VRF default - BGP state is Established, up for 6d01h - IPv4 Unicast: 4369 4 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 2.2.2.2 -BGP neighbor is 10.10.10.47, remote AS 64805, external link - BGP version 4, remote router ID 10.10.10.48, VRF default - BGP state is Established, up for 5d23h - IPv4 Unicast: 4369 4 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 2.2.2.2 -BGP neighbor is 10.10.10.57, remote AS 64805, external link - BGP version 4, remote router ID 10.10.10.48, VRF default - BGP state is Established, up for 5d23h - IPv4 Unicast: 4368 4 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 2.2.2.2 -BGP neighbor is 10.10.10.43, remote AS 64638, external link - BGP version 4, remote router ID 10.10.10.43, VRF default - BGP state is Established, up for 49d06h - IPv4 Unicast: 0 0 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 2.2.2.2 -BGP neighbor is 10.10.10.41, remote AS 64638, external link - BGP version 4, remote router ID 10.10.10.41, VRF default - BGP state is Established, up for 22:42:48 - IPv4 Unicast: 0 0 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 2.2.2.2 -BGP neighbor is 10.10.10.29, remote AS 65118, external link - BGP version 4, remote router ID 10.10.10.29, VRF default - BGP state is Established, up for 97d08h - IPv4 Unicast: 0 0 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 2.2.2.2 -BGP neighbor is 10.10.10.35, remote AS 65118, external link - BGP version 4, remote router ID 10.10.10.35, VRF default - BGP state is Established, up for 134d05h - IPv4 Unicast: 0 0 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 2.2.2.2 -BGP neighbor is 10.10.10.39, remote AS 65118, external link - BGP version 4, remote router ID 10.10.10.39, VRF default - BGP state is Established, up for 82d03h - IPv4 Unicast: 0 0 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 2.2.2.2 -BGP neighbor is 10.10.10.38, remote AS 65118, external link - BGP version 4, remote router ID 10.10.10.38, VRF default - BGP state is Established, up for 128d07h - IPv4 Unicast: 0 0 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 2.2.2.2 -BGP neighbor is 10.10.10.34, remote AS 65118, external link - BGP version 4, remote router ID 10.10.10.29, VRF default - BGP state is Established, up for 4d06h - IPv4 Unicast: 4241 1620 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 2.2.2.2 -BGP neighbor is 10.10.10.44, remote AS 65118, external link - BGP version 4, remote router ID 10.10.10.35, VRF default - BGP state is Established, up for 81d08h - IPv4 Unicast: 3701 1620 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 2.2.2.2 -BGP neighbor is 10.10.10.45, remote AS 65118, external link - BGP version 4, remote router ID 10.10.10.39, VRF default - BGP state is Established, up for 81d08h - IPv4 Unicast: 3998 1620 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 2.2.2.2 -BGP neighbor is 10.10.10.46, remote AS 65118, external link - BGP version 4, remote router ID 10.10.10.38, VRF default - BGP state is Established, up for 124d02h - IPv4 Unicast: 3919 1620 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 2.2.2.2 -BGP neighbor is 10.10.10.58, remote AS 64638, external link - BGP version 4, remote router ID 10.10.10.43, VRF default - BGP state is Idle, Could not find interface for peer - IPv4 Unicast: 0 0 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 2.2.2.2 -BGP neighbor is 10.10.10.49, remote AS 64638, external link - BGP version 4, remote router ID 10.10.10.41, VRF default - BGP state is Established, up for 22:44:04 - IPv4 Unicast: 4369 14 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 2.2.2.2 -BGP neighbor is 10.10.10.54, remote AS 64638, external link - BGP version 4, remote router ID 10.10.10.43, VRF default - BGP state is Established, up for 6d02h - IPv4 Unicast: 4357 14 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 2.2.2.2 -BGP neighbor is 10.10.10.37, remote AS 65066, external link - BGP version 4, remote router ID 10.10.10.37, VRF default - BGP state is Established, up for 96d00h - IPv4 Unicast: 0 0 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 2.2.2.2 -BGP neighbor is 10.10.10.36, remote AS 65066, external link - BGP version 4, remote router ID 10.10.10.37, VRF default - BGP state is Established, up for 90d07h - IPv4 Unicast: 0 0 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 2.2.2.2 -BGP neighbor is 10.10.10.53, remote AS 65066, external link - BGP version 4, remote router ID 10.10.10.37, VRF default - BGP state is Established, up for 81d07h - IPv4 Unicast: 3119 2721 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 2.2.2.2 -BGP neighbor is 10.10.10.59, remote AS 65066, external link - BGP version 4, remote router ID 10.10.10.37, VRF default - BGP state is Established, up for 22d00h - IPv4 Unicast: 4369 2721 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 2.2.2.2 -BGP neighbor is 10.10.10.56, remote AS 65066, external link - BGP version 4, remote router ID 10.10.10.37, VRF default - BGP state is Established, up for 62d07h - IPv4 Unicast: 3048 2721 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 2.2.2.2 -BGP neighbor is 10.10.10.55, remote AS 65066, external link - BGP version 4, remote router ID 10.10.10.37, VRF default - BGP state is Established, up for 62d07h - IPv4 Unicast: 4219 2720 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 2.2.2.2 -BGP neighbor is 10.10.10.8, remote AS 64805, external link - BGP version 4, remote router ID 10.10.10.9, VRF BLUE - BGP state is Established, up for 5d23h - IPv4 Unicast: 12 2 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 10.10.10.18 -BGP neighbor is 10.10.10.10, remote AS 64805, external link - BGP version 4, remote router ID 10.10.10.9, VRF BLUE - BGP state is Established, up for 5d23h - IPv4 Unicast: 14 2 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 10.10.10.18 -BGP neighbor is 10.10.10.16, remote AS 65066, external link - BGP version 4, remote router ID 10.10.10.13, VRF BLUE - BGP state is Established, up for 22d00h - IPv4 Unicast: 14 7 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 10.10.10.18 -BGP neighbor is 10.10.10.12, remote AS 65066, external link - BGP version 4, remote router ID 10.10.10.13, VRF BLUE - BGP state is Established, up for 60d02h - IPv4 Unicast: 7 7 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 10.10.10.18 -BGP neighbor is 10.10.10.14, remote AS 65066, external link - BGP version 4, remote router ID 10.10.10.15, VRF BLUE - BGP state is Established, up for 60d02h - IPv4 Unicast: 10 7 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 10.10.10.18 -BGP neighbor is 10.10.10.30, remote AS 64804, external link - BGP version 4, remote router ID 10.10.10.27, VRF GREEN - BGP state is Established, up for 55d22h - IPv4 Unicast: 53 8 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 10.10.10.28 -BGP neighbor is 10.10.10.33, remote AS 64804, external link - BGP version 4, remote router ID 10.10.10.27, VRF GREEN - BGP state is Established, up for 6d01h - IPv4 Unicast: 59 8 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 10.10.10.28 -BGP neighbor is 10.10.10.21, remote AS 64805, external link - BGP version 4, remote router ID 10.10.10.20, VRF GREEN - BGP state is Established, up for 5d23h - IPv4 Unicast: 58 8 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 10.10.10.28 -BGP neighbor is 10.10.10.19, remote AS 64805, external link - BGP version 4, remote router ID 10.10.10.20, VRF GREEN - BGP state is Established, up for 5d23h - IPv4 Unicast: 58 8 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 10.10.10.28 -BGP neighbor is 10.10.10.31, remote AS 65066, external link - BGP version 4, remote router ID 10.10.10.26, VRF GREEN - BGP state is Established, up for 60d02h - IPv4 Unicast: 24 50 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 10.10.10.28 -BGP neighbor is 10.10.10.32, remote AS 65066, external link - BGP version 4, remote router ID 10.10.10.26, VRF GREEN - BGP state is Established, up for 22d00h - IPv4 Unicast: 59 50 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 10.10.10.28 -BGP neighbor is 10.10.10.25, remote AS 65066, external link - BGP version 4, remote router ID 10.10.10.26, VRF GREEN - BGP state is Established, up for 60d02h - IPv4 Unicast: 59 50 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 10.10.10.28 -BGP neighbor is 10.10.10.23, remote AS 65066, external link - BGP version 4, remote router ID 10.10.10.24, VRF GREEN - BGP state is Established, up for 60d02h - IPv4 Unicast: 44 44 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 10.10.10.28 -BGP neighbor is 10.10.10.5, remote AS 64804, external link - BGP version 4, remote router ID 10.10.10.2, VRF RED - BGP state is Established, up for 55d22h - IPv4 Unicast: 12 2 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 10.10.10.7 -BGP neighbor is 10.10.10.1, remote AS 64804, external link - BGP version 4, remote router ID 10.10.10.2, VRF RED - BGP state is Established, up for 6d01h - IPv4 Unicast: 14 2 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 10.10.10.7 -BGP neighbor is 10.10.10.3, remote AS 65066, external link - BGP version 4, remote router ID 10.10.10.4, VRF RED - BGP state is Established, up for 60d02h - IPv4 Unicast: 3 11 - IPv6 Unicast: 0 0 -Local AS is 65101, local router ID 10.10.10.7 diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/issue1356/show_ip_bgp_summary_vrf_all.json b/test/eos/mocked_data/test_get_bgp_neighbors/issue1356/show_ip_bgp_summary_vrf_all.json deleted file mode 100644 index 3785b9642..000000000 --- a/test/eos/mocked_data/test_get_bgp_neighbors/issue1356/show_ip_bgp_summary_vrf_all.json +++ /dev/null @@ -1,465 +0,0 @@ -{ - "vrfs": { - "RED": { - "routerId": "10.10.10.7", - "peers": { - "10.10.10.1": { - "description": "TEST_DESCRIPTION", - "msgSent": 364186, - "inMsgQueue": 0, - "prefixReceived": 2, - "upDownTime": 1609977600.0, - "version": 4, - "prefixAccepted": 2, - "msgReceived": 457251, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "64804" - }, - "10.10.10.3": { - "description": "TEST_DESCRIPTION", - "msgSent": 101743, - "inMsgQueue": 0, - "prefixReceived": 11, - "upDownTime": 1605305600.0, - "version": 4, - "prefixAccepted": 11, - "msgReceived": 101674, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "65066" - }, - "10.10.10.5": { - "description": "TEST_DESCRIPTION", - "msgSent": 106639, - "inMsgQueue": 0, - "prefixReceived": 2, - "upDownTime": 1605665792.0, - "version": 4, - "prefixAccepted": 2, - "msgReceived": 106358, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "64804" - } - }, - "vrf": "RED", - "asn": "65101" - }, - "BLUE": { - "routerId": "10.10.10.18", - "peers": { - "10.10.10.8": { - "description": "TEST_DESCRIPTION", - "msgSent": 79261, - "inMsgQueue": 0, - "prefixReceived": 2, - "upDownTime": 1609982208.0, - "version": 4, - "prefixAccepted": 2, - "msgReceived": 78617, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "64805" - }, - "10.10.10.10": { - "description": "TEST_DESCRIPTION", - "msgSent": 79191, - "inMsgQueue": 0, - "prefixReceived": 2, - "upDownTime": 1609982208.0, - "version": 4, - "prefixAccepted": 2, - "msgReceived": 78571, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "64805" - }, - "10.10.10.12": { - "description": "TEST_DESCRIPTION", - "msgSent": 101673, - "inMsgQueue": 0, - "prefixReceived": 7, - "upDownTime": 1605305600.0, - "version": 4, - "prefixAccepted": 7, - "msgReceived": 101731, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "65066" - }, - "10.10.10.14": { - "description": "TEST_DESCRIPTION", - "msgSent": 101697, - "inMsgQueue": 0, - "prefixReceived": 7, - "upDownTime": 1605306368.0, - "version": 4, - "prefixAccepted": 7, - "msgReceived": 101696, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "65066" - }, - "10.10.10.16": { - "description": "TEST_DESCRIPTION", - "msgSent": 101718, - "inMsgQueue": 0, - "prefixReceived": 7, - "upDownTime": 1608598272.0, - "version": 4, - "prefixAccepted": 7, - "msgReceived": 101762, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "65066" - } - }, - "vrf": "BLUE", - "asn": "65101" - }, - "GREEN": { - "routerId": "10.10.10.28", - "peers": { - "10.10.10.19": { - "description": "TEST_DESCRIPTION", - "msgSent": 79487, - "inMsgQueue": 0, - "prefixReceived": 8, - "upDownTime": 1609982208.0, - "version": 4, - "prefixAccepted": 8, - "msgReceived": 79021, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "64805" - }, - "10.10.10.21": { - "description": "TEST_DESCRIPTION", - "msgSent": 79500, - "inMsgQueue": 0, - "prefixReceived": 8, - "upDownTime": 1609982208.0, - "version": 4, - "prefixAccepted": 8, - "msgReceived": 78944, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "64805" - }, - "10.10.10.23": { - "description": "TEST_DESCRIPTION", - "msgSent": 101910, - "inMsgQueue": 0, - "prefixReceived": 44, - "upDownTime": 1605306112.0, - "version": 4, - "prefixAccepted": 44, - "msgReceived": 101898, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "65066" - }, - "10.10.10.25": { - "description": "TEST_DESCRIPTION", - "msgSent": 101906, - "inMsgQueue": 0, - "prefixReceived": 50, - "upDownTime": 1605305216.0, - "version": 4, - "prefixAccepted": 50, - "msgReceived": 101872, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "65066" - }, - "10.10.10.30": { - "description": "TEST_DESCRIPTION", - "msgSent": 106865, - "inMsgQueue": 0, - "prefixReceived": 8, - "upDownTime": 1605665792.0, - "version": 4, - "prefixAccepted": 8, - "msgReceived": 106462, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "64804" - }, - "10.10.10.31": { - "description": "TEST_DESCRIPTION", - "msgSent": 101798, - "inMsgQueue": 0, - "prefixReceived": 50, - "upDownTime": 1605305216.0, - "version": 4, - "prefixAccepted": 50, - "msgReceived": 101891, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "65066" - }, - "10.10.10.32": { - "description": "TEST_DESCRIPTION", - "msgSent": 102008, - "inMsgQueue": 0, - "prefixReceived": 50, - "upDownTime": 1608598272.0, - "version": 4, - "prefixAccepted": 50, - "msgReceived": 101927, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "65066" - }, - "10.10.10.33": { - "description": "TEST_DESCRIPTION", - "msgSent": 739925, - "inMsgQueue": 0, - "prefixReceived": 8, - "upDownTime": 1609977600.0, - "version": 4, - "prefixAccepted": 8, - "msgReceived": 775079, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "64804" - } - }, - "vrf": "GREEN", - "asn": "65101" - }, - "default": { - "routerId": "2.2.2.2", - "peers": { - "10.10.10.34": { - "description": "TEST_DESCRIPTION", - "msgSent": 2267110, - "inMsgQueue": 0, - "prefixReceived": 1615, - "upDownTime": 1610129536.0, - "version": 4, - "prefixAccepted": 1615, - "msgReceived": 2109321, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "65118" - }, - "10.10.10.44": { - "description": "TEST_DESCRIPTION", - "msgSent": 2148074, - "inMsgQueue": 0, - "prefixReceived": 1615, - "upDownTime": 1603470976.0, - "version": 4, - "prefixAccepted": 1615, - "msgReceived": 2121077, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "65118" - }, - "10.10.10.45": { - "description": "TEST_DESCRIPTION", - "msgSent": 2044419, - "inMsgQueue": 0, - "prefixReceived": 1615, - "upDownTime": 1603470208.0, - "version": 4, - "prefixAccepted": 1615, - "msgReceived": 2108285, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "65118" - }, - "10.10.10.46": { - "description": "TEST_DESCRIPTION", - "msgSent": 2234699, - "inMsgQueue": 0, - "prefixReceived": 1615, - "upDownTime": 1599775616.0, - "version": 4, - "prefixAccepted": 1615, - "msgReceived": 2181235, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "65118" - }, - "10.10.10.47": { - "description": "TEST_DESCRIPTION", - "msgSent": 1124065, - "inMsgQueue": 0, - "prefixReceived": 4, - "upDownTime": 1609982208.0, - "version": 4, - "prefixAccepted": 4, - "msgReceived": 126715, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "64805" - }, - "10.10.10.57": { - "description": "TEST_DESCRIPTION", - "msgSent": 1124065, - "inMsgQueue": 0, - "prefixReceived": 4, - "upDownTime": 1609982208.0, - "version": 4, - "prefixAccepted": 4, - "msgReceived": 129890, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "64805" - }, - "10.10.10.58": { - "msgSent": 1159191, - "inMsgQueue": 0, - "peerStateIdleReason": "NoInterface", - "prefixReceived": 0, - "upDownTime": 1609975040.0, - "version": 4, - "msgReceived": 757763, - "prefixAccepted": 0, - "peerState": "Idle", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "64638" - }, - "10.10.10.59": { - "description": "TEST_DESCRIPTION", - "msgSent": 2181044, - "inMsgQueue": 0, - "prefixReceived": 2721, - "upDownTime": 1608598272.0, - "version": 4, - "prefixAccepted": 2721, - "msgReceived": 1728564, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "65066" - }, - "10.10.10.56": { - "description": "TEST_DESCRIPTION", - "msgSent": 1931429, - "inMsgQueue": 0, - "prefixReceived": 2721, - "upDownTime": 1605115520.0, - "version": 4, - "prefixAccepted": 2721, - "msgReceived": 1772562, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "65066" - }, - "10.10.10.55": { - "description": "TEST_DESCRIPTION", - "msgSent": 1958057, - "inMsgQueue": 0, - "prefixReceived": 2720, - "upDownTime": 1605115520.0, - "version": 4, - "prefixAccepted": 2720, - "msgReceived": 1645064, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "65066" - }, - "10.10.10.54": { - "description": "TEST_DESCRIPTION", - "msgSent": 991398, - "inMsgQueue": 0, - "prefixReceived": 14, - "upDownTime": 1609972480.0, - "version": 4, - "prefixAccepted": 14, - "msgReceived": 749926, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "64638" - }, - "10.10.10.53": { - "description": "TEST_DESCRIPTION", - "msgSent": 2271489, - "inMsgQueue": 0, - "prefixReceived": 2721, - "upDownTime": 1603473536.0, - "version": 4, - "prefixAccepted": 2721, - "msgReceived": 2003091, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "65066" - }, - "10.10.10.52": { - "description": "TEST_DESCRIPTION", - "msgSent": 1652455, - "inMsgQueue": 0, - "prefixReceived": 4, - "upDownTime": 1605665792.0, - "version": 4, - "prefixAccepted": 4, - "msgReceived": 108253, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "64804" - }, - "10.10.10.51": { - "description": "TEST_DESCRIPTION", - "msgSent": 5587106, - "inMsgQueue": 0, - "prefixReceived": 4, - "upDownTime": 1609977600.0, - "version": 4, - "prefixAccepted": 4, - "msgReceived": 668095, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "64804" - }, - "10.10.10.49": { - "msgSent": 39221, - "inMsgQueue": 0, - "prefixReceived": 14, - "upDownTime": 1610418048.0, - "version": 4, - "prefixAccepted": 14, - "msgReceived": 42632, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "64638" - } - }, - "vrf": "default", - "asn": "65101" - } - } -} diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/issue1356/show_ipv6_bgp_peers_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_rou.text b/test/eos/mocked_data/test_get_bgp_neighbors/issue1356/show_ipv6_bgp_peers_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_rou.text deleted file mode 100644 index e69de29bb..000000000 diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/issue1356/show_ipv6_bgp_summary_vrf_all.json b/test/eos/mocked_data/test_get_bgp_neighbors/issue1356/show_ipv6_bgp_summary_vrf_all.json deleted file mode 100644 index 40ea5266c..000000000 --- a/test/eos/mocked_data/test_get_bgp_neighbors/issue1356/show_ipv6_bgp_summary_vrf_all.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "vrfs": { - "RED": { - "routerId": "10.10.10.7", - "peers": {}, - "vrf": "RED", - "asn": "65101" - }, - "BLUE": { - "routerId": "10.10.10.18", - "peers": {}, - "vrf": "BLUE", - "asn": "65101" - }, - "GREEN": { - "routerId": "10.10.10.28", - "peers": {}, - "vrf": "GREEN", - "asn": "65101" - }, - "default": { - "routerId": "2.2.2.2", - "peers": {}, - "vrf": "default", - "asn": "65101" - } - } -} diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/issue1759/expected_result.json b/test/eos/mocked_data/test_get_bgp_neighbors/issue1759/expected_result.json deleted file mode 100644 index ee7922393..000000000 --- a/test/eos/mocked_data/test_get_bgp_neighbors/issue1759/expected_result.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "global": { - "peers": { - "fe80::a8c1:abff:fe0b:7b5f%Et5": { - "is_up": true, - "is_enabled": true, - "uptime": "...", - "description": "", - "remote_as": 4259840008, - "remote_id": "172.18.0.8", - "local_as": 4259906562, - "address_family": { - "ipv4": { - "sent_prefixes": 9, - "received_prefixes": 2, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 9, - "received_prefixes": 2, - "accepted_prefixes": -1 - } - } - }, - "fe80::a8c1:abff:fe27:69e9%Et2": { - "is_up": true, - "is_enabled": true, - "uptime": "...", - "description": "", - "remote_as": 4259973121, - "remote_id": "172.18.8.1", - "local_as": 4259906562, - "address_family": { - "ipv4": { - "sent_prefixes": 9, - "received_prefixes": 5, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 9, - "received_prefixes": 5, - "accepted_prefixes": -1 - } - } - }, - "fe80::a8c1:abff:fe35:51d9%Et1": { - "is_up": true, - "is_enabled": true, - "uptime": "...", - "description": "", - "remote_as": 4259973120, - "remote_id": "172.18.8.0", - "local_as": 4259906562, - "address_family": { - "ipv4": { - "sent_prefixes": 6, - "received_prefixes": 5, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 6, - "received_prefixes": 5, - "accepted_prefixes": -1 - } - } - }, - "fe80::a8c1:abff:fe5d:9706%Et4": { - "is_up": true, - "is_enabled": true, - "uptime": "...", - "description": "", - "remote_as": 4259840007, - "remote_id": "172.18.0.7", - "local_as": 4259906562, - "address_family": { - "ipv4": { - "sent_prefixes": 9, - "received_prefixes": 2, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 9, - "received_prefixes": 2, - "accepted_prefixes": -1 - } - } - }, - "fe80::a8c1:abff:fe95:fa49%Et3": { - "is_up": true, - "is_enabled": true, - "uptime": "...", - "description": "", - "remote_as": 4259840005, - "remote_id": "172.18.0.5", - "local_as": 4259906562, - "address_family": { - "ipv4": { - "sent_prefixes": 9, - "received_prefixes": 2, - "accepted_prefixes": -1 - }, - "ipv6": { - "sent_prefixes": 9, - "received_prefixes": 2, - "accepted_prefixes": -1 - } - } - } - }, - "router_id": "172.18.4.2" - } -} diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/issue1759/show_ip_bgp_neighbors_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_r.text b/test/eos/mocked_data/test_get_bgp_neighbors/issue1759/show_ip_bgp_neighbors_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_r.text deleted file mode 100644 index e69de29bb..000000000 diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/issue1759/show_ip_bgp_summary_vrf_all.json b/test/eos/mocked_data/test_get_bgp_neighbors/issue1759/show_ip_bgp_summary_vrf_all.json deleted file mode 100644 index 0155ea42a..000000000 --- a/test/eos/mocked_data/test_get_bgp_neighbors/issue1759/show_ip_bgp_summary_vrf_all.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "vrfs": { - "default": { - "routerId": "172.18.4.2", - "peers": { - "fe80::a8c1:abff:fe0b:7b5f%Et5": { - "msgSent": 239229, - "inMsgQueue": 0, - "prefixReceived": 2, - "upDownTime": 1664912777.128896, - "version": 4, - "prefixAccepted": 2, - "msgReceived": 203694, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "65000.8" - }, - "fe80::a8c1:abff:fe27:69e9%Et2": { - "msgSent": 11997, - "inMsgQueue": 0, - "prefixReceived": 5, - "upDownTime": 1664912780.356704, - "version": 4, - "prefixAccepted": 5, - "msgReceived": 11972, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "65002.2049" - }, - "fe80::a8c1:abff:fe35:51d9%Et1": { - "msgSent": 11984, - "inMsgQueue": 0, - "prefixReceived": 5, - "upDownTime": 1664912783.670673, - "version": 4, - "prefixAccepted": 5, - "msgReceived": 11979, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "65002.2048" - }, - "fe80::a8c1:abff:fe5d:9706%Et4": { - "msgSent": 239170, - "inMsgQueue": 0, - "prefixReceived": 2, - "upDownTime": 1664912777.50903, - "version": 4, - "prefixAccepted": 2, - "msgReceived": 203718, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "65000.7" - }, - "fe80::a8c1:abff:fe95:fa49%Et3": { - "msgSent": 239116, - "inMsgQueue": 0, - "prefixReceived": 2, - "upDownTime": 1664912777.604791, - "version": 4, - "prefixAccepted": 2, - "msgReceived": 203718, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "65000.5" - } - }, - "vrf": "default", - "asn": "65001.1026" - } - } -} diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/issue1759/show_ipv6_bgp_peers_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_rou.text b/test/eos/mocked_data/test_get_bgp_neighbors/issue1759/show_ipv6_bgp_peers_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_rou.text deleted file mode 100644 index f1d5ed371..000000000 --- a/test/eos/mocked_data/test_get_bgp_neighbors/issue1759/show_ipv6_bgp_peers_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_rou.text +++ /dev/null @@ -1,30 +0,0 @@ -BGP neighbor is fe80::a8c1:abff:fe0b:7b5f%Et5, remote AS 65000.8, external link - BGP version 4, remote router ID 172.18.0.8, VRF default - BGP state is Established, up for 7d01h - IPv4 Unicast: 9 2 1 0 - IPv6 Unicast: 9 2 1 0 -Local AS is 65001.1026, local router ID 172.18.4.2 -BGP neighbor is fe80::a8c1:abff:fe27:69e9%Et2, remote AS 65002.2049, external link - BGP version 4, remote router ID 172.18.8.1, VRF default - BGP state is Established, up for 7d01h - IPv4 Unicast: 9 5 1 0 - IPv6 Unicast: 9 5 1 0 -Local AS is 65001.1026, local router ID 172.18.4.2 -BGP neighbor is fe80::a8c1:abff:fe35:51d9%Et1, remote AS 65002.2048, external link - BGP version 4, remote router ID 172.18.8.0, VRF default - BGP state is Established, up for 7d01h - IPv4 Unicast: 6 5 4 0 - IPv6 Unicast: 6 5 4 0 -Local AS is 65001.1026, local router ID 172.18.4.2 -BGP neighbor is fe80::a8c1:abff:fe5d:9706%Et4, remote AS 65000.7, external link - BGP version 4, remote router ID 172.18.0.7, VRF default - BGP state is Established, up for 7d01h - IPv4 Unicast: 9 2 1 0 - IPv6 Unicast: 9 2 1 0 -Local AS is 65001.1026, local router ID 172.18.4.2 -BGP neighbor is fe80::a8c1:abff:fe95:fa49%Et3, remote AS 65000.5, external link - BGP version 4, remote router ID 172.18.0.5, VRF default - BGP state is Established, up for 7d01h - IPv4 Unicast: 9 2 1 0 - IPv6 Unicast: 9 2 1 0 -Local AS is 65001.1026, local router ID 172.18.4.2 diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/issue1759/show_ipv6_bgp_summary_vrf_all.json b/test/eos/mocked_data/test_get_bgp_neighbors/issue1759/show_ipv6_bgp_summary_vrf_all.json deleted file mode 100644 index aa96e6d48..000000000 --- a/test/eos/mocked_data/test_get_bgp_neighbors/issue1759/show_ipv6_bgp_summary_vrf_all.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "vrfs": { - "default": { - "routerId": "172.18.4.2", - "peers": { - "fe80::a8c1:abff:fe0b:7b5f%Et5": { - "msgSent": 239193, - "inMsgQueue": 0, - "prefixReceived": 2, - "upDownTime": 1664912777.128896, - "version": 4, - "prefixAccepted": 2, - "msgReceived": 203664, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "65000.8" - }, - "fe80::a8c1:abff:fe27:69e9%Et2": { - "msgSent": 11995, - "inMsgQueue": 0, - "prefixReceived": 5, - "upDownTime": 1664912780.356703, - "version": 4, - "prefixAccepted": 5, - "msgReceived": 11970, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "65002.2049" - }, - "fe80::a8c1:abff:fe35:51d9%Et1": { - "msgSent": 11982, - "inMsgQueue": 0, - "prefixReceived": 5, - "upDownTime": 1664912783.670674, - "version": 4, - "prefixAccepted": 5, - "msgReceived": 11977, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "65002.2048" - }, - "fe80::a8c1:abff:fe5d:9706%Et4": { - "msgSent": 239135, - "inMsgQueue": 0, - "prefixReceived": 2, - "upDownTime": 1664912777.50903, - "version": 4, - "prefixAccepted": 2, - "msgReceived": 203688, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "65000.7" - }, - "fe80::a8c1:abff:fe95:fa49%Et3": { - "msgSent": 239080, - "inMsgQueue": 0, - "prefixReceived": 2, - "upDownTime": 1664912777.604791, - "version": 4, - "prefixAccepted": 2, - "msgReceived": 203688, - "peerState": "Established", - "outMsgQueue": 0, - "underMaintenance": false, - "asn": "65000.5" - } - }, - "vrf": "default", - "asn": "65001.1026" - } - } -} diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/issue58_neighbor_down/expected_result.json b/test/eos/mocked_data/test_get_bgp_neighbors/issue58_neighbor_down/expected_result.json deleted file mode 100644 index 26963dca7..000000000 --- a/test/eos/mocked_data/test_get_bgp_neighbors/issue58_neighbor_down/expected_result.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "global": { - "router_id": "192.168.56.3", - "peers": { - "192.168.56.4": { - "is_enabled": true, - "uptime": "...", - "remote_as": 65001, - "description": "", - "remote_id": "192.168.56.3", - "local_as": 65002, - "is_up": false, - "address_family": { - "ipv4": { - "sent_prefixes": 0, - "accepted_prefixes": -1, - "received_prefixes": 0 - }, - "ipv6": { - "sent_prefixes": 0, - "accepted_prefixes": -1, - "received_prefixes": 0 - } - } - }, - "192.168.56.2": { - "is_enabled": true, - "uptime": "...", - "remote_as": 65002, - "description": "", - "remote_id": "192.168.56.2", - "local_as": 65001, - "is_up": true, - "address_family": { - "ipv4": { - "sent_prefixes": 0, - "accepted_prefixes": -1, - "received_prefixes": 0 - }, - "ipv6": { - "sent_prefixes": 0, - "accepted_prefixes": -1, - "received_prefixes": 0 - } - } - }, - "2001:7f8::f10:0:2": { - "is_enabled": true, - "uptime": "...", - "remote_as": 65002, - "description": "", - "remote_id": "192.168.56.2", - "local_as": 65001, - "is_up": true, - "address_family": { - "ipv4": { - "sent_prefixes": 0, - "accepted_prefixes": -1, - "received_prefixes": 0 - }, - "ipv6": { - "sent_prefixes": 0, - "accepted_prefixes": -1, - "received_prefixes": 0 - } - } - }, - "2001:7f8::f10:0:3": { - "is_enabled": true, - "uptime": 0, - "remote_as": 65001, - "description": "", - "remote_id": "192.168.56.3", - "local_as": 65002, - "is_up": false, - "address_family": { - "ipv4": { - "sent_prefixes": 0, - "accepted_prefixes": -1, - "received_prefixes": 0 - }, - "ipv6": { - "sent_prefixes": 0, - "accepted_prefixes": -1, - "received_prefixes": 0 - } - } - } - } - } -} diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/issue58_neighbor_down/show_ip_bgp_neighbors_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_r.text b/test/eos/mocked_data/test_get_bgp_neighbors/issue58_neighbor_down/show_ip_bgp_neighbors_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_r.text deleted file mode 100644 index 270822d7d..000000000 --- a/test/eos/mocked_data/test_get_bgp_neighbors/issue58_neighbor_down/show_ip_bgp_neighbors_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_r.text +++ /dev/null @@ -1,12 +0,0 @@ -BGP neighbor is 192.168.56.2, remote AS 65002, external link - BGP version 4, remote router ID 192.168.56.2, VRF default - BGP state is Established, up for 32d16h - IPv4 Unicast: 0 0 - IPv6 Unicast: 0 0 -Local AS is 65001, local router ID 192.168.56.3 -BGP neighbor is 192.168.56.4, remote AS 65001, external link - BGP version 4, remote router ID 192.168.56.3, VRF default - BGP state is Established, up for 32d16h - IPv4 Unicast: 0 0 - IPv6 Unicast: 0 0 -Local AS is 65002, local router ID 192.168.56.2 diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/issue58_neighbor_down/show_ip_bgp_summary_vrf_all.json b/test/eos/mocked_data/test_get_bgp_neighbors/issue58_neighbor_down/show_ip_bgp_summary_vrf_all.json deleted file mode 100644 index 850feca5e..000000000 --- a/test/eos/mocked_data/test_get_bgp_neighbors/issue58_neighbor_down/show_ip_bgp_summary_vrf_all.json +++ /dev/null @@ -1,37 +0,0 @@ -{ -"vrfs": { -"default": { -"routerId": "192.168.56.3", -"peers": { -"192.168.56.2": { -"msgSent": 6, -"inMsgQueue": 0, -"prefixReceived": 0, -"upDownTime": 1452680643.198489, -"version": 4, -"msgReceived": 5, -"prefixAccepted": 0, -"peerState": "Established", -"outMsgQueue": 0, -"underMaintenance": false, -"asn": 65002 -}, -"192.168.56.4": { -"msgSent": 267, -"inMsgQueue": 0, -"prefixReceived": 0, -"upDownTime": 1452696202.499104, -"version": 4, -"msgReceived": 263, -"prefixAccepted": 0, -"peerState": "Active", -"outMsgQueue": 0, -"underMaintenance": false, -"asn": 65001 -} -}, -"vrf": "default", -"asn": 65001 -} -} -} diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/issue58_neighbor_down/show_ipv6_bgp_peers_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_rou.text b/test/eos/mocked_data/test_get_bgp_neighbors/issue58_neighbor_down/show_ipv6_bgp_peers_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_rou.text deleted file mode 100644 index 6643bdc03..000000000 --- a/test/eos/mocked_data/test_get_bgp_neighbors/issue58_neighbor_down/show_ipv6_bgp_peers_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_rou.text +++ /dev/null @@ -1,12 +0,0 @@ -BGP neighbor is 2001:7f8::f10:0:2, remote AS 65002, external link - BGP version 4, remote router ID 192.168.56.2, VRF default - BGP state is Established, up for 32d16h - IPv4 Unicast: 0 0 - IPv6 Unicast: 0 0 -Local AS is 65001, local router ID 192.168.56.3 -BGP neighbor is 2001:7f8::f10:0:3, remote AS 65001, external link - BGP version 4, remote router ID 192.168.56.3, VRF default - BGP state is Established, up for 32d16h - IPv4 Unicast: 0 0 - IPv6 Unicast: 0 0 -Local AS is 65002, local router ID 192.168.56.2 diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/issue58_neighbor_down/show_ipv6_bgp_summary_vrf_all.json b/test/eos/mocked_data/test_get_bgp_neighbors/issue58_neighbor_down/show_ipv6_bgp_summary_vrf_all.json deleted file mode 100644 index 08e5e5c45..000000000 --- a/test/eos/mocked_data/test_get_bgp_neighbors/issue58_neighbor_down/show_ipv6_bgp_summary_vrf_all.json +++ /dev/null @@ -1,24 +0,0 @@ -{ -"vrfs": { -"default": { -"routerId": "192.168.56.3", -"peers": { -"2001:7f8::f10:0:2": { -"msgSent": 5, -"inMsgQueue": 0, -"prefixReceived": 0, -"upDownTime": 1452681618.167685, -"version": 4, -"msgReceived": 5, -"prefixAccepted": 0, -"peerState": "Established", -"outMsgQueue": 0, -"underMaintenance": false, -"asn": 65002 -} -}, -"vrf": "default", -"asn": 65001 -} -} -} diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/issue944/expected_result.json b/test/eos/mocked_data/test_get_bgp_neighbors/issue944/expected_result.json deleted file mode 100644 index a22cd863f..000000000 --- a/test/eos/mocked_data/test_get_bgp_neighbors/issue944/expected_result.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "global": { - "router_id": "192.168.56.3", - "peers": { - "192.168.56.4": { - "is_enabled": true, - "uptime": "...", - "remote_as": 65001, - "description": "", - "remote_id": "192.168.56.3", - "local_as": 65002, - "is_up": false, - "address_family": { - "ipv4": { - "sent_prefixes": 0, - "accepted_prefixes": -1, - "received_prefixes": 0 - }, - "ipv6": { - "sent_prefixes": 0, - "accepted_prefixes": -1, - "received_prefixes": 0 - } - } - }, - "192.168.56.2": { - "is_enabled": true, - "uptime": "...", - "remote_as": 65002, - "description": "", - "remote_id": "192.168.56.2", - "local_as": 65001, - "is_up": true, - "address_family": { - "ipv4": { - "sent_prefixes": 0, - "accepted_prefixes": -1, - "received_prefixes": 0 - }, - "ipv6": { - "sent_prefixes": 0, - "accepted_prefixes": -1, - "received_prefixes": 0 - } - } - }, - "2001:7f8::f10:0:2": { - "is_enabled": true, - "uptime": "...", - "remote_as": 65002, - "description": "", - "remote_id": "192.168.56.2", - "local_as": 65001, - "is_up": true, - "address_family": { - "ipv4": { - "sent_prefixes": 0, - "accepted_prefixes": -1, - "received_prefixes": 0 - }, - "ipv6": { - "sent_prefixes": 0, - "accepted_prefixes": -1, - "received_prefixes": 0 - } - } - }, - "2001:7f8::f10:0:3": { - "is_enabled": true, - "uptime": "...", - "remote_as": 65001, - "description": "", - "remote_id": "192.168.56.3", - "local_as": 65002, - "is_up": false, - "address_family": { - "ipv4": { - "sent_prefixes": 0, - "accepted_prefixes": -1, - "received_prefixes": 0 - }, - "ipv6": { - "sent_prefixes": 0, - "accepted_prefixes": -1, - "received_prefixes": 0 - } - } - } - } - } -} diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/issue944/show_ip_bgp_neighbors_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_r.text b/test/eos/mocked_data/test_get_bgp_neighbors/issue944/show_ip_bgp_neighbors_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_r.text deleted file mode 100644 index 577f118a3..000000000 --- a/test/eos/mocked_data/test_get_bgp_neighbors/issue944/show_ip_bgp_neighbors_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_r.text +++ /dev/null @@ -1,12 +0,0 @@ -BGP neighbor is 192.168.56.2, remote AS 65002, external link - BGP version 4, remote router ID 192.168.56.2, VRF default - BGP state is Established, up for 32d16h - IPv4 Unicast: 0 0 - IPv6 6PE: 0 0 -Local AS is 65001, local router ID 192.168.56.3 -BGP neighbor is 192.168.56.4, remote AS 65001, external link - BGP version 4, remote router ID 192.168.56.3, VRF default - BGP state is Established, up for 32d16h - IPv4 Unicast: 0 0 - IPv6 6PE: 0 0 -Local AS is 65002, local router ID 192.168.56.2 diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/issue944/show_ip_bgp_summary_vrf_all.json b/test/eos/mocked_data/test_get_bgp_neighbors/issue944/show_ip_bgp_summary_vrf_all.json deleted file mode 100644 index 850feca5e..000000000 --- a/test/eos/mocked_data/test_get_bgp_neighbors/issue944/show_ip_bgp_summary_vrf_all.json +++ /dev/null @@ -1,37 +0,0 @@ -{ -"vrfs": { -"default": { -"routerId": "192.168.56.3", -"peers": { -"192.168.56.2": { -"msgSent": 6, -"inMsgQueue": 0, -"prefixReceived": 0, -"upDownTime": 1452680643.198489, -"version": 4, -"msgReceived": 5, -"prefixAccepted": 0, -"peerState": "Established", -"outMsgQueue": 0, -"underMaintenance": false, -"asn": 65002 -}, -"192.168.56.4": { -"msgSent": 267, -"inMsgQueue": 0, -"prefixReceived": 0, -"upDownTime": 1452696202.499104, -"version": 4, -"msgReceived": 263, -"prefixAccepted": 0, -"peerState": "Active", -"outMsgQueue": 0, -"underMaintenance": false, -"asn": 65001 -} -}, -"vrf": "default", -"asn": 65001 -} -} -} diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/issue944/show_ipv6_bgp_peers_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_rou.text b/test/eos/mocked_data/test_get_bgp_neighbors/issue944/show_ipv6_bgp_peers_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_rou.text deleted file mode 100644 index 6643bdc03..000000000 --- a/test/eos/mocked_data/test_get_bgp_neighbors/issue944/show_ipv6_bgp_peers_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_rou.text +++ /dev/null @@ -1,12 +0,0 @@ -BGP neighbor is 2001:7f8::f10:0:2, remote AS 65002, external link - BGP version 4, remote router ID 192.168.56.2, VRF default - BGP state is Established, up for 32d16h - IPv4 Unicast: 0 0 - IPv6 Unicast: 0 0 -Local AS is 65001, local router ID 192.168.56.3 -BGP neighbor is 2001:7f8::f10:0:3, remote AS 65001, external link - BGP version 4, remote router ID 192.168.56.3, VRF default - BGP state is Established, up for 32d16h - IPv4 Unicast: 0 0 - IPv6 Unicast: 0 0 -Local AS is 65002, local router ID 192.168.56.2 diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/issue944/show_ipv6_bgp_summary_vrf_all.json b/test/eos/mocked_data/test_get_bgp_neighbors/issue944/show_ipv6_bgp_summary_vrf_all.json deleted file mode 100644 index a68112c2b..000000000 --- a/test/eos/mocked_data/test_get_bgp_neighbors/issue944/show_ipv6_bgp_summary_vrf_all.json +++ /dev/null @@ -1,37 +0,0 @@ -{ -"vrfs": { -"default": { -"routerId": "192.168.56.3", -"peers": { -"2001:7f8::f10:0:2": { -"msgSent": 5, -"inMsgQueue": 0, -"prefixReceived": 0, -"upDownTime": 1452681618.167685, -"version": 4, -"msgReceived": 5, -"prefixAccepted": 0, -"peerState": "Established", -"outMsgQueue": 0, -"underMaintenance": false, -"asn": 65002 -}, -"2001:7f8::f10:0:3": { -"msgSent": 267, -"inMsgQueue": 0, -"prefixReceived": 0, -"upDownTime": 1452696202.499104, -"version": 4, -"msgReceived": 263, -"prefixAccepted": 0, -"peerState": "Active", -"outMsgQueue": 0, -"underMaintenance": false, -"asn": 65001 -} -}, -"vrf": "default", -"asn": 65001 -} -} -} diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/normal/expected_result.json b/test/eos/mocked_data/test_get_bgp_neighbors/normal/expected_result.json index a22cd863f..3582fff2e 100644 --- a/test/eos/mocked_data/test_get_bgp_neighbors/normal/expected_result.json +++ b/test/eos/mocked_data/test_get_bgp_neighbors/normal/expected_result.json @@ -1,91 +1,91 @@ { "global": { - "router_id": "192.168.56.3", "peers": { - "192.168.56.4": { + "10.0.0.1": { + "local_as": 65001, + "remote_as": 65002, + "remote_id": "192.168.0.1", + "is_up": true, "is_enabled": true, - "uptime": "...", - "remote_as": 65001, "description": "", - "remote_id": "192.168.56.3", - "local_as": 65002, - "is_up": false, + "uptime": "...", "address_family": { "ipv4": { - "sent_prefixes": 0, - "accepted_prefixes": -1, - "received_prefixes": 0 + "received_prefixes": 3, + "accepted_prefixes": 3, + "sent_prefixes": 4 }, "ipv6": { - "sent_prefixes": 0, - "accepted_prefixes": -1, - "received_prefixes": 0 + "received_prefixes": 0, + "accepted_prefixes": 0, + "sent_prefixes": 0 } } }, - "192.168.56.2": { + "10.0.0.3": { + "local_as": 65001, + "remote_as": 65003, + "remote_id": "0.0.0.0", + "is_up": false, "is_enabled": true, - "uptime": "...", - "remote_as": 65002, "description": "", - "remote_id": "192.168.56.2", - "local_as": 65001, - "is_up": true, + "uptime": "...", "address_family": { "ipv4": { - "sent_prefixes": 0, - "accepted_prefixes": -1, - "received_prefixes": 0 + "received_prefixes": 0, + "accepted_prefixes": 0, + "sent_prefixes": 0 }, "ipv6": { - "sent_prefixes": 0, - "accepted_prefixes": -1, - "received_prefixes": 0 + "received_prefixes": 0, + "accepted_prefixes": 0, + "sent_prefixes": 0 } } }, - "2001:7f8::f10:0:2": { - "is_enabled": true, - "uptime": "...", - "remote_as": 65002, - "description": "", - "remote_id": "192.168.56.2", + "2001:fb8:100::2": { "local_as": 65001, + "remote_as": 65002, + "remote_id": "192.168.0.1", "is_up": true, + "is_enabled": true, + "description": "", + "uptime": "...", "address_family": { "ipv4": { - "sent_prefixes": 0, - "accepted_prefixes": -1, - "received_prefixes": 0 + "received_prefixes": 0, + "accepted_prefixes": 0, + "sent_prefixes": 0 }, "ipv6": { - "sent_prefixes": 0, - "accepted_prefixes": -1, - "received_prefixes": 0 + "received_prefixes": 3, + "accepted_prefixes": 3, + "sent_prefixes": 4 } } }, - "2001:7f8::f10:0:3": { + "2001:fb8:200::2": { + "local_as": 65001, + "remote_as": 65003, + "remote_id": "192.168.0.2", + "is_up": true, "is_enabled": true, - "uptime": "...", - "remote_as": 65001, "description": "", - "remote_id": "192.168.56.3", - "local_as": 65002, - "is_up": false, + "uptime": "...", "address_family": { "ipv4": { - "sent_prefixes": 0, - "accepted_prefixes": -1, - "received_prefixes": 0 + "received_prefixes": 0, + "accepted_prefixes": 0, + "sent_prefixes": 0 }, "ipv6": { - "sent_prefixes": 0, - "accepted_prefixes": -1, - "received_prefixes": 0 + "received_prefixes": 0, + "accepted_prefixes": 0, + "sent_prefixes": 5 } } } - } + }, + "router_id": "192.168.0.0" } } diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/normal/show_ip_bgp_neighbors_vrf_all.json b/test/eos/mocked_data/test_get_bgp_neighbors/normal/show_ip_bgp_neighbors_vrf_all.json new file mode 100644 index 000000000..8dfc4ec7b --- /dev/null +++ b/test/eos/mocked_data/test_get_bgp_neighbors/normal/show_ip_bgp_neighbors_vrf_all.json @@ -0,0 +1,362 @@ +{ + "vrfs": { + "default": { + "peerList": [ + { + "peerAddress": "10.0.0.1", + "asn": "65002", + "linkType": "external", + "routerId": "192.168.0.1", + "vrf": "default", + "version": 4, + "negotiatedVersion": 4, + "updateGroupIndex": -1, + "lastRcvd": 32, + "lastSent": 31, + "holdTime": 180, + "keepaliveTime": 60, + "configHoldTime": 180, + "configKeepaliveTime": 60, + "minHoldTime": 3, + "configMinHoldTime": 3, + "holdTimeLeft": 0, + "keepaliveTimeLeft": 0, + "state": "Established", + "establishedTime": 121, + "establishedTransitions": 1, + "lastState": "OpenConfirm", + "lastEvent": "ReapplyInboundPolicy", + "enRRefreshstalePathRemoval": false, + "outboundEnRRefreshEnabled": true, + "neighborCapabilities": { + "negotiationDisabled": false, + "unsupportedCapReceived": false, + "multiprotocolCaps": { + "ipv4Unicast": { + "advertised": true, + "received": true, + "enabled": true + } + }, + "fourOctetAsnCap": { + "advertised": true, + "received": true, + "enabled": true + }, + "routeRefreshCap": { + "advertised": true, + "received": true, + "enabled": true + }, + "enhancedRouteRefreshCap": { + "advertised": true, + "received": true, + "enabled": true + }, + "sendEorMessages": { + "advertised": true, + "received": true, + "enabled": true + }, + "addPathsCaps": { + "ipv4Unicast": { + "receivingAddPaths": { + "receiveCapabilityAdvertised": true, + "sendCapabilityReceived": false, + "enabled": false + }, + "sendingAddPaths": { + "sendCapabilityAdvertised": false, + "receiveCapabilityReceived": true, + "enabled": false + } + } + } + }, + "endOfRibs": { + "incoming": { + "ipv4Unicast": { + "status": "received", + "eorReceivedTime": 1721080528.064628, + "stalePathsDeleted": 0 + } + } + }, + "nexthopLuOriginateIpv4Uni": false, + "thirdPartyNexthopLuOriginateIpv4Uni": false, + "nexthopLuOriginateLfibBackupIpForwardIpv4Uni": false, + "nexthopLuOriginateIpv6Uni": false, + "thirdPartyNexthopLuOriginateIpv6Uni": false, + "nexthopLuOriginateLfibBackupIpForwardIpv6Uni": false, + "aigpSessionIpv4Uni": false, + "aigpSessionIpv4LabeledUni": false, + "aigpSessionIpv6Uni": false, + "aigpSessionIpv6LabeledUni": false, + "fwdFailoverTriggerSessionIpv4Uni": false, + "fwdFailoverTriggerSessionIpv6Uni": false, + "outMessageStats": { + "opens": 1, + "notifications": 0, + "updates": 2, + "keepalives": 4, + "rtRefreshes": 0, + "beginOfRtRefreshes": 0, + "endOfRtRefreshes": 0 + }, + "inMessageStats": { + "opens": 1, + "notifications": 0, + "updates": 2, + "keepalives": 4, + "rtRefreshes": 0, + "beginOfRtRefreshes": 0, + "endOfRtRefreshes": 0 + }, + "sentMessages": 7, + "receivedMessages": 7, + "prefixesSent": 4, + "prefixesReceived": 3, + "v4BestPaths": 1, + "v4BestEcmpPaths": 0, + "v6PrefixesSent": 0, + "v6PrefixesReceived": 0, + "v6BestPaths": 0, + "v6BestEcmpPaths": 0, + "totalRoutesWarnLimit": 204800, + "maxTotalRoutes": 256000, + "dropStats": { + "inDropAsloop": 0, + "inDropClusterIdLoop": 0, + "inDropMalformedMpbgp": 0, + "inDropOrigId": 0, + "inDropNhLocal": 0, + "inDropNhAfV6": 0, + "prefixDroppedMartianV4": 0, + "prefixDroppedMartianV6": 0, + "prefixLuDroppedV4": 0, + "prefixLuDroppedMartianV4": 0, + "prefixLuDroppedV6": 0, + "prefixLuDroppedMartianV6": 0, + "prefixEvpnDroppedUnsupportedRouteType": 0, + "prefixBgpLsDroppedReceptionUnsupported": 0, + "outDropV4LocalAddr": 0, + "outDropV6LocalAddr": 0, + "prefixVpnIpv4DroppedImportMatchFailure": 0, + "prefixVpnIpv6DroppedImportMatchFailure": 0, + "prefixEvpnDroppedImportMatchFailure": 0, + "prefixRtMembershipDroppedLocalAsReject": 0 + }, + "peerInUpdateErrors": { + "inUpdErrWithdraw": 0, + "inUpdErrIgnore": 0, + "inUpdErrDisableAfiSafi": 0, + "disabledAfiSafi": "None", + "lastUpdErrTime": 0 + }, + "bgpSoftReconfigInbound": "Default", + "rpkiOriginValidationMethod": "disabled", + "rpkiOriginValidationSendExtComm": false, + "rpkiOriginValidationRouteMap": "", + "orrPosition": {}, + "localAsn": "65001", + "localRouterId": "192.168.0.0", + "ttl": 1, + "maxTtlHops": 255, + "updateSource": "10.0.0.0", + "localPort": 179, + "remotePort": 41273, + "prependOwnDisabled": false, + "peerTcpInfo": { + "state": "ESTABLISHED", + "options": 7, + "sendWindowScale": 7, + "rcvWindowScale": 7, + "retransTimeout": 208000, + "delayedAckTimeout": 40000, + "maxSegmentSize": 1448, + "sndRtt": 4287, + "sndRttVariance": 8486, + "slowStartThreshold": 2147483647, + "congestionWindow": 10, + "rcvRtt": 0, + "rcvWindow": 14600, + "totalRetrans": 0, + "outputQueueLength": 0, + "outputMaxQueueLength": 87040, + "inputQueueLength": 0, + "inputMaxQueueLength": 32768, + "connectionOptions": { + "timestampsEnabled": true, + "selectiveAcknowledgementsEnabled": true, + "windowScaleEnabled": true, + "ecnEnabled": false + } + }, + "ifName": "Ethernet1", + "afiSafiInfo": { + "ipv4Unicast": { + "localNexthop": "10.0.0.0" + } + } + }, + { + "peerAddress": "10.0.0.3", + "asn": "65003", + "linkType": "external", + "routerId": "0.0.0.0", + "vrf": "default", + "version": 4, + "negotiatedVersion": 4, + "updateGroupIndex": -1, + "lastRcvd": 21, + "lastSent": 21, + "holdTime": 0, + "keepaliveTime": 0, + "configHoldTime": 180, + "configKeepaliveTime": 60, + "minHoldTime": 3, + "configMinHoldTime": 3, + "connectTimeLeft": 0, + "connectInterval": 64, + "connectFailed": 7, + "state": "Active", + "establishFailHint": "Cease/connection rejected", + "establishedTransitions": 0, + "lastState": "Idle", + "lastEvent": "Start", + "lastErrorRcvdCode": "Cease", + "lastErrorRcvdSubcode": "connection rejected", + "lastErrorRcvdTimeInfo": { + "time": 21, + "firstTime": 121, + "repeats": 6 + }, + "neighborCapabilities": { + "negotiationDisabled": false, + "unsupportedCapReceived": false, + "multiprotocolCaps": { + "ipv4Unicast": { + "advertised": true, + "received": false, + "enabled": false + } + }, + "fourOctetAsnCap": { + "advertised": true, + "received": false, + "enabled": false + }, + "routeRefreshCap": { + "advertised": true, + "received": false, + "enabled": false + }, + "enhancedRouteRefreshCap": { + "advertised": true, + "received": false, + "enabled": false + }, + "sendEorMessages": { + "advertised": true, + "received": false, + "enabled": false + }, + "addPathsCaps": { + "ipv4Unicast": { + "receivingAddPaths": { + "receiveCapabilityAdvertised": true, + "sendCapabilityReceived": false, + "enabled": false + } + } + } + }, + "endOfRibs": { + "incoming": {} + }, + "nexthopLuOriginateIpv4Uni": false, + "thirdPartyNexthopLuOriginateIpv4Uni": false, + "nexthopLuOriginateLfibBackupIpForwardIpv4Uni": false, + "nexthopLuOriginateIpv6Uni": false, + "thirdPartyNexthopLuOriginateIpv6Uni": false, + "nexthopLuOriginateLfibBackupIpForwardIpv6Uni": false, + "aigpSessionIpv4Uni": false, + "aigpSessionIpv4LabeledUni": false, + "aigpSessionIpv6Uni": false, + "aigpSessionIpv6LabeledUni": false, + "fwdFailoverTriggerSessionIpv4Uni": false, + "fwdFailoverTriggerSessionIpv6Uni": false, + "outMessageStats": { + "opens": 7, + "notifications": 0, + "updates": 0, + "keepalives": 0, + "rtRefreshes": 0 + }, + "inMessageStats": { + "opens": 0, + "notifications": 7, + "updates": 0, + "keepalives": 0, + "rtRefreshes": 0 + }, + "sentMessages": 7, + "receivedMessages": 7, + "prefixesSent": 0, + "prefixesReceived": 0, + "v4BestPaths": 0, + "v4BestEcmpPaths": 0, + "v6PrefixesSent": 0, + "v6PrefixesReceived": 0, + "v6BestPaths": 0, + "v6BestEcmpPaths": 0, + "totalRoutesWarnLimit": 204800, + "maxTotalRoutes": 256000, + "dropStats": { + "inDropAsloop": 0, + "inDropClusterIdLoop": 0, + "inDropMalformedMpbgp": 0, + "inDropOrigId": 0, + "inDropNhLocal": 0, + "inDropNhAfV6": 0, + "prefixDroppedMartianV4": 0, + "prefixDroppedMartianV6": 0, + "prefixLuDroppedV4": 0, + "prefixLuDroppedMartianV4": 0, + "prefixLuDroppedV6": 0, + "prefixLuDroppedMartianV6": 0, + "prefixEvpnDroppedUnsupportedRouteType": 0, + "prefixBgpLsDroppedReceptionUnsupported": 0, + "outDropV4LocalAddr": 0, + "outDropV6LocalAddr": 0, + "prefixVpnIpv4DroppedImportMatchFailure": 0, + "prefixVpnIpv6DroppedImportMatchFailure": 0, + "prefixEvpnDroppedImportMatchFailure": 0, + "prefixRtMembershipDroppedLocalAsReject": 0 + }, + "peerInUpdateErrors": { + "inUpdErrWithdraw": 0, + "inUpdErrIgnore": 0, + "inUpdErrDisableAfiSafi": 0, + "disabledAfiSafi": "None", + "lastUpdErrTime": 0 + }, + "bgpSoftReconfigInbound": "Default", + "rpkiOriginValidationMethod": "disabled", + "rpkiOriginValidationSendExtComm": false, + "rpkiOriginValidationRouteMap": "", + "orrPosition": {}, + "localAsn": "65001", + "localRouterId": "192.168.0.0", + "ttl": 1, + "maxTtlHops": 255, + "updateSource": "10.0.0.2", + "localPort": 0, + "remotePort": 179, + "prependOwnDisabled": false, + "afiSafiInfo": {} + } + ] + } + } +} diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/normal/show_ip_bgp_neighbors_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_r.text b/test/eos/mocked_data/test_get_bgp_neighbors/normal/show_ip_bgp_neighbors_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_r.text deleted file mode 100644 index 270822d7d..000000000 --- a/test/eos/mocked_data/test_get_bgp_neighbors/normal/show_ip_bgp_neighbors_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_r.text +++ /dev/null @@ -1,12 +0,0 @@ -BGP neighbor is 192.168.56.2, remote AS 65002, external link - BGP version 4, remote router ID 192.168.56.2, VRF default - BGP state is Established, up for 32d16h - IPv4 Unicast: 0 0 - IPv6 Unicast: 0 0 -Local AS is 65001, local router ID 192.168.56.3 -BGP neighbor is 192.168.56.4, remote AS 65001, external link - BGP version 4, remote router ID 192.168.56.3, VRF default - BGP state is Established, up for 32d16h - IPv4 Unicast: 0 0 - IPv6 Unicast: 0 0 -Local AS is 65002, local router ID 192.168.56.2 diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/normal/show_ip_bgp_summary_vrf_all.json b/test/eos/mocked_data/test_get_bgp_neighbors/normal/show_ip_bgp_summary_vrf_all.json index 850feca5e..f1aeeb257 100644 --- a/test/eos/mocked_data/test_get_bgp_neighbors/normal/show_ip_bgp_summary_vrf_all.json +++ b/test/eos/mocked_data/test_get_bgp_neighbors/normal/show_ip_bgp_summary_vrf_all.json @@ -1,37 +1,37 @@ { -"vrfs": { -"default": { -"routerId": "192.168.56.3", -"peers": { -"192.168.56.2": { -"msgSent": 6, -"inMsgQueue": 0, -"prefixReceived": 0, -"upDownTime": 1452680643.198489, -"version": 4, -"msgReceived": 5, -"prefixAccepted": 0, -"peerState": "Established", -"outMsgQueue": 0, -"underMaintenance": false, -"asn": 65002 -}, -"192.168.56.4": { -"msgSent": 267, -"inMsgQueue": 0, -"prefixReceived": 0, -"upDownTime": 1452696202.499104, -"version": 4, -"msgReceived": 263, -"prefixAccepted": 0, -"peerState": "Active", -"outMsgQueue": 0, -"underMaintenance": false, -"asn": 65001 -} -}, -"vrf": "default", -"asn": 65001 -} -} + "vrfs": { + "default": { + "vrf": "default", + "routerId": "192.168.0.0", + "asn": "65001", + "peers": { + "10.0.0.1": { + "version": 4, + "msgReceived": 5, + "msgSent": 4, + "inMsgQueue": 0, + "outMsgQueue": 0, + "asn": "65002", + "prefixAccepted": 3, + "prefixReceived": 3, + "upDownTime": 1721080527.052693, + "underMaintenance": false, + "peerState": "Established" + }, + "10.0.0.3": { + "version": 4, + "msgReceived": 6, + "msgSent": 6, + "inMsgQueue": 0, + "outMsgQueue": 0, + "asn": "65003", + "prefixAccepted": 0, + "prefixReceived": 0, + "upDownTime": 1721080524.898363, + "underMaintenance": false, + "peerState": "Active" + } + } + } + } } diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/normal/show_ipv6_bgp_peers_vrf_all.json b/test/eos/mocked_data/test_get_bgp_neighbors/normal/show_ipv6_bgp_peers_vrf_all.json new file mode 100644 index 000000000..db83671ed --- /dev/null +++ b/test/eos/mocked_data/test_get_bgp_neighbors/normal/show_ipv6_bgp_peers_vrf_all.json @@ -0,0 +1,415 @@ +{ + "vrfs": { + "default": { + "peerList": [ + { + "peerAddress": "2001:fb8:100::2", + "asn": "65002", + "linkType": "external", + "routerId": "192.168.0.1", + "vrf": "default", + "version": 4, + "negotiatedVersion": 4, + "updateGroupIndex": -1, + "lastRcvd": 33, + "lastSent": 23, + "holdTime": 180, + "keepaliveTime": 60, + "configHoldTime": 180, + "configKeepaliveTime": 60, + "minHoldTime": 3, + "configMinHoldTime": 3, + "holdTimeLeft": 0, + "keepaliveTimeLeft": 0, + "state": "Established", + "establishedTime": 165, + "establishedTransitions": 1, + "lastState": "OpenConfirm", + "lastEvent": "Established", + "lastSocketOutErrorMsg": "Bind (Cannot assign requested address)", + "lastSocketOutErrorTimeInfo": { + "time": 166 + }, + "enRRefreshstalePathRemoval": false, + "outboundEnRRefreshEnabled": true, + "neighborCapabilities": { + "negotiationDisabled": false, + "unsupportedCapReceived": false, + "multiprotocolCaps": { + "ipv6Unicast": { + "advertised": true, + "received": true, + "enabled": true + } + }, + "fourOctetAsnCap": { + "advertised": true, + "received": true, + "enabled": true + }, + "routeRefreshCap": { + "advertised": true, + "received": true, + "enabled": true + }, + "enhancedRouteRefreshCap": { + "advertised": true, + "received": true, + "enabled": true + }, + "sendEorMessages": { + "advertised": true, + "received": true, + "enabled": true + }, + "addPathsCaps": { + "ipv6Unicast": { + "receivingAddPaths": { + "receiveCapabilityAdvertised": true, + "sendCapabilityReceived": false, + "enabled": false + }, + "sendingAddPaths": { + "sendCapabilityAdvertised": false, + "receiveCapabilityReceived": true, + "enabled": false + } + } + } + }, + "endOfRibs": { + "incoming": { + "ipv6Unicast": { + "status": "received", + "eorReceivedTime": 1721080528.104721, + "stalePathsDeleted": 0 + } + } + }, + "nexthopLuOriginateIpv4Uni": false, + "thirdPartyNexthopLuOriginateIpv4Uni": false, + "nexthopLuOriginateLfibBackupIpForwardIpv4Uni": false, + "nexthopLuOriginateIpv6Uni": false, + "thirdPartyNexthopLuOriginateIpv6Uni": false, + "nexthopLuOriginateLfibBackupIpForwardIpv6Uni": false, + "aigpSessionIpv4Uni": false, + "aigpSessionIpv4LabeledUni": false, + "aigpSessionIpv6Uni": false, + "aigpSessionIpv6LabeledUni": false, + "fwdFailoverTriggerSessionIpv4Uni": false, + "fwdFailoverTriggerSessionIpv6Uni": false, + "outMessageStats": { + "opens": 1, + "notifications": 0, + "updates": 2, + "keepalives": 4, + "rtRefreshes": 0, + "beginOfRtRefreshes": 0, + "endOfRtRefreshes": 0 + }, + "inMessageStats": { + "opens": 1, + "notifications": 0, + "updates": 2, + "keepalives": 5, + "rtRefreshes": 0, + "beginOfRtRefreshes": 0, + "endOfRtRefreshes": 0 + }, + "sentMessages": 7, + "receivedMessages": 8, + "prefixesSent": 0, + "prefixesReceived": 0, + "v4BestPaths": 0, + "v4BestEcmpPaths": 0, + "v6PrefixesSent": 4, + "v6PrefixesReceived": 3, + "v6BestPaths": 1, + "v6BestEcmpPaths": 0, + "totalRoutesWarnLimit": 204800, + "maxTotalRoutes": 256000, + "dropStats": { + "inDropAsloop": 0, + "inDropClusterIdLoop": 0, + "inDropMalformedMpbgp": 0, + "inDropOrigId": 0, + "inDropNhLocal": 0, + "inDropNhAfV6": 0, + "prefixDroppedMartianV4": 0, + "prefixDroppedMartianV6": 0, + "prefixLuDroppedV4": 0, + "prefixLuDroppedMartianV4": 0, + "prefixLuDroppedV6": 0, + "prefixLuDroppedMartianV6": 0, + "prefixEvpnDroppedUnsupportedRouteType": 0, + "prefixBgpLsDroppedReceptionUnsupported": 0, + "outDropV4LocalAddr": 0, + "outDropV6LocalAddr": 0, + "prefixVpnIpv4DroppedImportMatchFailure": 0, + "prefixVpnIpv6DroppedImportMatchFailure": 0, + "prefixEvpnDroppedImportMatchFailure": 0, + "prefixRtMembershipDroppedLocalAsReject": 0 + }, + "peerInUpdateErrors": { + "inUpdErrWithdraw": 0, + "inUpdErrIgnore": 0, + "inUpdErrDisableAfiSafi": 0, + "disabledAfiSafi": "None", + "lastUpdErrTime": 0 + }, + "bgpSoftReconfigInbound": "Default", + "rpkiOriginValidationMethod": "disabled", + "rpkiOriginValidationSendExtComm": false, + "rpkiOriginValidationRouteMap": "", + "orrPosition": {}, + "localAsn": "65001", + "localRouterId": "192.168.0.0", + "ttl": 1, + "maxTtlHops": 255, + "updateSource": "2001:fb8:100::1", + "localPort": 42927, + "remotePort": 179, + "prependOwnDisabled": false, + "peerTcpInfo": { + "state": "ESTABLISHED", + "options": 7, + "sendWindowScale": 7, + "rcvWindowScale": 7, + "retransTimeout": 220000, + "delayedAckTimeout": 40000, + "maxSegmentSize": 1428, + "sndRtt": 19886, + "sndRttVariance": 18189, + "slowStartThreshold": 2147483647, + "congestionWindow": 10, + "rcvRtt": 0, + "rcvWindow": 14280, + "totalRetrans": 0, + "outputQueueLength": 0, + "outputMaxQueueLength": 87040, + "inputQueueLength": 0, + "inputMaxQueueLength": 32768, + "connectionOptions": { + "timestampsEnabled": true, + "selectiveAcknowledgementsEnabled": true, + "windowScaleEnabled": true, + "ecnEnabled": false + } + }, + "ifName": "Ethernet1", + "afiSafiInfo": { + "ipv6Unicast": { + "localNexthop": "2001:fb8:100::1" + } + } + }, + { + "peerAddress": "2001:fb8:200::2", + "asn": "65003", + "linkType": "external", + "routerId": "192.168.0.2", + "vrf": "default", + "version": 4, + "negotiatedVersion": 4, + "updateGroupIndex": -1, + "lastRcvd": 27, + "lastSent": 33, + "holdTime": 180, + "keepaliveTime": 60, + "configHoldTime": 180, + "configKeepaliveTime": 60, + "minHoldTime": 3, + "configMinHoldTime": 3, + "holdTimeLeft": 0, + "keepaliveTimeLeft": 0, + "state": "Established", + "establishedTime": 165, + "establishedTransitions": 1, + "lastState": "OpenConfirm", + "lastEvent": "Established", + "lastErrorCode": "Cease", + "lastErrorSubcode": "connection collision resolution", + "lastErrorTimeInfo": { + "time": 165 + }, + "lastSocketOutErrorMsg": "Bind (Cannot assign requested address)", + "lastSocketOutErrorTimeInfo": { + "time": 166 + }, + "enRRefreshstalePathRemoval": false, + "outboundEnRRefreshEnabled": true, + "neighborCapabilities": { + "negotiationDisabled": false, + "unsupportedCapReceived": false, + "multiprotocolCaps": { + "ipv6Unicast": { + "advertised": true, + "received": true, + "enabled": true + } + }, + "fourOctetAsnCap": { + "advertised": true, + "received": true, + "enabled": true + }, + "routeRefreshCap": { + "advertised": true, + "received": true, + "enabled": true + }, + "enhancedRouteRefreshCap": { + "advertised": true, + "received": true, + "enabled": true + }, + "sendEorMessages": { + "advertised": true, + "received": true, + "enabled": true + }, + "addPathsCaps": { + "ipv6Unicast": { + "receivingAddPaths": { + "receiveCapabilityAdvertised": true, + "sendCapabilityReceived": false, + "enabled": false + }, + "sendingAddPaths": { + "sendCapabilityAdvertised": false, + "receiveCapabilityReceived": true, + "enabled": false + } + } + } + }, + "endOfRibs": { + "incoming": { + "ipv6Unicast": { + "status": "received", + "eorReceivedTime": 1721080528.112453, + "stalePathsDeleted": 0 + } + } + }, + "nexthopLuOriginateIpv4Uni": false, + "thirdPartyNexthopLuOriginateIpv4Uni": false, + "nexthopLuOriginateLfibBackupIpForwardIpv4Uni": false, + "nexthopLuOriginateIpv6Uni": false, + "thirdPartyNexthopLuOriginateIpv6Uni": false, + "nexthopLuOriginateLfibBackupIpForwardIpv6Uni": false, + "aigpSessionIpv4Uni": false, + "aigpSessionIpv4LabeledUni": false, + "aigpSessionIpv6Uni": false, + "aigpSessionIpv6LabeledUni": false, + "fwdFailoverTriggerSessionIpv4Uni": false, + "fwdFailoverTriggerSessionIpv6Uni": false, + "outMessageStats": { + "opens": 2, + "notifications": 1, + "updates": 3, + "keepalives": 5, + "rtRefreshes": 0, + "beginOfRtRefreshes": 0, + "endOfRtRefreshes": 0 + }, + "inMessageStats": { + "opens": 1, + "notifications": 0, + "updates": 1, + "keepalives": 5, + "rtRefreshes": 0, + "beginOfRtRefreshes": 0, + "endOfRtRefreshes": 0 + }, + "sentMessages": 11, + "receivedMessages": 7, + "prefixesSent": 0, + "prefixesReceived": 0, + "v4BestPaths": 0, + "v4BestEcmpPaths": 0, + "v6PrefixesSent": 5, + "v6PrefixesReceived": 0, + "v6BestPaths": 0, + "v6BestEcmpPaths": 0, + "totalRoutesWarnLimit": 204800, + "maxTotalRoutes": 256000, + "dropStats": { + "inDropAsloop": 0, + "inDropClusterIdLoop": 0, + "inDropMalformedMpbgp": 0, + "inDropOrigId": 0, + "inDropNhLocal": 0, + "inDropNhAfV6": 0, + "prefixDroppedMartianV4": 0, + "prefixDroppedMartianV6": 0, + "prefixLuDroppedV4": 0, + "prefixLuDroppedMartianV4": 0, + "prefixLuDroppedV6": 0, + "prefixLuDroppedMartianV6": 0, + "prefixEvpnDroppedUnsupportedRouteType": 0, + "prefixBgpLsDroppedReceptionUnsupported": 0, + "outDropV4LocalAddr": 0, + "outDropV6LocalAddr": 0, + "prefixVpnIpv4DroppedImportMatchFailure": 0, + "prefixVpnIpv6DroppedImportMatchFailure": 0, + "prefixEvpnDroppedImportMatchFailure": 0, + "prefixRtMembershipDroppedLocalAsReject": 0 + }, + "peerInUpdateErrors": { + "inUpdErrWithdraw": 0, + "inUpdErrIgnore": 0, + "inUpdErrDisableAfiSafi": 0, + "disabledAfiSafi": "None", + "lastUpdErrTime": 0 + }, + "bgpSoftReconfigInbound": "Default", + "rpkiOriginValidationMethod": "disabled", + "rpkiOriginValidationSendExtComm": false, + "rpkiOriginValidationRouteMap": "", + "orrPosition": {}, + "localAsn": "65001", + "localRouterId": "192.168.0.0", + "ttl": 1, + "maxTtlHops": 255, + "updateSource": "2001:fb8:200::1", + "localPort": 179, + "remotePort": 33055, + "prependOwnDisabled": false, + "peerTcpInfo": { + "state": "ESTABLISHED", + "options": 7, + "sendWindowScale": 7, + "rcvWindowScale": 7, + "retransTimeout": 532000, + "delayedAckTimeout": 40000, + "maxSegmentSize": 1428, + "sndRtt": 71654, + "sndRttVariance": 104009, + "slowStartThreshold": 2147483647, + "congestionWindow": 10, + "rcvRtt": 0, + "rcvWindow": 14400, + "totalRetrans": 0, + "outputQueueLength": 0, + "outputMaxQueueLength": 87040, + "inputQueueLength": 0, + "inputMaxQueueLength": 32768, + "connectionOptions": { + "timestampsEnabled": true, + "selectiveAcknowledgementsEnabled": true, + "windowScaleEnabled": true, + "ecnEnabled": false + } + }, + "ifName": "Ethernet2", + "afiSafiInfo": { + "ipv6Unicast": { + "localNexthop": "2001:fb8:200::1" + } + } + } + ] + } + } +} diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/normal/show_ipv6_bgp_peers_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_rou.text b/test/eos/mocked_data/test_get_bgp_neighbors/normal/show_ipv6_bgp_peers_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_rou.text deleted file mode 100644 index 6643bdc03..000000000 --- a/test/eos/mocked_data/test_get_bgp_neighbors/normal/show_ipv6_bgp_peers_vrf_all___include_IPv_46___Unicast_6PE_____0_9_____grep__v___IPv_46__Unicast_______remote_AS___Local_AS_Desc_BGP_state__remote_rou.text +++ /dev/null @@ -1,12 +0,0 @@ -BGP neighbor is 2001:7f8::f10:0:2, remote AS 65002, external link - BGP version 4, remote router ID 192.168.56.2, VRF default - BGP state is Established, up for 32d16h - IPv4 Unicast: 0 0 - IPv6 Unicast: 0 0 -Local AS is 65001, local router ID 192.168.56.3 -BGP neighbor is 2001:7f8::f10:0:3, remote AS 65001, external link - BGP version 4, remote router ID 192.168.56.3, VRF default - BGP state is Established, up for 32d16h - IPv4 Unicast: 0 0 - IPv6 Unicast: 0 0 -Local AS is 65002, local router ID 192.168.56.2 diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/normal/show_ipv6_bgp_summary_vrf_all.json b/test/eos/mocked_data/test_get_bgp_neighbors/normal/show_ipv6_bgp_summary_vrf_all.json index a68112c2b..c86d7bcdb 100644 --- a/test/eos/mocked_data/test_get_bgp_neighbors/normal/show_ipv6_bgp_summary_vrf_all.json +++ b/test/eos/mocked_data/test_get_bgp_neighbors/normal/show_ipv6_bgp_summary_vrf_all.json @@ -1,37 +1,37 @@ { -"vrfs": { -"default": { -"routerId": "192.168.56.3", -"peers": { -"2001:7f8::f10:0:2": { -"msgSent": 5, -"inMsgQueue": 0, -"prefixReceived": 0, -"upDownTime": 1452681618.167685, -"version": 4, -"msgReceived": 5, -"prefixAccepted": 0, -"peerState": "Established", -"outMsgQueue": 0, -"underMaintenance": false, -"asn": 65002 -}, -"2001:7f8::f10:0:3": { -"msgSent": 267, -"inMsgQueue": 0, -"prefixReceived": 0, -"upDownTime": 1452696202.499104, -"version": 4, -"msgReceived": 263, -"prefixAccepted": 0, -"peerState": "Active", -"outMsgQueue": 0, -"underMaintenance": false, -"asn": 65001 -} -}, -"vrf": "default", -"asn": 65001 -} -} + "vrfs": { + "default": { + "vrf": "default", + "routerId": "192.168.0.0", + "asn": "65001", + "peers": { + "2001:fb8:100::2": { + "version": 4, + "msgReceived": 7, + "msgSent": 5, + "inMsgQueue": 0, + "outMsgQueue": 0, + "asn": "65002", + "prefixAccepted": 3, + "prefixReceived": 3, + "upDownTime": 1721080528.062069, + "underMaintenance": false, + "peerState": "Established" + }, + "2001:fb8:200::2": { + "version": 4, + "msgReceived": 5, + "msgSent": 8, + "inMsgQueue": 0, + "outMsgQueue": 0, + "asn": "65003", + "prefixAccepted": 0, + "prefixReceived": 0, + "upDownTime": 1721080528.069422, + "underMaintenance": false, + "peerState": "Established" + } + } + } + } } From 5bb8d0e95a82a5859b50b10e1efa257cbca39357 Mon Sep 17 00:00:00 2001 From: Brandon Ewing Date: Tue, 16 Jul 2024 09:54:19 -0500 Subject: [PATCH 03/22] ignore typing on TypedDict defaultdict --- napalm/eos/eos.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/napalm/eos/eos.py b/napalm/eos/eos.py index 7f08b62a5..a340cd3c9 100644 --- a/napalm/eos/eos.py +++ b/napalm/eos/eos.py @@ -686,9 +686,9 @@ def get_bgp_neighbors(self) -> Dict[str, models.BGPStateNeighborsPerVRFDict]: bgp_counters = defaultdict( lambda: models.BGPStateNeighborsPerVRFDict( - peers=models.BGPStateNeighborDict() - ) - ) + peers=models.BGPStateNeighborDict() # type: ignore + ) # type: ignore + ) # type: ignore # Iterate IPv4 and IPv6 neighbor details for cmd in cmd_outputs[2:]: for vrf_name, vrf_data in cmd["vrfs"].items(): From b7a2c130f13838eb45aba4fdbbe71f7d11820ba3 Mon Sep 17 00:00:00 2001 From: Brandon Ewing Date: Tue, 16 Jul 2024 09:54:45 -0500 Subject: [PATCH 04/22] add no peers test for eos.get_bgp_neighbors --- napalm/eos/eos.py | 9 ++++++++- .../nopeers/expected_result.json | 6 ++++++ .../nopeers/show_ip_bgp_neighbors_vrf_all.json | 7 +++++++ .../nopeers/show_ip_bgp_summary_vrf_all.json | 10 ++++++++++ .../nopeers/show_ipv6_bgp_peers_vrf_all.json | 7 +++++++ .../nopeers/show_ipv6_bgp_summary_vrf_all.json | 10 ++++++++++ 6 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/nopeers/expected_result.json create mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/nopeers/show_ip_bgp_neighbors_vrf_all.json create mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/nopeers/show_ip_bgp_summary_vrf_all.json create mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/nopeers/show_ipv6_bgp_peers_vrf_all.json create mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/nopeers/show_ipv6_bgp_summary_vrf_all.json diff --git a/napalm/eos/eos.py b/napalm/eos/eos.py index a340cd3c9..2c38bacef 100644 --- a/napalm/eos/eos.py +++ b/napalm/eos/eos.py @@ -729,7 +729,6 @@ def get_bgp_neighbors(self) -> Dict[str, models.BGPStateNeighborsPerVRFDict]: ), "sent_prefixes": peer["v6PrefixesSent"], } - vrf["router_id"] = napalm.base.helpers.ip(peer["localRouterId"]) peer_data: models.BGPStateNeighborDict = { "local_as": local_as, "remote_as": remote_as, @@ -744,6 +743,14 @@ def get_bgp_neighbors(self) -> Dict[str, models.BGPStateNeighborsPerVRFDict]: }, } vrf["peers"][peer_ip] = peer_data + + # Iterate IPv4 and IPv6 summary details for router-id assignment + for cmd in cmd_outputs[:2]: + for vrf_name, vrf_data in cmd["vrfs"].items(): + bgp_counters[vrf_name]["router_id"] = napalm.base.helpers.ip( + vrf_data["routerId"] + ) + bgp_counters["global"] = bgp_counters.pop("default") return dict(bgp_counters) diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/nopeers/expected_result.json b/test/eos/mocked_data/test_get_bgp_neighbors/nopeers/expected_result.json new file mode 100644 index 000000000..ab8854f5e --- /dev/null +++ b/test/eos/mocked_data/test_get_bgp_neighbors/nopeers/expected_result.json @@ -0,0 +1,6 @@ +{ + "global": { + "peers": {}, + "router_id": "192.168.0.0" + } +} diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/nopeers/show_ip_bgp_neighbors_vrf_all.json b/test/eos/mocked_data/test_get_bgp_neighbors/nopeers/show_ip_bgp_neighbors_vrf_all.json new file mode 100644 index 000000000..3022e1ca5 --- /dev/null +++ b/test/eos/mocked_data/test_get_bgp_neighbors/nopeers/show_ip_bgp_neighbors_vrf_all.json @@ -0,0 +1,7 @@ +{ + "vrfs": { + "default": { + "peerList": [] + } + } +} diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/nopeers/show_ip_bgp_summary_vrf_all.json b/test/eos/mocked_data/test_get_bgp_neighbors/nopeers/show_ip_bgp_summary_vrf_all.json new file mode 100644 index 000000000..efacff379 --- /dev/null +++ b/test/eos/mocked_data/test_get_bgp_neighbors/nopeers/show_ip_bgp_summary_vrf_all.json @@ -0,0 +1,10 @@ +{ + "vrfs": { + "default": { + "vrf": "default", + "routerId": "192.168.0.0", + "asn": "65001", + "peers": {} + } + } +} diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/nopeers/show_ipv6_bgp_peers_vrf_all.json b/test/eos/mocked_data/test_get_bgp_neighbors/nopeers/show_ipv6_bgp_peers_vrf_all.json new file mode 100644 index 000000000..3022e1ca5 --- /dev/null +++ b/test/eos/mocked_data/test_get_bgp_neighbors/nopeers/show_ipv6_bgp_peers_vrf_all.json @@ -0,0 +1,7 @@ +{ + "vrfs": { + "default": { + "peerList": [] + } + } +} diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/nopeers/show_ipv6_bgp_summary_vrf_all.json b/test/eos/mocked_data/test_get_bgp_neighbors/nopeers/show_ipv6_bgp_summary_vrf_all.json new file mode 100644 index 000000000..efacff379 --- /dev/null +++ b/test/eos/mocked_data/test_get_bgp_neighbors/nopeers/show_ipv6_bgp_summary_vrf_all.json @@ -0,0 +1,10 @@ +{ + "vrfs": { + "default": { + "vrf": "default", + "routerId": "192.168.0.0", + "asn": "65001", + "peers": {} + } + } +} From c649a94de2c2fd1492d150d1675c8f2f97b130ce Mon Sep 17 00:00:00 2001 From: Brandon Ewing Date: Tue, 16 Jul 2024 11:50:12 -0500 Subject: [PATCH 05/22] add no bgp test for eos.get_bgp_neighbors --- napalm/eos/eos.py | 3 ++- .../test_get_bgp_neighbors/nobgp/expected_result.json | 1 + .../nobgp/show_ip_bgp_neighbors_vrf_all.json | 3 +++ .../nobgp/show_ip_bgp_summary_vrf_all.json | 3 +++ .../nobgp/show_ipv6_bgp_peers_vrf_all.json | 3 +++ .../nobgp/show_ipv6_bgp_summary_vrf_all.json | 3 +++ 6 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/nobgp/expected_result.json create mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/nobgp/show_ip_bgp_neighbors_vrf_all.json create mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/nobgp/show_ip_bgp_summary_vrf_all.json create mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/nobgp/show_ipv6_bgp_peers_vrf_all.json create mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/nobgp/show_ipv6_bgp_summary_vrf_all.json diff --git a/napalm/eos/eos.py b/napalm/eos/eos.py index 2c38bacef..f31f2ad44 100644 --- a/napalm/eos/eos.py +++ b/napalm/eos/eos.py @@ -751,7 +751,8 @@ def get_bgp_neighbors(self) -> Dict[str, models.BGPStateNeighborsPerVRFDict]: vrf_data["routerId"] ) - bgp_counters["global"] = bgp_counters.pop("default") + if "default" in bgp_counters: + bgp_counters["global"] = bgp_counters.pop("default") return dict(bgp_counters) def get_environment(self): diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/nobgp/expected_result.json b/test/eos/mocked_data/test_get_bgp_neighbors/nobgp/expected_result.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/test/eos/mocked_data/test_get_bgp_neighbors/nobgp/expected_result.json @@ -0,0 +1 @@ +{} diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/nobgp/show_ip_bgp_neighbors_vrf_all.json b/test/eos/mocked_data/test_get_bgp_neighbors/nobgp/show_ip_bgp_neighbors_vrf_all.json new file mode 100644 index 000000000..796bb60a4 --- /dev/null +++ b/test/eos/mocked_data/test_get_bgp_neighbors/nobgp/show_ip_bgp_neighbors_vrf_all.json @@ -0,0 +1,3 @@ +{ + "vrfs": {} +} diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/nobgp/show_ip_bgp_summary_vrf_all.json b/test/eos/mocked_data/test_get_bgp_neighbors/nobgp/show_ip_bgp_summary_vrf_all.json new file mode 100644 index 000000000..796bb60a4 --- /dev/null +++ b/test/eos/mocked_data/test_get_bgp_neighbors/nobgp/show_ip_bgp_summary_vrf_all.json @@ -0,0 +1,3 @@ +{ + "vrfs": {} +} diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/nobgp/show_ipv6_bgp_peers_vrf_all.json b/test/eos/mocked_data/test_get_bgp_neighbors/nobgp/show_ipv6_bgp_peers_vrf_all.json new file mode 100644 index 000000000..796bb60a4 --- /dev/null +++ b/test/eos/mocked_data/test_get_bgp_neighbors/nobgp/show_ipv6_bgp_peers_vrf_all.json @@ -0,0 +1,3 @@ +{ + "vrfs": {} +} diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/nobgp/show_ipv6_bgp_summary_vrf_all.json b/test/eos/mocked_data/test_get_bgp_neighbors/nobgp/show_ipv6_bgp_summary_vrf_all.json new file mode 100644 index 000000000..796bb60a4 --- /dev/null +++ b/test/eos/mocked_data/test_get_bgp_neighbors/nobgp/show_ipv6_bgp_summary_vrf_all.json @@ -0,0 +1,3 @@ +{ + "vrfs": {} +} From f3b2077602d0ba95a21f2525bd2254c9be052c59 Mon Sep 17 00:00:00 2001 From: Brandon Ewing Date: Tue, 16 Jul 2024 12:15:51 -0500 Subject: [PATCH 06/22] generate new test case for issue #1759 --- .../issue1759/expected_result.json | 70 ++ .../show_ip_bgp_neighbors_vrf_all.json | 7 + .../show_ip_bgp_summary_vrf_all.json | 50 ++ .../show_ipv6_bgp_peers_vrf_all.json | 717 ++++++++++++++++++ .../show_ipv6_bgp_summary_vrf_all.json | 50 ++ 5 files changed, 894 insertions(+) create mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/issue1759/expected_result.json create mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/issue1759/show_ip_bgp_neighbors_vrf_all.json create mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/issue1759/show_ip_bgp_summary_vrf_all.json create mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/issue1759/show_ipv6_bgp_peers_vrf_all.json create mode 100644 test/eos/mocked_data/test_get_bgp_neighbors/issue1759/show_ipv6_bgp_summary_vrf_all.json diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/issue1759/expected_result.json b/test/eos/mocked_data/test_get_bgp_neighbors/issue1759/expected_result.json new file mode 100644 index 000000000..0d84063f8 --- /dev/null +++ b/test/eos/mocked_data/test_get_bgp_neighbors/issue1759/expected_result.json @@ -0,0 +1,70 @@ +{ + "global": { + "peers": { + "fe80::a8c1:abff:fe94:4171%Et3": { + "local_as": 4259973120, + "remote_as": 4259906564, + "remote_id": "172.18.4.4", + "is_up": true, + "is_enabled": true, + "description": "", + "uptime": 9, + "address_family": { + "ipv4": { + "received_prefixes": 3, + "accepted_prefixes": 3, + "sent_prefixes": 9 + }, + "ipv6": { + "received_prefixes": 3, + "accepted_prefixes": 3, + "sent_prefixes": 9 + } + } + }, + "fe80::a8c1:abff:fea1:b618%Et2": { + "local_as": 4259973120, + "remote_as": 4259906563, + "remote_id": "172.18.4.3", + "is_up": true, + "is_enabled": true, + "description": "", + "uptime": 9, + "address_family": { + "ipv4": { + "received_prefixes": 5, + "accepted_prefixes": 5, + "sent_prefixes": 8 + }, + "ipv6": { + "received_prefixes": 5, + "accepted_prefixes": 5, + "sent_prefixes": 8 + } + } + }, + "fe80::a8c1:abff:fedc:fb58%Et1": { + "local_as": 4259973120, + "remote_as": 4259906562, + "remote_id": "172.18.4.2", + "is_up": true, + "is_enabled": true, + "description": "", + "uptime": 9, + "address_family": { + "ipv4": { + "received_prefixes": 6, + "accepted_prefixes": 6, + "sent_prefixes": 5 + }, + "ipv6": { + "received_prefixes": 6, + "accepted_prefixes": 6, + "sent_prefixes": 5 + } + } + } + }, + "router_id": "172.18.8.0" + } +} diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/issue1759/show_ip_bgp_neighbors_vrf_all.json b/test/eos/mocked_data/test_get_bgp_neighbors/issue1759/show_ip_bgp_neighbors_vrf_all.json new file mode 100644 index 000000000..3022e1ca5 --- /dev/null +++ b/test/eos/mocked_data/test_get_bgp_neighbors/issue1759/show_ip_bgp_neighbors_vrf_all.json @@ -0,0 +1,7 @@ +{ + "vrfs": { + "default": { + "peerList": [] + } + } +} diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/issue1759/show_ip_bgp_summary_vrf_all.json b/test/eos/mocked_data/test_get_bgp_neighbors/issue1759/show_ip_bgp_summary_vrf_all.json new file mode 100644 index 000000000..631c9f6dc --- /dev/null +++ b/test/eos/mocked_data/test_get_bgp_neighbors/issue1759/show_ip_bgp_summary_vrf_all.json @@ -0,0 +1,50 @@ +{ + "vrfs": { + "default": { + "vrf": "default", + "routerId": "172.18.8.0", + "asn": "65002.2048", + "peers": { + "fe80::a8c1:abff:fe94:4171%Et3": { + "version": 4, + "msgReceived": 27, + "msgSent": 25, + "inMsgQueue": 0, + "outMsgQueue": 0, + "asn": "65001.1028", + "prefixAccepted": 3, + "prefixReceived": 3, + "upDownTime": 1721149910.529752, + "underMaintenance": false, + "peerState": "Established" + }, + "fe80::a8c1:abff:fea1:b618%Et2": { + "version": 4, + "msgReceived": 15, + "msgSent": 23, + "inMsgQueue": 0, + "outMsgQueue": 0, + "asn": "65001.1027", + "prefixAccepted": 5, + "prefixReceived": 5, + "upDownTime": 1721149910.47622, + "underMaintenance": false, + "peerState": "Established" + }, + "fe80::a8c1:abff:fedc:fb58%Et1": { + "version": 4, + "msgReceived": 21, + "msgSent": 23, + "inMsgQueue": 0, + "outMsgQueue": 0, + "asn": "65001.1026", + "prefixAccepted": 6, + "prefixReceived": 6, + "upDownTime": 1721149910.456982, + "underMaintenance": false, + "peerState": "Established" + } + } + } + } +} diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/issue1759/show_ipv6_bgp_peers_vrf_all.json b/test/eos/mocked_data/test_get_bgp_neighbors/issue1759/show_ipv6_bgp_peers_vrf_all.json new file mode 100644 index 000000000..04ecf83e7 --- /dev/null +++ b/test/eos/mocked_data/test_get_bgp_neighbors/issue1759/show_ipv6_bgp_peers_vrf_all.json @@ -0,0 +1,717 @@ +{ + "vrfs": { + "default": { + "peerList": [ + { + "peerAddress": "fe80::a8c1:abff:fe94:4171%Et3", + "asn": "65001.1028", + "linkType": "external", + "routerId": "172.18.4.4", + "vrf": "default", + "version": 4, + "lldpNeighbors": [ + { + "device": "node-65001.1028", + "description": "Arista Networks EOS version 4.30.5M-35156751.4305M (engineering build) running on an Arista cEOSLab" + } + ], + "peerGroupName": "LEAVES", + "peerFilter": "ASN4-PRIVATE", + "negotiatedVersion": 4, + "updateGroupIndex": -1, + "lastRcvd": 8, + "lastSent": 8, + "holdTime": 180, + "keepaliveTime": 60, + "configHoldTime": 180, + "configKeepaliveTime": 60, + "minHoldTime": 3, + "configMinHoldTime": 3, + "holdTimeLeft": 0, + "keepaliveTimeLeft": 0, + "state": "Established", + "establishedTime": 9, + "establishedTransitions": 1, + "lastState": "OpenConfirm", + "lastEvent": "RecvKeepAlive", + "enRRefreshstalePathRemoval": false, + "outboundEnRRefreshEnabled": true, + "neighborCapabilities": { + "negotiationDisabled": false, + "unsupportedCapReceived": false, + "multiprotocolCaps": { + "ipv4Unicast": { + "advertised": true, + "received": true, + "enabled": true + }, + "ipv6Unicast": { + "advertised": true, + "received": true, + "enabled": true + } + }, + "fourOctetAsnCap": { + "advertised": true, + "received": true, + "enabled": true + }, + "routeRefreshCap": { + "advertised": true, + "received": true, + "enabled": true + }, + "enhancedRouteRefreshCap": { + "advertised": true, + "received": true, + "enabled": true + }, + "sendEorMessages": { + "advertised": true, + "received": true, + "enabled": true + }, + "addPathsCaps": { + "ipv4Unicast": { + "receivingAddPaths": { + "receiveCapabilityAdvertised": true, + "sendCapabilityReceived": false, + "enabled": false + }, + "sendingAddPaths": { + "sendCapabilityAdvertised": false, + "receiveCapabilityReceived": true, + "enabled": false + } + }, + "ipv6Unicast": { + "receivingAddPaths": { + "receiveCapabilityAdvertised": true, + "sendCapabilityReceived": false, + "enabled": false + }, + "sendingAddPaths": { + "sendCapabilityAdvertised": false, + "receiveCapabilityReceived": true, + "enabled": false + } + } + }, + "extendedNextHopCaps": { + "ipv4UnicastOverIpv6": { + "advertised": true, + "received": true, + "enabled": true + } + } + }, + "endOfRibs": { + "incoming": { + "ipv4Unicast": { + "status": "timeout", + "stalePathsDeleted": 0 + }, + "ipv6Unicast": { + "status": "timeout", + "stalePathsDeleted": 0 + } + } + }, + "nexthopLuOriginateIpv4Uni": false, + "thirdPartyNexthopLuOriginateIpv4Uni": false, + "nexthopLuOriginateLfibBackupIpForwardIpv4Uni": false, + "nexthopLuOriginateIpv6Uni": false, + "thirdPartyNexthopLuOriginateIpv6Uni": false, + "nexthopLuOriginateLfibBackupIpForwardIpv6Uni": false, + "aigpSessionIpv4Uni": false, + "aigpSessionIpv4LabeledUni": false, + "aigpSessionIpv6Uni": false, + "aigpSessionIpv6LabeledUni": false, + "fwdFailoverTriggerSessionIpv6Uni": false, + "fwdFailoverTriggerSessionIpv4Uni": false, + "outMessageStats": { + "opens": 1, + "notifications": 0, + "updates": 20, + "keepalives": 2, + "rtRefreshes": 0, + "beginOfRtRefreshes": 0, + "endOfRtRefreshes": 0 + }, + "inMessageStats": { + "opens": 1, + "notifications": 0, + "updates": 21, + "keepalives": 2, + "rtRefreshes": 0, + "beginOfRtRefreshes": 0, + "endOfRtRefreshes": 0 + }, + "sentMessages": 23, + "receivedMessages": 24, + "prefixesSent": 9, + "prefixesReceived": 3, + "v4BestPaths": 1, + "v4BestEcmpPaths": 0, + "v6PrefixesSent": 9, + "v6PrefixesReceived": 3, + "v6BestPaths": 1, + "v6BestEcmpPaths": 0, + "totalRoutesWarnLimit": 204800, + "maxTotalRoutes": 256000, + "dropStats": { + "inDropAsloop": 0, + "inDropClusterIdLoop": 0, + "inDropMalformedMpbgp": 0, + "inDropOrigId": 0, + "inDropNhLocal": 0, + "inDropNhAfV6": 0, + "prefixDroppedMartianV4": 0, + "prefixDroppedMartianV6": 0, + "prefixLuDroppedV4": 0, + "prefixLuDroppedMartianV4": 0, + "prefixLuDroppedV6": 0, + "prefixLuDroppedMartianV6": 0, + "prefixEvpnDroppedUnsupportedRouteType": 0, + "prefixBgpLsDroppedReceptionUnsupported": 0, + "outDropV4LocalAddr": 0, + "outDropV6LocalAddr": 0, + "prefixVpnIpv4DroppedImportMatchFailure": 0, + "prefixVpnIpv6DroppedImportMatchFailure": 0, + "prefixEvpnDroppedImportMatchFailure": 0, + "prefixRtMembershipDroppedLocalAsReject": 0 + }, + "peerInUpdateErrors": { + "inUpdErrWithdraw": 0, + "inUpdErrIgnore": 0, + "inUpdErrDisableAfiSafi": 0, + "disabledAfiSafi": "None", + "lastUpdErrTime": 0 + }, + "bgpSoftReconfigInbound": "Default", + "rpkiOriginValidationMethod": "disabled", + "rpkiOriginValidationSendExtComm": false, + "rpkiOriginValidationRouteMap": "", + "orrPosition": {}, + "localAsn": "65002.2048", + "localRouterId": "172.18.8.0", + "ttl": 1, + "maxTtlHops": 255, + "updateSource": "fe80::a8c1:abff:fe5a:41a7", + "localPort": 179, + "remotePort": 41861, + "prependOwnDisabled": false, + "peerTcpInfo": { + "state": "ESTABLISHED", + "options": 7, + "sendWindowScale": 7, + "rcvWindowScale": 7, + "retransTimeout": 208000, + "delayedAckTimeout": 40000, + "maxSegmentSize": 1428, + "sndRtt": 5738, + "sndRttVariance": 10800, + "slowStartThreshold": 2147483647, + "congestionWindow": 10, + "rcvRtt": 955000, + "rcvWindow": 14400, + "totalRetrans": 0, + "outputQueueLength": 0, + "outputMaxQueueLength": 87040, + "inputQueueLength": 0, + "inputMaxQueueLength": 32768, + "connectionOptions": { + "timestampsEnabled": true, + "selectiveAcknowledgementsEnabled": true, + "windowScaleEnabled": true, + "ecnEnabled": false + } + }, + "ifName": "Ethernet3", + "afiSafiInfo": { + "ipv4Unicast": { + "localNexthop": "" + }, + "ipv6Unicast": { + "localNexthop": "fe80::a8c1:abff:fe5a:41a7" + } + } + }, + { + "peerAddress": "fe80::a8c1:abff:fea1:b618%Et2", + "asn": "65001.1027", + "linkType": "external", + "routerId": "172.18.4.3", + "vrf": "default", + "version": 4, + "lldpNeighbors": [ + { + "device": "node-65001.1027", + "description": "Arista Networks EOS version 4.30.5M-35156751.4305M (engineering build) running on an Arista cEOSLab" + } + ], + "peerGroupName": "LEAVES", + "peerFilter": "ASN4-PRIVATE", + "negotiatedVersion": 4, + "updateGroupIndex": -1, + "lastRcvd": 8, + "lastSent": 8, + "holdTime": 180, + "keepaliveTime": 60, + "configHoldTime": 180, + "configKeepaliveTime": 60, + "minHoldTime": 3, + "configMinHoldTime": 3, + "holdTimeLeft": 0, + "keepaliveTimeLeft": 0, + "state": "Established", + "establishedTime": 9, + "establishedTransitions": 1, + "lastState": "OpenConfirm", + "lastEvent": "ReapplyInboundPolicy", + "enRRefreshstalePathRemoval": false, + "outboundEnRRefreshEnabled": true, + "neighborCapabilities": { + "negotiationDisabled": false, + "unsupportedCapReceived": false, + "multiprotocolCaps": { + "ipv4Unicast": { + "advertised": true, + "received": true, + "enabled": true + }, + "ipv6Unicast": { + "advertised": true, + "received": true, + "enabled": true + } + }, + "fourOctetAsnCap": { + "advertised": true, + "received": true, + "enabled": true + }, + "routeRefreshCap": { + "advertised": true, + "received": true, + "enabled": true + }, + "enhancedRouteRefreshCap": { + "advertised": true, + "received": true, + "enabled": true + }, + "sendEorMessages": { + "advertised": true, + "received": true, + "enabled": true + }, + "addPathsCaps": { + "ipv4Unicast": { + "receivingAddPaths": { + "receiveCapabilityAdvertised": true, + "sendCapabilityReceived": false, + "enabled": false + }, + "sendingAddPaths": { + "sendCapabilityAdvertised": false, + "receiveCapabilityReceived": true, + "enabled": false + } + }, + "ipv6Unicast": { + "receivingAddPaths": { + "receiveCapabilityAdvertised": true, + "sendCapabilityReceived": false, + "enabled": false + }, + "sendingAddPaths": { + "sendCapabilityAdvertised": false, + "receiveCapabilityReceived": true, + "enabled": false + } + } + }, + "extendedNextHopCaps": { + "ipv4UnicastOverIpv6": { + "advertised": true, + "received": true, + "enabled": true + } + } + }, + "endOfRibs": { + "incoming": { + "ipv4Unicast": { + "status": "received", + "eorReceivedTime": 1721149911.520603, + "stalePathsDeleted": 0 + }, + "ipv6Unicast": { + "status": "received", + "eorReceivedTime": 1721149911.520582, + "stalePathsDeleted": 0 + } + } + }, + "nexthopLuOriginateIpv4Uni": false, + "thirdPartyNexthopLuOriginateIpv4Uni": false, + "nexthopLuOriginateLfibBackupIpForwardIpv4Uni": false, + "nexthopLuOriginateIpv6Uni": false, + "thirdPartyNexthopLuOriginateIpv6Uni": false, + "nexthopLuOriginateLfibBackupIpForwardIpv6Uni": false, + "aigpSessionIpv4Uni": false, + "aigpSessionIpv4LabeledUni": false, + "aigpSessionIpv6Uni": false, + "aigpSessionIpv6LabeledUni": false, + "fwdFailoverTriggerSessionIpv6Uni": false, + "fwdFailoverTriggerSessionIpv4Uni": false, + "outMessageStats": { + "opens": 1, + "notifications": 0, + "updates": 18, + "keepalives": 2, + "rtRefreshes": 0, + "beginOfRtRefreshes": 0, + "endOfRtRefreshes": 0 + }, + "inMessageStats": { + "opens": 1, + "notifications": 0, + "updates": 10, + "keepalives": 2, + "rtRefreshes": 0, + "beginOfRtRefreshes": 0, + "endOfRtRefreshes": 0 + }, + "sentMessages": 21, + "receivedMessages": 13, + "prefixesSent": 8, + "prefixesReceived": 5, + "v4BestPaths": 2, + "v4BestEcmpPaths": 0, + "v6PrefixesSent": 8, + "v6PrefixesReceived": 5, + "v6BestPaths": 2, + "v6BestEcmpPaths": 0, + "totalRoutesWarnLimit": 204800, + "maxTotalRoutes": 256000, + "dropStats": { + "inDropAsloop": 0, + "inDropClusterIdLoop": 0, + "inDropMalformedMpbgp": 0, + "inDropOrigId": 0, + "inDropNhLocal": 0, + "inDropNhAfV6": 0, + "prefixDroppedMartianV4": 0, + "prefixDroppedMartianV6": 0, + "prefixLuDroppedV4": 0, + "prefixLuDroppedMartianV4": 0, + "prefixLuDroppedV6": 0, + "prefixLuDroppedMartianV6": 0, + "prefixEvpnDroppedUnsupportedRouteType": 0, + "prefixBgpLsDroppedReceptionUnsupported": 0, + "outDropV4LocalAddr": 0, + "outDropV6LocalAddr": 0, + "prefixVpnIpv4DroppedImportMatchFailure": 0, + "prefixVpnIpv6DroppedImportMatchFailure": 0, + "prefixEvpnDroppedImportMatchFailure": 0, + "prefixRtMembershipDroppedLocalAsReject": 0 + }, + "peerInUpdateErrors": { + "inUpdErrWithdraw": 0, + "inUpdErrIgnore": 0, + "inUpdErrDisableAfiSafi": 0, + "disabledAfiSafi": "None", + "lastUpdErrTime": 0 + }, + "bgpSoftReconfigInbound": "Default", + "rpkiOriginValidationMethod": "disabled", + "rpkiOriginValidationSendExtComm": false, + "rpkiOriginValidationRouteMap": "", + "orrPosition": {}, + "localAsn": "65002.2048", + "localRouterId": "172.18.8.0", + "ttl": 1, + "maxTtlHops": 255, + "updateSource": "fe80::a8c1:abff:fe85:a217", + "localPort": 179, + "remotePort": 33217, + "prependOwnDisabled": false, + "peerTcpInfo": { + "state": "ESTABLISHED", + "options": 7, + "sendWindowScale": 7, + "rcvWindowScale": 7, + "retransTimeout": 204000, + "delayedAckTimeout": 40000, + "maxSegmentSize": 1428, + "sndRtt": 3481, + "sndRttVariance": 6449, + "slowStartThreshold": 2147483647, + "congestionWindow": 10, + "rcvRtt": 0, + "rcvWindow": 14400, + "totalRetrans": 0, + "outputQueueLength": 0, + "outputMaxQueueLength": 87040, + "inputQueueLength": 0, + "inputMaxQueueLength": 32768, + "connectionOptions": { + "timestampsEnabled": true, + "selectiveAcknowledgementsEnabled": true, + "windowScaleEnabled": true, + "ecnEnabled": false + } + }, + "ifName": "Ethernet2", + "afiSafiInfo": { + "ipv4Unicast": { + "localNexthop": "" + }, + "ipv6Unicast": { + "localNexthop": "fe80::a8c1:abff:fe85:a217" + } + } + }, + { + "peerAddress": "fe80::a8c1:abff:fedc:fb58%Et1", + "asn": "65001.1026", + "linkType": "external", + "routerId": "172.18.4.2", + "vrf": "default", + "version": 4, + "lldpNeighbors": [ + { + "device": "node-65001.1026", + "description": "Arista Networks EOS version 4.30.5M-35156751.4305M (engineering build) running on an Arista cEOSLab" + } + ], + "peerGroupName": "LEAVES", + "peerFilter": "ASN4-PRIVATE", + "negotiatedVersion": 4, + "updateGroupIndex": -1, + "lastRcvd": 8, + "lastSent": 8, + "holdTime": 180, + "keepaliveTime": 60, + "configHoldTime": 180, + "configKeepaliveTime": 60, + "minHoldTime": 3, + "configMinHoldTime": 3, + "holdTimeLeft": 0, + "keepaliveTimeLeft": 0, + "state": "Established", + "establishedTime": 9, + "establishedTransitions": 1, + "lastState": "OpenConfirm", + "lastEvent": "RecvKeepAlive", + "enRRefreshstalePathRemoval": false, + "outboundEnRRefreshEnabled": true, + "neighborCapabilities": { + "negotiationDisabled": false, + "unsupportedCapReceived": false, + "multiprotocolCaps": { + "ipv4Unicast": { + "advertised": true, + "received": true, + "enabled": true + }, + "ipv6Unicast": { + "advertised": true, + "received": true, + "enabled": true + } + }, + "fourOctetAsnCap": { + "advertised": true, + "received": true, + "enabled": true + }, + "routeRefreshCap": { + "advertised": true, + "received": true, + "enabled": true + }, + "enhancedRouteRefreshCap": { + "advertised": true, + "received": true, + "enabled": true + }, + "sendEorMessages": { + "advertised": true, + "received": true, + "enabled": true + }, + "addPathsCaps": { + "ipv4Unicast": { + "receivingAddPaths": { + "receiveCapabilityAdvertised": true, + "sendCapabilityReceived": false, + "enabled": false + }, + "sendingAddPaths": { + "sendCapabilityAdvertised": false, + "receiveCapabilityReceived": true, + "enabled": false + } + }, + "ipv6Unicast": { + "receivingAddPaths": { + "receiveCapabilityAdvertised": true, + "sendCapabilityReceived": false, + "enabled": false + }, + "sendingAddPaths": { + "sendCapabilityAdvertised": false, + "receiveCapabilityReceived": true, + "enabled": false + } + } + }, + "extendedNextHopCaps": { + "ipv4UnicastOverIpv6": { + "advertised": true, + "received": true, + "enabled": true + } + } + }, + "endOfRibs": { + "incoming": { + "ipv4Unicast": { + "status": "received", + "eorReceivedTime": 1721149911.53437, + "stalePathsDeleted": 0 + }, + "ipv6Unicast": { + "status": "received", + "eorReceivedTime": 1721149911.534352, + "stalePathsDeleted": 0 + } + } + }, + "nexthopLuOriginateIpv4Uni": false, + "thirdPartyNexthopLuOriginateIpv4Uni": false, + "nexthopLuOriginateLfibBackupIpForwardIpv4Uni": false, + "nexthopLuOriginateIpv6Uni": false, + "thirdPartyNexthopLuOriginateIpv6Uni": false, + "nexthopLuOriginateLfibBackupIpForwardIpv6Uni": false, + "aigpSessionIpv4Uni": false, + "aigpSessionIpv4LabeledUni": false, + "aigpSessionIpv6Uni": false, + "aigpSessionIpv6LabeledUni": false, + "fwdFailoverTriggerSessionIpv6Uni": false, + "fwdFailoverTriggerSessionIpv4Uni": false, + "outMessageStats": { + "opens": 1, + "notifications": 0, + "updates": 18, + "keepalives": 2, + "rtRefreshes": 0, + "beginOfRtRefreshes": 0, + "endOfRtRefreshes": 0 + }, + "inMessageStats": { + "opens": 1, + "notifications": 0, + "updates": 16, + "keepalives": 2, + "rtRefreshes": 0, + "beginOfRtRefreshes": 0, + "endOfRtRefreshes": 0 + }, + "sentMessages": 21, + "receivedMessages": 19, + "prefixesSent": 5, + "prefixesReceived": 6, + "v4BestPaths": 5, + "v4BestEcmpPaths": 0, + "v6PrefixesSent": 5, + "v6PrefixesReceived": 6, + "v6BestPaths": 5, + "v6BestEcmpPaths": 0, + "totalRoutesWarnLimit": 204800, + "maxTotalRoutes": 256000, + "dropStats": { + "inDropAsloop": 0, + "inDropClusterIdLoop": 0, + "inDropMalformedMpbgp": 0, + "inDropOrigId": 0, + "inDropNhLocal": 0, + "inDropNhAfV6": 0, + "prefixDroppedMartianV4": 0, + "prefixDroppedMartianV6": 0, + "prefixLuDroppedV4": 0, + "prefixLuDroppedMartianV4": 0, + "prefixLuDroppedV6": 0, + "prefixLuDroppedMartianV6": 0, + "prefixEvpnDroppedUnsupportedRouteType": 0, + "prefixBgpLsDroppedReceptionUnsupported": 0, + "outDropV4LocalAddr": 0, + "outDropV6LocalAddr": 0, + "prefixVpnIpv4DroppedImportMatchFailure": 0, + "prefixVpnIpv6DroppedImportMatchFailure": 0, + "prefixEvpnDroppedImportMatchFailure": 0, + "prefixRtMembershipDroppedLocalAsReject": 0 + }, + "peerInUpdateErrors": { + "inUpdErrWithdraw": 0, + "inUpdErrIgnore": 0, + "inUpdErrDisableAfiSafi": 0, + "disabledAfiSafi": "None", + "lastUpdErrTime": 0 + }, + "bgpSoftReconfigInbound": "Default", + "rpkiOriginValidationMethod": "disabled", + "rpkiOriginValidationSendExtComm": false, + "rpkiOriginValidationRouteMap": "", + "orrPosition": {}, + "localAsn": "65002.2048", + "localRouterId": "172.18.8.0", + "ttl": 1, + "maxTtlHops": 255, + "updateSource": "fe80::a8c1:abff:fece:2f12", + "localPort": 46863, + "remotePort": 179, + "prependOwnDisabled": false, + "peerTcpInfo": { + "state": "ESTABLISHED", + "options": 7, + "sendWindowScale": 7, + "rcvWindowScale": 7, + "retransTimeout": 208000, + "delayedAckTimeout": 40000, + "maxSegmentSize": 1428, + "sndRtt": 6920, + "sndRttVariance": 12272, + "slowStartThreshold": 2147483647, + "congestionWindow": 10, + "rcvRtt": 0, + "rcvWindow": 14280, + "totalRetrans": 0, + "outputQueueLength": 0, + "outputMaxQueueLength": 87040, + "inputQueueLength": 0, + "inputMaxQueueLength": 32768, + "connectionOptions": { + "timestampsEnabled": true, + "selectiveAcknowledgementsEnabled": true, + "windowScaleEnabled": true, + "ecnEnabled": false + } + }, + "ifName": "Ethernet1", + "afiSafiInfo": { + "ipv4Unicast": { + "localNexthop": "" + }, + "ipv6Unicast": { + "localNexthop": "fe80::a8c1:abff:fece:2f12" + } + } + } + ] + } + } +} diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/issue1759/show_ipv6_bgp_summary_vrf_all.json b/test/eos/mocked_data/test_get_bgp_neighbors/issue1759/show_ipv6_bgp_summary_vrf_all.json new file mode 100644 index 000000000..b4ddc4c91 --- /dev/null +++ b/test/eos/mocked_data/test_get_bgp_neighbors/issue1759/show_ipv6_bgp_summary_vrf_all.json @@ -0,0 +1,50 @@ +{ + "vrfs": { + "default": { + "vrf": "default", + "routerId": "172.18.8.0", + "asn": "65002.2048", + "peers": { + "fe80::a8c1:abff:fe94:4171%Et3": { + "version": 4, + "msgReceived": 25, + "msgSent": 24, + "inMsgQueue": 0, + "outMsgQueue": 0, + "asn": "65001.1028", + "prefixAccepted": 3, + "prefixReceived": 3, + "upDownTime": 1721149910.529753, + "underMaintenance": false, + "peerState": "Established" + }, + "fe80::a8c1:abff:fea1:b618%Et2": { + "version": 4, + "msgReceived": 14, + "msgSent": 22, + "inMsgQueue": 0, + "outMsgQueue": 0, + "asn": "65001.1027", + "prefixAccepted": 5, + "prefixReceived": 5, + "upDownTime": 1721149910.47622, + "underMaintenance": false, + "peerState": "Established" + }, + "fe80::a8c1:abff:fedc:fb58%Et1": { + "version": 4, + "msgReceived": 20, + "msgSent": 22, + "inMsgQueue": 0, + "outMsgQueue": 0, + "asn": "65001.1026", + "prefixAccepted": 6, + "prefixReceived": 6, + "upDownTime": 1721149910.456982, + "underMaintenance": false, + "peerState": "Established" + } + } + } + } +} From 981c5cababfcae3b95d448f9c37ddb713b44aaa4 Mon Sep 17 00:00:00 2001 From: Brandon Ewing Date: Fri, 26 Jul 2024 08:33:26 -0500 Subject: [PATCH 07/22] check for correct uptime in eos bgp neighbors --- .../test_get_bgp_neighbors/normal/expected_result.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/eos/mocked_data/test_get_bgp_neighbors/normal/expected_result.json b/test/eos/mocked_data/test_get_bgp_neighbors/normal/expected_result.json index 3582fff2e..d6e527ded 100644 --- a/test/eos/mocked_data/test_get_bgp_neighbors/normal/expected_result.json +++ b/test/eos/mocked_data/test_get_bgp_neighbors/normal/expected_result.json @@ -8,7 +8,7 @@ "is_up": true, "is_enabled": true, "description": "", - "uptime": "...", + "uptime": 121, "address_family": { "ipv4": { "received_prefixes": 3, @@ -29,7 +29,7 @@ "is_up": false, "is_enabled": true, "description": "", - "uptime": "...", + "uptime": -1, "address_family": { "ipv4": { "received_prefixes": 0, @@ -50,7 +50,7 @@ "is_up": true, "is_enabled": true, "description": "", - "uptime": "...", + "uptime": 165, "address_family": { "ipv4": { "received_prefixes": 0, @@ -71,7 +71,7 @@ "is_up": true, "is_enabled": true, "description": "", - "uptime": "...", + "uptime": 165, "address_family": { "ipv4": { "received_prefixes": 0, From e72555931d1000a9197ead7aed996772b153762a Mon Sep 17 00:00:00 2001 From: Roman Dodin Date: Wed, 21 Aug 2024 20:57:12 +0200 Subject: [PATCH 08/22] added pyenv venv file to the gitignore (#2145) --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 87330b57c..184d469e6 100644 --- a/.gitignore +++ b/.gitignore @@ -59,6 +59,7 @@ docs/_static/ .venv .vscode .devcontainer +.python-version env *.swp From 6e5d7d1a0ef1fd7d94c3c3b02454621f6fa51906 Mon Sep 17 00:00:00 2001 From: Nicolas Rodriguez Date: Fri, 20 Sep 2024 22:59:52 +0200 Subject: [PATCH 09/22] Fix UnboundLocalError: cannot access local variable 'seconds' where it is not associated with a value Stacktrace: File "/data/apps/netbox/.asdf/installs/python/3.11.9/lib/python3.11/site-packages/napalm/nxos_ssh/nxos_ssh.py", line 511, in parse_uptime + seconds ^^^^^^^ --- napalm/nxos_ssh/nxos_ssh.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/napalm/nxos_ssh/nxos_ssh.py b/napalm/nxos_ssh/nxos_ssh.py index fcec00c28..ef71aa016 100644 --- a/napalm/nxos_ssh/nxos_ssh.py +++ b/napalm/nxos_ssh/nxos_ssh.py @@ -484,7 +484,7 @@ def parse_uptime(uptime_str): Return the uptime in seconds as an integer """ # Initialize to zero - (years, weeks, days, hours, minutes) = (0, 0, 0, 0, 0) + (years, weeks, days, hours, minutes, seconds) = (0, 0, 0, 0, 0, 0) uptime_str = uptime_str.strip() time_list = uptime_str.split(",") From 19706c3380976f16886286a48e2057cdf5b9e0eb Mon Sep 17 00:00:00 2001 From: Nicolas Rodriguez Date: Fri, 20 Sep 2024 23:01:53 +0200 Subject: [PATCH 10/22] Fix unexpected speed unit in show interfaces parsing Sometimes unit is "Kbit/sec": MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec, reliability 255/255, txload 1/255, rxload 1/255 --- napalm/nxos_ssh/nxos_ssh.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/napalm/nxos_ssh/nxos_ssh.py b/napalm/nxos_ssh/nxos_ssh.py index ef71aa016..7206756d4 100644 --- a/napalm/nxos_ssh/nxos_ssh.py +++ b/napalm/nxos_ssh/nxos_ssh.py @@ -168,8 +168,7 @@ def parse_intf_section(interface): mtu = int(speed_data["mtu"]) speed_unit = speed_data["speed_unit"] speed_unit = speed_unit.rstrip(",") - # This was alway in Kbit (in the data I saw) - if speed_unit != "Kbit": + if speed_unit not in ["Kbit", "Kbit/sec"]: msg = "Unexpected speed unit in show interfaces parsing:\n\n{}".format( interface ) From 3d6568350a76903538b8431de129a16c033c4ae7 Mon Sep 17 00:00:00 2001 From: Nicolas Rodriguez Date: Mon, 14 Oct 2024 23:05:42 +0200 Subject: [PATCH 11/22] Add tests on NXOSSSHDriver.parse_uptime method --- test/nxos_ssh/test_static_methods.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 test/nxos_ssh/test_static_methods.py diff --git a/test/nxos_ssh/test_static_methods.py b/test/nxos_ssh/test_static_methods.py new file mode 100644 index 000000000..9dd066a8f --- /dev/null +++ b/test/nxos_ssh/test_static_methods.py @@ -0,0 +1,20 @@ +"""Tests for uptime utils""" + +from napalm.nxos_ssh import NXOSSSHDriver + + +def test_parse_uptime(): + """ + Test uptime parsing + """ + assert ( + NXOSSSHDriver.parse_uptime("0 day(s), 0 hour(s), 0 minute(s), 1 second(s)") == 1 + ) + assert ( + NXOSSSHDriver.parse_uptime("1 day(s), 0 hour(s), 0 minute(s), 0 second(s)") + == 86400 + ) + assert ( + NXOSSSHDriver.parse_uptime("4 day(s), 15 hour(s), 48 minute(s), 52 second(s)") + == 402532 + ) From 17e0aebb0d064742e11dfba7c7a9f31eb6fe7bf2 Mon Sep 17 00:00:00 2001 From: bewing Date: Mon, 4 Nov 2024 19:37:18 -0600 Subject: [PATCH 12/22] Improve nxos_ssh version handling (#2152) Closes #2151 --- napalm/nxos_ssh/nxos_ssh.py | 2 +- .../issue2151/expected_result.json | 76 +++++++++++++++++++ .../issue2151/show_hostname.txt | 1 + .../test_get_facts/issue2151/show_hosts.txt | 7 ++ .../issue2151/show_interface_status.txt | 69 +++++++++++++++++ .../issue2151/show_inventory___json.txt | 34 +++++++++ .../test_get_facts/issue2151/show_version.txt | 50 ++++++++++++ 7 files changed, 238 insertions(+), 1 deletion(-) create mode 100644 test/nxos_ssh/mocked_data/test_get_facts/issue2151/expected_result.json create mode 100644 test/nxos_ssh/mocked_data/test_get_facts/issue2151/show_hostname.txt create mode 100644 test/nxos_ssh/mocked_data/test_get_facts/issue2151/show_hosts.txt create mode 100644 test/nxos_ssh/mocked_data/test_get_facts/issue2151/show_interface_status.txt create mode 100644 test/nxos_ssh/mocked_data/test_get_facts/issue2151/show_inventory___json.txt create mode 100644 test/nxos_ssh/mocked_data/test_get_facts/issue2151/show_version.txt diff --git a/napalm/nxos_ssh/nxos_ssh.py b/napalm/nxos_ssh/nxos_ssh.py index 7206756d4..5a71662a8 100644 --- a/napalm/nxos_ssh/nxos_ssh.py +++ b/napalm/nxos_ssh/nxos_ssh.py @@ -621,7 +621,7 @@ def get_facts(self): _, uptime_str = line.split(" uptime is ") uptime = self.parse_uptime(uptime_str) - if "system: " in line or "NXOS: " in line: + if "system: " in line or line.strip().startswith("NXOS: version"): line = line.strip() os_version = line.split()[2] os_version = os_version.strip() diff --git a/test/nxos_ssh/mocked_data/test_get_facts/issue2151/expected_result.json b/test/nxos_ssh/mocked_data/test_get_facts/issue2151/expected_result.json new file mode 100644 index 000000000..4f2b4860e --- /dev/null +++ b/test/nxos_ssh/mocked_data/test_get_facts/issue2151/expected_result.json @@ -0,0 +1,76 @@ +{ + "os_version": "10.3(5)", + "uptime": 4338547, + "interface_list": [ + "Management0", + "Ethernet1/1", + "Ethernet1/2", + "Ethernet1/3", + "Ethernet1/4", + "Ethernet1/5", + "Ethernet1/6", + "Ethernet1/7", + "Ethernet1/8", + "Ethernet1/9", + "Ethernet1/10", + "Ethernet1/11", + "Ethernet1/12", + "Ethernet1/13", + "Ethernet1/14", + "Ethernet1/15", + "Ethernet1/16", + "Ethernet1/17", + "Ethernet1/18", + "Ethernet1/19", + "Ethernet1/20", + "Ethernet1/21", + "Ethernet1/22", + "Ethernet1/23", + "Ethernet1/24", + "Ethernet1/25", + "Ethernet1/26", + "Ethernet1/27", + "Ethernet1/28", + "Ethernet1/29", + "Ethernet1/30", + "Ethernet1/31", + "Ethernet1/32", + "Ethernet1/33", + "Ethernet1/34", + "Ethernet1/35", + "Ethernet1/36", + "Ethernet1/37", + "Ethernet1/38", + "Ethernet1/39", + "Ethernet1/40", + "Ethernet1/41", + "Ethernet1/42", + "Ethernet1/43", + "Ethernet1/44", + "Ethernet1/45", + "Ethernet1/46", + "Ethernet1/47", + "Ethernet1/48", + "Ethernet1/49", + "Ethernet1/50", + "Ethernet1/51", + "Ethernet1/52", + "Port-channel1", + "Port-channel16", + "Port-channel17", + "Port-channel32", + "Port-channel33", + "Port-channel34", + "Port-channel35", + "Port-channel50", + "Port-channel51", + "Port-channel360", + "Vlan1", + "Vlan351" + ], + "vendor": "Cisco", + "serial_number": "TM6012EC74B", + "model": "Nexus 3048 Chassis", + "hostname": "SWITCH_NXOSv", + "fqdn": "SWITCH_NXOSv.y.z.a.com" +} diff --git a/test/nxos_ssh/mocked_data/test_get_facts/issue2151/show_hostname.txt b/test/nxos_ssh/mocked_data/test_get_facts/issue2151/show_hostname.txt new file mode 100644 index 000000000..c82c8bda3 --- /dev/null +++ b/test/nxos_ssh/mocked_data/test_get_facts/issue2151/show_hostname.txt @@ -0,0 +1 @@ +SWITCH_NXOSv.y.z.a.com \ No newline at end of file diff --git a/test/nxos_ssh/mocked_data/test_get_facts/issue2151/show_hosts.txt b/test/nxos_ssh/mocked_data/test_get_facts/issue2151/show_hosts.txt new file mode 100644 index 000000000..303a24bf1 --- /dev/null +++ b/test/nxos_ssh/mocked_data/test_get_facts/issue2151/show_hosts.txt @@ -0,0 +1,7 @@ +DNS lookup enabled +Vrf Name: default Default domain is y.z.a.com +Name servers are 8.8.8.4 8.8.8.8 + + + +Host Address diff --git a/test/nxos_ssh/mocked_data/test_get_facts/issue2151/show_interface_status.txt b/test/nxos_ssh/mocked_data/test_get_facts/issue2151/show_interface_status.txt new file mode 100644 index 000000000..105efd980 --- /dev/null +++ b/test/nxos_ssh/mocked_data/test_get_facts/issue2151/show_interface_status.txt @@ -0,0 +1,69 @@ + +-------------------------------------------------------------------------------- +Port Name Status Vlan Duplex Speed Type +-------------------------------------------------------------------------------- +mgmt0 -- connected routed full 1000 -- +Eth1/1 -- connected 353 full 100 10/100/1g +Eth1/2 -- notconnec 353 auto auto 10/100/1g +Eth1/3 -- disabled 366 auto auto 10/100/1g +Eth1/4 -- connected 351 full 1000 10/100/1g +Eth1/5 -- connected 351 full 1000 10/100/1g +Eth1/6 -- connected 351 full 1000 10/100/1g +Eth1/7 -- connected 351 full 1000 10/100/1g +Eth1/8 -- connected 351 full 1000 10/100/1g +Eth1/9 -- connected 351 full 1000 10/100/1g +Eth1/10 -- connected 351 full 1000 10/100/1g +Eth1/11 -- connected 351 full 1000 10/100/1g +Eth1/12 -- connected 351 full 1000 10/100/1g +Eth1/13 -- connected 351 full 1000 10/100/1g +Eth1/14 -- connected 351 full 1000 10/100/1g +Eth1/15 -- connected 351 full 1000 10/100/1g +Eth1/16 -- connected trunk full 1000 10/100/1g +Eth1/17 -- connected trunk full 1000 10/100/1g +Eth1/18 -- connected 369 full 1000 10/100/1g +Eth1/19 -- notconnec 351 auto auto 10/100/1g +Eth1/20 -- connected 351 full 100 10/100/1g +Eth1/21 -- connected 351 half 100 10/100/1g +Eth1/22 -- connected 351 half 100 10/100/1g +Eth1/23 -- disabled 366 auto auto 10/100/1g +Eth1/24 -- connected 352 full 1000 10/100/1g +Eth1/25 -- connected 352 half 100 10/100/1g +Eth1/26 -- connected 352 full 1000 10/100/1g +Eth1/27 -- connected 352 half 100 10/100/1g +Eth1/28 -- connected 352 full 100 10/100/1g +Eth1/29 -- connected 352 full 100 10/100/1g +Eth1/30 -- connected 352 full 100 10/100/1g +Eth1/31 -- disabled 366 auto auto 10/100/1g +Eth1/32 -- connected trunk full 1000 10/100/1g +Eth1/33 -- connected trunk full 1000 10/100/1g +Eth1/34 -- connected trunk full 1000 10/100/1g +Eth1/35 -- connected trunk full 1000 10/100/1g +Eth1/36 -- connected 351 full 1000 10/100/1g +Eth1/37 -- connected 351 full 1000 10/100/1g +Eth1/38 -- connected 351 full 1000 10/100/1g +Eth1/39 -- connected 351 full 1000 10/100/1g +Eth1/40 -- connected 351 full 1000 10/100/1g +Eth1/41 -- disabled 350 auto auto 10/100/1g +Eth1/42 -- connected 351 full 1000 10/100/1g +Eth1/43 -- connected 351 full 1000 10/100/1g +Eth1/44 -- connected 351 full 1000 10/100/1g +Eth1/45 -- connected 351 full 1000 10/100/1g +Eth1/46 -- disabled 366 auto auto 10/100/1g +Eth1/47 -- connected trunk full 1000 10/100/1g +Eth1/48 -- connected trunk full 1000 10/100/1g +Eth1/49 -- xcvrAbsen 366 full 10G -- +Eth1/50 -- connected trunk full 1000 1000base-SX +Eth1/51 -- connected trunk full 1000 1000base-SX +Eth1/52 -- connected trunk full 1000 1000base-SX +Po1 -- connected trunk full 1000 -- +Po16 -- connected trunk full 1000 -- +Po17 -- connected trunk full 1000 -- +Po32 -- connected trunk full 1000 -- +Po33 -- connected trunk full 1000 -- +Po34 -- connected trunk full 1000 -- +Po35 -- connected trunk full 1000 -- +Po50 -- connected trunk full 1000 -- +Po51 -- connected trunk full 1000 -- +Po360 -- connected trunk full 1000 -- +Vlan1 -- down routed auto auto -- +Vlan351 -- connected routed auto auto -- \ No newline at end of file diff --git a/test/nxos_ssh/mocked_data/test_get_facts/issue2151/show_inventory___json.txt b/test/nxos_ssh/mocked_data/test_get_facts/issue2151/show_inventory___json.txt new file mode 100644 index 000000000..15cbe724c --- /dev/null +++ b/test/nxos_ssh/mocked_data/test_get_facts/issue2151/show_inventory___json.txt @@ -0,0 +1,34 @@ +{ + "TABLE_inv": { + "ROW_inv": [ + { + "name": "Chassis", + "desc": "Nexus 6001 Chassis", + "productid": "N6K-C6001-64P", + "vendorid": "V01", + "serialnum": "TM6012EC74B" + }, + { + "name": "Module 1", + "desc": "Nexus 64 Supervisor", + "productid": "N6K-C6001-64P", + "vendorid": "V01", + "serialnum": "FOC11111111" + }, + { + "name": "Module 2", + "desc": "Nexus 4xQSFP Ethernet Module", + "productid": "N6K-C6001-M4Q", + "vendorid": "V01", + "serialnum": "FOC11111111" + }, + { + "name": "Fan 1", + "desc": "Chassis fan module", + "productid": "N6K-C6001-FAN-B", + "vendorid": "N/A", + "serialnum": "N/A" + } + ] + } +} diff --git a/test/nxos_ssh/mocked_data/test_get_facts/issue2151/show_version.txt b/test/nxos_ssh/mocked_data/test_get_facts/issue2151/show_version.txt new file mode 100644 index 000000000..cafe1098d --- /dev/null +++ b/test/nxos_ssh/mocked_data/test_get_facts/issue2151/show_version.txt @@ -0,0 +1,50 @@ +Cisco Nexus Operating System (NX-OS) Software +TAC support: http://www.cisco.com/tac +Copyright (C) 2002-2017, Cisco and/or its affiliates. +All rights reserved. +The copyrights to certain works contained in this software are +owned by other third parties and used and distributed under their own +licenses, such as open source. This software is provided "as is," and unless +otherwise stated, there is no warranty, express or implied, including but not +limited to warranties of merchantability and fitness for a particular purpose. +Certain components of this software are licensed under +the GNU General Public License (GPL) version 2.0 or +GNU General Public License (GPL) version 3.0 or the GNU +Lesser General Public License (LGPL) Version 2.1 or +Lesser General Public License (LGPL) Version 2.0. +A copy of each such license is available at +http://www.opensource.org/licenses/gpl-2.0.php and +http://opensource.org/licenses/gpl-3.0.html and +http://www.opensource.org/licenses/lgpl-2.1.php and +http://www.gnu.org/licenses/old-licenses/library.txt. + +Software + BIOS: version 01.09 + NXOS: version 10.3(5) [Maintenance Release] + Host NXOS: version 10.3(5) + BIOS compile time: 10/08/2023 + NXOS image file is: bootflash:///nxos64-cs.10.3.5.M.bin + NXOS compile time: 4/30/2024 12:00:00 [05/08/2024 05:39:13] + NXOS boot mode: LXC + +Hardware + cisco Nexus 3048 Chassis + Intel(R) Celeron(R) CPU P4505 @ 1.87GHz with 3903332 kB of memory. + Processor Board ID TM6012EC74B + + Device name: SWITCH_NXOSv + bootflash: 1848240 kB + usb1: 0 kB (expansion flash) + +Kernel uptime is 50 day(s), 5 hour(s), 9 minute(s), 7 second(s) + +Last reset at 829281 usecs after Thu Oct 26 20:25:34 2017 + + Reason: Reset Requested by CLI command reload + System version: 7.0(3)I4(7) + Service: + +plugin + Core Plugin, Ethernet Plugin + +Active Package(s): From e6c5da20786d3b0e9cade98298721e96b82a89c6 Mon Sep 17 00:00:00 2001 From: bewing Date: Fri, 3 Jan 2025 10:43:25 -0600 Subject: [PATCH 13/22] Bump ansible version in docs requirements (#2158) Ansible 9.6.0 was removed after a windows venv was included in the collection release. https://forum.ansible.com/t/release-announcement-ansible-community-package-9-6-1/6206 --- docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 8f6628a66..1b2e19981 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -5,4 +5,4 @@ invoke==2.2.0 jinja2==3.1.4 MarkupSafe==2.1.5 pytest==8.2.1 -ansible==9.6.0 +ansible==9.6.1 From 9a539a84f646239d07450575c0c4062ae6b306ba Mon Sep 17 00:00:00 2001 From: bewing Date: Fri, 3 Jan 2025 10:52:28 -0600 Subject: [PATCH 14/22] Draft: Update eos CLI vrf command (#2157) * Bump ansible version in docs requirements Ansible 9.6.0 was removed after a windows venv was included in the collection release. https://forum.ansible.com/t/release-announcement-ansible-community-package-9-6-1/6206 * Update eos CLI vrf command Replace "routing-context vrf" with "cli vrf" per Arista FN 0039 --------- Co-authored-by: Kirk Byers --- napalm/eos/eos.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/napalm/eos/eos.py b/napalm/eos/eos.py index f31f2ad44..76f95f551 100644 --- a/napalm/eos/eos.py +++ b/napalm/eos/eos.py @@ -1687,7 +1687,7 @@ def traceroute( commands = [] if vrf: - commands.append("routing-context vrf {vrf}".format(vrf=vrf)) + commands.append("cli vrf {vrf}".format(vrf=vrf)) if source: source_opt = "-s {source}".format(source=source) @@ -2193,7 +2193,7 @@ def ping( commands = [] if vrf: - commands.append("routing-context vrf {vrf}".format(vrf=vrf)) + commands.append("cli vrf {vrf}".format(vrf=vrf)) command = "ping {}".format(destination) command += " timeout {}".format(timeout) From 99192df02a16272478deac9fe401c3c6933aef8c Mon Sep 17 00:00:00 2001 From: Brandon Ewing Date: Wed, 22 Jan 2025 13:10:04 -0600 Subject: [PATCH 15/22] Support non-total model testing in helper In support of adding details to NTP server dictionaries, support detection of non-total TypedDicts and change the logic to only error if there are EXTRA keys instead of missing keys. --- napalm/base/test/helpers.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/napalm/base/test/helpers.py b/napalm/base/test/helpers.py index de81e48ed..1b7cd57cd 100644 --- a/napalm/base/test/helpers.py +++ b/napalm/base/test/helpers.py @@ -4,23 +4,26 @@ def test_model(model, data): """Return if the dictionary `data` complies with the `model`.""" # Access the underlying schema for a TypedDict directly - model = model.__annotations__ - same_keys = set(model.keys()) == set(data.keys()) + annotations = model.__annotations__ + if model.__total__: + same_keys = set(annotations.keys()) == set(data.keys()) + else: + same_keys = set(data.keys()) <= set(annotations.keys()) if not same_keys: print( "model_keys: {}\ndata_keys: {}".format( - sorted(model.keys()), sorted(data.keys()) + sorted(annotations.keys()), sorted(data.keys()) ) ) correct_class = True - for key, instance_class in model.items(): - correct_class = isinstance(data[key], instance_class) and correct_class + for key in data.keys(): + correct_class = isinstance(data[key], annotations[key]) and correct_class if not correct_class: print( "key: {}\nmodel_class: {}\ndata_class: {}".format( - key, instance_class, data[key].__class__ + key, annotations[key], data[key].__class__ ) ) From 145c7b73f790c135996a30277e637ad026d24100 Mon Sep 17 00:00:00 2001 From: Brandon Ewing Date: Wed, 22 Jan 2025 13:11:27 -0600 Subject: [PATCH 16/22] Update NTP data return definition Support returning details regarding individual NTP servers based on openconfig models (/system/ntp/servers/server) --- napalm/base/base.py | 15 +++++++++++++-- napalm/base/models.py | 20 ++++++++++++++++++-- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/napalm/base/base.py b/napalm/base/base.py index e7226cba6..7c69c61b1 100644 --- a/napalm/base/base.py +++ b/napalm/base/base.py @@ -921,12 +921,23 @@ def get_ntp_servers(self) -> Dict[str, models.NTPServerDict]: """ Returns the NTP servers configuration as dictionary. The keys of the dictionary represent the IP Addresses of the servers. - Inner dictionaries do not have yet any available keys. + Inner dictionaries MAY contain information regarding per-server configuration. Example:: { - '192.168.0.1': {}, + '192.168.0.1': + { + 'address': '192.168.0.1', + 'port': 123, + 'version': 4, + 'association_type': 'SERVER', + 'iburst': False, + 'prefer': False, + 'network_instance': 'default', + 'source_address': '192.0.2.1', + 'key_id': -1, + }, '17.72.148.53': {}, '37.187.56.220': {}, '162.158.20.18': {} diff --git a/napalm/base/models.py b/napalm/base/models.py index 395c3c8dc..ad104bc56 100644 --- a/napalm/base/models.py +++ b/napalm/base/models.py @@ -224,7 +224,15 @@ NTPPeerDict = TypedDict( "NTPPeerDict", { - # will populate it in the future wit potential keys + "address": str, + "port": int, + "version": int, + "association_type": str, + "iburst": bool, + "prefer": bool, + "network_instance": str, + "source_address": str, + "key_id": int, }, total=False, ) @@ -232,7 +240,15 @@ NTPServerDict = TypedDict( "NTPServerDict", { - # will populate it in the future wit potential keys + "address": str, + "port": int, + "version": int, + "association_type": str, + "iburst": bool, + "prefer": bool, + "network_instance": str, + "source_address": str, + "key_id": int, }, total=False, ) From c02a74981239ef4e085fe5a0caddc5b2e6ef8a2a Mon Sep 17 00:00:00 2001 From: Brandon Ewing Date: Wed, 22 Jan 2025 13:25:13 -0600 Subject: [PATCH 17/22] Add support for NTP server details to EOS --- napalm/eos/eos.py | 79 ++++++++++++++++--- .../details/expected_result.json | 24 ++++++ .../details/show_ip_interface.json | 48 +++++++++++ .../details/show_ipv6_interface.json | 46 +++++++++++ .../show_running_config___section_ntp.text | 2 + .../normal/expected_result.json | 36 ++++++++- 6 files changed, 223 insertions(+), 12 deletions(-) create mode 100644 test/eos/mocked_data/test_get_ntp_servers/details/expected_result.json create mode 100644 test/eos/mocked_data/test_get_ntp_servers/details/show_ip_interface.json create mode 100644 test/eos/mocked_data/test_get_ntp_servers/details/show_ipv6_interface.json create mode 100644 test/eos/mocked_data/test_get_ntp_servers/details/show_running_config___section_ntp.text diff --git a/napalm/eos/eos.py b/napalm/eos/eos.py index 76f95f551..827bee3f1 100644 --- a/napalm/eos/eos.py +++ b/napalm/eos/eos.py @@ -1202,21 +1202,78 @@ def get_arp_table(self, vrf=""): return arp_table def get_ntp_servers(self): - commands = ["show running-config | section ntp"] + result = {} - raw_ntp_config = self._run_commands(commands, encoding="text")[0].get( - "output", "" - ) + commands = ["show running-config | section ntp"] - ntp_config = napalm.base.helpers.textfsm_extractor( - self, "ntp_peers", raw_ntp_config + raw_ntp_config = ( + self._run_commands(commands, encoding="text")[0] + .get("output", "") + .splitlines() ) - return { - str(ntp_peer.get("ntppeer")): {} - for ntp_peer in ntp_config - if ntp_peer.get("ntppeer", "") - } + for server in raw_ntp_config: + details = { + "port": 123, + "version": 4, + "association_type": "SERVER", + "iburst": False, + "prefer": False, + "network_instance": "default", + "source_address": "", + "key_id": -1, + } + tokens = server.split() + if tokens[2] == "vrf": + details["network_instance"] = tokens[3] + server_ip = details["address"] = tokens[4] + idx = 5 + else: + server_ip = details["address"] = tokens[2] + idx = 3 + try: + parsed_address = napalm.base.helpers.ipaddress.ip_address(server_ip) + family = parsed_address.version + except ValueError: + # Assume family of 4, unless local-interface has no IPv4 addresses + family = 4 + while idx < len(tokens): + if tokens[idx] == "iburst": + details["iburst"] = True + idx += 1 + + elif tokens[idx] == "key": + details["key_id"] = int(tokens[idx + 1]) + idx += 2 + + elif tokens[idx] == "local-interface": + interfaces = self.get_interfaces_ip() + intf = tokens[idx + 1] + if family == 6 and interfaces[intf]["ipv6"]: + details["source_address"] = list( + interfaces[intf]["ipv6"].keys() + )[0] + elif interfaces[intf]["ipv4"]: + details["source_address"] = list( + interfaces[intf]["ipv4"].keys() + )[0] + elif interfaces[intf]["ipv6"]: + details["source_address"] = list( + interfaces[intf]["ipv6"].keys() + )[0] + idx += 2 + + elif tokens[idx] == "version": + details["version"] = int(tokens[idx + 1]) + idx += 2 + + elif tokens[idx] == "prefer": + details["prefer"] = True + idx += 1 + + result[server_ip] = details + + return result def get_ntp_stats(self): ntp_stats = [] diff --git a/test/eos/mocked_data/test_get_ntp_servers/details/expected_result.json b/test/eos/mocked_data/test_get_ntp_servers/details/expected_result.json new file mode 100644 index 000000000..cbdf65d1b --- /dev/null +++ b/test/eos/mocked_data/test_get_ntp_servers/details/expected_result.json @@ -0,0 +1,24 @@ +{ + "1.2.3.4": { + "port": 123, + "version": 4, + "association_type": "SERVER", + "iburst": true, + "prefer": true, + "network_instance": "FOO", + "source_address": "", + "key_id": -1, + "address": "1.2.3.4" + }, + "4.3.2.1": { + "port": 123, + "version": 4, + "association_type": "SERVER", + "iburst": false, + "prefer": false, + "network_instance": "FOO", + "source_address": "172.20.20.2", + "key_id": -1, + "address": "4.3.2.1" + } +} diff --git a/test/eos/mocked_data/test_get_ntp_servers/details/show_ip_interface.json b/test/eos/mocked_data/test_get_ntp_servers/details/show_ip_interface.json new file mode 100644 index 000000000..955643613 --- /dev/null +++ b/test/eos/mocked_data/test_get_ntp_servers/details/show_ip_interface.json @@ -0,0 +1,48 @@ +{ + "interfaces": { + "Management0": { + "name": "Management0", + "lineProtocolStatus": "up", + "interfaceStatus": "connected", + "mtu": 1500, + "interfaceAddressBrief": { + "ipAddr": { + "address": "172.20.20.2", + "maskLen": 24 + } + }, + "ipv4Routable240": false, + "ipv4Routable0": false, + "enabled": true, + "description": "", + "interfaceAddress": { + "primaryIp": { + "address": "172.20.20.2", + "maskLen": 24 + }, + "secondaryIps": {}, + "secondaryIpsOrderedList": [], + "virtualIp": { + "address": "0.0.0.0", + "maskLen": 0 + }, + "virtualSecondaryIps": {}, + "virtualSecondaryIpsOrderedList": [], + "broadcastAddress": "255.255.255.255", + "dhcp": false + }, + "proxyArp": false, + "proxyArpAllowDefault": false, + "localProxyArp": false, + "gratuitousArp": false, + "routedAddr": "00:1c:73:7b:8c:1d", + "isVrrpBackup": false, + "vrf": "default", + "urpf": "disable", + "addresslessForwarding": "isInvalid", + "directedBroadcastEnabled": false, + "maxMssIngress": 0, + "maxMssEgress": 0 + } + } +} diff --git a/test/eos/mocked_data/test_get_ntp_servers/details/show_ipv6_interface.json b/test/eos/mocked_data/test_get_ntp_servers/details/show_ipv6_interface.json new file mode 100644 index 000000000..a4b8142b0 --- /dev/null +++ b/test/eos/mocked_data/test_get_ntp_servers/details/show_ipv6_interface.json @@ -0,0 +1,46 @@ +{ + "interfaces": { + "Management0": { + "name": "Management0", + "lineProtocolStatus": "up", + "interfaceStatus": "connected", + "mtu": 1500, + "linkLocal": { + "address": "fe80::21c:73ff:fe7b:8c1d", + "subnet": "fe80::/64", + "active": true, + "leastpref": false, + "dadfailed": false + }, + "state": "enabled", + "addresses": [ + { + "address": "2001:172:20:20::2", + "subnet": "2001:172:20:20::/64", + "active": true, + "leastpref": false, + "dadfailed": false + } + ], + "globalAddressesAreVirtual": false, + "multicastGroupAddresses": [ + "ff02::1", + "ff02::1:ff00:2", + "ff02::1:ff7b:8c1d" + ], + "dadStatus": "unavailable", + "dadAttempts": -1, + "ndReachableTime": 30000, + "ndRetransmitInterval": 1000, + "enhancedDad": false, + "autoConfigStatus": "stateless", + "urpf": "disable", + "urpfV4V6Mismatch": false, + "vrf": "default", + "addrSource": "manual", + "maxMssIngress": 0, + "maxMssEgress": 0, + "acceptUnsolicitedNa": false + } + } +} diff --git a/test/eos/mocked_data/test_get_ntp_servers/details/show_running_config___section_ntp.text b/test/eos/mocked_data/test_get_ntp_servers/details/show_running_config___section_ntp.text new file mode 100644 index 000000000..98a32b9ba --- /dev/null +++ b/test/eos/mocked_data/test_get_ntp_servers/details/show_running_config___section_ntp.text @@ -0,0 +1,2 @@ +ntp server vrf FOO 1.2.3.4 prefer iburst +ntp server vrf FOO 4.3.2.1 local-interface Management0 diff --git a/test/eos/mocked_data/test_get_ntp_servers/normal/expected_result.json b/test/eos/mocked_data/test_get_ntp_servers/normal/expected_result.json index b3a9d7d23..d59b3d99e 100644 --- a/test/eos/mocked_data/test_get_ntp_servers/normal/expected_result.json +++ b/test/eos/mocked_data/test_get_ntp_servers/normal/expected_result.json @@ -1 +1,35 @@ -{"1.2.3.4": {}, "2001:0db8:0a0b:12f0:0000:0000:0000:0001": {}, "5.6.7.8": {}} +{ + "1.2.3.4": { + "port": 123, + "version": 4, + "association_type": "SERVER", + "iburst": false, + "prefer": false, + "network_instance": "default", + "source_address": "", + "key_id": -1, + "address": "1.2.3.4" + }, + "5.6.7.8": { + "port": 123, + "version": 4, + "association_type": "SERVER", + "iburst": false, + "prefer": false, + "network_instance": "default", + "source_address": "", + "key_id": -1, + "address": "5.6.7.8" + }, + "2001:0db8:0a0b:12f0:0000:0000:0000:0001": { + "port": 123, + "version": 4, + "association_type": "SERVER", + "iburst": false, + "prefer": false, + "network_instance": "default", + "source_address": "", + "key_id": -1, + "address": "2001:0db8:0a0b:12f0:0000:0000:0000:0001" + } +} From 053e89989096832c03566c10030f5a0a4bef6282 Mon Sep 17 00:00:00 2001 From: Brandon Ewing Date: Thu, 23 Jan 2025 09:09:54 -0600 Subject: [PATCH 18/22] Add kwarg for model subset testing Since we only have a limited set of models that we are testing subsets of keys for, we should explicitly only allow subsets when testing those getters. --- napalm/base/test/getters.py | 8 ++++++-- napalm/base/test/helpers.py | 12 +++++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/napalm/base/test/getters.py b/napalm/base/test/getters.py index dadd7699b..0056aada6 100644 --- a/napalm/base/test/getters.py +++ b/napalm/base/test/getters.py @@ -311,7 +311,9 @@ def test_get_ntp_peers(self, test_case): for peer, peer_details in get_ntp_peers.items(): assert isinstance(peer, str) - assert helpers.test_model(models.NTPPeerDict, peer_details) + assert helpers.test_model( + models.NTPPeerDict, peer_details, allow_subset=True + ) return get_ntp_peers @@ -323,7 +325,9 @@ def test_get_ntp_servers(self, test_case): for server, server_details in get_ntp_servers.items(): assert isinstance(server, str) - assert helpers.test_model(models.NTPServerDict, server_details) + assert helpers.test_model( + models.NTPServerDict, server_details, allow_subset=True + ) return get_ntp_servers diff --git a/napalm/base/test/helpers.py b/napalm/base/test/helpers.py index 1b7cd57cd..0ce734c34 100644 --- a/napalm/base/test/helpers.py +++ b/napalm/base/test/helpers.py @@ -1,14 +1,16 @@ """Several methods to help with the tests.""" -def test_model(model, data): +def test_model(model, data, allow_subset=False): """Return if the dictionary `data` complies with the `model`.""" # Access the underlying schema for a TypedDict directly annotations = model.__annotations__ - if model.__total__: - same_keys = set(annotations.keys()) == set(data.keys()) - else: + if allow_subset: same_keys = set(data.keys()) <= set(annotations.keys()) + source = data + else: + same_keys = set(annotations.keys()) == set(data.keys()) + source = annotations if not same_keys: print( @@ -18,7 +20,7 @@ def test_model(model, data): ) correct_class = True - for key in data.keys(): + for key in source.keys(): correct_class = isinstance(data[key], annotations[key]) and correct_class if not correct_class: print( From 95b0abaa5637908aa49f430297fb5b62ca79c621 Mon Sep 17 00:00:00 2001 From: Brandon Ewing Date: Thu, 23 Jan 2025 12:38:30 -0600 Subject: [PATCH 19/22] Refactor nxos ntp for mypy typing Making NTPPeerDict and NTPServerDict non-identical caused issues with typing since we wre unable to assert the type of the return dictionary easily. This refactor allows us to explicitly state the return type for each function. --- napalm/base/models.py | 12 +----------- napalm/nxos/nxos.py | 27 ++++++++++++++++----------- 2 files changed, 17 insertions(+), 22 deletions(-) diff --git a/napalm/base/models.py b/napalm/base/models.py index ad104bc56..159c0ac75 100644 --- a/napalm/base/models.py +++ b/napalm/base/models.py @@ -223,17 +223,7 @@ NTPPeerDict = TypedDict( "NTPPeerDict", - { - "address": str, - "port": int, - "version": int, - "association_type": str, - "iburst": bool, - "prefer": bool, - "network_instance": str, - "source_address": str, - "key_id": int, - }, + {}, total=False, ) diff --git a/napalm/nxos/nxos.py b/napalm/nxos/nxos.py index 48a67f483..782cf7c1b 100644 --- a/napalm/nxos/nxos.py +++ b/napalm/nxos/nxos.py @@ -1204,27 +1204,32 @@ def get_arp_table(self, vrf: str = "") -> List[models.ARPTableDict]: ) return arp_table - def _get_ntp_entity( - self, peer_type: str - ) -> Dict[str, Union[models.NTPPeerDict, models.NTPServerDict]]: - ntp_entities: Dict[str, Union[models.NTPPeerDict, models.NTPServerDict]] = {} + def _filter_ntp_table(self, peer_type: str) -> List[str]: + ret = [] command = "show ntp peers" ntp_peers_table = self._get_command_table(command, "TABLE_peers", "ROW_peers") - for ntp_peer in ntp_peers_table: if ntp_peer.get("serv_peer", "").strip() != peer_type: continue peer_addr = napalm.base.helpers.ip(ntp_peer.get("PeerIPAddress").strip()) - # Ignore the type of the following line until NTP data is modelled - ntp_entities[peer_addr] = {} # type: ignore - - return ntp_entities + ret.append(peer_addr) + return ret def get_ntp_peers(self) -> Dict[str, models.NTPPeerDict]: - return self._get_ntp_entity("Peer") + ntp_entities: Dict[str, models.NTPPeerDict] = {} + peers = self._filter_ntp_table("Peer") + for peer_addr in peers: + ntp_entities[peer_addr] = {} + + return ntp_entities def get_ntp_servers(self) -> Dict[str, models.NTPServerDict]: - return self._get_ntp_entity("Server") + ntp_entities: Dict[str, models.NTPServerDict] = {} + peers = self._filter_ntp_table("Server") + for peer_addr in peers: + ntp_entities[peer_addr] = {} + + return ntp_entities def get_ntp_stats(self) -> List[models.NTPStats]: ntp_stats: List[models.NTPStats] = [] From 8e9f538299bd62293db33cf8bc636a6278e2fd60 Mon Sep 17 00:00:00 2001 From: Brandon Ewing Date: Thu, 23 Jan 2025 15:06:12 -0600 Subject: [PATCH 20/22] remove unused EOS NTP peer textfsm --- napalm/eos/utils/textfsm_templates/ntp_peers.tpl | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 napalm/eos/utils/textfsm_templates/ntp_peers.tpl diff --git a/napalm/eos/utils/textfsm_templates/ntp_peers.tpl b/napalm/eos/utils/textfsm_templates/ntp_peers.tpl deleted file mode 100644 index 58042e0ba..000000000 --- a/napalm/eos/utils/textfsm_templates/ntp_peers.tpl +++ /dev/null @@ -1,6 +0,0 @@ -Value NTPPeer (\w+.*) - -Start - ^ntp\s+server\s+${NTPPeer} -> Record - -EOF From eef08bcc6be11e8c9310de99af0b90b2115e91f3 Mon Sep 17 00:00:00 2001 From: manu Date: Sun, 9 Feb 2025 20:38:41 +0100 Subject: [PATCH 21/22] use plain dict in IOSDriver.get_bgp_neighbors_detail() (#2163) --- napalm/ios/ios.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/napalm/ios/ios.py b/napalm/ios/ios.py index 92e40d6c7..c42837609 100644 --- a/napalm/ios/ios.py +++ b/napalm/ios/ios.py @@ -22,7 +22,6 @@ import telnetlib import tempfile import uuid -from collections import defaultdict from netmiko import FileTransfer, InLineTransfer @@ -2076,7 +2075,7 @@ def get_bgp_neighbors(self): return bgp_neighbor_data def get_bgp_neighbors_detail(self, neighbor_address=""): - bgp_detail = defaultdict(lambda: defaultdict(lambda: [])) + bgp_detail = {} raw_bgp_sum = self._send_command("show ip bgp all sum").strip() @@ -2227,6 +2226,14 @@ def get_bgp_neighbors_detail(self, neighbor_address=""): "export_policy": bgp_neigh_afi["policy_out"], } ) + + vrf_name = details["routing_table"] + if vrf_name not in bgp_detail.keys(): + bgp_detail[vrf_name] = {} + remote_as = details["remote_as"] + if remote_as not in bgp_detail[vrf_name].keys(): + bgp_detail[vrf_name][remote_as] = [] + bgp_detail[details["routing_table"]][details["remote_as"]].append(details) return bgp_detail From d21c466ee8516b0bbdf51b48b43c7b421803c740 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2025 09:44:38 -0800 Subject: [PATCH 22/22] Bump urllib3 from 2.2.1 to 2.2.2 (#2102) --- docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 1b2e19981..7f5378762 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,4 +1,4 @@ -urllib3==2.2.1 # https://github.com/readthedocs/readthedocs.org/issues/10290 +urllib3==2.2.2 # https://github.com/readthedocs/readthedocs.org/issues/10290 sphinx==7.3.7 sphinx-rtd-theme==2.0.0 invoke==2.2.0