# OF THIS SOFTWARE.
#
-#################################
-# TOPOLOGY
-#################################
-"""
-
- +-------+
- +------- | R2 |
- | +-------+
- | |
- +-------+ |
- | R1 | |
- +-------+ |
- | |
- | +-------+ +-------+
- +---------- | R3 |----------| R4 |
- +-------+ +-------+
-
-"""
-
-#################################
-# TEST SUMMARY
-#################################
-"""
-Following tests are covered to test route-map functionality:
-TC_34:
- Verify if route-maps is applied in both inbound and
- outbound direction to same neighbor/interface.
-TC_36:
- Test permit/deny statements operation in route-maps with a
- permutation and combination of permit/deny in prefix-lists
-TC_35:
- Test multiple sequence numbers in a single route-map for different
- match/set clauses.
-TC_37:
- Test add/remove route-maps with multiple set
- clauses and without any match statement.(Set only)
-TC_38:
- Test add/remove route-maps with multiple match
- clauses and without any set statement.(Match only)
-"""
-
import sys
import json
import time
create_bgp_community_lists,
interface_status,
create_route_maps,
+ create_static_routes,
create_prefix_lists,
verify_route_maps,
check_address_types,
)
from lib.topojson import build_topo_from_json, build_config_from_json
+#################################
+# TOPOLOGY
+#################################
+"""
+
+ +-------+
+ +------- | R2 |
+ | +-------+
+ | |
+ +-------+ |
+ | R1 | |
+ +-------+ |
+ | |
+ | +-------+ +-------+
+ +---------- | R3 |----------| R4 |
+ +-------+ +-------+
+
+"""
+
+#################################
+# TEST SUMMARY
+#################################
+"""
+Following tests are covered to test route-map functionality:
+TC_34:
+ Verify if route-maps is applied in both inbound and
+ outbound direction to same neighbor/interface.
+TC_36:
+ Test permit/deny statements operation in route-maps with a
+ permutation and combination of permit/deny in prefix-lists
+TC_35:
+ Test multiple sequence numbers in a single route-map for different
+ match/set clauses.
+TC_37:
+ Test add/remove route-maps with multiple set
+ clauses and without any match statement.(Set only)
+TC_38:
+ Test add/remove route-maps with multiple match
+ clauses and without any set statement.(Match only)
+"""
# Global variables
bgp_convergence = False
result = verify_rib(
tgen, adt, dut, input_dict_2, protocol=protocol, expected=False
)
- assert result is not True, "Testcase {} : Failed \n"
- "routes are not present in rib \n Error: {}".format(tc_name, result)
+ assert result is not True, ("Testcase {} : Failed \n"
+ "routes are not present in rib \n Error: {}".format(tc_name, result))
logger.info("Expected behaviour: {}".format(result))
# Verifying RIB routes
result = verify_rib(
tgen, adt, dut, input_dict, protocol=protocol, expected=False
)
- assert result is not True, "Testcase {} : Failed \n "
- "routes are not present in rib \n Error: {}".format(tc_name, result)
+ assert result is not True, ("Testcase {} : Failed \n "
+ "routes are not present in rib \n Error: {}".format(tc_name, result))
logger.info("Expected behaviour: {}".format(result))
write_test_footer(tc_name)
}
# tgen.mininet_cli()
- result = verify_rib(
- tgen, adt, dut, input_dict_2, protocol=protocol, expected=False
- )
if "deny" in [prefix_action, rmap_action]:
- assert result is not True, "Testcase {} : Failed \n "
- "Routes are still present \n Error: {}".format(tc_name, result)
+ result = verify_rib(
+ tgen, adt, dut, input_dict_2, protocol=protocol, expected=False
+ )
+ assert result is not True, ("Testcase {} : Failed \n "
+ "Routes are still present \n Error: {}".format(tc_name, result))
logger.info("Expected behaviour: {}".format(result))
else:
+ result = verify_rib(
+ tgen, adt, dut, input_dict_2, protocol=protocol
+ )
assert result is True, "Testcase {} : Failed \n Error: {}".format(
tc_name, result
)