From 4db753c49ac9c11f67eded4fdee4617fc3d66e96 Mon Sep 17 00:00:00 2001 From: stormliang Date: Tue, 28 Mar 2023 13:03:12 +0000 Subject: [PATCH] Revert "[route_check] fix IPv6 address handling (#2722)" This reverts commit ff6883233a3c86e993add50453c3152745eaff0d. --- scripts/route_check.py | 5 ++--- tests/route_check_test_data.py | 18 ------------------ 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/scripts/route_check.py b/scripts/route_check.py index c832b2c6ea..4db3f399a2 100755 --- a/scripts/route_check.py +++ b/scripts/route_check.py @@ -47,7 +47,6 @@ import traceback import subprocess -from ipaddress import ip_network from swsscommon import swsscommon from utilities_common import chassis @@ -146,7 +145,7 @@ def add_prefix(ip): ip = ip + PREFIX_SEPARATOR + "32" else: ip = ip + PREFIX_SEPARATOR + "128" - return str(ip_network(ip)) + return ip def add_prefix_ifnot(ip): @@ -155,7 +154,7 @@ def add_prefix_ifnot(ip): :param ip: IP to add prefix as string. :return ip with prefix """ - return str(ip_network(ip)) if ip.find(PREFIX_SEPARATOR) != -1 else add_prefix(ip) + return ip if ip.find(PREFIX_SEPARATOR) != -1 else add_prefix(ip) def is_local(ip): diff --git a/tests/route_check_test_data.py b/tests/route_check_test_data.py index 7ed1eee41f..b8ba9c521a 100644 --- a/tests/route_check_test_data.py +++ b/tests/route_check_test_data.py @@ -462,22 +462,4 @@ }, RET: -1, }, - "10": { - DESCR: "basic good one with IPv6 address", - ARGS: "route_check -m INFO -i 1000", - PRE: { - APPL_DB: { - ROUTE_TABLE: { - }, - INTF_TABLE: { - "PortChannel1013:2000:31:0:0::1/64": {}, - } - }, - ASIC_DB: { - RT_ENTRY_TABLE: { - RT_ENTRY_KEY_PREFIX + "2000:31::1/128" + RT_ENTRY_KEY_SUFFIX: {}, - } - } - } - }, }