summaryrefslogtreecommitdiffstats
path: root/tests/topotests
diff options
context:
space:
mode:
authorChristian Hopps <chopps@labn.net>2021-09-03 14:43:32 +0200
committerChristian Hopps <chopps@labn.net>2021-09-04 15:04:47 +0200
commit4953ca977f3a5de8109ee6353ad07f816ca1774c (patch)
tree447a3e8475b38653269d2cb3e98ec0118c783bf3 /tests/topotests
parenttests: Disable test which fails under micronet (diff)
downloadfrr-4953ca977f3a5de8109ee6353ad07f816ca1774c.tar.xz
frr-4953ca977f3a5de8109ee6353ad07f816ca1774c.zip
tests: cleanup - remove unused imports
Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'tests/topotests')
-rw-r--r--tests/topotests/all_protocol_startup/test_all_protocol_startup.py1
-rwxr-xr-xtests/topotests/analyze.py2
-rw-r--r--tests/topotests/bfd_bgp_cbit_topo3/test_bfd_bgp_cbit_topo3.py1
-rw-r--r--tests/topotests/bfd_isis_topo1/test_bfd_isis_topo1.py2
-rwxr-xr-xtests/topotests/bfd_ospf_topo1/test_bfd_ospf_topo1.py3
-rw-r--r--tests/topotests/bfd_topo3/test_bfd_topo3.py1
-rw-r--r--tests/topotests/bfd_vrf_topo1/test_bfd_vrf_topo1.py1
-rw-r--r--tests/topotests/bgp_aggregate_address_origin/test_bgp_aggregate-address_origin.py3
-rw-r--r--tests/topotests/bgp_aggregate_address_route_map/test_bgp_aggregate-address_route-map.py3
-rw-r--r--tests/topotests/bgp_aggregate_address_topo1/test_bgp_aggregate_address_topo1.py3
-rw-r--r--tests/topotests/bgp_aggregator_zero/test_bgp_aggregator_zero.py3
-rw-r--r--tests/topotests/bgp_as_allow_in/test_bgp_as_allow_in.py2
-rw-r--r--tests/topotests/bgp_as_wide_bgp_identifier/test_bgp_as_wide_bgp_identifier.py3
-rw-r--r--tests/topotests/bgp_aspath_zero/test_bgp_aspath_zero.py3
-rw-r--r--tests/topotests/bgp_auth/test_bgp_auth.py5
-rw-r--r--tests/topotests/bgp_basic_functionality_topo1/test_bgp_basic_functionality.py4
-rw-r--r--tests/topotests/bgp_blackhole_community/test_bgp_blackhole_community.py2
-rw-r--r--tests/topotests/bgp_comm_list_delete/test_bgp_comm-list_delete.py4
-rw-r--r--tests/topotests/bgp_communities_topo1/test_bgp_communities.py5
-rw-r--r--tests/topotests/bgp_communities_topo1/test_bgp_communities_topo2.py7
-rw-r--r--tests/topotests/bgp_community_alias/test_bgp-community-alias.py3
-rw-r--r--tests/topotests/bgp_community_change_update/test_bgp_community_change_update.py2
-rw-r--r--tests/topotests/bgp_conditional_advertisement/test_bgp_conditional_advertisement.py1
-rw-r--r--tests/topotests/bgp_default_afi_safi/test_bgp-default-afi-safi.py4
-rw-r--r--tests/topotests/bgp_default_route/test_bgp_default-originate.py3
-rw-r--r--tests/topotests/bgp_default_route_route_map_match/test_bgp_default-originate_route-map_match.py3
-rw-r--r--tests/topotests/bgp_default_route_route_map_match2/test_bgp_default-originate_route-map_match2.py3
-rw-r--r--tests/topotests/bgp_default_route_route_map_match_set/test_bgp_default-originate_route-map_match_set.py3
-rw-r--r--tests/topotests/bgp_default_route_route_map_set/test_bgp_default-originate_route-map_set.py3
-rw-r--r--tests/topotests/bgp_distance_change/test_bgp_distance_change.py3
-rw-r--r--tests/topotests/bgp_dont_capability_negogiate/test_bgp_dont_capability_negotiate.py2
-rw-r--r--tests/topotests/bgp_ebgp_common_subnet_nexthop_unchanged/test_bgp-ebgp-common-subnet-nexthop-unchanged.py3
-rw-r--r--tests/topotests/bgp_ebgp_requires_policy/test_bgp_ebgp_requires_policy.py2
-rw-r--r--tests/topotests/bgp_ecmp_topo1/test_bgp_ecmp_topo1.py1
-rw-r--r--tests/topotests/bgp_ecmp_topo2/test_ebgp_ecmp_topo2.py4
-rw-r--r--tests/topotests/bgp_ecmp_topo2/test_ibgp_ecmp_topo2.py4
-rw-r--r--tests/topotests/bgp_ecmp_topo3/test_ibgp_ecmp_topo3.py9
-rw-r--r--tests/topotests/bgp_evpn_mh/test_evpn_mh.py3
-rwxr-xr-xtests/topotests/bgp_evpn_overlay_index_gateway/test_bgp_evpn_overlay_index_gateway.py1
-rw-r--r--tests/topotests/bgp_evpn_rt5/test_bgp_evpn.py3
-rwxr-xr-xtests/topotests/bgp_evpn_vxlan_topo1/test_bgp_evpn_vxlan.py2
-rw-r--r--tests/topotests/bgp_features/test_bgp_features.py1
-rw-r--r--tests/topotests/bgp_flowspec/test_bgp_flowspec_topo.py4
-rw-r--r--tests/topotests/bgp_gr_functionality_topo1/test_bgp_gr_functionality_topo1.py10
-rw-r--r--tests/topotests/bgp_gr_functionality_topo2/test_bgp_gr_functionality_topo2.py10
-rw-r--r--tests/topotests/bgp_gshut/test_bgp_gshut.py3
-rw-r--r--tests/topotests/bgp_gshut_topo1/test_ebgp_gshut_topo1.py9
-rw-r--r--tests/topotests/bgp_gshut_topo1/test_ibgp_gshut_topo1.py13
-rw-r--r--tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ebgp_ibgp_nbr.py9
-rw-r--r--tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ebgp_nbr.py15
-rw-r--r--tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ebgp_unnumbered_nbr.py11
-rw-r--r--tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ibgp_nbr.py8
-rw-r--r--tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ibgp_unnumbered_nbr.py8
-rw-r--r--tests/topotests/bgp_ipv6_rtadv/test_bgp_ipv6_rtadv.py1
-rw-r--r--tests/topotests/bgp_l3vpn_to_bgp_direct/customize.py7
-rw-r--r--tests/topotests/bgp_l3vpn_to_bgp_vrf/customize.py6
-rw-r--r--tests/topotests/bgp_large_community/test_bgp_large_community_topo_1.py4
-rw-r--r--tests/topotests/bgp_large_community/test_bgp_large_community_topo_2.py5
-rw-r--r--tests/topotests/bgp_link_bw_ip/test_bgp_linkbw_ip.py2
-rwxr-xr-xtests/topotests/bgp_listen_on_multiple_addresses/test_bgp_listen_on_multiple_addresses.py4
-rw-r--r--tests/topotests/bgp_local_as_private_remove/test_bgp_local_as_private_remove.py3
-rw-r--r--tests/topotests/bgp_lu_topo1/test_bgp_lu.py3
-rw-r--r--tests/topotests/bgp_maximum_prefix_invalid_update/test_bgp_maximum_prefix_invalid_update.py4
-rw-r--r--tests/topotests/bgp_maximum_prefix_out/test_bgp_maximum_prefix_out.py3
-rwxr-xr-xtests/topotests/bgp_minimum_holdtime/test_bgp_minimum_holdtime.py3
-rw-r--r--tests/topotests/bgp_multi_vrf_topo1/test_bgp_multi_vrf_topo1.py6
-rw-r--r--tests/topotests/bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py4
-rw-r--r--tests/topotests/bgp_multiview_topo1/test_bgp_multiview_topo1.py2
-rw-r--r--tests/topotests/bgp_path_attributes_topo1/test_bgp_path_attributes.py14
-rw-r--r--tests/topotests/bgp_peer_group/test_bgp_peer-group.py2
-rwxr-xr-xtests/topotests/bgp_peer_type_multipath_relax/test_bgp_peer-type_multipath-relax.py1
-rw-r--r--tests/topotests/bgp_prefix_list_topo1/test_prefix_lists.py4
-rw-r--r--tests/topotests/bgp_prefix_sid/test_bgp_prefix_sid.py1
-rwxr-xr-xtests/topotests/bgp_prefix_sid2/test_bgp_prefix_sid2.py1
-rw-r--r--tests/topotests/bgp_recursive_route_ebgp_multi_hop/test_bgp_recursive_route_ebgp_multi_hop.py9
-rw-r--r--tests/topotests/bgp_reject_as_sets/test_bgp_reject_as_sets.py3
-rw-r--r--tests/topotests/bgp_rfapi_basic_sanity/customize.py7
-rw-r--r--tests/topotests/bgp_rmap_extcommunity_none/test_bgp_rmap_extcommunity_none.py2
-rw-r--r--tests/topotests/bgp_route_aggregation/test_bgp_aggregation.py9
-rw-r--r--tests/topotests/bgp_route_map/test_route_map_topo1.py16
-rw-r--r--tests/topotests/bgp_route_map/test_route_map_topo2.py6
-rw-r--r--tests/topotests/bgp_rr_ibgp/test_bgp_rr_ibgp_topo1.py2
-rw-r--r--tests/topotests/bgp_sender_as_path_loop_detection/test_bgp_sender-as-path-loop-detection.py3
-rw-r--r--tests/topotests/bgp_set_local_preference_add_subtract/test_bgp_set_local-preference_add_subtract.py3
-rwxr-xr-xtests/topotests/bgp_snmp_mplsl3vpn/test_bgp_snmp_mplsvpn.py6
-rwxr-xr-xtests/topotests/bgp_srv6l3vpn_to_bgp_vrf/test_bgp_srv6l3vpn_to_bgp_vrf.py2
-rw-r--r--tests/topotests/bgp_suppress_fib/test_bgp_suppress_fib.py3
-rw-r--r--tests/topotests/bgp_tcp_mss/test_bgp_tcp_mss.py2
-rw-r--r--tests/topotests/bgp_update_delay/test_bgp_update_delay.py3
-rw-r--r--tests/topotests/bgp_vrf_dynamic_route_leak/test_bgp_vrf_dynamic_route_leak_topo1.py9
-rw-r--r--tests/topotests/bgp_vrf_dynamic_route_leak/test_bgp_vrf_dynamic_route_leak_topo2.py5
-rw-r--r--tests/topotests/bgp_vrf_lite_ipv6_rtadv/test_bgp_vrf_lite_ipv6_rtadv.py2
-rw-r--r--tests/topotests/bgp_vrf_netns/test_bgp_vrf_netns_topo.py1
-rw-r--r--tests/topotests/bgp_vrf_route_leak_basic/test_bgp-vrf-route-leak-basic.py2
-rw-r--r--tests/topotests/config_timing/test_config_timing.py1
-rw-r--r--tests/topotests/eigrp_topo1/test_eigrp_topo1.py1
-rw-r--r--tests/topotests/evpn_pim_1/test_evpn_pim_topo1.py2
-rw-r--r--tests/topotests/evpn_type5_test_topo1/test_evpn_type5_chaos_topo1.py13
-rw-r--r--tests/topotests/evpn_type5_test_topo1/test_evpn_type5_topo1.py9
-rw-r--r--tests/topotests/example_test/test_template.py2
-rwxr-xr-xtests/topotests/example_topojson_test/test_topo_json_multiple_links/test_example_topojson_multiple_links.py2
-rwxr-xr-xtests/topotests/example_topojson_test/test_topo_json_single_link/test_example_topojson.py1
-rwxr-xr-xtests/topotests/example_topojson_test/test_topo_json_single_link_loopback/test_example_topojson.py2
-rwxr-xr-xtests/topotests/isis_lfa_topo1/test_isis_lfa_topo1.py3
-rwxr-xr-xtests/topotests/isis_lsp_bits_topo1/test_isis_lsp_bits_topo1.py4
-rwxr-xr-xtests/topotests/isis_rlfa_topo1/test_isis_rlfa_topo1.py3
-rwxr-xr-xtests/topotests/isis_snmp/test_isis_snmp.py3
-rwxr-xr-xtests/topotests/isis_sr_te_topo1/test_isis_sr_te_topo1.py3
-rw-r--r--tests/topotests/isis_sr_topo1/test_isis_sr_topo1.py2
-rwxr-xr-xtests/topotests/isis_tilfa_topo1/test_isis_tilfa_topo1.py3
-rw-r--r--tests/topotests/isis_topo1/test_isis_topo1.py2
-rw-r--r--tests/topotests/isis_topo1_vrf/test_isis_topo1_vrf.py2
-rw-r--r--tests/topotests/ldp_oc_acl_topo1/test_ldp_oc_acl_topo1.py1
-rw-r--r--tests/topotests/ldp_oc_topo1/test_ldp_oc_topo1.py2
-rw-r--r--tests/topotests/ldp_snmp/test_ldp_snmp_topo1.py3
-rw-r--r--tests/topotests/ldp_sync_isis_topo1/test_ldp_sync_isis_topo1.py2
-rw-r--r--tests/topotests/ldp_sync_ospf_topo1/test_ldp_sync_ospf_topo1.py2
-rw-r--r--tests/topotests/ldp_topo1/test_ldp_topo1.py1
-rw-r--r--tests/topotests/ldp_vpls_topo1/test_ldp_vpls_topo1.py2
-rw-r--r--tests/topotests/lib/bgp.py6
-rw-r--r--tests/topotests/lib/common_config.py5
-rw-r--r--tests/topotests/lib/ltemplate.py1
-rw-r--r--tests/topotests/lib/lutil.py1
-rw-r--r--tests/topotests/lib/micronet.py2
-rw-r--r--tests/topotests/lib/micronet_cli.py5
-rw-r--r--tests/topotests/lib/micronet_compat.py4
-rw-r--r--tests/topotests/lib/ospf.py5
-rw-r--r--tests/topotests/lib/pim.py5
-rw-r--r--tests/topotests/lib/topolog.py4
-rw-r--r--tests/topotests/msdp_mesh_topo1/test_msdp_mesh_topo1.py3
-rwxr-xr-xtests/topotests/msdp_topo1/test_msdp_topo1.py3
-rw-r--r--tests/topotests/multicast_pim_bsm_topo1/test_mcast_pim_bsmp_01.py4
-rw-r--r--tests/topotests/multicast_pim_bsm_topo2/test_mcast_pim_bsmp_02.py15
-rwxr-xr-xtests/topotests/multicast_pim_sm_topo1/test_multicast_pim_sm_topo1.py12
-rwxr-xr-xtests/topotests/multicast_pim_sm_topo2/test_multicast_pim_sm_topo2.py9
-rwxr-xr-xtests/topotests/multicast_pim_sm_topo3/test_multicast_pim_sm_topo3.py14
-rwxr-xr-xtests/topotests/multicast_pim_sm_topo3/test_multicast_pim_sm_topo4.py17
-rwxr-xr-xtests/topotests/multicast_pim_static_rp_topo1/test_multicast_pim_static_rp.py3
-rw-r--r--tests/topotests/nhrp_topo/test_nhrp_topo.py1
-rw-r--r--tests/topotests/ospf6_topo1/test_ospf6_topo1.py3
-rwxr-xr-xtests/topotests/ospf6_topo1_vrf/test_ospf6_topo1_vrf.py3
-rw-r--r--tests/topotests/ospf6_topo2/test_ospf6_topo2.py1
-rw-r--r--tests/topotests/ospf_basic_functionality/test_ospf_asbr_summary_topo1.py4
-rw-r--r--tests/topotests/ospf_basic_functionality/test_ospf_asbr_summary_type7_lsa.py15
-rw-r--r--tests/topotests/ospf_basic_functionality/test_ospf_authentication.py4
-rw-r--r--tests/topotests/ospf_basic_functionality/test_ospf_chaos.py7
-rw-r--r--tests/topotests/ospf_basic_functionality/test_ospf_ecmp.py11
-rw-r--r--tests/topotests/ospf_basic_functionality/test_ospf_ecmp_lan.py15
-rw-r--r--tests/topotests/ospf_basic_functionality/test_ospf_lan.py12
-rw-r--r--tests/topotests/ospf_basic_functionality/test_ospf_nssa.py11
-rw-r--r--tests/topotests/ospf_basic_functionality/test_ospf_p2mp.py15
-rw-r--r--tests/topotests/ospf_basic_functionality/test_ospf_routemaps.py11
-rw-r--r--tests/topotests/ospf_basic_functionality/test_ospf_rte_calc.py5
-rw-r--r--tests/topotests/ospf_basic_functionality/test_ospf_single_area.py10
-rw-r--r--tests/topotests/ospf_dual_stack/test_ospf_dual_stack.py18
-rw-r--r--tests/topotests/ospf_gr_helper/test_ospf_gr_helper.py12
-rwxr-xr-xtests/topotests/ospf_gr_topo1/test_ospf_gr_topo1.py3
-rwxr-xr-xtests/topotests/ospf_sr_te_topo1/test_ospf_sr_te_topo1.py2
-rw-r--r--tests/topotests/ospf_sr_topo1/test_ospf_sr_topo1.py3
-rw-r--r--tests/topotests/ospf_suppress_fa/test_ospf_suppress_fa.py1
-rw-r--r--tests/topotests/ospf_te_topo1/test_ospf_te_topo1.py1
-rw-r--r--tests/topotests/ospf_tilfa_topo1/test_ospf_tilfa_topo1.py3
-rw-r--r--tests/topotests/ospf_topo1/test_ospf_topo1.py1
-rw-r--r--tests/topotests/ospf_topo1_vrf/test_ospf_topo1_vrf.py2
-rw-r--r--tests/topotests/ospf_topo2/test_ospf_topo2.py2
-rw-r--r--tests/topotests/ospfv3_basic_functionality/test_ospfv3_asbr_summary_topo1.py7
-rw-r--r--tests/topotests/ospfv3_basic_functionality/test_ospfv3_ecmp.py14
-rw-r--r--tests/topotests/ospfv3_basic_functionality/test_ospfv3_routemaps.py14
-rw-r--r--tests/topotests/ospfv3_basic_functionality/test_ospfv3_rte_calc.py14
-rw-r--r--tests/topotests/ospfv3_basic_functionality/test_ospfv3_single_area.py15
-rw-r--r--tests/topotests/pbr_topo1/test_pbr_topo1.py2
-rwxr-xr-xtests/topotests/pim_acl/test_pim_acl.py4
-rw-r--r--tests/topotests/pim_basic/test_pim.py1
-rw-r--r--tests/topotests/pim_basic_topo2/test_pim_basic_topo2.py2
-rwxr-xr-xtests/topotests/pim_igmp_vrf/test_pim_vrf.py4
-rw-r--r--tests/topotests/rip_topo1/test_rip_topo1.py1
-rw-r--r--tests/topotests/ripng_topo1/test_ripng_topo1.py2
-rw-r--r--tests/topotests/route_scale/test_route_scale.py1
-rwxr-xr-xtests/topotests/simple_snmp_test/test_simple_snmp.py5
-rwxr-xr-xtests/topotests/srv6_locator/test_srv6_locator.py1
-rw-r--r--tests/topotests/static_routing_with_ebgp/test_static_routes_topo1_ebgp.py5
-rw-r--r--tests/topotests/static_routing_with_ebgp/test_static_routes_topo2_ebgp.py4
-rw-r--r--tests/topotests/static_routing_with_ebgp/test_static_routes_topo3_ebgp.py5
-rw-r--r--tests/topotests/static_routing_with_ebgp/test_static_routes_topo4_ebgp.py5
-rw-r--r--tests/topotests/static_routing_with_ibgp/test_static_routes_topo1_ibgp.py6
-rw-r--r--tests/topotests/static_routing_with_ibgp/test_static_routes_topo2_ibgp.py6
-rw-r--r--tests/topotests/static_routing_with_ibgp/test_static_routes_topo3_ibgp.py7
-rw-r--r--tests/topotests/static_routing_with_ibgp/test_static_routes_topo4_ibgp.py5
-rw-r--r--tests/topotests/zebra_netlink/test_zebra_netlink.py3
-rw-r--r--tests/topotests/zebra_opaque/test_zebra_opaque.py2
-rwxr-xr-xtests/topotests/zebra_seg6_route/test_zebra_seg6_route.py3
-rwxr-xr-xtests/topotests/zebra_seg6local_route/test_zebra_seg6local_route.py3
192 files changed, 75 insertions, 827 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 52526e0c7..d272aab78 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 aea5fae00..09aa22f03 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 29c25bba2..92432669c 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 6a19b1ea4..4c44ca440 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 c82b4b590..09b863174 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 9ed8f5fcb..978593e41 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 06b20c443..acb86ea7f 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 517154987..0d01fa2ad 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 74c9e83ce..df2059456 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 4e82a61e1..d724b586d 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 76eafbce4..6836dc11a 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 5613b75d7..9b789f4ea 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 2f7a9cc58..571e28cf7 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 875ff38d8..63c890f13 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 48ba0cca5..3e5b80f83 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 ee241b653..3de3bcd4d 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 aaa65004f..4f8fc0d67 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 252475616..4db4e37f7 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 be0d87d22..123461caa 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 80bcae631..947efa8f8 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 cc8166029..b95bf7487 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 472a0b955..138512bc6 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 02fcd5445..e9b393ba7 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 4bcf2ebb4..3f4be3da4 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 9da8d0a49..b2d530b42 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 e6298dd78..11eaa7b37 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 8f23cf25b..99528f675 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 728819525..27451ec7b 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 4be98c08f..cc2243a1c 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 9af237986..a7040dbe8 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 6025ad935..f8099492d 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 c0886de85..2e6c3c48a 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 4f33e8124..4a6eaf81a 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 66714fd2f..7b9ef0a50 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 a82ed8ec8..3c0706ed8 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 561ba0edf..cf1b0cfa0 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 66ebe5b58..e57dffee3 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 bad4da116..c9f6d1dc9 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 802d29dba..91e76fd26 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 98411938c..52a6d0c9f 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 d300561e1..c713fb926 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 f2e09fb01..00f5d1fcb 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 05ea944eb..682ff4cee 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 4ee3b9708..56f6e1a3b 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 5fc361f8f..bf5aea1da 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 a08f74d6c..764252d96 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 2bddd9c77..7a19939a5 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 90d285f0f..95578bada 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 04945a94a..e9de3a5e1 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 f09da23bc..b31c8499e 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 5966ffded..bc5c4ddcd 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 9b5e48e08..3ce0293ff 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 5e804df23..a5a8b5fe6 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 04cf0395d..981028ff7 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 f344ee76b..7d7a4bd15 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 91291d89e..8fd344696 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 fb472c449..fa3598ff8 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 a94d20da3..6b62b2c5e 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 799b5f93f..4eec69f7f 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 bc4336b6f..4b4335a01 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 f648e1791..bb2c43d1f 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 6318044ea..894185459 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 66fcd355e..5c34ebf91 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 07d1cb02b..d45f00f69 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 5facdd26e..b1641b3c1 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 ffa1c3fb6..eefb965f8 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 609fdf358..3163fd75a 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 76a06bccd..d32cbeb75 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 f34ecc30a..a2566bd38 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 172426b2c..494f6c68b 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 4cd14367b..8321a5755 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 f046f442e..64093497c 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 49a4049c0..d36bc3123 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 5c85895ed..323c06527 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 918c16e34..e255b4e88 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 271db0a7c..8d1e83498 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 3cf53a184..1a86746e3 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 d2a602f9a..d34ac3cdd 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 <name> 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 007e640f5..1367d77e5 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 ba4456e71..5af7296fc 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 ca05ba45d..eccb2c1bf 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 d40ea2ed8..cf8315f59 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 9d3c3a765..b5c33f359 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 0ef5f61d9..d238cc94e 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 7f58c65ab..3e6e41721 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 60e419ab1..2f2bdbc8e 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 2c14ad9de..5a22fbbc5 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 db90bbd5d..eed0b3437 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 31a887b6c..b3e6ad3a1 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 b2e2250a9..07ba0964d 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 8e3e32fc8..30d05a640 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 5d6a5859c..b70e27315 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 d0011f9df..8d2cb08ca 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 66a52841f..e630ef910 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 b68f52bbd..69b3edcf3 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 f97b1f2da..8b7c9fc6d 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 216494d4e..6d5c096c0 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 83c415c0f..72d1251d2 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 3a101b453..6cce0958a 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 7bd434d75..dfc0bb4a0 100644
--- a/tests/topotests/example_test/test_template.py
+++ b/tests/topotests/example_test/test_template.py
@@ -26,13 +26,11 @@
<template>.py: Test <template>.
"""
-import os
import sys
import pytest
# Import topogen and topotest helpers
from lib.topogen import Topogen, TopoRouter, get_topogen
-from lib.topolog import logger
# TODO: select markers based on daemons used during test
diff --git a/tests/topotests/example_topojson_test/test_topo_json_multiple_links/test_example_topojson_multiple_links.py b/tests/topotests/example_topojson_test/test_topo_json_multiple_links/test_example_topojson_multiple_links.py
index 11b58301d..ce3ae1f4c 100755
--- a/tests/topotests/example_topojson_test/test_topo_json_multiple_links/test_example_topojson_multiple_links.py
+++ b/tests/topotests/example_topojson_test/test_topo_json_multiple_links/test_example_topojson_multiple_links.py
@@ -28,7 +28,6 @@ import os
import sys
import json
import time
-import inspect
import pytest
# Save the Current Working Directory to find configuration files.
@@ -40,7 +39,6 @@ sys.path.append(os.path.join(CWD, "../../"))
from lib.topogen import Topogen, get_topogen
# 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.common_config import (
diff --git a/tests/topotests/example_topojson_test/test_topo_json_single_link/test_example_topojson.py b/tests/topotests/example_topojson_test/test_topo_json_single_link/test_example_topojson.py
index 82cc9bd94..771df9f7a 100755
--- a/tests/topotests/example_topojson_test/test_topo_json_single_link/test_example_topojson.py
+++ b/tests/topotests/example_topojson_test/test_topo_json_single_link/test_example_topojson.py
@@ -39,7 +39,6 @@ sys.path.append(os.path.join(CWD, "../../"))
from lib.topogen import Topogen, get_topogen
# 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.common_config import (
diff --git a/tests/topotests/example_topojson_test/test_topo_json_single_link_loopback/test_example_topojson.py b/tests/topotests/example_topojson_test/test_topo_json_single_link_loopback/test_example_topojson.py
index 9ab9f77f0..2cba65d4d 100755
--- a/tests/topotests/example_topojson_test/test_topo_json_single_link_loopback/test_example_topojson.py
+++ b/tests/topotests/example_topojson_test/test_topo_json_single_link_loopback/test_example_topojson.py
@@ -28,7 +28,6 @@ import os
import sys
import time
import json
-import inspect
import pytest
# Save the Current Working Directory to find configuration files.
@@ -41,7 +40,6 @@ sys.path.append(os.path.join(CWD, "../../"))
from lib.topogen import Topogen, get_topogen
# 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.common_config import (
diff --git a/tests/topotests/isis_lfa_topo1/test_isis_lfa_topo1.py b/tests/topotests/isis_lfa_topo1/test_isis_lfa_topo1.py
index 07391ec2b..7e902213e 100755
--- a/tests/topotests/isis_lfa_topo1/test_isis_lfa_topo1.py
+++ b/tests/topotests/isis_lfa_topo1/test_isis_lfa_topo1.py
@@ -55,9 +55,7 @@ import os
import sys
import pytest
import json
-import re
import tempfile
-from time import sleep
from functools import partial
# Save the Current Working Directory to find configuration files.
@@ -71,7 +69,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.isisd]
diff --git a/tests/topotests/isis_lsp_bits_topo1/test_isis_lsp_bits_topo1.py b/tests/topotests/isis_lsp_bits_topo1/test_isis_lsp_bits_topo1.py
index b86a2cf31..9b4cd9511 100755
--- a/tests/topotests/isis_lsp_bits_topo1/test_isis_lsp_bits_topo1.py
+++ b/tests/topotests/isis_lsp_bits_topo1/test_isis_lsp_bits_topo1.py
@@ -66,9 +66,6 @@ import os
import sys
import pytest
import json
-import re
-import tempfile
-from time import sleep
from functools import partial
# Save the Current Working Directory to find configuration files.
@@ -82,7 +79,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.isisd]
diff --git a/tests/topotests/isis_rlfa_topo1/test_isis_rlfa_topo1.py b/tests/topotests/isis_rlfa_topo1/test_isis_rlfa_topo1.py
index 39a03a3e9..ba0543a82 100755
--- a/tests/topotests/isis_rlfa_topo1/test_isis_rlfa_topo1.py
+++ b/tests/topotests/isis_rlfa_topo1/test_isis_rlfa_topo1.py
@@ -64,9 +64,7 @@ import os
import sys
import pytest
import json
-import re
import tempfile
-from time import sleep
from functools import partial
# Save the Current Working Directory to find configuration files.
@@ -80,7 +78,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.isisd, pytest.mark.ldpd]
diff --git a/tests/topotests/isis_snmp/test_isis_snmp.py b/tests/topotests/isis_snmp/test_isis_snmp.py
index cb8705e5b..206291a85 100755
--- a/tests/topotests/isis_snmp/test_isis_snmp.py
+++ b/tests/topotests/isis_snmp/test_isis_snmp.py
@@ -61,11 +61,9 @@ test_isis_snmp.py:
"""
import os
-import re
import sys
import pytest
import json
-from time import sleep
from functools import partial
# Save the Current Working Directory to find configuration files.
@@ -80,7 +78,6 @@ 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.isisd, pytest.mark.ldpd, pytest.mark.snmp]
diff --git a/tests/topotests/isis_sr_te_topo1/test_isis_sr_te_topo1.py b/tests/topotests/isis_sr_te_topo1/test_isis_sr_te_topo1.py
index c653d5286..fb987ba48 100755
--- a/tests/topotests/isis_sr_te_topo1/test_isis_sr_te_topo1.py
+++ b/tests/topotests/isis_sr_te_topo1/test_isis_sr_te_topo1.py
@@ -79,8 +79,6 @@ import os
import sys
import pytest
import json
-import re
-from time import sleep
from functools import partial
# Save the Current Working Directory to find configuration files.
@@ -94,7 +92,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.isisd, pytest.mark.pathd]
diff --git a/tests/topotests/isis_sr_topo1/test_isis_sr_topo1.py b/tests/topotests/isis_sr_topo1/test_isis_sr_topo1.py
index a8956bb57..40a7b76af 100644
--- a/tests/topotests/isis_sr_topo1/test_isis_sr_topo1.py
+++ b/tests/topotests/isis_sr_topo1/test_isis_sr_topo1.py
@@ -68,7 +68,6 @@ import sys
import pytest
import json
import re
-from time import sleep
from functools import partial
# Save the Current Working Directory to find configuration files.
@@ -82,7 +81,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.isisd]
diff --git a/tests/topotests/isis_tilfa_topo1/test_isis_tilfa_topo1.py b/tests/topotests/isis_tilfa_topo1/test_isis_tilfa_topo1.py
index 37ce25312..07e91f1a4 100755
--- a/tests/topotests/isis_tilfa_topo1/test_isis_tilfa_topo1.py
+++ b/tests/topotests/isis_tilfa_topo1/test_isis_tilfa_topo1.py
@@ -67,9 +67,7 @@ import os
import sys
import pytest
import json
-import re
import tempfile
-from time import sleep
from functools import partial
# Save the Current Working Directory to find configuration files.
@@ -83,7 +81,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.isisd]
diff --git a/tests/topotests/isis_topo1/test_isis_topo1.py b/tests/topotests/isis_topo1/test_isis_topo1.py
index 34bc3830f..a597e3107 100644
--- a/tests/topotests/isis_topo1/test_isis_topo1.py
+++ b/tests/topotests/isis_topo1/test_isis_topo1.py
@@ -32,7 +32,6 @@ import os
import re
import sys
import pytest
-import time
CWD = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.join(CWD, "../"))
@@ -42,7 +41,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.isisd]
diff --git a/tests/topotests/isis_topo1_vrf/test_isis_topo1_vrf.py b/tests/topotests/isis_topo1_vrf/test_isis_topo1_vrf.py
index 620fc333b..59b8666b7 100644
--- a/tests/topotests/isis_topo1_vrf/test_isis_topo1_vrf.py
+++ b/tests/topotests/isis_topo1_vrf/test_isis_topo1_vrf.py
@@ -30,7 +30,6 @@ import os
import re
import sys
import pytest
-import platform
CWD = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.join(CWD, "../"))
@@ -42,7 +41,6 @@ from lib.topolog import logger
from lib.topotest import iproute2_is_vrf_capable
from lib.common_config import required_linux_kernel_version
-from lib.micronet_compat import Topo
pytestmark = [pytest.mark.isisd]
diff --git a/tests/topotests/ldp_oc_acl_topo1/test_ldp_oc_acl_topo1.py b/tests/topotests/ldp_oc_acl_topo1/test_ldp_oc_acl_topo1.py
index 42ba24f78..3608c5a48 100644
--- a/tests/topotests/ldp_oc_acl_topo1/test_ldp_oc_acl_topo1.py
+++ b/tests/topotests/ldp_oc_acl_topo1/test_ldp_oc_acl_topo1.py
@@ -76,7 +76,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.ldpd, pytest.mark.ospfd]
diff --git a/tests/topotests/ldp_oc_topo1/test_ldp_oc_topo1.py b/tests/topotests/ldp_oc_topo1/test_ldp_oc_topo1.py
index 78e231b60..972692691 100644
--- a/tests/topotests/ldp_oc_topo1/test_ldp_oc_topo1.py
+++ b/tests/topotests/ldp_oc_topo1/test_ldp_oc_topo1.py
@@ -62,7 +62,6 @@ import os
import sys
import pytest
import json
-from time import sleep
from functools import partial
# Save the Current Working Directory to find configuration files.
@@ -76,7 +75,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.ldpd, pytest.mark.ospfd]
diff --git a/tests/topotests/ldp_snmp/test_ldp_snmp_topo1.py b/tests/topotests/ldp_snmp/test_ldp_snmp_topo1.py
index a616335d7..13fa90679 100644
--- a/tests/topotests/ldp_snmp/test_ldp_snmp_topo1.py
+++ b/tests/topotests/ldp_snmp/test_ldp_snmp_topo1.py
@@ -60,11 +60,9 @@ ce1-eth0 (172.16.1.1/24)| |ce2-eth0 (172.16.1.2/24)
"""
import os
-import re
import sys
import pytest
import json
-from time import sleep
from functools import partial
# Save the Current Working Directory to find configuration files.
@@ -79,7 +77,6 @@ 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.ldpd, pytest.mark.isisd, pytest.mark.snmp]
diff --git a/tests/topotests/ldp_sync_isis_topo1/test_ldp_sync_isis_topo1.py b/tests/topotests/ldp_sync_isis_topo1/test_ldp_sync_isis_topo1.py
index 37275ed9e..48584f042 100644
--- a/tests/topotests/ldp_sync_isis_topo1/test_ldp_sync_isis_topo1.py
+++ b/tests/topotests/ldp_sync_isis_topo1/test_ldp_sync_isis_topo1.py
@@ -64,7 +64,6 @@ import re
import sys
import pytest
import json
-from time import sleep
from functools import partial
# Save the Current Working Directory to find configuration files.
@@ -78,7 +77,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.isisd, pytest.mark.ldpd]
diff --git a/tests/topotests/ldp_sync_ospf_topo1/test_ldp_sync_ospf_topo1.py b/tests/topotests/ldp_sync_ospf_topo1/test_ldp_sync_ospf_topo1.py
index 5412fa600..dc6e1a767 100644
--- a/tests/topotests/ldp_sync_ospf_topo1/test_ldp_sync_ospf_topo1.py
+++ b/tests/topotests/ldp_sync_ospf_topo1/test_ldp_sync_ospf_topo1.py
@@ -63,7 +63,6 @@ import os
import sys
import pytest
import json
-from time import sleep
from functools import partial
# Save the Current Working Directory to find configuration files.
@@ -77,7 +76,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.ldpd, pytest.mark.ospfd]
diff --git a/tests/topotests/ldp_topo1/test_ldp_topo1.py b/tests/topotests/ldp_topo1/test_ldp_topo1.py
index f6d28b66a..c21d6bf28 100644
--- a/tests/topotests/ldp_topo1/test_ldp_topo1.py
+++ b/tests/topotests/ldp_topo1/test_ldp_topo1.py
@@ -67,7 +67,6 @@ from time import sleep
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from lib import topotest
-from lib.micronet_compat import Topo
from lib.topogen import Topogen, get_topogen
fatal_error = ""
diff --git a/tests/topotests/ldp_vpls_topo1/test_ldp_vpls_topo1.py b/tests/topotests/ldp_vpls_topo1/test_ldp_vpls_topo1.py
index c77c96b17..86128a629 100644
--- a/tests/topotests/ldp_vpls_topo1/test_ldp_vpls_topo1.py
+++ b/tests/topotests/ldp_vpls_topo1/test_ldp_vpls_topo1.py
@@ -64,7 +64,6 @@ import os
import sys
import pytest
import json
-from time import sleep
from functools import partial
# Save the Current Working Directory to find configuration files.
@@ -78,7 +77,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.ldpd, pytest.mark.ospfd]
diff --git a/tests/topotests/lib/bgp.py b/tests/topotests/lib/bgp.py
index 753b24e52..ac834bcf4 100644
--- a/tests/topotests/lib/bgp.py
+++ b/tests/topotests/lib/bgp.py
@@ -19,7 +19,6 @@
#
import ipaddress
-import os
import sys
import traceback
from copy import deepcopy
@@ -31,17 +30,14 @@ from lib.common_config import (
FRRCFG_FILE,
InvalidCLIError,
check_address_types,
- create_common_configuration,
find_interface_with_greater_ip,
generate_ips,
get_frr_ipv6_linklocal,
- get_ipv6_linklocal_address,
- load_config_to_router,
retry,
run_frr_cmd,
validate_ip_address,
)
-from lib.topogen import TopoRouter, get_topogen
+from lib.topogen import get_topogen
from lib.topolog import logger
from lib.topotest import frr_unicode
diff --git a/tests/topotests/lib/common_config.py b/tests/topotests/lib/common_config.py
index a4f2ac805..865f7fd44 100644
--- a/tests/topotests/lib/common_config.py
+++ b/tests/topotests/lib/common_config.py
@@ -22,7 +22,6 @@ import ipaddress
import json
import os
import platform
-import signal
import socket
import subprocess
import sys
@@ -32,17 +31,14 @@ from copy import deepcopy
from datetime import datetime, timedelta
from functools import wraps
from re import search as re_search
-from tempfile import mkdtemp
from time import sleep
try:
# Imports from python2
import ConfigParser as configparser
- from StringIO import StringIO
except ImportError:
# Imports from python3
import configparser
- from io import StringIO
from lib.micronet import comm_error
from lib.topogen import TopoRouter, get_topogen
@@ -211,7 +207,6 @@ def set_seq_id(obj_type, router, id, obj_name):
class InvalidCLIError(Exception):
"""Raise when the CLI command is wrong"""
- pass
def run_frr_cmd(rnode, cmd, isjson=False):
diff --git a/tests/topotests/lib/ltemplate.py b/tests/topotests/lib/ltemplate.py
index ef2eb8cab..7d2ae4d40 100644
--- a/tests/topotests/lib/ltemplate.py
+++ b/tests/topotests/lib/ltemplate.py
@@ -39,7 +39,6 @@ from lib.topolog import logger
from lib.lutil import *
# Required to instantiate the topology builder class.
-from lib.micronet_compat import Topo
customize = None
diff --git a/tests/topotests/lib/lutil.py b/tests/topotests/lib/lutil.py
index c49488ed9..c17c7f14e 100644
--- a/tests/topotests/lib/lutil.py
+++ b/tests/topotests/lib/lutil.py
@@ -20,7 +20,6 @@ import os
import re
import sys
import time
-import datetime
import json
import math
import time
diff --git a/tests/topotests/lib/micronet.py b/tests/topotests/lib/micronet.py
index da6a6915d..0416c53c4 100644
--- a/tests/topotests/lib/micronet.py
+++ b/tests/topotests/lib/micronet.py
@@ -21,9 +21,7 @@
import datetime
import logging
import os
-import pdb
import re
-import readline
import shlex
import subprocess
import sys
diff --git a/tests/topotests/lib/micronet_cli.py b/tests/topotests/lib/micronet_cli.py
index ac45cbd3d..b6cba81d8 100644
--- a/tests/topotests/lib/micronet_cli.py
+++ b/tests/topotests/lib/micronet_cli.py
@@ -19,22 +19,17 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
import argparse
-import datetime
import logging
import os
-import pdb
import pty
import re
import readline
import select
-import shlex
import socket
import subprocess
import sys
import tempfile
import termios
-import time as time_mod
-import traceback
import tty
diff --git a/tests/topotests/lib/micronet_compat.py b/tests/topotests/lib/micronet_compat.py
index ca061c8b2..31a76aca5 100644
--- a/tests/topotests/lib/micronet_compat.py
+++ b/tests/topotests/lib/micronet_compat.py
@@ -18,10 +18,6 @@
# with this program; see the file COPYING; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
-import logging
-import os
-import subprocess
-import traceback
import glob
import logging
diff --git a/tests/topotests/lib/ospf.py b/tests/topotests/lib/ospf.py
index d6f1b0e00..803909f35 100644
--- a/tests/topotests/lib/ospf.py
+++ b/tests/topotests/lib/ospf.py
@@ -20,17 +20,12 @@
import ipaddress
import sys
-import traceback
from copy import deepcopy
-from ipaddress import IPv6Address
-from time import sleep
# Import common_config to use commomnly used APIs
from lib.common_config import (
create_common_configurations,
InvalidCLIError,
- check_address_types,
- create_common_configuration,
generate_ips,
retry,
run_frr_cmd,
diff --git a/tests/topotests/lib/pim.py b/tests/topotests/lib/pim.py
index 2cb4777a9..a165878ca 100644
--- a/tests/topotests/lib/pim.py
+++ b/tests/topotests/lib/pim.py
@@ -19,14 +19,11 @@
import datetime
import os
import re
-import socket
import sys
-import tempfile
import traceback
from copy import deepcopy
from time import sleep
-import pytest
# Import common_config to use commomnly used APIs
from lib.common_config import (
@@ -38,7 +35,7 @@ from lib.common_config import (
retry,
run_frr_cmd,
)
-from lib.micronet import comm_error, get_exec_path
+from lib.micronet import get_exec_path
from lib.topolog import logger
from lib.topotest import frr_unicode
diff --git a/tests/topotests/lib/topolog.py b/tests/topotests/lib/topolog.py
index 06e4fa066..b2251cbef 100644
--- a/tests/topotests/lib/topolog.py
+++ b/tests/topotests/lib/topolog.py
@@ -32,9 +32,9 @@ import subprocess
import sys
if sys.version_info[0] > 2:
- import configparser
+ pass
else:
- import ConfigParser as configparser
+ pass
try:
from xdist import is_xdist_controller
diff --git a/tests/topotests/msdp_mesh_topo1/test_msdp_mesh_topo1.py b/tests/topotests/msdp_mesh_topo1/test_msdp_mesh_topo1.py
index c32800c93..dc08ae1af 100644
--- a/tests/topotests/msdp_mesh_topo1/test_msdp_mesh_topo1.py
+++ b/tests/topotests/msdp_mesh_topo1/test_msdp_mesh_topo1.py
@@ -28,10 +28,8 @@ test_msdp_mesh_topo1.py: Test the FRR PIM MSDP mesh groups.
import os
import sys
-import json
from functools import partial
import pytest
-import socket
# Save the Current Working Directory to find configuration files.
CWD = os.path.dirname(os.path.realpath(__file__))
@@ -41,7 +39,6 @@ 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
diff --git a/tests/topotests/msdp_topo1/test_msdp_topo1.py b/tests/topotests/msdp_topo1/test_msdp_topo1.py
index 93a4f62fc..c30c397ee 100755
--- a/tests/topotests/msdp_topo1/test_msdp_topo1.py
+++ b/tests/topotests/msdp_topo1/test_msdp_topo1.py
@@ -29,8 +29,6 @@ test_msdp_topo1.py: Test the FRR PIM MSDP peer.
import os
import sys
import json
-import socket
-import tempfile
from functools import partial
import pytest
@@ -42,7 +40,6 @@ 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
diff --git a/tests/topotests/multicast_pim_bsm_topo1/test_mcast_pim_bsmp_01.py b/tests/topotests/multicast_pim_bsm_topo1/test_mcast_pim_bsmp_01.py
index b346e3d33..f1b13cbd0 100644
--- a/tests/topotests/multicast_pim_bsm_topo1/test_mcast_pim_bsmp_01.py
+++ b/tests/topotests/multicast_pim_bsm_topo1/test_mcast_pim_bsmp_01.py
@@ -52,7 +52,6 @@ Tests covered in this suite
import os
import sys
-import json
import time
import pytest
@@ -66,7 +65,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.common_config import (
start_topology,
@@ -110,7 +108,7 @@ from lib.pim import (
McastTesterHelper,
)
from lib.topolog import logger
-from lib.topojson import build_topo_from_json, build_config_from_json
+from lib.topojson import build_config_from_json
pytestmark = [pytest.mark.pimd, pytest.mark.staticd]
diff --git a/tests/topotests/multicast_pim_bsm_topo2/test_mcast_pim_bsmp_02.py b/tests/topotests/multicast_pim_bsm_topo2/test_mcast_pim_bsmp_02.py
index 69b105cc4..63701871d 100644
--- a/tests/topotests/multicast_pim_bsm_topo2/test_mcast_pim_bsmp_02.py
+++ b/tests/topotests/multicast_pim_bsm_topo2/test_mcast_pim_bsmp_02.py
@@ -43,7 +43,6 @@ Tests covered in this suite
import os
import sys
-import json
import time
import pytest
@@ -57,7 +56,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.common_config import (
start_topology,
@@ -66,21 +64,13 @@ from lib.common_config import (
step,
addKernelRoute,
create_static_routes,
- stop_router,
- start_router,
- shutdown_bringup_interface,
- kill_router_daemons,
- start_router_daemons,
reset_config_on_routers,
- do_countdown,
- apply_raw_config,
run_frr_cmd,
required_linux_kernel_version,
topo_daemons,
)
from lib.pim import (
- create_pim_config,
add_rp_interfaces_and_pim_config,
reconfig_interfaces,
scapy_send_bsr_raw_packet,
@@ -93,15 +83,12 @@ from lib.pim import (
verify_upstream_iif,
verify_igmp_groups,
verify_ip_pim_upstream_rpf,
- enable_disable_pim_unicast_bsm,
- enable_disable_pim_bsm,
clear_ip_mroute,
clear_ip_pim_interface_traffic,
- verify_pim_interface_traffic,
McastTesterHelper,
)
from lib.topolog import logger
-from lib.topojson import build_topo_from_json, build_config_from_json
+from lib.topojson import build_config_from_json
pytestmark = [pytest.mark.pimd, pytest.mark.staticd]
diff --git a/tests/topotests/multicast_pim_sm_topo1/test_multicast_pim_sm_topo1.py b/tests/topotests/multicast_pim_sm_topo1/test_multicast_pim_sm_topo1.py
index 002a79485..313d5da8d 100755
--- a/tests/topotests/multicast_pim_sm_topo1/test_multicast_pim_sm_topo1.py
+++ b/tests/topotests/multicast_pim_sm_topo1/test_multicast_pim_sm_topo1.py
@@ -51,9 +51,7 @@ Following tests are covered:
import os
import sys
-import json
import time
-import datetime
from time import sleep
import pytest
@@ -69,21 +67,15 @@ 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.common_config import (
start_topology,
write_test_header,
write_test_footer,
step,
- addKernelRoute,
apply_raw_config,
reset_config_on_routers,
shutdown_bringup_interface,
- kill_router_daemons,
- start_router,
- start_router_daemons,
- stop_router,
required_linux_kernel_version,
topo_daemons,
)
@@ -94,8 +86,6 @@ from lib.pim import (
verify_ip_mroutes,
verify_pim_interface_traffic,
verify_upstream_iif,
- verify_pim_neighbors,
- verify_pim_state,
verify_ip_pim_join,
clear_ip_mroute,
clear_ip_pim_interface_traffic,
@@ -104,7 +94,7 @@ from lib.pim import (
McastTesterHelper,
)
from lib.topolog import logger
-from lib.topojson import build_topo_from_json, build_config_from_json
+from lib.topojson import build_config_from_json
pytestmark = [pytest.mark.pimd]
diff --git a/tests/topotests/multicast_pim_sm_topo2/test_multicast_pim_sm_topo2.py b/tests/topotests/multicast_pim_sm_topo2/test_multicast_pim_sm_topo2.py
index c0fa53af1..625839d3c 100755
--- a/tests/topotests/multicast_pim_sm_topo2/test_multicast_pim_sm_topo2.py
+++ b/tests/topotests/multicast_pim_sm_topo2/test_multicast_pim_sm_topo2.py
@@ -47,10 +47,7 @@ Following tests are covered:
import os
import sys
-import json
import time
-import datetime
-from time import sleep
import pytest
pytestmark = pytest.mark.pimd
@@ -65,14 +62,12 @@ 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.common_config import (
start_topology,
write_test_header,
write_test_footer,
step,
- addKernelRoute,
reset_config_on_routers,
shutdown_bringup_interface,
kill_router_daemons,
@@ -91,14 +86,12 @@ from lib.pim import (
verify_upstream_iif,
verify_pim_neighbors,
verify_pim_state,
- verify_ip_pim_join,
clear_ip_mroute,
clear_ip_pim_interface_traffic,
- verify_igmp_config,
McastTesterHelper,
)
from lib.topolog import logger
-from lib.topojson import build_topo_from_json, build_config_from_json
+from lib.topojson import build_config_from_json
pytestmark = [pytest.mark.pimd]
diff --git a/tests/topotests/multicast_pim_sm_topo3/test_multicast_pim_sm_topo3.py b/tests/topotests/multicast_pim_sm_topo3/test_multicast_pim_sm_topo3.py
index 84e274ab2..b0824d2ff 100755
--- a/tests/topotests/multicast_pim_sm_topo3/test_multicast_pim_sm_topo3.py
+++ b/tests/topotests/multicast_pim_sm_topo3/test_multicast_pim_sm_topo3.py
@@ -51,7 +51,6 @@ Following tests are covered:
import os
import re
import sys
-import json
import time
import datetime
import pytest
@@ -74,17 +73,9 @@ from lib.common_config import (
write_test_header,
write_test_footer,
step,
- addKernelRoute,
reset_config_on_routers,
shutdown_bringup_interface,
- kill_router_daemons,
- start_router,
- start_router_daemons,
- stop_router,
apply_raw_config,
- add_interfaces_to_vlan,
- tcpdump_capture_start,
- tcpdump_capture_stop,
check_router_status,
required_linux_kernel_version,
topo_daemons,
@@ -94,22 +85,19 @@ from lib.pim import (
create_igmp_config,
verify_igmp_groups,
verify_ip_mroutes,
- clear_ip_mroute_verify,
clear_ip_mroute,
clear_ip_pim_interface_traffic,
verify_igmp_config,
- verify_pim_neighbors,
verify_pim_config,
verify_pim_interface,
verify_upstream_iif,
verify_multicast_traffic,
verify_pim_rp_info,
- get_refCount_for_mroute,
verify_multicast_flag_state,
McastTesterHelper,
)
from lib.topolog import logger
-from lib.topojson import build_topo_from_json, build_config_from_json
+from lib.topojson import build_config_from_json
CWD = os.path.dirname(os.path.realpath(__file__))
pytestmark = pytest.mark.pimd
diff --git a/tests/topotests/multicast_pim_sm_topo3/test_multicast_pim_sm_topo4.py b/tests/topotests/multicast_pim_sm_topo3/test_multicast_pim_sm_topo4.py
index 275578a5b..5e29a1f1f 100755
--- a/tests/topotests/multicast_pim_sm_topo3/test_multicast_pim_sm_topo4.py
+++ b/tests/topotests/multicast_pim_sm_topo3/test_multicast_pim_sm_topo4.py
@@ -41,12 +41,8 @@ Following tests are covered:
"""
import os
-import re
import sys
-import json
import time
-import datetime
-from time import sleep
import pytest
pytestmark = pytest.mark.pimd
@@ -61,18 +57,14 @@ 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.common_config import (
start_topology,
write_test_header,
write_test_footer,
step,
- addKernelRoute,
reset_config_on_routers,
shutdown_bringup_interface,
- start_router,
- stop_router,
apply_raw_config,
create_static_routes,
required_linux_kernel_version,
@@ -81,23 +73,16 @@ from lib.common_config import (
from lib.pim import (
create_pim_config,
create_igmp_config,
- verify_igmp_groups,
verify_ip_mroutes,
clear_ip_pim_interface_traffic,
- verify_igmp_config,
- verify_pim_neighbors,
- verify_pim_config,
- verify_pim_interface,
verify_upstream_iif,
clear_ip_mroute,
- verify_multicast_traffic,
verify_pim_rp_info,
verify_pim_interface_traffic,
- verify_igmp_interface,
McastTesterHelper,
)
from lib.topolog import logger
-from lib.topojson import build_topo_from_json, build_config_from_json
+from lib.topojson import build_config_from_json
TOPOLOGY = """
diff --git a/tests/topotests/multicast_pim_static_rp_topo1/test_multicast_pim_static_rp.py b/tests/topotests/multicast_pim_static_rp_topo1/test_multicast_pim_static_rp.py
index d599b07a7..cf68dd790 100755
--- a/tests/topotests/multicast_pim_static_rp_topo1/test_multicast_pim_static_rp.py
+++ b/tests/topotests/multicast_pim_static_rp_topo1/test_multicast_pim_static_rp.py
@@ -99,7 +99,6 @@ TC_32 : Verify RP info and (*,G) mroute after deleting the RP and shut / no
import os
import sys
-import json
import time
from time import sleep
import datetime
@@ -114,7 +113,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
from lib.topolog import logger
@@ -126,7 +124,6 @@ from lib.common_config import (
write_test_footer,
reset_config_on_routers,
step,
- addKernelRoute,
shutdown_bringup_interface,
kill_router_daemons,
start_router_daemons,
diff --git a/tests/topotests/nhrp_topo/test_nhrp_topo.py b/tests/topotests/nhrp_topo/test_nhrp_topo.py
index 19be9a8ff..3dc7ef196 100644
--- a/tests/topotests/nhrp_topo/test_nhrp_topo.py
+++ b/tests/topotests/nhrp_topo/test_nhrp_topo.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.nhrpd]
diff --git a/tests/topotests/ospf6_topo1/test_ospf6_topo1.py b/tests/topotests/ospf6_topo1/test_ospf6_topo1.py
index 1bc994aaa..99379354f 100644
--- a/tests/topotests/ospf6_topo1/test_ospf6_topo1.py
+++ b/tests/topotests/ospf6_topo1/test_ospf6_topo1.py
@@ -74,11 +74,9 @@ import os
import re
import sys
import pytest
-from time import sleep
from functools import partial
-from lib.micronet_compat import Topo
# Save the Current Working Directory to find configuration files later.
CWD = os.path.dirname(os.path.realpath(__file__))
@@ -89,7 +87,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
-import platform
pytestmark = [pytest.mark.ospfd]
diff --git a/tests/topotests/ospf6_topo1_vrf/test_ospf6_topo1_vrf.py b/tests/topotests/ospf6_topo1_vrf/test_ospf6_topo1_vrf.py
index 174cecfef..2bc8e2157 100755
--- a/tests/topotests/ospf6_topo1_vrf/test_ospf6_topo1_vrf.py
+++ b/tests/topotests/ospf6_topo1_vrf/test_ospf6_topo1_vrf.py
@@ -75,12 +75,9 @@ import os
import re
import sys
import pytest
-import platform
-from time import sleep
from functools import partial
-from lib.micronet_compat import Topo
# Save the Current Working Directory to find configuration files later.
CWD = os.path.dirname(os.path.realpath(__file__))
diff --git a/tests/topotests/ospf6_topo2/test_ospf6_topo2.py b/tests/topotests/ospf6_topo2/test_ospf6_topo2.py
index c1ff243fd..6f7daf533 100644
--- a/tests/topotests/ospf6_topo2/test_ospf6_topo2.py
+++ b/tests/topotests/ospf6_topo2/test_ospf6_topo2.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.ospf6d]
diff --git a/tests/topotests/ospf_basic_functionality/test_ospf_asbr_summary_topo1.py b/tests/topotests/ospf_basic_functionality/test_ospf_asbr_summary_topo1.py
index dfcbf7bcb..64dfa0c69 100644
--- a/tests/topotests/ospf_basic_functionality/test_ospf_asbr_summary_topo1.py
+++ b/tests/topotests/ospf_basic_functionality/test_ospf_asbr_summary_topo1.py
@@ -26,7 +26,6 @@ import os
import sys
import time
import pytest
-import json
# Save the Current Working Directory to find configuration files.
CWD = os.path.dirname(os.path.realpath(__file__))
@@ -35,7 +34,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 ipaddress
from time import sleep
@@ -61,7 +59,7 @@ from lib.common_config import (
create_interfaces_cfg,
)
from lib.topolog import logger
-from lib.topojson import build_topo_from_json, build_config_from_json
+from lib.topojson import build_config_from_json
from lib.ospf import (
verify_ospf_neighbor,
clear_ospf,
diff --git a/tests/topotests/ospf_basic_functionality/test_ospf_asbr_summary_type7_lsa.py b/tests/topotests/ospf_basic_functionality/test_ospf_asbr_summary_type7_lsa.py
index a4a946f2e..e63f59e84 100644
--- a/tests/topotests/ospf_basic_functionality/test_ospf_asbr_summary_type7_lsa.py
+++ b/tests/topotests/ospf_basic_functionality/test_ospf_asbr_summary_type7_lsa.py
@@ -26,7 +26,6 @@ import os
import sys
import time
import pytest
-import json
# Save the Current Working Directory to find configuration files.
CWD = os.path.dirname(os.path.realpath(__file__))
@@ -35,36 +34,24 @@ 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 ipaddress
from time import sleep
# Import topoJson from lib, to create topology and initial configuration
from lib.common_config import (
start_topology,
write_test_header,
- kill_router_daemons,
write_test_footer,
reset_config_on_routers,
- stop_router,
- start_router,
verify_rib,
create_static_routes,
step,
- start_router_daemons,
- create_route_maps,
- shutdown_bringup_interface,
topo_daemons,
- create_prefix_lists,
- create_route_maps,
- create_interfaces_cfg,
)
from lib.topolog import logger
-from lib.topojson import build_topo_from_json, build_config_from_json
+from lib.topojson import build_config_from_json
from lib.ospf import (
verify_ospf_neighbor,
- clear_ospf,
verify_ospf_rib,
create_router_ospf,
verify_ospf_summary,
diff --git a/tests/topotests/ospf_basic_functionality/test_ospf_authentication.py b/tests/topotests/ospf_basic_functionality/test_ospf_authentication.py
index 0ddd7d517..030b77c60 100644
--- a/tests/topotests/ospf_basic_functionality/test_ospf_authentication.py
+++ b/tests/topotests/ospf_basic_functionality/test_ospf_authentication.py
@@ -28,7 +28,6 @@ import time
import pytest
from time import sleep
from copy import deepcopy
-import json
from lib.topotest import frr_unicode
# Save the Current Working Directory to find configuration files.
@@ -38,7 +37,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
@@ -52,7 +50,7 @@ from lib.common_config import (
topo_daemons,
)
from lib.topolog import logger
-from lib.topojson import build_topo_from_json, build_config_from_json
+from lib.topojson import build_config_from_json
from lib.ospf import verify_ospf_neighbor, config_ospf_interface, clear_ospf
from ipaddress import IPv4Address
diff --git a/tests/topotests/ospf_basic_functionality/test_ospf_chaos.py b/tests/topotests/ospf_basic_functionality/test_ospf_chaos.py
index eade677ca..a5c92023b 100644
--- a/tests/topotests/ospf_basic_functionality/test_ospf_chaos.py
+++ b/tests/topotests/ospf_basic_functionality/test_ospf_chaos.py
@@ -26,8 +26,6 @@ import os
import sys
import time
import pytest
-from copy import deepcopy
-import json
# Save the Current Working Directory to find configuration files.
CWD = os.path.dirname(os.path.realpath(__file__))
@@ -36,7 +34,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
@@ -46,7 +43,6 @@ from lib.common_config import (
write_test_footer,
reset_config_on_routers,
step,
- shutdown_bringup_interface,
topo_daemons,
verify_rib,
stop_router,
@@ -59,8 +55,7 @@ from lib.common_config import (
from lib.ospf import verify_ospf_neighbor, verify_ospf_rib, create_router_ospf
from lib.topolog import logger
-from lib.topojson import build_topo_from_json, build_config_from_json
-from ipaddress import IPv4Address
+from lib.topojson import build_config_from_json
pytestmark = [pytest.mark.ospfd, pytest.mark.staticd]
diff --git a/tests/topotests/ospf_basic_functionality/test_ospf_ecmp.py b/tests/topotests/ospf_basic_functionality/test_ospf_ecmp.py
index 6c8571fa9..a578272e2 100644
--- a/tests/topotests/ospf_basic_functionality/test_ospf_ecmp.py
+++ b/tests/topotests/ospf_basic_functionality/test_ospf_ecmp.py
@@ -26,9 +26,7 @@ import os
import sys
import time
import pytest
-import json
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__))
@@ -37,9 +35,7 @@ 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
-from ipaddress import IPv4Address
# Import topoJson from lib, to create topology and initial configuration
from lib.common_config import (
@@ -50,21 +46,16 @@ from lib.common_config import (
verify_rib,
create_static_routes,
step,
- create_route_maps,
shutdown_bringup_interface,
- create_interfaces_cfg,
topo_daemons,
)
from lib.topolog import logger
-from lib.topojson import build_topo_from_json, build_config_from_json
+from lib.topojson import build_config_from_json
from lib.ospf import (
verify_ospf_neighbor,
config_ospf_interface,
- clear_ospf,
verify_ospf_rib,
- create_router_ospf,
- verify_ospf_interface,
redistribute_ospf,
)
diff --git a/tests/topotests/ospf_basic_functionality/test_ospf_ecmp_lan.py b/tests/topotests/ospf_basic_functionality/test_ospf_ecmp_lan.py
index 9ca46082d..4a5660f42 100644
--- a/tests/topotests/ospf_basic_functionality/test_ospf_ecmp_lan.py
+++ b/tests/topotests/ospf_basic_functionality/test_ospf_ecmp_lan.py
@@ -26,7 +26,6 @@ import os
import sys
import time
import pytest
-import json
# Save the Current Working Directory to find configuration files.
CWD = os.path.dirname(os.path.realpath(__file__))
@@ -35,40 +34,28 @@ 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
from lib.common_config import (
start_topology,
write_test_header,
- create_interfaces_cfg,
write_test_footer,
reset_config_on_routers,
verify_rib,
create_static_routes,
- check_address_types,
step,
- create_route_maps,
- shutdown_bringup_interface,
- stop_router,
- start_router,
topo_daemons,
)
-from lib.bgp import verify_bgp_convergence, create_router_bgp
from lib.topolog import logger
-from lib.topojson import build_topo_from_json, build_config_from_json
+from lib.topojson import build_config_from_json
from lib.ospf import (
verify_ospf_neighbor,
- config_ospf_interface,
clear_ospf,
verify_ospf_rib,
- create_router_ospf,
- verify_ospf_interface,
redistribute_ospf,
)
-from ipaddress import IPv4Address
pytestmark = [pytest.mark.ospfd, pytest.mark.staticd]
diff --git a/tests/topotests/ospf_basic_functionality/test_ospf_lan.py b/tests/topotests/ospf_basic_functionality/test_ospf_lan.py
index d85267a36..b80da41be 100644
--- a/tests/topotests/ospf_basic_functionality/test_ospf_lan.py
+++ b/tests/topotests/ospf_basic_functionality/test_ospf_lan.py
@@ -26,9 +26,7 @@ import os
import sys
import time
import pytest
-import json
from copy import deepcopy
-import ipaddress
from lib.topotest import frr_unicode
# Save the Current Working Directory to find configuration files.
@@ -38,7 +36,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
@@ -48,24 +45,17 @@ from lib.common_config import (
create_interfaces_cfg,
write_test_footer,
reset_config_on_routers,
- verify_rib,
- create_static_routes,
- check_address_types,
step,
- create_route_maps,
shutdown_bringup_interface,
stop_router,
start_router,
topo_daemons,
)
-from lib.bgp import verify_bgp_convergence, create_router_bgp
from lib.topolog import logger
-from lib.topojson import build_topo_from_json, build_config_from_json
+from lib.topojson import build_config_from_json
from lib.ospf import (
verify_ospf_neighbor,
- config_ospf_interface,
clear_ospf,
- verify_ospf_rib,
create_router_ospf,
verify_ospf_interface,
)
diff --git a/tests/topotests/ospf_basic_functionality/test_ospf_nssa.py b/tests/topotests/ospf_basic_functionality/test_ospf_nssa.py
index 1c2b9a9dd..aa34208ac 100644
--- a/tests/topotests/ospf_basic_functionality/test_ospf_nssa.py
+++ b/tests/topotests/ospf_basic_functionality/test_ospf_nssa.py
@@ -25,14 +25,11 @@
import ipaddress
from lib.ospf import (
verify_ospf_neighbor,
- config_ospf_interface,
- clear_ospf,
verify_ospf_rib,
create_router_ospf,
- verify_ospf_interface,
redistribute_ospf,
)
-from lib.topojson import build_topo_from_json, build_config_from_json
+from lib.topojson import build_config_from_json
from lib.topolog import logger
from lib.common_config import (
start_topology,
@@ -42,19 +39,13 @@ from lib.common_config import (
verify_rib,
create_static_routes,
step,
- create_route_maps,
- shutdown_bringup_interface,
- create_interfaces_cfg,
topo_daemons,
)
-from ipaddress import IPv4Address
from lib.topogen import Topogen, get_topogen
-from lib.micronet_compat import Topo
import os
import sys
import time
import pytest
-import json
# Save the Current Working Directory to find configuration files.
CWD = os.path.dirname(os.path.realpath(__file__))
diff --git a/tests/topotests/ospf_basic_functionality/test_ospf_p2mp.py b/tests/topotests/ospf_basic_functionality/test_ospf_p2mp.py
index 43e93e98c..7c09e71ef 100644
--- a/tests/topotests/ospf_basic_functionality/test_ospf_p2mp.py
+++ b/tests/topotests/ospf_basic_functionality/test_ospf_p2mp.py
@@ -26,7 +26,6 @@ import os
import sys
import time
import pytest
-import json
from copy import deepcopy
from ipaddress import IPv4Address
@@ -37,9 +36,7 @@ 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 ipaddress
# Import topoJson from lib, to create topology and initial configuration
from lib.common_config import (
@@ -47,26 +44,16 @@ from lib.common_config import (
write_test_header,
write_test_footer,
reset_config_on_routers,
- verify_rib,
- create_static_routes,
step,
- create_route_maps,
- shutdown_bringup_interface,
create_interfaces_cfg,
topo_daemons,
)
from lib.topolog import logger
-from lib.topojson import build_topo_from_json, build_config_from_json
+from lib.topojson import build_config_from_json
from lib.topotest import frr_unicode
from lib.ospf import (
- verify_ospf_neighbor,
- config_ospf_interface,
- clear_ospf,
- verify_ospf_rib,
- create_router_ospf,
verify_ospf_interface,
- verify_ospf_database,
)
diff --git a/tests/topotests/ospf_basic_functionality/test_ospf_routemaps.py b/tests/topotests/ospf_basic_functionality/test_ospf_routemaps.py
index 5620ce60a..621c3e50d 100644
--- a/tests/topotests/ospf_basic_functionality/test_ospf_routemaps.py
+++ b/tests/topotests/ospf_basic_functionality/test_ospf_routemaps.py
@@ -26,8 +26,6 @@ import os
import sys
import time
import pytest
-import json
-from copy import deepcopy
# Save the Current Working Directory to find configuration files.
CWD = os.path.dirname(os.path.realpath(__file__))
@@ -36,7 +34,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
@@ -48,21 +45,17 @@ from lib.common_config import (
create_prefix_lists,
verify_rib,
create_static_routes,
- check_address_types,
step,
create_route_maps,
verify_prefix_lists,
- topo_daemons,
- shutdown_bringup_interface
+ topo_daemons
)
from lib.topolog import logger
-from lib.topojson import build_topo_from_json, build_config_from_json
+from lib.topojson import build_config_from_json
from lib.ospf import (
verify_ospf_neighbor,
- clear_ospf,
verify_ospf_rib,
create_router_ospf,
- verify_ospf_database,
redistribute_ospf,
)
diff --git a/tests/topotests/ospf_basic_functionality/test_ospf_rte_calc.py b/tests/topotests/ospf_basic_functionality/test_ospf_rte_calc.py
index d89864ac4..fb96054db 100644
--- a/tests/topotests/ospf_basic_functionality/test_ospf_rte_calc.py
+++ b/tests/topotests/ospf_basic_functionality/test_ospf_rte_calc.py
@@ -27,7 +27,6 @@ import sys
import time
import pytest
import ipaddress
-import json
# Save the Current Working Directory to find configuration files.
CWD = os.path.dirname(os.path.realpath(__file__))
@@ -36,7 +35,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
@@ -54,13 +52,12 @@ from lib.common_config import (
)
from lib.bgp import verify_bgp_convergence, create_router_bgp
from lib.topolog import logger
-from lib.topojson import build_topo_from_json, build_config_from_json
+from lib.topojson import build_config_from_json
from lib.ospf import (
verify_ospf_neighbor,
clear_ospf,
verify_ospf_rib,
- create_router_ospf,
redistribute_ospf,
config_ospf_interface,
verify_ospf_interface,
diff --git a/tests/topotests/ospf_basic_functionality/test_ospf_single_area.py b/tests/topotests/ospf_basic_functionality/test_ospf_single_area.py
index 4bbc9099d..73193582a 100644
--- a/tests/topotests/ospf_basic_functionality/test_ospf_single_area.py
+++ b/tests/topotests/ospf_basic_functionality/test_ospf_single_area.py
@@ -26,7 +26,6 @@ import os
import sys
import time
import pytest
-import json
from copy import deepcopy
from ipaddress import IPv4Address
from lib.topotest import frr_unicode
@@ -38,7 +37,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 ipaddress
@@ -48,25 +46,19 @@ from lib.common_config import (
write_test_header,
write_test_footer,
reset_config_on_routers,
- verify_rib,
- create_static_routes,
step,
- create_route_maps,
- shutdown_bringup_interface,
create_interfaces_cfg,
topo_daemons,
)
from lib.topolog import logger
-from lib.topojson import build_topo_from_json, build_config_from_json
+from lib.topojson import build_config_from_json
from lib.ospf import (
verify_ospf_neighbor,
config_ospf_interface,
clear_ospf,
verify_ospf_rib,
- create_router_ospf,
verify_ospf_interface,
- verify_ospf_database,
)
pytestmark = [pytest.mark.ospfd, pytest.mark.staticd]
diff --git a/tests/topotests/ospf_dual_stack/test_ospf_dual_stack.py b/tests/topotests/ospf_dual_stack/test_ospf_dual_stack.py
index fda9892f2..2ea697ea7 100644
--- a/tests/topotests/ospf_dual_stack/test_ospf_dual_stack.py
+++ b/tests/topotests/ospf_dual_stack/test_ospf_dual_stack.py
@@ -4,13 +4,11 @@ import os
import sys
import time
import pytest
-import json
CWD = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.join(CWD, "../"))
sys.path.append(os.path.join(CWD, "../lib/"))
-from lib.micronet_compat import Topo
from lib.topogen import Topogen, get_topogen
from lib.common_config import (
@@ -18,28 +16,14 @@ from lib.common_config import (
write_test_header,
write_test_footer,
reset_config_on_routers,
- stop_router,
- start_router,
- verify_rib,
- create_static_routes,
step,
- start_router_daemons,
- shutdown_bringup_interface,
topo_daemons,
- create_prefix_lists,
- create_interfaces_cfg,
- run_frr_cmd,
)
from lib.topolog import logger
-from lib.topojson import build_topo_from_json, build_config_from_json
+from lib.topojson import build_config_from_json
from lib.ospf import (
verify_ospf_neighbor,
verify_ospf6_neighbor,
- create_router_ospf,
- create_router_ospf6,
- verify_ospf_summary,
- redistribute_ospf,
- verify_ospf_database,
)
pytestmark = [pytest.mark.ospfd, pytest.mark.staticd]
diff --git a/tests/topotests/ospf_gr_helper/test_ospf_gr_helper.py b/tests/topotests/ospf_gr_helper/test_ospf_gr_helper.py
index 6e3147bd0..d0c918d6b 100644
--- a/tests/topotests/ospf_gr_helper/test_ospf_gr_helper.py
+++ b/tests/topotests/ospf_gr_helper/test_ospf_gr_helper.py
@@ -26,10 +26,6 @@ import os
import sys
import time
import pytest
-import json
-from time import sleep
-from copy import deepcopy
-import ipaddress
# Save the Current Working Directory to find configuration files.
CWD = os.path.dirname(os.path.realpath(__file__))
@@ -45,26 +41,20 @@ from lib.common_config import (
write_test_header,
write_test_footer,
reset_config_on_routers,
- verify_rib,
- create_static_routes,
step,
- create_route_maps,
- shutdown_bringup_interface,
create_interfaces_cfg,
topo_daemons,
scapy_send_raw_packet
)
from lib.topolog import logger
-from lib.topojson import build_topo_from_json, build_config_from_json
+from lib.topojson import build_config_from_json
from lib.ospf import (
verify_ospf_neighbor,
clear_ospf,
verify_ospf_gr_helper,
create_router_ospf,
- verify_ospf_interface,
- verify_ospf_database,
)
# Global variables
diff --git a/tests/topotests/ospf_gr_topo1/test_ospf_gr_topo1.py b/tests/topotests/ospf_gr_topo1/test_ospf_gr_topo1.py
index 0a6e1ea2f..7d9cc6841 100755
--- a/tests/topotests/ospf_gr_topo1/test_ospf_gr_topo1.py
+++ b/tests/topotests/ospf_gr_topo1/test_ospf_gr_topo1.py
@@ -72,8 +72,6 @@ import os
import sys
import pytest
import json
-import re
-import tempfile
from time import sleep
from functools import partial
@@ -92,7 +90,6 @@ from lib.common_config import (
)
# Required to instantiate the topology builder class.
-from lib.micronet_compat import Topo
pytestmark = [pytest.mark.ospfd]
diff --git a/tests/topotests/ospf_sr_te_topo1/test_ospf_sr_te_topo1.py b/tests/topotests/ospf_sr_te_topo1/test_ospf_sr_te_topo1.py
index cf8914111..f061c51b4 100755
--- a/tests/topotests/ospf_sr_te_topo1/test_ospf_sr_te_topo1.py
+++ b/tests/topotests/ospf_sr_te_topo1/test_ospf_sr_te_topo1.py
@@ -78,7 +78,6 @@ import os
import sys
import pytest
import json
-import re
from time import sleep
from functools import partial
@@ -93,7 +92,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, pytest.mark.pathd]
diff --git a/tests/topotests/ospf_sr_topo1/test_ospf_sr_topo1.py b/tests/topotests/ospf_sr_topo1/test_ospf_sr_topo1.py
index 60c87cbb5..96e37fdcc 100644
--- a/tests/topotests/ospf_sr_topo1/test_ospf_sr_topo1.py
+++ b/tests/topotests/ospf_sr_topo1/test_ospf_sr_topo1.py
@@ -67,8 +67,6 @@ import os
import sys
import pytest
import json
-import re
-from time import sleep
from functools import partial
# Save the Current Working Directory to find configuration files.
@@ -82,7 +80,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.ospfd]
diff --git a/tests/topotests/ospf_suppress_fa/test_ospf_suppress_fa.py b/tests/topotests/ospf_suppress_fa/test_ospf_suppress_fa.py
index 2dcdcba58..56c8db7f5 100644
--- a/tests/topotests/ospf_suppress_fa/test_ospf_suppress_fa.py
+++ b/tests/topotests/ospf_suppress_fa/test_ospf_suppress_fa.py
@@ -48,7 +48,6 @@ from lib import topotest
from lib.topogen import Topogen, TopoRouter, get_topogen
# Required to instantiate the topology builder class.
-from lib.micronet_compat import Topo
pytestmark = [pytest.mark.ospfd]
diff --git a/tests/topotests/ospf_te_topo1/test_ospf_te_topo1.py b/tests/topotests/ospf_te_topo1/test_ospf_te_topo1.py
index a8bb2f699..7de23dc34 100644
--- a/tests/topotests/ospf_te_topo1/test_ospf_te_topo1.py
+++ b/tests/topotests/ospf_te_topo1/test_ospf_te_topo1.py
@@ -67,7 +67,6 @@ sys.path.append(os.path.join(CWD, "../"))
# pylint: disable=C0413
# Required to instantiate the topology builder class.
-from lib.micronet_compat import Topo
# Import topogen and topotest helpers
from lib import topotest
diff --git a/tests/topotests/ospf_tilfa_topo1/test_ospf_tilfa_topo1.py b/tests/topotests/ospf_tilfa_topo1/test_ospf_tilfa_topo1.py
index 97ccdbf37..696cb90d0 100644
--- a/tests/topotests/ospf_tilfa_topo1/test_ospf_tilfa_topo1.py
+++ b/tests/topotests/ospf_tilfa_topo1/test_ospf_tilfa_topo1.py
@@ -54,8 +54,6 @@ import os
import sys
import pytest
import json
-import re
-from time import sleep
from functools import partial
# Save the Current Working Directory to find configuration files.
@@ -69,7 +67,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.ospfd]
diff --git a/tests/topotests/ospf_topo1/test_ospf_topo1.py b/tests/topotests/ospf_topo1/test_ospf_topo1.py
index 175b75f90..d84c41bea 100644
--- a/tests/topotests/ospf_topo1/test_ospf_topo1.py
+++ b/tests/topotests/ospf_topo1/test_ospf_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.ospfd]
diff --git a/tests/topotests/ospf_topo1_vrf/test_ospf_topo1_vrf.py b/tests/topotests/ospf_topo1_vrf/test_ospf_topo1_vrf.py
index c83c91668..44de61d82 100644
--- a/tests/topotests/ospf_topo1_vrf/test_ospf_topo1_vrf.py
+++ b/tests/topotests/ospf_topo1_vrf/test_ospf_topo1_vrf.py
@@ -27,7 +27,6 @@ test_ospf_topo1.py: Test the FRR OSPF routing daemon.
"""
import os
-import re
import sys
from functools import partial
import pytest
@@ -43,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.ospfd]
diff --git a/tests/topotests/ospf_topo2/test_ospf_topo2.py b/tests/topotests/ospf_topo2/test_ospf_topo2.py
index 696396d68..2b06ce857 100644
--- a/tests/topotests/ospf_topo2/test_ospf_topo2.py
+++ b/tests/topotests/ospf_topo2/test_ospf_topo2.py
@@ -27,7 +27,6 @@ test_ospf_topo2.py: Test the OSPF unnumbered.
"""
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.ospfd]
diff --git a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_asbr_summary_topo1.py b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_asbr_summary_topo1.py
index f2158c36e..49f1f7ea5 100644
--- a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_asbr_summary_topo1.py
+++ b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_asbr_summary_topo1.py
@@ -26,10 +26,6 @@ import os
import sys
import time
import pytest
-import json
-from copy import deepcopy
-from ipaddress import IPv4Address
-from lib.topotest import frr_unicode
# Save the Current Working Directory to find configuration files.
CWD = os.path.dirname(os.path.realpath(__file__))
@@ -59,11 +55,10 @@ from lib.common_config import (
shutdown_bringup_interface,
create_prefix_lists,
create_route_maps,
- create_interfaces_cfg,
topo_daemons,
)
from lib.topolog import logger
-from lib.topojson import build_topo_from_json, build_config_from_json
+from lib.topojson import build_config_from_json
from lib.ospf import (
verify_ospf6_neighbor,
clear_ospf,
diff --git a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_ecmp.py b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_ecmp.py
index 50f05a2ec..9353cd923 100644
--- a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_ecmp.py
+++ b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_ecmp.py
@@ -26,10 +26,6 @@ import os
import sys
import time
import pytest
-import json
-from copy import deepcopy
-from ipaddress import IPv4Address
-from lib.topotest import frr_unicode
# Save the Current Working Directory to find configuration files.
CWD = os.path.dirname(os.path.realpath(__file__))
@@ -39,7 +35,6 @@ sys.path.append(os.path.join(CWD, "../lib/"))
# pylint: disable=C0413
# Import topogen and topotest helpers
from lib.topogen import Topogen, get_topogen
-import ipaddress
# Import topoJson from lib, to create topology and initial configuration
from lib.common_config import (
@@ -50,27 +45,20 @@ from lib.common_config import (
verify_rib,
create_static_routes,
step,
- create_route_maps,
shutdown_bringup_interface,
- create_interfaces_cfg,
topo_daemons,
get_frr_ipv6_linklocal,
)
from lib.topolog import logger
-from lib.topojson import build_topo_from_json, build_config_from_json
+from lib.topojson import build_config_from_json
from lib.ospf import (
verify_ospf6_neighbor,
- config_ospf_interface,
- clear_ospf,
verify_ospf6_rib,
create_router_ospf,
- verify_ospf6_interface,
- verify_ospf6_database,
config_ospf6_interface,
)
-from ipaddress import IPv6Address
pytestmark = [pytest.mark.ospfd, pytest.mark.staticd]
diff --git a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_routemaps.py b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_routemaps.py
index 9d944f4d9..461efbe97 100644
--- a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_routemaps.py
+++ b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_routemaps.py
@@ -26,10 +26,6 @@ import os
import sys
import time
import pytest
-import json
-from copy import deepcopy
-from ipaddress import IPv4Address
-from lib.topotest import frr_unicode
# Save the Current Working Directory to find configuration files.
CWD = os.path.dirname(os.path.realpath(__file__))
@@ -39,7 +35,6 @@ sys.path.append(os.path.join(CWD, "../lib/"))
# pylint: disable=C0413
# Import topogen and topotest helpers
from lib.topogen import Topogen, get_topogen
-import ipaddress
# Import topoJson from lib, to create topology and initial configuration
from lib.common_config import (
@@ -53,24 +48,17 @@ from lib.common_config import (
step,
create_route_maps,
verify_prefix_lists,
- get_frr_ipv6_linklocal,
topo_daemons,
)
from lib.topolog import logger
-from lib.topojson import build_topo_from_json, build_config_from_json
+from lib.topojson import build_config_from_json
from lib.ospf import (
verify_ospf6_neighbor,
- config_ospf_interface,
- clear_ospf,
verify_ospf6_rib,
create_router_ospf,
- verify_ospf6_interface,
- verify_ospf6_database,
- config_ospf6_interface,
)
-from ipaddress import IPv6Address
pytestmark = [pytest.mark.ospfd, pytest.mark.staticd]
diff --git a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_rte_calc.py b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_rte_calc.py
index f4dc8dc09..d8f659e5a 100644
--- a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_rte_calc.py
+++ b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_rte_calc.py
@@ -25,10 +25,6 @@ import os
import sys
import time
import pytest
-import json
-from copy import deepcopy
-from ipaddress import IPv4Address
-from lib.topotest import frr_unicode
# Save the Current Working Directory to find configuration files.
CWD = os.path.dirname(os.path.realpath(__file__))
@@ -37,10 +33,8 @@ 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 ipaddress
-from lib.bgp import verify_bgp_convergence, create_router_bgp
# Import topoJson from lib, to create topology and initial configuration
from lib.common_config import (
@@ -49,9 +43,7 @@ from lib.common_config import (
write_test_footer,
reset_config_on_routers,
verify_rib,
- create_static_routes,
step,
- create_route_maps,
shutdown_bringup_interface,
create_interfaces_cfg,
topo_daemons,
@@ -59,20 +51,16 @@ from lib.common_config import (
)
from lib.topolog import logger
-from lib.topojson import build_topo_from_json, build_config_from_json
+from lib.topojson import build_config_from_json
from lib.ospf import (
verify_ospf6_neighbor,
- config_ospf_interface,
- clear_ospf,
verify_ospf6_rib,
create_router_ospf,
verify_ospf6_interface,
- verify_ospf6_database,
config_ospf6_interface,
)
-from ipaddress import IPv6Address
pytestmark = [pytest.mark.ospfd, pytest.mark.staticd]
diff --git a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_single_area.py b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_single_area.py
index 969e9c45b..69accfc5b 100644
--- a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_single_area.py
+++ b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_single_area.py
@@ -26,9 +26,7 @@ import os
import sys
import time
import pytest
-import json
from copy import deepcopy
-from ipaddress import IPv4Address
from lib.topotest import frr_unicode
# Save the Current Working Directory to find configuration files.
@@ -38,9 +36,7 @@ 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 ipaddress
# Import topoJson from lib, to create topology and initial configuration
from lib.common_config import (
@@ -48,26 +44,17 @@ from lib.common_config import (
write_test_header,
write_test_footer,
reset_config_on_routers,
- verify_rib,
- create_static_routes,
step,
- create_route_maps,
- shutdown_bringup_interface,
create_interfaces_cfg,
topo_daemons
)
from lib.topolog import logger
-from lib.topojson import build_topo_from_json, build_config_from_json
+from lib.topojson import build_config_from_json
from lib.ospf import (
verify_ospf6_neighbor,
- config_ospf_interface,
clear_ospf,
- verify_ospf6_rib,
- create_router_ospf,
verify_ospf6_interface,
- verify_ospf6_database,
- config_ospf6_interface,
)
from ipaddress import IPv6Address
diff --git a/tests/topotests/pbr_topo1/test_pbr_topo1.py b/tests/topotests/pbr_topo1/test_pbr_topo1.py
index 304a2dd0c..daf03e73d 100644
--- a/tests/topotests/pbr_topo1/test_pbr_topo1.py
+++ b/tests/topotests/pbr_topo1/test_pbr_topo1.py
@@ -28,7 +28,6 @@ test_pbr_topo1.py: Testing PBR
"""
import os
-import re
import sys
import pytest
import json
@@ -47,7 +46,6 @@ from lib.topolog import logger
from lib.common_config import shutdown_bringup_interface
# Required to instantiate the topology builder class.
-from lib.micronet_compat import Topo
pytestmark = [pytest.mark.pbrd]
diff --git a/tests/topotests/pim_acl/test_pim_acl.py b/tests/topotests/pim_acl/test_pim_acl.py
index 23b0efe4b..4e8dec0db 100755
--- a/tests/topotests/pim_acl/test_pim_acl.py
+++ b/tests/topotests/pim_acl/test_pim_acl.py
@@ -104,10 +104,6 @@ import functools
import os
import sys
import pytest
-import re
-import time
-from time import sleep
-import socket
# Save the Current Working Directory to find configuration files.
CWD = os.path.dirname(os.path.realpath(__file__))
diff --git a/tests/topotests/pim_basic/test_pim.py b/tests/topotests/pim_basic/test_pim.py
index c346a77c0..1d1067c34 100644
--- a/tests/topotests/pim_basic/test_pim.py
+++ b/tests/topotests/pim_basic/test_pim.py
@@ -41,7 +41,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.pimd]
diff --git a/tests/topotests/pim_basic_topo2/test_pim_basic_topo2.py b/tests/topotests/pim_basic_topo2/test_pim_basic_topo2.py
index 2352a9ab1..b64572865 100644
--- a/tests/topotests/pim_basic_topo2/test_pim_basic_topo2.py
+++ b/tests/topotests/pim_basic_topo2/test_pim_basic_topo2.py
@@ -28,7 +28,6 @@ test_pim_basic_topo2.py: Test the FRR PIM protocol convergence.
import os
import sys
-import json
from functools import partial
import pytest
@@ -43,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.bfdd, pytest.mark.pimd]
diff --git a/tests/topotests/pim_igmp_vrf/test_pim_vrf.py b/tests/topotests/pim_igmp_vrf/test_pim_vrf.py
index badd22419..73cee74b5 100755
--- a/tests/topotests/pim_igmp_vrf/test_pim_vrf.py
+++ b/tests/topotests/pim_igmp_vrf/test_pim_vrf.py
@@ -93,10 +93,6 @@ import functools
import os
import sys
import pytest
-import re
-import time
-from time import sleep
-import socket
# Save the Current Working Directory to find configuration files.
CWD = os.path.dirname(os.path.realpath(__file__))
diff --git a/tests/topotests/rip_topo1/test_rip_topo1.py b/tests/topotests/rip_topo1/test_rip_topo1.py
index 8cf96777b..88299c90d 100644
--- a/tests/topotests/rip_topo1/test_rip_topo1.py
+++ b/tests/topotests/rip_topo1/test_rip_topo1.py
@@ -34,7 +34,6 @@ import pytest
from time import sleep
-from functools import partial
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from lib import topotest
diff --git a/tests/topotests/ripng_topo1/test_ripng_topo1.py b/tests/topotests/ripng_topo1/test_ripng_topo1.py
index e2be3abcc..df81ac08c 100644
--- a/tests/topotests/ripng_topo1/test_ripng_topo1.py
+++ b/tests/topotests/ripng_topo1/test_ripng_topo1.py
@@ -31,10 +31,8 @@ import os
import re
import sys
import pytest
-import unicodedata
from time import sleep
-from functools import partial
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from lib import topotest
diff --git a/tests/topotests/route_scale/test_route_scale.py b/tests/topotests/route_scale/test_route_scale.py
index d48996720..12cb835b8 100644
--- a/tests/topotests/route_scale/test_route_scale.py
+++ b/tests/topotests/route_scale/test_route_scale.py
@@ -43,7 +43,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.common_config import shutdown_bringup_interface
pytestmark = [pytest.mark.sharpd]
diff --git a/tests/topotests/simple_snmp_test/test_simple_snmp.py b/tests/topotests/simple_snmp_test/test_simple_snmp.py
index c96bddf18..495a4c9cd 100755
--- a/tests/topotests/simple_snmp_test/test_simple_snmp.py
+++ b/tests/topotests/simple_snmp_test/test_simple_snmp.py
@@ -27,9 +27,6 @@ test_bgp_simple snmp.py: Test snmp infrastructure.
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.
@@ -38,9 +35,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, TopoRouter, get_topogen
-from lib.topolog import logger
from lib.snmptest import SnmpTester
diff --git a/tests/topotests/srv6_locator/test_srv6_locator.py b/tests/topotests/srv6_locator/test_srv6_locator.py
index 7b571a0a8..5a0c5b5ea 100755
--- a/tests/topotests/srv6_locator/test_srv6_locator.py
+++ b/tests/topotests/srv6_locator/test_srv6_locator.py
@@ -30,7 +30,6 @@ Test for SRv6 manager on zebra
import os
import sys
import json
-import time
import pytest
import functools
diff --git a/tests/topotests/static_routing_with_ebgp/test_static_routes_topo1_ebgp.py b/tests/topotests/static_routing_with_ebgp/test_static_routes_topo1_ebgp.py
index 3298be17e..809a0a324 100644
--- a/tests/topotests/static_routing_with_ebgp/test_static_routes_topo1_ebgp.py
+++ b/tests/topotests/static_routing_with_ebgp/test_static_routes_topo1_ebgp.py
@@ -30,7 +30,6 @@
"""
import sys
-import json
import time
import os
import pytest
@@ -44,7 +43,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 version_cmp
# Import topoJson from lib, to create topology and initial configuration
@@ -57,14 +55,13 @@ from lib.common_config import (
create_static_routes,
check_address_types,
step,
- create_interfaces_cfg,
shutdown_bringup_interface,
stop_router,
start_router,
)
from lib.topolog import logger
from lib.bgp import 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
pytestmark = [pytest.mark.bgpd, pytest.mark.staticd]
diff --git a/tests/topotests/static_routing_with_ebgp/test_static_routes_topo2_ebgp.py b/tests/topotests/static_routing_with_ebgp/test_static_routes_topo2_ebgp.py
index 8c98a88bd..b85aa43ca 100644
--- a/tests/topotests/static_routing_with_ebgp/test_static_routes_topo2_ebgp.py
+++ b/tests/topotests/static_routing_with_ebgp/test_static_routes_topo2_ebgp.py
@@ -38,7 +38,6 @@
-Verify 8 static route functionality with 8 ECMP next hop
"""
import sys
-import json
import time
import os
import pytest
@@ -52,7 +51,6 @@ sys.path.append(os.path.join(CWD, "../"))
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 +69,7 @@ from lib.common_config import (
)
from lib.topolog import logger
from lib.bgp import 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
pytestmark = [pytest.mark.bgpd, pytest.mark.staticd]
diff --git a/tests/topotests/static_routing_with_ebgp/test_static_routes_topo3_ebgp.py b/tests/topotests/static_routing_with_ebgp/test_static_routes_topo3_ebgp.py
index 703e295e5..0e6ab6183 100644
--- a/tests/topotests/static_routing_with_ebgp/test_static_routes_topo3_ebgp.py
+++ b/tests/topotests/static_routing_with_ebgp/test_static_routes_topo3_ebgp.py
@@ -31,7 +31,6 @@
"""
import sys
-import json
import time
import os
import pytest
@@ -45,7 +44,6 @@ sys.path.append(os.path.join(CWD, "../"))
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
from lib.common_config import (
@@ -57,7 +55,6 @@ from lib.common_config import (
create_static_routes,
check_address_types,
step,
- create_interfaces_cfg,
shutdown_bringup_interface,
stop_router,
start_router,
@@ -66,7 +63,7 @@ from lib.common_config import (
)
from lib.topolog import logger
from lib.bgp import 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
pytestmark = [pytest.mark.bgpd, pytest.mark.staticd]
diff --git a/tests/topotests/static_routing_with_ebgp/test_static_routes_topo4_ebgp.py b/tests/topotests/static_routing_with_ebgp/test_static_routes_topo4_ebgp.py
index bc85a752a..7a7c5d63a 100644
--- a/tests/topotests/static_routing_with_ebgp/test_static_routes_topo4_ebgp.py
+++ b/tests/topotests/static_routing_with_ebgp/test_static_routes_topo4_ebgp.py
@@ -30,7 +30,6 @@ Following tests are covered in the script.
"""
import sys
-import json
import time
import os
import pytest
@@ -44,7 +43,6 @@ sys.path.append(os.path.join(CWD, "../"))
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
from lib.topotest import version_cmp
@@ -59,7 +57,6 @@ from lib.common_config import (
step,
create_prefix_lists,
create_route_maps,
- create_interfaces_cfg,
verify_prefix_lists,
verify_route_maps,
)
@@ -70,7 +67,7 @@ from lib.bgp import (
clear_bgp_and_verify,
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/static_routing_with_ibgp/test_static_routes_topo1_ibgp.py b/tests/topotests/static_routing_with_ibgp/test_static_routes_topo1_ibgp.py
index b571e312d..e06d0fca3 100644
--- a/tests/topotests/static_routing_with_ibgp/test_static_routes_topo1_ibgp.py
+++ b/tests/topotests/static_routing_with_ibgp/test_static_routes_topo1_ibgp.py
@@ -30,12 +30,10 @@
"""
import sys
-import json
import time
import os
import pytest
import platform
-from copy import deepcopy
# Save the Current Working Directory to find configuration files.
CWD = os.path.dirname(os.path.realpath(__file__))
@@ -43,7 +41,6 @@ sys.path.append(os.path.join(CWD, "../"))
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
from lib.topotest import version_cmp
@@ -57,14 +54,13 @@ from lib.common_config import (
create_static_routes,
check_address_types,
step,
- create_interfaces_cfg,
shutdown_bringup_interface,
stop_router,
start_router,
)
from lib.topolog import logger
from lib.bgp import 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
pytestmark = [pytest.mark.bgpd, pytest.mark.staticd]
diff --git a/tests/topotests/static_routing_with_ibgp/test_static_routes_topo2_ibgp.py b/tests/topotests/static_routing_with_ibgp/test_static_routes_topo2_ibgp.py
index 20697bf19..cb6c87945 100644
--- a/tests/topotests/static_routing_with_ibgp/test_static_routes_topo2_ibgp.py
+++ b/tests/topotests/static_routing_with_ibgp/test_static_routes_topo2_ibgp.py
@@ -38,12 +38,10 @@
-Verify 8 static route functionality with 8 ECMP next hop
"""
import sys
-import json
import time
import os
import pytest
import platform
-from time import sleep
import random
# Save the Current Working Directory to find configuration files.
@@ -52,7 +50,6 @@ sys.path.append(os.path.join(CWD, "../"))
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
@@ -65,14 +62,13 @@ from lib.common_config import (
create_static_routes,
check_address_types,
step,
- create_interfaces_cfg,
shutdown_bringup_interface,
stop_router,
start_router,
)
from lib.topolog import logger
from lib.bgp import 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
from lib.topotest import version_cmp
pytestmark = [pytest.mark.bgpd, pytest.mark.staticd]
diff --git a/tests/topotests/static_routing_with_ibgp/test_static_routes_topo3_ibgp.py b/tests/topotests/static_routing_with_ibgp/test_static_routes_topo3_ibgp.py
index ac7a80745..1ac91e1f5 100644
--- a/tests/topotests/static_routing_with_ibgp/test_static_routes_topo3_ibgp.py
+++ b/tests/topotests/static_routing_with_ibgp/test_static_routes_topo3_ibgp.py
@@ -31,14 +31,11 @@
"""
import sys
-import json
import time
import os
import pytest
import platform
-from copy import deepcopy
import random
-from re import search as re_search
# Save the Current Working Directory to find configuration files.
@@ -47,7 +44,6 @@ sys.path.append(os.path.join(CWD, "../"))
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
from lib.topotest import version_cmp
@@ -60,14 +56,13 @@ from lib.common_config import (
create_static_routes,
check_address_types,
step,
- create_interfaces_cfg,
shutdown_bringup_interface,
stop_router,
start_router,
)
from lib.topolog import logger
from lib.bgp import 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
pytestmark = [pytest.mark.bgpd, pytest.mark.staticd]
diff --git a/tests/topotests/static_routing_with_ibgp/test_static_routes_topo4_ibgp.py b/tests/topotests/static_routing_with_ibgp/test_static_routes_topo4_ibgp.py
index 8dcdc8093..42d86f22d 100644
--- a/tests/topotests/static_routing_with_ibgp/test_static_routes_topo4_ibgp.py
+++ b/tests/topotests/static_routing_with_ibgp/test_static_routes_topo4_ibgp.py
@@ -29,7 +29,6 @@ Following tests are covered in the script.
"""
import sys
-import json
import time
import os
import pytest
@@ -43,7 +42,6 @@ sys.path.append(os.path.join(CWD, "../"))
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
from lib.common_config import (
@@ -56,7 +54,6 @@ from lib.common_config import (
step,
create_prefix_lists,
create_route_maps,
- create_interfaces_cfg,
verify_prefix_lists,
verify_route_maps,
)
@@ -67,7 +64,7 @@ from lib.bgp import (
clear_bgp_and_verify,
clear_bgp,
)
-from lib.topojson import build_topo_from_json, build_config_from_json
+from lib.topojson import build_config_from_json
from lib.topotest import version_cmp
diff --git a/tests/topotests/zebra_netlink/test_zebra_netlink.py b/tests/topotests/zebra_netlink/test_zebra_netlink.py
index 8c258a9da..a15ddec14 100644
--- a/tests/topotests/zebra_netlink/test_zebra_netlink.py
+++ b/tests/topotests/zebra_netlink/test_zebra_netlink.py
@@ -26,11 +26,9 @@ test_zebra_netlink.py: Test some basic interactions with kernel using Netlink
"""
import os
-import re
import sys
import pytest
import json
-import platform
from functools import partial
# Save the Current Working Directory to find configuration files.
@@ -42,7 +40,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.common_config import shutdown_bringup_interface
pytestmark = [pytest.mark.sharpd]
diff --git a/tests/topotests/zebra_opaque/test_zebra_opaque.py b/tests/topotests/zebra_opaque/test_zebra_opaque.py
index 05911a9de..2cd4a8853 100644
--- a/tests/topotests/zebra_opaque/test_zebra_opaque.py
+++ b/tests/topotests/zebra_opaque/test_zebra_opaque.py
@@ -25,7 +25,6 @@ Test if Opaque Data is accessable from other daemons in Zebra
import os
import sys
import json
-import time
import pytest
import functools
@@ -35,7 +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
pytestmark = [pytest.mark.bgpd]
diff --git a/tests/topotests/zebra_seg6_route/test_zebra_seg6_route.py b/tests/topotests/zebra_seg6_route/test_zebra_seg6_route.py
index 6ac6569fa..68212c9a8 100755
--- a/tests/topotests/zebra_seg6_route/test_zebra_seg6_route.py
+++ b/tests/topotests/zebra_seg6_route/test_zebra_seg6_route.py
@@ -26,11 +26,9 @@ test_zebra_seg6_route.py: Test seg6 route addition with zapi.
"""
import os
-import re
import sys
import pytest
import json
-import platform
from functools import partial
CWD = os.path.dirname(os.path.realpath(__file__))
@@ -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.common_config import shutdown_bringup_interface
pytestmark = [pytest.mark.sharpd]
diff --git a/tests/topotests/zebra_seg6local_route/test_zebra_seg6local_route.py b/tests/topotests/zebra_seg6local_route/test_zebra_seg6local_route.py
index 3311fbe0b..32ae8a86e 100755
--- a/tests/topotests/zebra_seg6local_route/test_zebra_seg6local_route.py
+++ b/tests/topotests/zebra_seg6local_route/test_zebra_seg6local_route.py
@@ -26,11 +26,9 @@ test_zebra_seg6local_route.py: Test seg6local route addition with zapi.
"""
import os
-import re
import sys
import pytest
import json
-import platform
from functools import partial
CWD = os.path.dirname(os.path.realpath(__file__))
@@ -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.common_config import shutdown_bringup_interface
pytestmark = [pytest.mark.sharpd]