From 4953ca977f3a5de8109ee6353ad07f816ca1774c Mon Sep 17 00:00:00 2001 From: Christian Hopps Date: Fri, 3 Sep 2021 08:43:32 -0400 Subject: [PATCH] tests: cleanup - remove unused imports Signed-off-by: Christian Hopps --- .../test_all_protocol_startup.py | 1 - tests/topotests/analyze.py | 2 -- .../test_bfd_bgp_cbit_topo3.py | 1 - .../bfd_isis_topo1/test_bfd_isis_topo1.py | 2 -- .../bfd_ospf_topo1/test_bfd_ospf_topo1.py | 3 --- tests/topotests/bfd_topo3/test_bfd_topo3.py | 1 - .../bfd_vrf_topo1/test_bfd_vrf_topo1.py | 1 - .../test_bgp_aggregate-address_origin.py | 3 --- .../test_bgp_aggregate-address_route-map.py | 3 --- .../test_bgp_aggregate_address_topo1.py | 3 --- .../test_bgp_aggregator_zero.py | 3 --- .../bgp_as_allow_in/test_bgp_as_allow_in.py | 2 -- .../test_bgp_as_wide_bgp_identifier.py | 3 --- .../bgp_aspath_zero/test_bgp_aspath_zero.py | 3 --- tests/topotests/bgp_auth/test_bgp_auth.py | 5 ----- .../test_bgp_basic_functionality.py | 4 +--- .../test_bgp_blackhole_community.py | 2 -- .../test_bgp_comm-list_delete.py | 4 ---- .../test_bgp_communities.py | 5 +---- .../test_bgp_communities_topo2.py | 7 +------ .../test_bgp-community-alias.py | 3 --- .../test_bgp_community_change_update.py | 2 -- .../test_bgp_conditional_advertisement.py | 1 - .../test_bgp-default-afi-safi.py | 4 ---- .../test_bgp_default-originate.py | 3 --- ...st_bgp_default-originate_route-map_match.py | 3 --- ...t_bgp_default-originate_route-map_match2.py | 3 --- ...gp_default-originate_route-map_match_set.py | 3 --- ...test_bgp_default-originate_route-map_set.py | 3 --- .../test_bgp_distance_change.py | 3 --- .../test_bgp_dont_capability_negotiate.py | 2 -- ...bgp-ebgp-common-subnet-nexthop-unchanged.py | 3 --- .../test_bgp_ebgp_requires_policy.py | 2 -- .../bgp_ecmp_topo1/test_bgp_ecmp_topo1.py | 1 - .../bgp_ecmp_topo2/test_ebgp_ecmp_topo2.py | 4 +--- .../bgp_ecmp_topo2/test_ibgp_ecmp_topo2.py | 4 +--- .../bgp_ecmp_topo3/test_ibgp_ecmp_topo3.py | 9 ++------- tests/topotests/bgp_evpn_mh/test_evpn_mh.py | 3 --- .../test_bgp_evpn_overlay_index_gateway.py | 1 - tests/topotests/bgp_evpn_rt5/test_bgp_evpn.py | 3 --- .../test_bgp_evpn_vxlan.py | 2 -- .../bgp_features/test_bgp_features.py | 1 - .../bgp_flowspec/test_bgp_flowspec_topo.py | 4 ---- .../test_bgp_gr_functionality_topo1.py | 10 ++-------- .../test_bgp_gr_functionality_topo2.py | 10 ++-------- tests/topotests/bgp_gshut/test_bgp_gshut.py | 3 --- .../bgp_gshut_topo1/test_ebgp_gshut_topo1.py | 9 +-------- .../bgp_gshut_topo1/test_ibgp_gshut_topo1.py | 13 +------------ .../test_rfc5549_ebgp_ibgp_nbr.py | 9 +-------- .../test_rfc5549_ebgp_nbr.py | 15 +-------------- .../test_rfc5549_ebgp_unnumbered_nbr.py | 11 ++--------- .../test_rfc5549_ibgp_nbr.py | 8 +------- .../test_rfc5549_ibgp_unnumbered_nbr.py | 8 ++------ .../bgp_ipv6_rtadv/test_bgp_ipv6_rtadv.py | 1 - .../bgp_l3vpn_to_bgp_direct/customize.py | 7 +------ .../bgp_l3vpn_to_bgp_vrf/customize.py | 6 +----- .../test_bgp_large_community_topo_1.py | 4 +--- .../test_bgp_large_community_topo_2.py | 5 +---- .../bgp_link_bw_ip/test_bgp_linkbw_ip.py | 2 -- .../test_bgp_listen_on_multiple_addresses.py | 4 +--- .../test_bgp_local_as_private_remove.py | 3 --- tests/topotests/bgp_lu_topo1/test_bgp_lu.py | 3 --- .../test_bgp_maximum_prefix_invalid_update.py | 4 ---- .../test_bgp_maximum_prefix_out.py | 3 --- .../test_bgp_minimum_holdtime.py | 3 --- .../test_bgp_multi_vrf_topo1.py | 6 +----- .../test_bgp_multi_vrf_topo2.py | 4 +--- .../test_bgp_multiview_topo1.py | 2 -- .../test_bgp_path_attributes.py | 14 ++------------ .../bgp_peer_group/test_bgp_peer-group.py | 2 -- .../test_bgp_peer-type_multipath-relax.py | 1 - .../bgp_prefix_list_topo1/test_prefix_lists.py | 4 +--- .../bgp_prefix_sid/test_bgp_prefix_sid.py | 1 - .../bgp_prefix_sid2/test_bgp_prefix_sid2.py | 1 - .../test_bgp_recursive_route_ebgp_multi_hop.py | 9 +-------- .../test_bgp_reject_as_sets.py | 3 --- .../bgp_rfapi_basic_sanity/customize.py | 7 +------ .../test_bgp_rmap_extcommunity_none.py | 2 -- .../test_bgp_aggregation.py | 9 +-------- .../bgp_route_map/test_route_map_topo1.py | 16 +--------------- .../bgp_route_map/test_route_map_topo2.py | 6 +----- .../bgp_rr_ibgp/test_bgp_rr_ibgp_topo1.py | 2 -- .../test_bgp_sender-as-path-loop-detection.py | 3 --- ...st_bgp_set_local-preference_add_subtract.py | 3 --- .../test_bgp_snmp_mplsvpn.py | 6 ------ .../test_bgp_srv6l3vpn_to_bgp_vrf.py | 2 -- .../bgp_suppress_fib/test_bgp_suppress_fib.py | 3 --- .../topotests/bgp_tcp_mss/test_bgp_tcp_mss.py | 2 -- .../bgp_update_delay/test_bgp_update_delay.py | 3 --- .../test_bgp_vrf_dynamic_route_leak_topo1.py | 9 +-------- .../test_bgp_vrf_dynamic_route_leak_topo2.py | 5 ----- .../test_bgp_vrf_lite_ipv6_rtadv.py | 2 -- .../bgp_vrf_netns/test_bgp_vrf_netns_topo.py | 1 - .../test_bgp-vrf-route-leak-basic.py | 2 -- .../config_timing/test_config_timing.py | 1 - .../topotests/eigrp_topo1/test_eigrp_topo1.py | 1 - .../evpn_pim_1/test_evpn_pim_topo1.py | 2 -- .../test_evpn_type5_chaos_topo1.py | 13 +------------ .../test_evpn_type5_topo1.py | 9 --------- tests/topotests/example_test/test_template.py | 2 -- .../test_example_topojson_multiple_links.py | 2 -- .../test_example_topojson.py | 1 - .../test_example_topojson.py | 2 -- .../isis_lfa_topo1/test_isis_lfa_topo1.py | 3 --- .../test_isis_lsp_bits_topo1.py | 4 ---- .../isis_rlfa_topo1/test_isis_rlfa_topo1.py | 3 --- tests/topotests/isis_snmp/test_isis_snmp.py | 3 --- .../isis_sr_te_topo1/test_isis_sr_te_topo1.py | 3 --- .../isis_sr_topo1/test_isis_sr_topo1.py | 2 -- .../isis_tilfa_topo1/test_isis_tilfa_topo1.py | 3 --- tests/topotests/isis_topo1/test_isis_topo1.py | 2 -- .../isis_topo1_vrf/test_isis_topo1_vrf.py | 2 -- .../ldp_oc_acl_topo1/test_ldp_oc_acl_topo1.py | 1 - .../ldp_oc_topo1/test_ldp_oc_topo1.py | 2 -- .../topotests/ldp_snmp/test_ldp_snmp_topo1.py | 3 --- .../test_ldp_sync_isis_topo1.py | 2 -- .../test_ldp_sync_ospf_topo1.py | 2 -- tests/topotests/ldp_topo1/test_ldp_topo1.py | 1 - .../ldp_vpls_topo1/test_ldp_vpls_topo1.py | 2 -- tests/topotests/lib/bgp.py | 6 +----- tests/topotests/lib/common_config.py | 5 ----- tests/topotests/lib/ltemplate.py | 1 - tests/topotests/lib/lutil.py | 1 - tests/topotests/lib/micronet.py | 2 -- tests/topotests/lib/micronet_cli.py | 5 ----- tests/topotests/lib/micronet_compat.py | 4 ---- tests/topotests/lib/ospf.py | 5 ----- tests/topotests/lib/pim.py | 5 +---- tests/topotests/lib/topolog.py | 4 ++-- .../msdp_mesh_topo1/test_msdp_mesh_topo1.py | 3 --- tests/topotests/msdp_topo1/test_msdp_topo1.py | 3 --- .../test_mcast_pim_bsmp_01.py | 4 +--- .../test_mcast_pim_bsmp_02.py | 15 +-------------- .../test_multicast_pim_sm_topo1.py | 12 +----------- .../test_multicast_pim_sm_topo2.py | 9 +-------- .../test_multicast_pim_sm_topo3.py | 14 +------------- .../test_multicast_pim_sm_topo4.py | 17 +---------------- .../test_multicast_pim_static_rp.py | 3 --- tests/topotests/nhrp_topo/test_nhrp_topo.py | 1 - .../topotests/ospf6_topo1/test_ospf6_topo1.py | 3 --- .../ospf6_topo1_vrf/test_ospf6_topo1_vrf.py | 3 --- .../topotests/ospf6_topo2/test_ospf6_topo2.py | 1 - .../test_ospf_asbr_summary_topo1.py | 4 +--- .../test_ospf_asbr_summary_type7_lsa.py | 15 +-------------- .../test_ospf_authentication.py | 4 +--- .../test_ospf_chaos.py | 7 +------ .../ospf_basic_functionality/test_ospf_ecmp.py | 11 +---------- .../test_ospf_ecmp_lan.py | 15 +-------------- .../ospf_basic_functionality/test_ospf_lan.py | 12 +----------- .../ospf_basic_functionality/test_ospf_nssa.py | 11 +---------- .../ospf_basic_functionality/test_ospf_p2mp.py | 15 +-------------- .../test_ospf_routemaps.py | 11 ++--------- .../test_ospf_rte_calc.py | 5 +---- .../test_ospf_single_area.py | 10 +--------- .../ospf_dual_stack/test_ospf_dual_stack.py | 18 +----------------- .../ospf_gr_helper/test_ospf_gr_helper.py | 12 +----------- .../ospf_gr_topo1/test_ospf_gr_topo1.py | 3 --- .../ospf_sr_te_topo1/test_ospf_sr_te_topo1.py | 2 -- .../ospf_sr_topo1/test_ospf_sr_topo1.py | 3 --- .../ospf_suppress_fa/test_ospf_suppress_fa.py | 1 - .../ospf_te_topo1/test_ospf_te_topo1.py | 1 - .../ospf_tilfa_topo1/test_ospf_tilfa_topo1.py | 3 --- tests/topotests/ospf_topo1/test_ospf_topo1.py | 1 - .../ospf_topo1_vrf/test_ospf_topo1_vrf.py | 2 -- tests/topotests/ospf_topo2/test_ospf_topo2.py | 2 -- .../test_ospfv3_asbr_summary_topo1.py | 7 +------ .../test_ospfv3_ecmp.py | 14 +------------- .../test_ospfv3_routemaps.py | 14 +------------- .../test_ospfv3_rte_calc.py | 14 +------------- .../test_ospfv3_single_area.py | 15 +-------------- tests/topotests/pbr_topo1/test_pbr_topo1.py | 2 -- tests/topotests/pim_acl/test_pim_acl.py | 4 ---- tests/topotests/pim_basic/test_pim.py | 1 - .../pim_basic_topo2/test_pim_basic_topo2.py | 2 -- tests/topotests/pim_igmp_vrf/test_pim_vrf.py | 4 ---- tests/topotests/rip_topo1/test_rip_topo1.py | 1 - .../topotests/ripng_topo1/test_ripng_topo1.py | 2 -- .../topotests/route_scale/test_route_scale.py | 1 - .../simple_snmp_test/test_simple_snmp.py | 5 ----- .../srv6_locator/test_srv6_locator.py | 1 - .../test_static_routes_topo1_ebgp.py | 5 +---- .../test_static_routes_topo2_ebgp.py | 4 +--- .../test_static_routes_topo3_ebgp.py | 5 +---- .../test_static_routes_topo4_ebgp.py | 5 +---- .../test_static_routes_topo1_ibgp.py | 6 +----- .../test_static_routes_topo2_ibgp.py | 6 +----- .../test_static_routes_topo3_ibgp.py | 7 +------ .../test_static_routes_topo4_ibgp.py | 5 +---- .../zebra_netlink/test_zebra_netlink.py | 3 --- .../zebra_opaque/test_zebra_opaque.py | 2 -- .../zebra_seg6_route/test_zebra_seg6_route.py | 3 --- .../test_zebra_seg6local_route.py | 3 --- tools/frr-reload.py | 1 - 193 files changed, 75 insertions(+), 828 deletions(-) diff --git a/tests/topotests/all_protocol_startup/test_all_protocol_startup.py b/tests/topotests/all_protocol_startup/test_all_protocol_startup.py index 52526e0c73..d272aab78c 100644 --- a/tests/topotests/all_protocol_startup/test_all_protocol_startup.py +++ b/tests/topotests/all_protocol_startup/test_all_protocol_startup.py @@ -34,7 +34,6 @@ import pytest import glob from time import sleep -from functools import partial pytestmark = [ pytest.mark.babeld, diff --git a/tests/topotests/analyze.py b/tests/topotests/analyze.py index aea5fae00e..09aa22f03c 100755 --- a/tests/topotests/analyze.py +++ b/tests/topotests/analyze.py @@ -21,10 +21,8 @@ # import argparse import glob -import json import logging import os -import pdb import re import subprocess import sys diff --git a/tests/topotests/bfd_bgp_cbit_topo3/test_bfd_bgp_cbit_topo3.py b/tests/topotests/bfd_bgp_cbit_topo3/test_bfd_bgp_cbit_topo3.py index 29c25bba29..92432669c8 100644 --- a/tests/topotests/bfd_bgp_cbit_topo3/test_bfd_bgp_cbit_topo3.py +++ b/tests/topotests/bfd_bgp_cbit_topo3/test_bfd_bgp_cbit_topo3.py @@ -46,7 +46,6 @@ pytestmark = [pytest.mark.bgpd, pytest.mark.bfdd] def setup_module(mod): "Sets up the pytest environment" - from collections import OrderedDict topodef = { "s1": ("r1", "r2"), "s2": ("r2", "r3"), diff --git a/tests/topotests/bfd_isis_topo1/test_bfd_isis_topo1.py b/tests/topotests/bfd_isis_topo1/test_bfd_isis_topo1.py index 6a19b1ea46..4c44ca4400 100644 --- a/tests/topotests/bfd_isis_topo1/test_bfd_isis_topo1.py +++ b/tests/topotests/bfd_isis_topo1/test_bfd_isis_topo1.py @@ -72,9 +72,7 @@ import os import sys import pytest import json -import re from time import sleep -from time import time from functools import partial # Save the Current Working Directory to find configuration files. diff --git a/tests/topotests/bfd_ospf_topo1/test_bfd_ospf_topo1.py b/tests/topotests/bfd_ospf_topo1/test_bfd_ospf_topo1.py index c82b4b590a..09b8631740 100755 --- a/tests/topotests/bfd_ospf_topo1/test_bfd_ospf_topo1.py +++ b/tests/topotests/bfd_ospf_topo1/test_bfd_ospf_topo1.py @@ -72,9 +72,7 @@ import os import sys import pytest import json -import re from time import sleep -from time import time from functools import partial # Save the Current Working Directory to find configuration files. @@ -84,7 +82,6 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 # Import topogen and topotest helpers from lib import topotest -from lib.micronet_compat import Topo from lib.topogen import Topogen, TopoRouter, get_topogen from lib.topolog import logger diff --git a/tests/topotests/bfd_topo3/test_bfd_topo3.py b/tests/topotests/bfd_topo3/test_bfd_topo3.py index 9ed8f5fcbf..978593e41a 100644 --- a/tests/topotests/bfd_topo3/test_bfd_topo3.py +++ b/tests/topotests/bfd_topo3/test_bfd_topo3.py @@ -39,7 +39,6 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 # Import topogen and topotest helpers from lib import topotest -from lib.micronet_compat import Topo from lib.topogen import Topogen, TopoRouter, get_topogen from lib.topolog import logger diff --git a/tests/topotests/bfd_vrf_topo1/test_bfd_vrf_topo1.py b/tests/topotests/bfd_vrf_topo1/test_bfd_vrf_topo1.py index 06b20c4430..acb86ea7f2 100644 --- a/tests/topotests/bfd_vrf_topo1/test_bfd_vrf_topo1.py +++ b/tests/topotests/bfd_vrf_topo1/test_bfd_vrf_topo1.py @@ -44,7 +44,6 @@ from lib.topogen import Topogen, TopoRouter, get_topogen from lib.topolog import logger # Required to instantiate the topology builder class. -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bfdd, pytest.mark.bgpd] diff --git a/tests/topotests/bgp_aggregate_address_origin/test_bgp_aggregate-address_origin.py b/tests/topotests/bgp_aggregate_address_origin/test_bgp_aggregate-address_origin.py index 517154987e..0d01fa2ade 100644 --- a/tests/topotests/bgp_aggregate_address_origin/test_bgp_aggregate-address_origin.py +++ b/tests/topotests/bgp_aggregate_address_origin/test_bgp_aggregate-address_origin.py @@ -34,7 +34,6 @@ router bgp 65031 import os import sys import json -import time import pytest import functools @@ -44,8 +43,6 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen -from lib.topolog import logger -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_aggregate_address_route_map/test_bgp_aggregate-address_route-map.py b/tests/topotests/bgp_aggregate_address_route_map/test_bgp_aggregate-address_route-map.py index 74c9e83ce0..df20594566 100644 --- a/tests/topotests/bgp_aggregate_address_route_map/test_bgp_aggregate-address_route-map.py +++ b/tests/topotests/bgp_aggregate_address_route_map/test_bgp_aggregate-address_route-map.py @@ -37,7 +37,6 @@ route-map aggr-rmap permit 10 import os import sys import json -import time import pytest import functools @@ -47,8 +46,6 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen -from lib.topolog import logger -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_aggregate_address_topo1/test_bgp_aggregate_address_topo1.py b/tests/topotests/bgp_aggregate_address_topo1/test_bgp_aggregate_address_topo1.py index 4e82a61e11..d724b586d9 100644 --- a/tests/topotests/bgp_aggregate_address_topo1/test_bgp_aggregate_address_topo1.py +++ b/tests/topotests/bgp_aggregate_address_topo1/test_bgp_aggregate_address_topo1.py @@ -28,8 +28,6 @@ Test BGP aggregate address features. import os import sys -import json -import time import pytest import functools @@ -40,7 +38,6 @@ sys.path.append(os.path.join(CWD, "../")) from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen from lib.topolog import logger -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_aggregator_zero/test_bgp_aggregator_zero.py b/tests/topotests/bgp_aggregator_zero/test_bgp_aggregator_zero.py index 76eafbce4e..6836dc11ac 100644 --- a/tests/topotests/bgp_aggregator_zero/test_bgp_aggregator_zero.py +++ b/tests/topotests/bgp_aggregator_zero/test_bgp_aggregator_zero.py @@ -27,7 +27,6 @@ is continued to be processed, but AGGREGATOR attribute is discarded. import os import sys import json -import time import pytest import functools @@ -37,8 +36,6 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen -from lib.topolog import logger -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_as_allow_in/test_bgp_as_allow_in.py b/tests/topotests/bgp_as_allow_in/test_bgp_as_allow_in.py index 5613b75d7a..9b789f4eac 100644 --- a/tests/topotests/bgp_as_allow_in/test_bgp_as_allow_in.py +++ b/tests/topotests/bgp_as_allow_in/test_bgp_as_allow_in.py @@ -51,7 +51,6 @@ sys.path.append(os.path.join(CWD, "../lib/")) # pylint: disable=C0413 # Import topogen and topotest helpers -from lib.micronet_compat import Topo from lib.topogen import Topogen, get_topogen # Import topoJson from lib, to create topology and initial configuration @@ -71,7 +70,6 @@ from lib.topolog import logger from lib.bgp import ( verify_bgp_convergence, create_router_bgp, - clear_bgp_and_verify, verify_bgp_rib, ) from lib.topojson import build_topo_from_json, build_config_from_json diff --git a/tests/topotests/bgp_as_wide_bgp_identifier/test_bgp_as_wide_bgp_identifier.py b/tests/topotests/bgp_as_wide_bgp_identifier/test_bgp_as_wide_bgp_identifier.py index 2f7a9cc587..571e28cf7b 100644 --- a/tests/topotests/bgp_as_wide_bgp_identifier/test_bgp_as_wide_bgp_identifier.py +++ b/tests/topotests/bgp_as_wide_bgp_identifier/test_bgp_as_wide_bgp_identifier.py @@ -32,7 +32,6 @@ affected and should work. import os import sys import json -import time import pytest import functools @@ -42,8 +41,6 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen -from lib.topolog import logger -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_aspath_zero/test_bgp_aspath_zero.py b/tests/topotests/bgp_aspath_zero/test_bgp_aspath_zero.py index 875ff38d83..63c890f138 100644 --- a/tests/topotests/bgp_aspath_zero/test_bgp_aspath_zero.py +++ b/tests/topotests/bgp_aspath_zero/test_bgp_aspath_zero.py @@ -27,7 +27,6 @@ is threated as withdrawal. import os import sys import json -import time import pytest import functools @@ -37,8 +36,6 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen -from lib.topolog import logger -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_auth/test_bgp_auth.py b/tests/topotests/bgp_auth/test_bgp_auth.py index 48ba0cca58..3e5b80f83f 100644 --- a/tests/topotests/bgp_auth/test_bgp_auth.py +++ b/tests/topotests/bgp_auth/test_bgp_auth.py @@ -48,7 +48,6 @@ import os import sys import json import platform -from functools import partial import pytest from time import sleep @@ -60,12 +59,9 @@ sys.path.append(os.path.join(CWD, "../")) # Import topogen and topotest helpers from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen -from lib.topolog import logger # Required to instantiate the topology builder class. -from lib.micronet_compat import Topo -from lib.common_config import apply_raw_config ERROR_LIST = ["Malformed", "Failure", "Unknown", "Incomplete"] @@ -74,7 +70,6 @@ pytestmark = [pytest.mark.bgpd, pytest.mark.ospfd] class InvalidCLIError(Exception): """Raise when the CLI command is wrong""" - pass def build_topo(tgen): # Create routers diff --git a/tests/topotests/bgp_basic_functionality_topo1/test_bgp_basic_functionality.py b/tests/topotests/bgp_basic_functionality_topo1/test_bgp_basic_functionality.py index ee241b653a..3de3bcd4db 100644 --- a/tests/topotests/bgp_basic_functionality_topo1/test_bgp_basic_functionality.py +++ b/tests/topotests/bgp_basic_functionality_topo1/test_bgp_basic_functionality.py @@ -45,7 +45,6 @@ Test steps import os import sys -import json import time import pytest from copy import deepcopy @@ -69,11 +68,10 @@ from lib.common_config import (addKernelRoute, apply_raw_config, verify_bgp_community, verify_fib_routes, verify_rib, write_test_footer, write_test_header) -from lib.micronet_compat import Topo # pylint: disable=C0413 # Import topogen and topotest helpers from lib.topogen import Topogen, get_topogen -from lib.topojson import build_config_from_json, build_topo_from_json +from lib.topojson import build_config_from_json from lib.topolog import logger pytestmark = [pytest.mark.bgpd, pytest.mark.staticd] diff --git a/tests/topotests/bgp_blackhole_community/test_bgp_blackhole_community.py b/tests/topotests/bgp_blackhole_community/test_bgp_blackhole_community.py index aaa65004f1..4f8fc0d67a 100644 --- a/tests/topotests/bgp_blackhole_community/test_bgp_blackhole_community.py +++ b/tests/topotests/bgp_blackhole_community/test_bgp_blackhole_community.py @@ -36,8 +36,6 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen -from lib.topolog import logger -from lib.micronet_compat import Topo from lib.common_config import step pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_comm_list_delete/test_bgp_comm-list_delete.py b/tests/topotests/bgp_comm_list_delete/test_bgp_comm-list_delete.py index 2524756168..4db4e37f7f 100644 --- a/tests/topotests/bgp_comm_list_delete/test_bgp_comm-list_delete.py +++ b/tests/topotests/bgp_comm_list_delete/test_bgp_comm-list_delete.py @@ -33,17 +33,13 @@ route-map test permit 10 import os import sys import json -import time import pytest CWD = os.path.dirname(os.path.realpath(__file__)) sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 -from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen -from lib.topolog import logger -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_communities_topo1/test_bgp_communities.py b/tests/topotests/bgp_communities_topo1/test_bgp_communities.py index be0d87d22e..123461caa9 100644 --- a/tests/topotests/bgp_communities_topo1/test_bgp_communities.py +++ b/tests/topotests/bgp_communities_topo1/test_bgp_communities.py @@ -29,7 +29,6 @@ Following tests are covered to test bgp community functionality: import os import sys import time -import json import pytest # Save the Current Working Directory to find configuration files. @@ -38,7 +37,6 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 # Import topogen and topotest helpers -from lib.micronet_compat import Topo from lib.topogen import Topogen, get_topogen # Import topoJson from lib, to create topology and initial configuration @@ -60,10 +58,9 @@ from lib.topolog import logger from lib.bgp import ( verify_bgp_convergence, create_router_bgp, - clear_bgp_and_verify, verify_bgp_rib, ) -from lib.topojson import build_topo_from_json, build_config_from_json +from lib.topojson import build_config_from_json from copy import deepcopy pytestmark = [pytest.mark.bgpd, pytest.mark.staticd] diff --git a/tests/topotests/bgp_communities_topo1/test_bgp_communities_topo2.py b/tests/topotests/bgp_communities_topo1/test_bgp_communities_topo2.py index 80bcae6312..947efa8f8a 100644 --- a/tests/topotests/bgp_communities_topo1/test_bgp_communities_topo2.py +++ b/tests/topotests/bgp_communities_topo1/test_bgp_communities_topo2.py @@ -31,7 +31,6 @@ Following tests are covered to test bgp community functionality: import os import sys import time -import json import pytest # Save the Current Working Directory to find configuration files. @@ -40,7 +39,6 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 # Import topogen and topotest helpers -from lib.micronet_compat import Topo from lib.topogen import Topogen, get_topogen # Import topoJson from lib, to create topology and initial configuration @@ -54,7 +52,6 @@ from lib.common_config import ( check_address_types, step, create_route_maps, - create_prefix_lists, create_route_maps, required_linux_kernel_version, ) @@ -63,12 +60,10 @@ from lib.topolog import logger from lib.bgp import ( verify_bgp_convergence, create_router_bgp, - clear_bgp_and_verify, verify_bgp_rib, verify_bgp_community, ) -from lib.topojson import build_topo_from_json, build_config_from_json -from copy import deepcopy +from lib.topojson import build_config_from_json pytestmark = [pytest.mark.bgpd, pytest.mark.staticd] diff --git a/tests/topotests/bgp_community_alias/test_bgp-community-alias.py b/tests/topotests/bgp_community_alias/test_bgp-community-alias.py index cc81660298..b95bf74876 100644 --- a/tests/topotests/bgp_community_alias/test_bgp-community-alias.py +++ b/tests/topotests/bgp_community_alias/test_bgp-community-alias.py @@ -25,7 +25,6 @@ Test if BGP community alias is visible in CLI outputs import os import sys import json -import time import pytest import functools @@ -37,8 +36,6 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen -from lib.topolog import logger -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_community_change_update/test_bgp_community_change_update.py b/tests/topotests/bgp_community_change_update/test_bgp_community_change_update.py index 472a0b9557..138512bc62 100644 --- a/tests/topotests/bgp_community_change_update/test_bgp_community_change_update.py +++ b/tests/topotests/bgp_community_change_update/test_bgp_community_change_update.py @@ -53,8 +53,6 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen -from lib.topolog import logger -from lib.micronet_compat import Topo from lib.common_config import step from time import sleep diff --git a/tests/topotests/bgp_conditional_advertisement/test_bgp_conditional_advertisement.py b/tests/topotests/bgp_conditional_advertisement/test_bgp_conditional_advertisement.py index 02fcd5445a..e9b393ba7f 100644 --- a/tests/topotests/bgp_conditional_advertisement/test_bgp_conditional_advertisement.py +++ b/tests/topotests/bgp_conditional_advertisement/test_bgp_conditional_advertisement.py @@ -137,7 +137,6 @@ sys.path.append(os.path.join(CWD, "../")) from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen from lib.topolog import logger -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_default_afi_safi/test_bgp-default-afi-safi.py b/tests/topotests/bgp_default_afi_safi/test_bgp-default-afi-safi.py index 4bcf2ebb46..3f4be3da4e 100644 --- a/tests/topotests/bgp_default_afi_safi/test_bgp-default-afi-safi.py +++ b/tests/topotests/bgp_default_afi_safi/test_bgp-default-afi-safi.py @@ -33,7 +33,6 @@ import os import sys import json import pytest -import functools pytestmark = [pytest.mark.bgpd] @@ -41,10 +40,7 @@ CWD = os.path.dirname(os.path.realpath(__file__)) sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 -from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen -from lib.topolog import logger -from lib.micronet_compat import Topo from lib.common_config import step pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_default_route/test_bgp_default-originate.py b/tests/topotests/bgp_default_route/test_bgp_default-originate.py index 9da8d0a491..b2d530b423 100644 --- a/tests/topotests/bgp_default_route/test_bgp_default-originate.py +++ b/tests/topotests/bgp_default_route/test_bgp_default-originate.py @@ -25,7 +25,6 @@ Test if default-originate works without route-map. import os import sys import json -import time import pytest import functools @@ -35,8 +34,6 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen -from lib.topolog import logger -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_default_route_route_map_match/test_bgp_default-originate_route-map_match.py b/tests/topotests/bgp_default_route_route_map_match/test_bgp_default-originate_route-map_match.py index e6298dd782..11eaa7b373 100644 --- a/tests/topotests/bgp_default_route_route_map_match/test_bgp_default-originate_route-map_match.py +++ b/tests/topotests/bgp_default_route_route_map_match/test_bgp_default-originate_route-map_match.py @@ -25,7 +25,6 @@ Test if default-originate works with ONLY match operations. import os import sys import json -import time import pytest import functools @@ -35,8 +34,6 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen -from lib.topolog import logger -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_default_route_route_map_match2/test_bgp_default-originate_route-map_match2.py b/tests/topotests/bgp_default_route_route_map_match2/test_bgp_default-originate_route-map_match2.py index 8f23cf25b5..99528f675e 100644 --- a/tests/topotests/bgp_default_route_route_map_match2/test_bgp_default-originate_route-map_match2.py +++ b/tests/topotests/bgp_default_route_route_map_match2/test_bgp_default-originate_route-map_match2.py @@ -27,7 +27,6 @@ to r2. import os import sys import json -import time import pytest import functools @@ -37,8 +36,6 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen -from lib.topolog import logger -from lib.micronet_compat import Topo from lib.common_config import step pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_default_route_route_map_match_set/test_bgp_default-originate_route-map_match_set.py b/tests/topotests/bgp_default_route_route_map_match_set/test_bgp_default-originate_route-map_match_set.py index 728819525a..27451ec7b3 100644 --- a/tests/topotests/bgp_default_route_route_map_match_set/test_bgp_default-originate_route-map_match_set.py +++ b/tests/topotests/bgp_default_route_route_map_match_set/test_bgp_default-originate_route-map_match_set.py @@ -26,7 +26,6 @@ And verify if set operations work as well. import os import sys import json -import time import pytest import functools @@ -36,8 +35,6 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen -from lib.topolog import logger -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_default_route_route_map_set/test_bgp_default-originate_route-map_set.py b/tests/topotests/bgp_default_route_route_map_set/test_bgp_default-originate_route-map_set.py index 4be98c08f6..cc2243a1c4 100644 --- a/tests/topotests/bgp_default_route_route_map_set/test_bgp_default-originate_route-map_set.py +++ b/tests/topotests/bgp_default_route_route_map_set/test_bgp_default-originate_route-map_set.py @@ -25,7 +25,6 @@ Test if default-originate works with ONLY set operations. import os import sys import json -import time import pytest import functools @@ -35,8 +34,6 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen -from lib.topolog import logger -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_distance_change/test_bgp_distance_change.py b/tests/topotests/bgp_distance_change/test_bgp_distance_change.py index 9af237986f..a7040dbe8c 100644 --- a/tests/topotests/bgp_distance_change/test_bgp_distance_change.py +++ b/tests/topotests/bgp_distance_change/test_bgp_distance_change.py @@ -36,7 +36,6 @@ Changed distance should reflect to RIB after changes. import os import sys import json -import time import pytest import functools @@ -46,8 +45,6 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen -from lib.topolog import logger -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_dont_capability_negogiate/test_bgp_dont_capability_negotiate.py b/tests/topotests/bgp_dont_capability_negogiate/test_bgp_dont_capability_negotiate.py index 6025ad935c..f8099492db 100644 --- a/tests/topotests/bgp_dont_capability_negogiate/test_bgp_dont_capability_negotiate.py +++ b/tests/topotests/bgp_dont_capability_negogiate/test_bgp_dont_capability_negotiate.py @@ -26,7 +26,6 @@ sets `dont-capability-negotiate`. import os import sys import json -import time import pytest import functools @@ -38,7 +37,6 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen -from lib.topolog import logger pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_ebgp_common_subnet_nexthop_unchanged/test_bgp-ebgp-common-subnet-nexthop-unchanged.py b/tests/topotests/bgp_ebgp_common_subnet_nexthop_unchanged/test_bgp-ebgp-common-subnet-nexthop-unchanged.py index c0886de856..2e6c3c48ab 100644 --- a/tests/topotests/bgp_ebgp_common_subnet_nexthop_unchanged/test_bgp-ebgp-common-subnet-nexthop-unchanged.py +++ b/tests/topotests/bgp_ebgp_common_subnet_nexthop_unchanged/test_bgp-ebgp-common-subnet-nexthop-unchanged.py @@ -36,7 +36,6 @@ common subnet with this address. import os import sys import json -import time import pytest import functools @@ -48,8 +47,6 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen -from lib.topolog import logger -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_ebgp_requires_policy/test_bgp_ebgp_requires_policy.py b/tests/topotests/bgp_ebgp_requires_policy/test_bgp_ebgp_requires_policy.py index 4f33e81248..4a6eaf81a7 100644 --- a/tests/topotests/bgp_ebgp_requires_policy/test_bgp_ebgp_requires_policy.py +++ b/tests/topotests/bgp_ebgp_requires_policy/test_bgp_ebgp_requires_policy.py @@ -44,7 +44,6 @@ Scenario 3: import os import sys import json -import time import pytest import functools @@ -55,7 +54,6 @@ sys.path.append(os.path.join(CWD, "../")) from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen from lib.topolog import logger -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_ecmp_topo1/test_bgp_ecmp_topo1.py b/tests/topotests/bgp_ecmp_topo1/test_bgp_ecmp_topo1.py index 66714fd2f3..7b9ef0a505 100644 --- a/tests/topotests/bgp_ecmp_topo1/test_bgp_ecmp_topo1.py +++ b/tests/topotests/bgp_ecmp_topo1/test_bgp_ecmp_topo1.py @@ -43,7 +43,6 @@ from lib.topogen import Topogen, TopoRouter, get_topogen from lib.topolog import logger # Required to instantiate the topology builder class. -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_ecmp_topo2/test_ebgp_ecmp_topo2.py b/tests/topotests/bgp_ecmp_topo2/test_ebgp_ecmp_topo2.py index a82ed8ec8c..3c0706ed88 100644 --- a/tests/topotests/bgp_ecmp_topo2/test_ebgp_ecmp_topo2.py +++ b/tests/topotests/bgp_ecmp_topo2/test_ebgp_ecmp_topo2.py @@ -39,7 +39,6 @@ Following tests are covered to test ecmp functionality on EBGP. import os import sys import time -import json import pytest # Save the Current Working Directory to find configuration files. @@ -50,7 +49,6 @@ sys.path.append(os.path.join(CWD, "../../")) # pylint: disable=C0413 # Import topogen and topotest helpers from lib.topogen import Topogen, get_topogen -from lib.micronet_compat import Topo from lib.common_config import ( start_topology, @@ -65,7 +63,7 @@ from lib.common_config import ( ) from lib.topolog import logger from lib.bgp import verify_bgp_convergence, create_router_bgp, clear_bgp -from lib.topojson import build_topo_from_json, build_config_from_json +from lib.topojson import build_config_from_json pytestmark = [pytest.mark.bgpd, pytest.mark.staticd] diff --git a/tests/topotests/bgp_ecmp_topo2/test_ibgp_ecmp_topo2.py b/tests/topotests/bgp_ecmp_topo2/test_ibgp_ecmp_topo2.py index 561ba0edf7..cf1b0cfa0e 100644 --- a/tests/topotests/bgp_ecmp_topo2/test_ibgp_ecmp_topo2.py +++ b/tests/topotests/bgp_ecmp_topo2/test_ibgp_ecmp_topo2.py @@ -39,7 +39,6 @@ Following tests are covered to test ecmp functionality on EBGP. import os import sys import time -import json import pytest # Save the Current Working Directory to find configuration files. @@ -50,7 +49,6 @@ sys.path.append(os.path.join(CWD, "../../")) # pylint: disable=C0413 # Import topogen and topotest helpers from lib.topogen import Topogen, get_topogen -from lib.micronet_compat import Topo from lib.common_config import ( start_topology, @@ -65,7 +63,7 @@ from lib.common_config import ( ) from lib.topolog import logger from lib.bgp import verify_bgp_convergence, create_router_bgp, clear_bgp -from lib.topojson import build_topo_from_json, build_config_from_json +from lib.topojson import build_config_from_json pytestmark = [pytest.mark.bgpd, pytest.mark.staticd] diff --git a/tests/topotests/bgp_ecmp_topo3/test_ibgp_ecmp_topo3.py b/tests/topotests/bgp_ecmp_topo3/test_ibgp_ecmp_topo3.py index 66ebe5b58e..e57dffee36 100644 --- a/tests/topotests/bgp_ecmp_topo3/test_ibgp_ecmp_topo3.py +++ b/tests/topotests/bgp_ecmp_topo3/test_ibgp_ecmp_topo3.py @@ -28,7 +28,6 @@ Following tests are covered to test ecmp functionality on iBGP. import os import sys import time -import json import pytest from time import sleep @@ -39,25 +38,21 @@ sys.path.append(os.path.join(CWD, "../../")) # pylint: disable=C0413 # Import topogen and topotest helpers -from lib.topogen import Topogen, get_topogen +from lib.topogen import get_topogen from lib import topojson from lib.common_config import ( - start_topology, write_test_header, write_test_footer, verify_rib, create_static_routes, check_address_types, - interface_status, reset_config_on_routers, - required_linux_kernel_version, shutdown_bringup_interface, apply_raw_config, ) from lib.topolog import logger -from lib.bgp import verify_bgp_convergence, create_router_bgp, clear_bgp -from lib.topojson import build_topo_from_json, build_config_from_json +from lib.bgp import create_router_bgp, verify_bgp_convergence pytestmark = [pytest.mark.bgpd, pytest.mark.staticd] diff --git a/tests/topotests/bgp_evpn_mh/test_evpn_mh.py b/tests/topotests/bgp_evpn_mh/test_evpn_mh.py index bad4da116a..c9f6d1dc9d 100644 --- a/tests/topotests/bgp_evpn_mh/test_evpn_mh.py +++ b/tests/topotests/bgp_evpn_mh/test_evpn_mh.py @@ -28,7 +28,6 @@ test_evpn_mh.py: Testing EVPN multihoming """ import os -import re import sys import subprocess from functools import partial @@ -48,9 +47,7 @@ sys.path.append(os.path.join(CWD, "../")) # Import topogen and topotest helpers from lib import topotest # Required to instantiate the topology builder class. -from lib.micronet_compat import Topo from lib.topogen import Topogen, TopoRouter, get_topogen -from lib.topolog import logger pytestmark = [pytest.mark.bgpd, pytest.mark.pimd] diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/test_bgp_evpn_overlay_index_gateway.py b/tests/topotests/bgp_evpn_overlay_index_gateway/test_bgp_evpn_overlay_index_gateway.py index 802d29dbaf..91e76fd265 100755 --- a/tests/topotests/bgp_evpn_overlay_index_gateway/test_bgp_evpn_overlay_index_gateway.py +++ b/tests/topotests/bgp_evpn_overlay_index_gateway/test_bgp_evpn_overlay_index_gateway.py @@ -75,7 +75,6 @@ from lib.common_config import ( ) # Required to instantiate the topology builder class. -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_evpn_rt5/test_bgp_evpn.py b/tests/topotests/bgp_evpn_rt5/test_bgp_evpn.py index 98411938c4..52a6d0c9f3 100644 --- a/tests/topotests/bgp_evpn_rt5/test_bgp_evpn.py +++ b/tests/topotests/bgp_evpn_rt5/test_bgp_evpn.py @@ -28,8 +28,6 @@ import os import sys -import json -from functools import partial import pytest import platform @@ -44,7 +42,6 @@ from lib.topogen import Topogen, TopoRouter, get_topogen from lib.topolog import logger # Required to instantiate the topology builder class. -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_evpn_vxlan_topo1/test_bgp_evpn_vxlan.py b/tests/topotests/bgp_evpn_vxlan_topo1/test_bgp_evpn_vxlan.py index d300561e1f..c713fb926e 100755 --- a/tests/topotests/bgp_evpn_vxlan_topo1/test_bgp_evpn_vxlan.py +++ b/tests/topotests/bgp_evpn_vxlan_topo1/test_bgp_evpn_vxlan.py @@ -28,7 +28,6 @@ test_bgp_evpn_vxlan.py: Test VXLAN EVPN MAC a route signalling over BGP. import os import sys import json -import re from functools import partial from time import sleep import pytest @@ -44,7 +43,6 @@ from lib.topogen import Topogen, TopoRouter, get_topogen from lib.topolog import logger # Required to instantiate the topology builder class. -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd, pytest.mark.ospfd] diff --git a/tests/topotests/bgp_features/test_bgp_features.py b/tests/topotests/bgp_features/test_bgp_features.py index f2e09fb010..00f5d1fcb1 100644 --- a/tests/topotests/bgp_features/test_bgp_features.py +++ b/tests/topotests/bgp_features/test_bgp_features.py @@ -45,7 +45,6 @@ from lib.topogen import Topogen, TopoRouter, get_topogen from lib.topolog import logger # Required to instantiate the topology builder class. -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd, pytest.mark.ospfd] diff --git a/tests/topotests/bgp_flowspec/test_bgp_flowspec_topo.py b/tests/topotests/bgp_flowspec/test_bgp_flowspec_topo.py index 05ea944ebf..682ff4ceec 100644 --- a/tests/topotests/bgp_flowspec/test_bgp_flowspec_topo.py +++ b/tests/topotests/bgp_flowspec/test_bgp_flowspec_topo.py @@ -54,7 +54,6 @@ import functools import os import sys import pytest -import getopt # Save the Current Working Directory to find configuration files. CWD = os.path.dirname(os.path.realpath(__file__)) @@ -65,11 +64,8 @@ sys.path.append(os.path.join(CWD, "../")) from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen from lib.topolog import logger -from lib.lutil import lUtil -from lib.lutil import luCommand # Required to instantiate the topology builder class. -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_gr_functionality_topo1/test_bgp_gr_functionality_topo1.py b/tests/topotests/bgp_gr_functionality_topo1/test_bgp_gr_functionality_topo1.py index 4ee3b97080..56f6e1a3be 100644 --- a/tests/topotests/bgp_gr_functionality_topo1/test_bgp_gr_functionality_topo1.py +++ b/tests/topotests/bgp_gr_functionality_topo1/test_bgp_gr_functionality_topo1.py @@ -89,9 +89,7 @@ Basic Common Test steps for all the test case below : import os import sys -import json import time -import inspect import pytest # Save the Current Working Directory to find configuration files. @@ -101,15 +99,13 @@ sys.path.append(os.path.join("../lib/")) # pylint: disable=C0413 # Import topogen and topotest helpers -from lib import topotest -from lib.topogen import Topogen, TopoRouter, get_topogen +from lib.topogen import Topogen, get_topogen from lib.topolog import logger # Required to instantiate the topology builder class. -from lib.micronet_compat import Topo # Import topoJson from lib, to create topology and initial configuration -from lib.topojson import build_topo_from_json, build_config_from_json +from lib.topojson import build_config_from_json from lib.bgp import ( clear_bgp, verify_bgp_rib, @@ -117,7 +113,6 @@ from lib.bgp import ( create_router_bgp, verify_r_bit, verify_f_bit, - verify_graceful_restart_timers, verify_bgp_convergence, verify_bgp_convergence_from_running_config, ) @@ -135,7 +130,6 @@ from lib.common_config import ( shutdown_bringup_interface, step, get_frr_ipv6_linklocal, - create_route_maps, required_linux_kernel_version, ) diff --git a/tests/topotests/bgp_gr_functionality_topo2/test_bgp_gr_functionality_topo2.py b/tests/topotests/bgp_gr_functionality_topo2/test_bgp_gr_functionality_topo2.py index 5fc361f8fe..bf5aea1dad 100644 --- a/tests/topotests/bgp_gr_functionality_topo2/test_bgp_gr_functionality_topo2.py +++ b/tests/topotests/bgp_gr_functionality_topo2/test_bgp_gr_functionality_topo2.py @@ -84,11 +84,9 @@ TC_30: import os import sys -import json import time import pytest from time import sleep -from copy import deepcopy # Save the Current Working Directory to find configuration files. CWD = os.path.dirname(os.path.realpath(__file__)) @@ -97,15 +95,13 @@ sys.path.append(os.path.join("../lib/")) # pylint: disable=C0413 # Import topogen and topotest helpers -from lib import topotest -from lib.topogen import Topogen, TopoRouter, get_topogen +from lib.topogen import Topogen, get_topogen from lib.topolog import logger # Required to instantiate the topology builder class. -from lib.micronet_compat import Topo # Import topoJson from lib, to create topology and initial configuration -from lib.topojson import build_topo_from_json, build_config_from_json +from lib.topojson import build_config_from_json from lib.bgp import ( clear_bgp, verify_bgp_rib, @@ -131,10 +127,8 @@ from lib.common_config import ( check_address_types, write_test_footer, check_router_status, - shutdown_bringup_interface, step, get_frr_ipv6_linklocal, - create_route_maps, required_linux_kernel_version, ) diff --git a/tests/topotests/bgp_gshut/test_bgp_gshut.py b/tests/topotests/bgp_gshut/test_bgp_gshut.py index a08f74d6c4..764252d962 100644 --- a/tests/topotests/bgp_gshut/test_bgp_gshut.py +++ b/tests/topotests/bgp_gshut/test_bgp_gshut.py @@ -60,9 +60,7 @@ import os import re import sys import json -import time import pytest -import functools import platform from functools import partial @@ -73,7 +71,6 @@ sys.path.append(os.path.join(CWD, "../")) from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen from lib.topolog import logger -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_gshut_topo1/test_ebgp_gshut_topo1.py b/tests/topotests/bgp_gshut_topo1/test_ebgp_gshut_topo1.py index 2bddd9c77f..7a19939a5c 100644 --- a/tests/topotests/bgp_gshut_topo1/test_ebgp_gshut_topo1.py +++ b/tests/topotests/bgp_gshut_topo1/test_ebgp_gshut_topo1.py @@ -31,7 +31,6 @@ Following tests are covered to test ecmp functionality on BGP GSHUT. import os import sys import time -import json import pytest # Save the Current Working Directory to find configuration files. @@ -42,17 +41,13 @@ sys.path.append(os.path.join(CWD, "../../")) # pylint: disable=C0413 # Import topogen and topotest helpers from lib.topogen import Topogen, get_topogen -from lib.micronet_compat import Topo -from time import sleep from lib.common_config import ( start_topology, write_test_header, write_test_footer, verify_rib, - create_static_routes, check_address_types, - interface_status, reset_config_on_routers, step, get_frr_ipv6_linklocal, @@ -62,18 +57,16 @@ from lib.common_config import ( start_router, create_route_maps, create_bgp_community_lists, - delete_route_maps, required_linux_kernel_version, ) from lib.topolog import logger from lib.bgp import ( verify_bgp_convergence, create_router_bgp, - clear_bgp, verify_bgp_rib, verify_bgp_attributes, ) -from lib.topojson import build_topo_from_json, build_config_from_json +from lib.topojson import build_config_from_json pytestmark = [pytest.mark.bgpd, pytest.mark.staticd] diff --git a/tests/topotests/bgp_gshut_topo1/test_ibgp_gshut_topo1.py b/tests/topotests/bgp_gshut_topo1/test_ibgp_gshut_topo1.py index 90d285f0f2..95578bada9 100644 --- a/tests/topotests/bgp_gshut_topo1/test_ibgp_gshut_topo1.py +++ b/tests/topotests/bgp_gshut_topo1/test_ibgp_gshut_topo1.py @@ -31,7 +31,6 @@ Following tests are covered to test ecmp functionality on BGP GSHUT. import os import sys import time -import json import pytest # Save the Current Working Directory to find configuration files. @@ -42,38 +41,28 @@ sys.path.append(os.path.join(CWD, "../../")) # pylint: disable=C0413 # Import topogen and topotest helpers from lib.topogen import Topogen, get_topogen -from lib.micronet_compat import Topo -from time import sleep from lib.common_config import ( start_topology, write_test_header, write_test_footer, verify_rib, - create_static_routes, check_address_types, - interface_status, reset_config_on_routers, step, get_frr_ipv6_linklocal, - kill_router_daemons, - start_router_daemons, - stop_router, - start_router, create_route_maps, create_bgp_community_lists, - delete_route_maps, required_linux_kernel_version, ) from lib.topolog import logger from lib.bgp import ( verify_bgp_convergence, create_router_bgp, - clear_bgp, verify_bgp_rib, verify_bgp_attributes, ) -from lib.topojson import build_topo_from_json, build_config_from_json +from lib.topojson import build_config_from_json pytestmark = [pytest.mark.bgpd, pytest.mark.staticd] diff --git a/tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ebgp_ibgp_nbr.py b/tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ebgp_ibgp_nbr.py index 04945a94a5..e9de3a5e15 100644 --- a/tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ebgp_ibgp_nbr.py +++ b/tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ebgp_ibgp_nbr.py @@ -25,11 +25,8 @@ import os import sys import time -import json import pytest from copy import deepcopy -import ipaddr -from re import search as re_search # Save the Current Working Directory to find configuration files. CWD = os.path.dirname(os.path.realpath(__file__)) @@ -45,23 +42,19 @@ from lib.common_config import ( write_test_header, get_frr_ipv6_linklocal, write_test_footer, - create_prefix_lists, verify_rib, create_static_routes, check_address_types, reset_config_on_routers, step, - create_route_maps, - create_interfaces_cfg, ) from lib.topolog import logger from lib.bgp import ( - clear_bgp_and_verify, verify_bgp_convergence, create_router_bgp, verify_bgp_rib, ) -from lib.topojson import build_topo_from_json, build_config_from_json +from lib.topojson import build_config_from_json # Global variables topo = None diff --git a/tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ebgp_nbr.py b/tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ebgp_nbr.py index f09da23bc4..b31c8499e8 100644 --- a/tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ebgp_nbr.py +++ b/tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ebgp_nbr.py @@ -25,12 +25,7 @@ import os import sys import time -import json import pytest -import datetime -from copy import deepcopy -import ipaddr -from re import search as re_search # Save the Current Working Directory to find configuration files. CWD = os.path.dirname(os.path.realpath(__file__)) @@ -45,28 +40,20 @@ from lib.common_config import ( start_topology, write_test_header, write_test_footer, - create_prefix_lists, get_frr_ipv6_linklocal, verify_rib, create_static_routes, check_address_types, reset_config_on_routers, step, - create_route_maps, - addKernelRoute, - kill_router_daemons, - start_router_daemons, - create_interfaces_cfg, ) from lib.topolog import logger from lib.bgp import ( - clear_bgp_and_verify, - clear_bgp, verify_bgp_convergence, create_router_bgp, verify_bgp_rib, ) -from lib.topojson import build_topo_from_json, build_config_from_json +from lib.topojson import build_config_from_json # Global variables topo = None diff --git a/tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ebgp_unnumbered_nbr.py b/tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ebgp_unnumbered_nbr.py index 5966ffdedd..bc5c4ddcd7 100644 --- a/tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ebgp_unnumbered_nbr.py +++ b/tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ebgp_unnumbered_nbr.py @@ -25,11 +25,7 @@ import os import sys import time -import json import pytest -import ipaddr -from copy import deepcopy -from re import search as re_search # Save the Current Working Directory to find configuration files. CWD = os.path.dirname(os.path.realpath(__file__)) @@ -41,7 +37,6 @@ from lib.topogen import Topogen, get_topogen from lib.common_config import ( write_test_header, start_topology, - create_route_maps, write_test_footer, start_router, stop_router, @@ -50,14 +45,12 @@ from lib.common_config import ( check_address_types, reset_config_on_routers, step, - shutdown_bringup_interface, - create_interfaces_cfg, get_frr_ipv6_linklocal, ) from lib.topolog import logger -from lib.bgp import clear_bgp, verify_bgp_convergence, create_router_bgp, verify_bgp_rib +from lib.bgp import create_router_bgp, verify_bgp_convergence, verify_bgp_rib -from lib.topojson import build_topo_from_json, build_config_from_json +from lib.topojson import build_config_from_json # Global variables topo = None diff --git a/tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ibgp_nbr.py b/tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ibgp_nbr.py index 9b5e48e08f..3ce0293ffe 100644 --- a/tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ibgp_nbr.py +++ b/tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ibgp_nbr.py @@ -25,11 +25,8 @@ import os import sys import time -import json import pytest from copy import deepcopy -import ipaddr -from re import search as re_search # Save the Current Working Directory to find configuration files. CWD = os.path.dirname(os.path.realpath(__file__)) @@ -48,21 +45,18 @@ from lib.common_config import ( create_prefix_lists, verify_rib, create_static_routes, - check_address_types, reset_config_on_routers, step, create_route_maps, - create_interfaces_cfg, get_frr_ipv6_linklocal, ) from lib.topolog import logger from lib.bgp import ( - clear_bgp_and_verify, verify_bgp_convergence, create_router_bgp, verify_bgp_rib, ) -from lib.topojson import build_topo_from_json, build_config_from_json +from lib.topojson import build_config_from_json # Global variables topo = None diff --git a/tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ibgp_unnumbered_nbr.py b/tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ibgp_unnumbered_nbr.py index 5e804df232..a5a8b5fe68 100644 --- a/tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ibgp_unnumbered_nbr.py +++ b/tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ibgp_unnumbered_nbr.py @@ -25,10 +25,7 @@ import os import sys import time -import json import pytest -import ipaddr -from re import search as re_search # Save the Current Working Directory to find configuration files. CWD = os.path.dirname(os.path.realpath(__file__)) @@ -43,7 +40,6 @@ from lib.common_config import ( start_topology, write_test_header, write_test_footer, - create_interfaces_cfg, verify_rib, create_static_routes, check_address_types, @@ -52,8 +48,8 @@ from lib.common_config import ( get_frr_ipv6_linklocal, ) from lib.topolog import logger -from lib.bgp import clear_bgp, verify_bgp_convergence, create_router_bgp -from lib.topojson import build_topo_from_json, build_config_from_json +from lib.bgp import create_router_bgp, verify_bgp_convergence +from lib.topojson import build_config_from_json # Global variables topo = None diff --git a/tests/topotests/bgp_ipv6_rtadv/test_bgp_ipv6_rtadv.py b/tests/topotests/bgp_ipv6_rtadv/test_bgp_ipv6_rtadv.py index 04cf0395d6..981028ff76 100644 --- a/tests/topotests/bgp_ipv6_rtadv/test_bgp_ipv6_rtadv.py +++ b/tests/topotests/bgp_ipv6_rtadv/test_bgp_ipv6_rtadv.py @@ -43,7 +43,6 @@ from lib.topogen import Topogen, TopoRouter, get_topogen from lib.topolog import logger # Required to instantiate the topology builder class. -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_l3vpn_to_bgp_direct/customize.py b/tests/topotests/bgp_l3vpn_to_bgp_direct/customize.py index f344ee76b0..7d7a4bd155 100644 --- a/tests/topotests/bgp_l3vpn_to_bgp_direct/customize.py +++ b/tests/topotests/bgp_l3vpn_to_bgp_direct/customize.py @@ -74,20 +74,15 @@ r3-eth1 .3 | | .3 r3-eth0 | .4 r4-eth0 """ import os -import re -import pytest # pylint: disable=C0413 # Import topogen and topotest helpers -from lib import topotest -from lib.topogen import Topogen, TopoRouter, get_topogen +from lib.topogen import get_topogen from lib.topolog import logger from lib.ltemplate import ltemplateRtrCmd # Required to instantiate the topology builder class. -from lib.micronet_compat import Topo -import shutil CWD = os.path.dirname(os.path.realpath(__file__)) # test name based on directory diff --git a/tests/topotests/bgp_l3vpn_to_bgp_vrf/customize.py b/tests/topotests/bgp_l3vpn_to_bgp_vrf/customize.py index 91291d89e3..8fd344696e 100644 --- a/tests/topotests/bgp_l3vpn_to_bgp_vrf/customize.py +++ b/tests/topotests/bgp_l3vpn_to_bgp_vrf/customize.py @@ -74,21 +74,17 @@ r3-eth1 .3 | | .3 r3-eth0 | .4 r4-eth0 """ import os -import re -import pytest import platform # pylint: disable=C0413 # Import topogen and topotest helpers from lib import topotest -from lib.topogen import Topogen, TopoRouter, get_topogen +from lib.topogen import get_topogen from lib.topolog import logger from lib.ltemplate import ltemplateRtrCmd # Required to instantiate the topology builder class. -from lib.micronet_compat import Topo -import shutil CWD = os.path.dirname(os.path.realpath(__file__)) # test name based on directory diff --git a/tests/topotests/bgp_large_community/test_bgp_large_community_topo_1.py b/tests/topotests/bgp_large_community/test_bgp_large_community_topo_1.py index fb472c4495..fa3598ff8e 100644 --- a/tests/topotests/bgp_large_community/test_bgp_large_community_topo_1.py +++ b/tests/topotests/bgp_large_community/test_bgp_large_community_topo_1.py @@ -50,11 +50,9 @@ import pytest import time from os import path as os_path import sys -from json import load as json_load # Required to instantiate the topology builder class. from lib.topogen import Topogen, get_topogen -from lib.micronet_compat import Topo from lib.common_config import ( start_topology, @@ -71,7 +69,7 @@ from lib.common_config import ( ) from lib.topolog import logger from lib.bgp import verify_bgp_convergence, create_router_bgp, clear_bgp_and_verify -from lib.topojson import build_topo_from_json, build_config_from_json +from lib.topojson import build_config_from_json pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_large_community/test_bgp_large_community_topo_2.py b/tests/topotests/bgp_large_community/test_bgp_large_community_topo_2.py index a94d20da36..6b62b2c5ee 100644 --- a/tests/topotests/bgp_large_community/test_bgp_large_community_topo_2.py +++ b/tests/topotests/bgp_large_community/test_bgp_large_community_topo_2.py @@ -61,7 +61,6 @@ Following tests are covered: import os import sys -import json import pytest import time @@ -74,7 +73,6 @@ sys.path.append(os.path.join(CWD, "../lib/")) # Import topogen and topotest helpers # Import topoJson from lib, to create topology and initial configuration from lib.topogen import Topogen, get_topogen -from lib.micronet_compat import Topo from lib.common_config import ( start_topology, @@ -83,7 +81,6 @@ from lib.common_config import ( reset_config_on_routers, create_route_maps, create_bgp_community_lists, - create_prefix_lists, verify_bgp_community, step, verify_create_community_list, @@ -95,7 +92,7 @@ from lib.common_config import ( ) from lib.topolog import logger from lib.bgp import verify_bgp_convergence, create_router_bgp, clear_bgp_and_verify -from lib.topojson import build_topo_from_json, build_config_from_json +from lib.topojson import build_config_from_json pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_link_bw_ip/test_bgp_linkbw_ip.py b/tests/topotests/bgp_link_bw_ip/test_bgp_linkbw_ip.py index 799b5f93f1..4eec69f7f4 100644 --- a/tests/topotests/bgp_link_bw_ip/test_bgp_linkbw_ip.py +++ b/tests/topotests/bgp_link_bw_ip/test_bgp_linkbw_ip.py @@ -27,7 +27,6 @@ test_bgp_linkbw_ip.py: Test weighted ECMP using BGP link-bandwidth """ import os -import re import sys from functools import partial import pytest @@ -44,7 +43,6 @@ from lib.topogen import Topogen, TopoRouter, get_topogen from lib.topolog import logger # Required to instantiate the topology builder class. -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_listen_on_multiple_addresses/test_bgp_listen_on_multiple_addresses.py b/tests/topotests/bgp_listen_on_multiple_addresses/test_bgp_listen_on_multiple_addresses.py index bc4336b6f3..4b4335a014 100755 --- a/tests/topotests/bgp_listen_on_multiple_addresses/test_bgp_listen_on_multiple_addresses.py +++ b/tests/topotests/bgp_listen_on_multiple_addresses/test_bgp_listen_on_multiple_addresses.py @@ -40,7 +40,6 @@ connections on multiple addresses. import os import sys -import json import pytest @@ -49,11 +48,10 @@ CWD = os.path.dirname(os.path.realpath(__file__)) sys.path.append(os.path.join(CWD, "../")) from lib.topogen import Topogen, get_topogen -from lib.topojson import build_topo_from_json, build_config_from_json +from lib.topojson import build_config_from_json from lib.topojson import linux_intf_config_from_json from lib.common_config import start_topology from lib.topotest import router_json_cmp, run_and_expect -from lib.micronet_compat import Topo from functools import partial pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_local_as_private_remove/test_bgp_local_as_private_remove.py b/tests/topotests/bgp_local_as_private_remove/test_bgp_local_as_private_remove.py index f648e1791f..bb2c43d1fc 100644 --- a/tests/topotests/bgp_local_as_private_remove/test_bgp_local_as_private_remove.py +++ b/tests/topotests/bgp_local_as_private_remove/test_bgp_local_as_private_remove.py @@ -38,10 +38,7 @@ CWD = os.path.dirname(os.path.realpath(__file__)) sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 -from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen -from lib.topolog import logger -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_lu_topo1/test_bgp_lu.py b/tests/topotests/bgp_lu_topo1/test_bgp_lu.py index 6318044eaa..8941854593 100644 --- a/tests/topotests/bgp_lu_topo1/test_bgp_lu.py +++ b/tests/topotests/bgp_lu_topo1/test_bgp_lu.py @@ -29,7 +29,6 @@ import os import sys import json from functools import partial -from time import sleep import pytest # Save the Current Working Directory to find configuration files. @@ -40,10 +39,8 @@ sys.path.append(os.path.join(CWD, "../")) # Import topogen and topotest helpers from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen -from lib.topolog import logger # Required to instantiate the topology builder class. -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_maximum_prefix_invalid_update/test_bgp_maximum_prefix_invalid_update.py b/tests/topotests/bgp_maximum_prefix_invalid_update/test_bgp_maximum_prefix_invalid_update.py index 66fcd355ee..5c34ebf919 100644 --- a/tests/topotests/bgp_maximum_prefix_invalid_update/test_bgp_maximum_prefix_invalid_update.py +++ b/tests/topotests/bgp_maximum_prefix_invalid_update/test_bgp_maximum_prefix_invalid_update.py @@ -35,17 +35,13 @@ is not sent if maximum-prefix count is overflow. import os import sys import json -import time import pytest CWD = os.path.dirname(os.path.realpath(__file__)) sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 -from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen -from lib.topolog import logger -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_maximum_prefix_out/test_bgp_maximum_prefix_out.py b/tests/topotests/bgp_maximum_prefix_out/test_bgp_maximum_prefix_out.py index 07d1cb02b1..d45f00f697 100644 --- a/tests/topotests/bgp_maximum_prefix_out/test_bgp_maximum_prefix_out.py +++ b/tests/topotests/bgp_maximum_prefix_out/test_bgp_maximum_prefix_out.py @@ -30,7 +30,6 @@ correctly. import os import sys import json -import time import pytest import functools @@ -40,8 +39,6 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen -from lib.topolog import logger -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_minimum_holdtime/test_bgp_minimum_holdtime.py b/tests/topotests/bgp_minimum_holdtime/test_bgp_minimum_holdtime.py index 5facdd26ea..b1641b3c13 100755 --- a/tests/topotests/bgp_minimum_holdtime/test_bgp_minimum_holdtime.py +++ b/tests/topotests/bgp_minimum_holdtime/test_bgp_minimum_holdtime.py @@ -25,7 +25,6 @@ Test if minimum-holdtime works. import os import sys import json -import time import pytest import functools @@ -35,8 +34,6 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen -from lib.topolog import logger -from mininet.topo import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_multi_vrf_topo1/test_bgp_multi_vrf_topo1.py b/tests/topotests/bgp_multi_vrf_topo1/test_bgp_multi_vrf_topo1.py index ffa1c3fb61..eefb965f80 100644 --- a/tests/topotests/bgp_multi_vrf_topo1/test_bgp_multi_vrf_topo1.py +++ b/tests/topotests/bgp_multi_vrf_topo1/test_bgp_multi_vrf_topo1.py @@ -99,10 +99,8 @@ FUNC_16_3: import os import sys -import json import time import pytest -from copy import deepcopy # Save the Current Working Directory to find configuration files. CWD = os.path.dirname(os.path.realpath(__file__)) @@ -114,7 +112,6 @@ sys.path.append(os.path.join(CWD, "../lib/")) # pylint: disable=C0413 # Import topogen and topotest helpers from lib.topogen import Topogen, get_topogen -from lib.micronet_compat import Topo from lib.topotest import iproute2_is_vrf_capable from lib.common_config import ( step, @@ -136,14 +133,13 @@ from lib.common_config import ( from lib.topolog import logger from lib.bgp import ( - clear_bgp, verify_bgp_rib, create_router_bgp, verify_bgp_community, verify_bgp_convergence, verify_best_path_as_per_bgp_attribute, ) -from lib.topojson import build_topo_from_json, build_config_from_json +from lib.topojson import build_config_from_json pytestmark = [pytest.mark.bgpd, pytest.mark.staticd] diff --git a/tests/topotests/bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py b/tests/topotests/bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py index 609fdf3587..3163fd75a4 100644 --- a/tests/topotests/bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py +++ b/tests/topotests/bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py @@ -53,7 +53,6 @@ CHAOS_8: import os import sys -import json import time import pytest from copy import deepcopy @@ -70,7 +69,6 @@ sys.path.append(os.path.join(CWD, "../lib/")) # pylint: disable=C0413 # Import topogen and topotest helpers from lib.topogen import Topogen, get_topogen -from lib.micronet_compat import Topo from lib.topotest import iproute2_is_vrf_capable from lib.common_config import ( step, @@ -99,7 +97,7 @@ from lib.common_config import ( from lib.topolog import logger from lib.bgp import clear_bgp, verify_bgp_rib, create_router_bgp, verify_bgp_convergence -from lib.topojson import build_config_from_json, build_topo_from_json +from lib.topojson import build_config_from_json pytestmark = [pytest.mark.bgpd, pytest.mark.staticd] diff --git a/tests/topotests/bgp_multiview_topo1/test_bgp_multiview_topo1.py b/tests/topotests/bgp_multiview_topo1/test_bgp_multiview_topo1.py index 76a06bccd2..d32cbeb751 100644 --- a/tests/topotests/bgp_multiview_topo1/test_bgp_multiview_topo1.py +++ b/tests/topotests/bgp_multiview_topo1/test_bgp_multiview_topo1.py @@ -64,10 +64,8 @@ test_bgp_multiview_topo1.py: Simple FRR Route-Server Test import json import os -import re import sys import pytest -import glob import json from time import sleep diff --git a/tests/topotests/bgp_path_attributes_topo1/test_bgp_path_attributes.py b/tests/topotests/bgp_path_attributes_topo1/test_bgp_path_attributes.py index f34ecc30a0..a2566bd382 100644 --- a/tests/topotests/bgp_path_attributes_topo1/test_bgp_path_attributes.py +++ b/tests/topotests/bgp_path_attributes_topo1/test_bgp_path_attributes.py @@ -52,11 +52,7 @@ Teardown module: import os import sys -import pdb -import json import time -import inspect -from time import sleep import pytest # Save the Current Working Directory to find configuration files. @@ -65,9 +61,7 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 # Import topogen and topotest helpers -from lib.micronet_compat import Topo -from lib import topotest -from lib.topogen import Topogen, TopoRouter, get_topogen +from lib.topogen import Topogen, get_topogen # Required to instantiate the topology builder class. from lib.common_config import ( @@ -78,7 +72,6 @@ from lib.common_config import ( verify_rib, create_static_routes, create_prefix_lists, - verify_prefix_lists, create_route_maps, check_address_types, ) @@ -86,13 +79,10 @@ from lib.topolog import logger from lib.bgp import ( verify_bgp_convergence, create_router_bgp, - clear_bgp_and_verify, verify_best_path_as_per_bgp_attribute, verify_best_path_as_per_admin_distance, - modify_as_number, - verify_as_numbers, ) -from lib.topojson import build_topo_from_json, build_config_from_json +from lib.topojson import build_config_from_json pytestmark = [pytest.mark.bgpd, pytest.mark.staticd] diff --git a/tests/topotests/bgp_peer_group/test_bgp_peer-group.py b/tests/topotests/bgp_peer_group/test_bgp_peer-group.py index 172426b2c8..494f6c68b9 100644 --- a/tests/topotests/bgp_peer_group/test_bgp_peer-group.py +++ b/tests/topotests/bgp_peer_group/test_bgp_peer-group.py @@ -35,8 +35,6 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen -from lib.topolog import logger -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_peer_type_multipath_relax/test_bgp_peer-type_multipath-relax.py b/tests/topotests/bgp_peer_type_multipath_relax/test_bgp_peer-type_multipath-relax.py index 4cd14367bf..8321a57552 100755 --- a/tests/topotests/bgp_peer_type_multipath_relax/test_bgp_peer-type_multipath-relax.py +++ b/tests/topotests/bgp_peer_type_multipath_relax/test_bgp_peer-type_multipath-relax.py @@ -71,7 +71,6 @@ sys.path.append(os.path.join(CWD, "../")) from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen from lib.topolog import logger -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd, pytest.mark.staticd] diff --git a/tests/topotests/bgp_prefix_list_topo1/test_prefix_lists.py b/tests/topotests/bgp_prefix_list_topo1/test_prefix_lists.py index f046f442e0..64093497cb 100644 --- a/tests/topotests/bgp_prefix_list_topo1/test_prefix_lists.py +++ b/tests/topotests/bgp_prefix_list_topo1/test_prefix_lists.py @@ -44,7 +44,6 @@ IP prefix-list tests """ import sys -import json import time import os import pytest @@ -55,7 +54,6 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 # Import topogen and topotest helpers -from lib.micronet_compat import Topo from lib.topogen import Topogen, get_topogen # Import topoJson from lib, to create topology and initial configuration @@ -71,7 +69,7 @@ from lib.common_config import ( ) from lib.topolog import logger from lib.bgp import verify_bgp_convergence, create_router_bgp, clear_bgp_and_verify -from lib.topojson import build_topo_from_json, build_config_from_json +from lib.topojson import build_config_from_json pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_prefix_sid/test_bgp_prefix_sid.py b/tests/topotests/bgp_prefix_sid/test_bgp_prefix_sid.py index 49a4049c00..d36bc31237 100644 --- a/tests/topotests/bgp_prefix_sid/test_bgp_prefix_sid.py +++ b/tests/topotests/bgp_prefix_sid/test_bgp_prefix_sid.py @@ -39,7 +39,6 @@ sys.path.append(os.path.join(CWD, "../")) from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen from lib.topolog import logger -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_prefix_sid2/test_bgp_prefix_sid2.py b/tests/topotests/bgp_prefix_sid2/test_bgp_prefix_sid2.py index 5c85895ed2..323c065275 100755 --- a/tests/topotests/bgp_prefix_sid2/test_bgp_prefix_sid2.py +++ b/tests/topotests/bgp_prefix_sid2/test_bgp_prefix_sid2.py @@ -39,7 +39,6 @@ sys.path.append(os.path.join(CWD, "../")) from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen from lib.topolog import logger -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_recursive_route_ebgp_multi_hop/test_bgp_recursive_route_ebgp_multi_hop.py b/tests/topotests/bgp_recursive_route_ebgp_multi_hop/test_bgp_recursive_route_ebgp_multi_hop.py index 918c16e34a..e255b4e88c 100644 --- a/tests/topotests/bgp_recursive_route_ebgp_multi_hop/test_bgp_recursive_route_ebgp_multi_hop.py +++ b/tests/topotests/bgp_recursive_route_ebgp_multi_hop/test_bgp_recursive_route_ebgp_multi_hop.py @@ -40,10 +40,8 @@ multi-hop functionality: import os import sys import time -import json import pytest from time import sleep -from copy import deepcopy # Save the Current Working Directory to find configuration files. CWD = os.path.dirname(os.path.realpath(__file__)) @@ -51,8 +49,6 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 # Import topogen and topotest helpers -from lib import topotest -from lib.micronet_compat import Topo from lib.topogen import Topogen, get_topogen # Import topoJson from lib, to create topology and initial configuration @@ -69,21 +65,18 @@ from lib.common_config import ( create_route_maps, create_interface_in_kernel, shutdown_bringup_interface, - addKernelRoute, - delete_route_maps, ) from lib.topolog import logger from lib.bgp import ( verify_bgp_convergence, create_router_bgp, - clear_bgp_and_verify, verify_bgp_rib, verify_bgp_convergence_from_running_config, modify_as_number, verify_bgp_attributes, clear_bgp, ) -from lib.topojson import build_topo_from_json, build_config_from_json +from lib.topojson import build_config_from_json pytestmark = [pytest.mark.bgpd, pytest.mark.staticd] diff --git a/tests/topotests/bgp_reject_as_sets/test_bgp_reject_as_sets.py b/tests/topotests/bgp_reject_as_sets/test_bgp_reject_as_sets.py index 271db0a7c9..8d1e834986 100644 --- a/tests/topotests/bgp_reject_as_sets/test_bgp_reject_as_sets.py +++ b/tests/topotests/bgp_reject_as_sets/test_bgp_reject_as_sets.py @@ -37,7 +37,6 @@ BGP speakers conforming to this document (i.e., conformant BGP import os import sys import json -import time import pytest import functools @@ -47,8 +46,6 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen -from lib.topolog import logger -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_rfapi_basic_sanity/customize.py b/tests/topotests/bgp_rfapi_basic_sanity/customize.py index 3cf53a184d..1a86746e37 100644 --- a/tests/topotests/bgp_rfapi_basic_sanity/customize.py +++ b/tests/topotests/bgp_rfapi_basic_sanity/customize.py @@ -61,20 +61,15 @@ r3-eth1 .3 | | .3 r3-eth0 | .4 r4-eth0 """ import os -import re -import pytest # pylint: disable=C0413 # Import topogen and topotest helpers -from lib import topotest -from lib.topogen import Topogen, TopoRouter, get_topogen +from lib.topogen import get_topogen from lib.topolog import logger from lib.ltemplate import ltemplateRtrCmd # Required to instantiate the topology builder class. -from lib.micronet_compat import Topo -import shutil CWD = os.path.dirname(os.path.realpath(__file__)) # test name based on directory diff --git a/tests/topotests/bgp_rmap_extcommunity_none/test_bgp_rmap_extcommunity_none.py b/tests/topotests/bgp_rmap_extcommunity_none/test_bgp_rmap_extcommunity_none.py index d2a602f9a2..d34ac3cdda 100644 --- a/tests/topotests/bgp_rmap_extcommunity_none/test_bgp_rmap_extcommunity_none.py +++ b/tests/topotests/bgp_rmap_extcommunity_none/test_bgp_rmap_extcommunity_none.py @@ -28,7 +28,6 @@ route-map permit 10 import os import sys import json -import time import pytest import functools @@ -40,7 +39,6 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen -from lib.topolog import logger pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_route_aggregation/test_bgp_aggregation.py b/tests/topotests/bgp_route_aggregation/test_bgp_aggregation.py index 007e640f58..1367d77e55 100644 --- a/tests/topotests/bgp_route_aggregation/test_bgp_aggregation.py +++ b/tests/topotests/bgp_route_aggregation/test_bgp_aggregation.py @@ -31,10 +31,7 @@ Following tests are covered to test bgp aggregation functionality: import os import sys import time -import json import pytest -from time import sleep -from copy import deepcopy # Save the Current Working Directory to find configuration files. CWD = os.path.dirname(os.path.realpath(__file__)) @@ -42,15 +39,12 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 # Import topogen and topotest helpers -from lib import topotest -from lib.micronet_compat import Topo from lib.topogen import Topogen, get_topogen # Import topoJson from lib, to create topology and initial configuration from lib.common_config import ( start_topology, write_test_header, - apply_raw_config, write_test_footer, reset_config_on_routers, verify_rib, @@ -66,9 +60,8 @@ from lib.bgp import ( create_router_bgp, verify_bgp_rib, verify_bgp_community, - verify_bgp_timers_and_functionality, ) -from lib.topojson import build_topo_from_json, build_config_from_json +from lib.topojson import build_config_from_json pytestmark = [pytest.mark.bgpd, pytest.mark.staticd] diff --git a/tests/topotests/bgp_route_map/test_route_map_topo1.py b/tests/topotests/bgp_route_map/test_route_map_topo1.py index ba4456e717..5af7296fcb 100644 --- a/tests/topotests/bgp_route_map/test_route_map_topo1.py +++ b/tests/topotests/bgp_route_map/test_route_map_topo1.py @@ -21,12 +21,9 @@ # import sys -import json import time import pytest -import inspect import os -from time import sleep # Save the Current Working Directory to find configuration files. CWD = os.path.dirname(os.path.realpath(__file__)) @@ -34,38 +31,27 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 # Import topogen and topotest helpers -from lib import topotest from lib.topogen import Topogen, get_topogen -from lib.micronet_compat import Topo # Required to instantiate the topology builder class. -from lib.topojson import * from lib.common_config import ( start_topology, write_test_header, write_test_footer, - verify_bgp_community, verify_rib, - delete_route_maps, - create_bgp_community_lists, - interface_status, create_route_maps, create_static_routes, create_prefix_lists, - verify_route_maps, check_address_types, - shutdown_bringup_interface, - verify_prefix_lists, reset_config_on_routers, ) from lib.topolog import logger from lib.bgp import ( verify_bgp_convergence, create_router_bgp, - clear_bgp_and_verify, verify_bgp_attributes, ) -from lib.topojson import build_topo_from_json, build_config_from_json +from lib.topojson import build_config_from_json pytestmark = [pytest.mark.bgpd, pytest.mark.staticd] diff --git a/tests/topotests/bgp_route_map/test_route_map_topo2.py b/tests/topotests/bgp_route_map/test_route_map_topo2.py index ca05ba45d9..eccb2c1bf2 100644 --- a/tests/topotests/bgp_route_map/test_route_map_topo2.py +++ b/tests/topotests/bgp_route_map/test_route_map_topo2.py @@ -101,7 +101,6 @@ TC_60 """ import sys -import json import time import pytest import inspect @@ -114,9 +113,7 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 # Import topogen and topotest helpers -from lib import topotest from lib.topogen import Topogen, get_topogen -from lib.micronet_compat import Topo # Required to instantiate the topology builder class. from lib.common_config import ( @@ -127,7 +124,6 @@ from lib.common_config import ( verify_rib, delete_route_maps, create_bgp_community_lists, - interface_status, create_route_maps, create_prefix_lists, verify_route_maps, @@ -145,7 +141,7 @@ from lib.bgp import ( clear_bgp_and_verify, verify_bgp_attributes, ) -from lib.topojson import build_topo_from_json, build_config_from_json +from lib.topojson import build_config_from_json pytestmark = [pytest.mark.bgpd, pytest.mark.staticd] diff --git a/tests/topotests/bgp_rr_ibgp/test_bgp_rr_ibgp_topo1.py b/tests/topotests/bgp_rr_ibgp/test_bgp_rr_ibgp_topo1.py index d40ea2ed85..cf8315f594 100644 --- a/tests/topotests/bgp_rr_ibgp/test_bgp_rr_ibgp_topo1.py +++ b/tests/topotests/bgp_rr_ibgp/test_bgp_rr_ibgp_topo1.py @@ -31,7 +31,6 @@ routes around """ import os -import re import sys import pytest import json @@ -47,7 +46,6 @@ from lib.topogen import Topogen, TopoRouter, get_topogen from lib.topolog import logger # Required to instantiate the topology builder class. -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_sender_as_path_loop_detection/test_bgp_sender-as-path-loop-detection.py b/tests/topotests/bgp_sender_as_path_loop_detection/test_bgp_sender-as-path-loop-detection.py index 9d3c3a7652..b5c33f359b 100644 --- a/tests/topotests/bgp_sender_as_path_loop_detection/test_bgp_sender-as-path-loop-detection.py +++ b/tests/topotests/bgp_sender_as_path_loop_detection/test_bgp_sender-as-path-loop-detection.py @@ -30,7 +30,6 @@ command works as expeced. import os import sys import json -import time import pytest import functools @@ -40,8 +39,6 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen -from lib.topolog import logger -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_set_local_preference_add_subtract/test_bgp_set_local-preference_add_subtract.py b/tests/topotests/bgp_set_local_preference_add_subtract/test_bgp_set_local-preference_add_subtract.py index 0ef5f61d97..d238cc94ec 100644 --- a/tests/topotests/bgp_set_local_preference_add_subtract/test_bgp_set_local-preference_add_subtract.py +++ b/tests/topotests/bgp_set_local_preference_add_subtract/test_bgp_set_local-preference_add_subtract.py @@ -31,7 +31,6 @@ LOCAL_PREF in route-maps. import os import sys import json -import time import pytest import functools @@ -41,8 +40,6 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen -from lib.topolog import logger -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_snmp_mplsl3vpn/test_bgp_snmp_mplsvpn.py b/tests/topotests/bgp_snmp_mplsl3vpn/test_bgp_snmp_mplsvpn.py index 7f58c65ab0..3e6e417211 100755 --- a/tests/topotests/bgp_snmp_mplsl3vpn/test_bgp_snmp_mplsvpn.py +++ b/tests/topotests/bgp_snmp_mplsl3vpn/test_bgp_snmp_mplsvpn.py @@ -27,11 +27,8 @@ test_bgp_snmp_mplsl3vpn.py: Test mplsL3Vpn MIB [RFC4382]. import os import sys -import json -from functools import partial from time import sleep import pytest -import re # Save the Current Working Directory to find configuration files. CWD = os.path.dirname(os.path.realpath(__file__)) @@ -39,13 +36,10 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 # Import topogen and topotest helpers -from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen -from lib.topolog import logger from lib.snmptest import SnmpTester # Required to instantiate the topology builder class. -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd, pytest.mark.isisd, pytest.mark.snmp] diff --git a/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/test_bgp_srv6l3vpn_to_bgp_vrf.py b/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/test_bgp_srv6l3vpn_to_bgp_vrf.py index 60e419ab1c..2f2bdbc8eb 100755 --- a/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/test_bgp_srv6l3vpn_to_bgp_vrf.py +++ b/tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/test_bgp_srv6l3vpn_to_bgp_vrf.py @@ -22,7 +22,6 @@ # import os -import re import sys import json import functools @@ -37,7 +36,6 @@ from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen from lib.topolog import logger from lib.common_config import required_linux_kernel_version -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_suppress_fib/test_bgp_suppress_fib.py b/tests/topotests/bgp_suppress_fib/test_bgp_suppress_fib.py index 2c14ad9dee..5a22fbbc54 100644 --- a/tests/topotests/bgp_suppress_fib/test_bgp_suppress_fib.py +++ b/tests/topotests/bgp_suppress_fib/test_bgp_suppress_fib.py @@ -26,7 +26,6 @@ import os import sys import json -import time import pytest from functools import partial from time import sleep @@ -37,8 +36,6 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen -from lib.topolog import logger -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_tcp_mss/test_bgp_tcp_mss.py b/tests/topotests/bgp_tcp_mss/test_bgp_tcp_mss.py index db90bbd5df..eed0b34371 100644 --- a/tests/topotests/bgp_tcp_mss/test_bgp_tcp_mss.py +++ b/tests/topotests/bgp_tcp_mss/test_bgp_tcp_mss.py @@ -35,7 +35,6 @@ Need to verify if the tcp-mss value is reflected in the TCP session. import os import sys import json -import time import pytest import functools @@ -49,7 +48,6 @@ sys.path.append(os.path.join(CWD, "../")) from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen from lib.topolog import logger -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_update_delay/test_bgp_update_delay.py b/tests/topotests/bgp_update_delay/test_bgp_update_delay.py index 31a887b6c3..b3e6ad3a12 100644 --- a/tests/topotests/bgp_update_delay/test_bgp_update_delay.py +++ b/tests/topotests/bgp_update_delay/test_bgp_update_delay.py @@ -60,7 +60,6 @@ event of packet loss. import os import sys import json -import time import pytest import functools @@ -70,8 +69,6 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen -from lib.topolog import logger -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_vrf_dynamic_route_leak/test_bgp_vrf_dynamic_route_leak_topo1.py b/tests/topotests/bgp_vrf_dynamic_route_leak/test_bgp_vrf_dynamic_route_leak_topo1.py index b2e2250a9c..07ba0964d4 100644 --- a/tests/topotests/bgp_vrf_dynamic_route_leak/test_bgp_vrf_dynamic_route_leak_topo1.py +++ b/tests/topotests/bgp_vrf_dynamic_route_leak/test_bgp_vrf_dynamic_route_leak_topo1.py @@ -33,7 +33,6 @@ Following tests are covered to test BGP Multi-VRF Dynamic Route Leaking: import os import sys -import json import time import pytest import platform @@ -49,25 +48,20 @@ sys.path.append(os.path.join(CWD, "../lib/")) # Import topogen and topotest helpers from lib.topogen import Topogen, get_topogen from lib.topotest import version_cmp -from lib.micronet_compat import Topo from lib.common_config import ( start_topology, write_test_header, check_address_types, write_test_footer, - reset_config_on_routers, - verify_rib, step, create_route_maps, - shutdown_bringup_interface, create_static_routes, create_prefix_lists, create_bgp_community_lists, create_interface_in_kernel, check_router_status, verify_cli_json, - get_frr_ipv6_linklocal, verify_fib_routes, ) @@ -75,11 +69,10 @@ from lib.topolog import logger from lib.bgp import ( verify_bgp_convergence, create_router_bgp, - clear_bgp, verify_bgp_community, verify_bgp_rib, ) -from lib.topojson import build_topo_from_json, build_config_from_json +from lib.topojson import build_config_from_json pytestmark = [pytest.mark.bgpd, pytest.mark.staticd] diff --git a/tests/topotests/bgp_vrf_dynamic_route_leak/test_bgp_vrf_dynamic_route_leak_topo2.py b/tests/topotests/bgp_vrf_dynamic_route_leak/test_bgp_vrf_dynamic_route_leak_topo2.py index 8e3e32fc8f..30d05a6401 100644 --- a/tests/topotests/bgp_vrf_dynamic_route_leak/test_bgp_vrf_dynamic_route_leak_topo2.py +++ b/tests/topotests/bgp_vrf_dynamic_route_leak/test_bgp_vrf_dynamic_route_leak_topo2.py @@ -47,19 +47,14 @@ sys.path.append(os.path.join(CWD, "../lib/")) # Import topogen and topotest helpers from lib.topogen import Topogen, get_topogen from lib.topotest import version_cmp -from lib.micronet_compat import Topo from lib.common_config import ( start_topology, write_test_header, check_address_types, write_test_footer, - verify_rib, step, create_route_maps, - create_static_routes, - stop_router, - start_router, create_prefix_lists, create_bgp_community_lists, check_router_status, diff --git a/tests/topotests/bgp_vrf_lite_ipv6_rtadv/test_bgp_vrf_lite_ipv6_rtadv.py b/tests/topotests/bgp_vrf_lite_ipv6_rtadv/test_bgp_vrf_lite_ipv6_rtadv.py index 5d6a5859cf..b70e273155 100644 --- a/tests/topotests/bgp_vrf_lite_ipv6_rtadv/test_bgp_vrf_lite_ipv6_rtadv.py +++ b/tests/topotests/bgp_vrf_lite_ipv6_rtadv/test_bgp_vrf_lite_ipv6_rtadv.py @@ -31,7 +31,6 @@ import sys import json from functools import partial import pytest -import platform # Save the Current Working Directory to find configuration files. CWD = os.path.dirname(os.path.realpath(__file__)) @@ -45,7 +44,6 @@ from lib.topolog import logger from lib.common_config import required_linux_kernel_version # Required to instantiate the topology builder class. -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_vrf_netns/test_bgp_vrf_netns_topo.py b/tests/topotests/bgp_vrf_netns/test_bgp_vrf_netns_topo.py index d0011f9df2..8d2cb08ca8 100644 --- a/tests/topotests/bgp_vrf_netns/test_bgp_vrf_netns_topo.py +++ b/tests/topotests/bgp_vrf_netns/test_bgp_vrf_netns_topo.py @@ -42,7 +42,6 @@ from lib.topogen import Topogen, TopoRouter, get_topogen from lib.topolog import logger # Required to instantiate the topology builder class. -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/bgp_vrf_route_leak_basic/test_bgp-vrf-route-leak-basic.py b/tests/topotests/bgp_vrf_route_leak_basic/test_bgp-vrf-route-leak-basic.py index 66a52841fb..e630ef9102 100644 --- a/tests/topotests/bgp_vrf_route_leak_basic/test_bgp-vrf-route-leak-basic.py +++ b/tests/topotests/bgp_vrf_route_leak_basic/test_bgp-vrf-route-leak-basic.py @@ -25,7 +25,6 @@ test_bgp-vrf-route-leak-basic.py.py: Test basic vrf route leaking """ -import json import os import sys from functools import partial @@ -39,7 +38,6 @@ from lib import topotest from lib.topogen import Topogen, TopoRouter, get_topogen from lib.topolog import logger -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd] diff --git a/tests/topotests/config_timing/test_config_timing.py b/tests/topotests/config_timing/test_config_timing.py index b68f52bbda..69b3edcf32 100644 --- a/tests/topotests/config_timing/test_config_timing.py +++ b/tests/topotests/config_timing/test_config_timing.py @@ -45,7 +45,6 @@ sys.path.append(os.path.join(CWD, "../")) # pylint: disable=C0413 from lib.topogen import Topogen, TopoRouter, get_topogen from lib.topolog import logger -from lib.micronet_compat import Topo pytestmark = [pytest.mark.staticd] diff --git a/tests/topotests/eigrp_topo1/test_eigrp_topo1.py b/tests/topotests/eigrp_topo1/test_eigrp_topo1.py index f97b1f2daa..8b7c9fc6d7 100644 --- a/tests/topotests/eigrp_topo1/test_eigrp_topo1.py +++ b/tests/topotests/eigrp_topo1/test_eigrp_topo1.py @@ -46,7 +46,6 @@ from lib.topogen import Topogen, TopoRouter, get_topogen from lib.topolog import logger # Required to instantiate the topology builder class. -from lib.micronet_compat import Topo ##################################################### ## diff --git a/tests/topotests/evpn_pim_1/test_evpn_pim_topo1.py b/tests/topotests/evpn_pim_1/test_evpn_pim_topo1.py index 216494d4e6..6d5c096c0a 100644 --- a/tests/topotests/evpn_pim_1/test_evpn_pim_topo1.py +++ b/tests/topotests/evpn_pim_1/test_evpn_pim_topo1.py @@ -28,7 +28,6 @@ test_evpn_pim_topo1.py: Testing evpn-pim """ import os -import re import sys import pytest import json @@ -47,7 +46,6 @@ from lib.topogen import Topogen, TopoRouter, get_topogen from lib.topolog import logger # Required to instantiate the topology builder class. -from lib.micronet_compat import Topo pytestmark = [pytest.mark.bgpd, pytest.mark.bgpd] diff --git a/tests/topotests/evpn_type5_test_topo1/test_evpn_type5_chaos_topo1.py b/tests/topotests/evpn_type5_test_topo1/test_evpn_type5_chaos_topo1.py index 83c415c0f3..72d1251d25 100644 --- a/tests/topotests/evpn_type5_test_topo1/test_evpn_type5_chaos_topo1.py +++ b/tests/topotests/evpn_type5_test_topo1/test_evpn_type5_chaos_topo1.py @@ -30,14 +30,11 @@ Following tests are covered to test EVPN-Type5 functionality: """ import os -import re import sys -import json import time import pytest import platform from copy import deepcopy -from time import sleep # Save the Current Working Directory to find configuration files. @@ -51,7 +48,6 @@ sys.path.append(os.path.join(CWD, "../lib/")) # Import topogen and topotest helpers from lib.topotest import version_cmp from lib.topogen import Topogen, get_topogen -from lib.micronet_compat import Topo from lib.common_config import ( start_topology, @@ -61,15 +57,11 @@ from lib.common_config import ( reset_config_on_routers, verify_rib, step, - start_router_daemons, create_static_routes, create_vrf_cfg, - create_route_maps, - create_interface_in_kernel, check_router_status, configure_vxlan, configure_brctl, - apply_raw_config, verify_vrf_vni, verify_cli_json, ) @@ -78,12 +70,9 @@ from lib.topolog import logger from lib.bgp import ( verify_bgp_convergence, create_router_bgp, - clear_bgp, - verify_best_path_as_per_bgp_attribute, verify_attributes_for_evpn_routes, - verify_evpn_routes, ) -from lib.topojson import build_topo_from_json, build_config_from_json +from lib.topojson import build_config_from_json pytestmark = [pytest.mark.bgpd, pytest.mark.staticd] diff --git a/tests/topotests/evpn_type5_test_topo1/test_evpn_type5_topo1.py b/tests/topotests/evpn_type5_test_topo1/test_evpn_type5_topo1.py index 3a101b4533..6cce0958a4 100644 --- a/tests/topotests/evpn_type5_test_topo1/test_evpn_type5_topo1.py +++ b/tests/topotests/evpn_type5_test_topo1/test_evpn_type5_topo1.py @@ -34,14 +34,12 @@ Following tests are covered to test EVPN-Type5 functionality: """ import os -import re import sys import json import time import pytest import platform from copy import deepcopy -from time import sleep # Save the Current Working Directory to find configuration files. @@ -55,7 +53,6 @@ sys.path.append(os.path.join(CWD, "../lib/")) # Import topogen and topotest helpers from lib.topotest import version_cmp from lib.topogen import Topogen, get_topogen -from lib.micronet_compat import Topo from lib.common_config import ( start_topology, @@ -66,17 +63,12 @@ from lib.common_config import ( verify_rib, step, create_route_maps, - verify_cli_json, - start_router_daemons, create_static_routes, - stop_router, - start_router, create_vrf_cfg, check_router_status, apply_raw_config, configure_vxlan, configure_brctl, - verify_vrf_vni, create_interface_in_kernel, ) @@ -84,7 +76,6 @@ from lib.topolog import logger from lib.bgp import ( verify_bgp_convergence, create_router_bgp, - clear_bgp, verify_best_path_as_per_bgp_attribute, verify_attributes_for_evpn_routes, verify_evpn_routes, diff --git a/tests/topotests/example_test/test_template.py b/tests/topotests/example_test/test_template.py index 7bd434d756..dfc0bb4a04 100644 --- a/tests/topotests/example_test/test_template.py +++ b/tests/topotests/example_test/test_template.py @@ -26,13 +26,11 @@