tc_name = request.node.name
write_test_header(tc_name)
+ # Creating configuration from JSON
+ reset_config_on_routers(tgen)
+
# Modify router id
input_dict = {
"r1": {"bgp": {"router_id": "12.12.12.12"}},
tc_name = request.node.name
write_test_header(tc_name)
+ # Creating configuration from JSON
+ reset_config_on_routers(tgen)
+
input_dict = {
"r1": {"bgp": {"local_as": 131079}},
"r2": {"bgp": {"local_as": 131079}},
tc_name = request.node.name
write_test_header(tc_name)
+ # Creating configuration from JSON
+ reset_config_on_routers(tgen)
+
# Api call to modify AS number
input_dict = {
"r1": {
},
}
result = modify_as_number(tgen, topo, input_dict)
- try:
- assert result is True
- except AssertionError:
- logger.info("Expected behaviour: {}".format(result))
- logger.info("BGP config is not created because of invalid ASNs")
+ assert result is not True, (
+ "Expected BGP config is not created because of invalid ASNs: {}".format(
+ result
+ )
+ )
+
+ # Creating configuration from JSON
+ reset_config_on_routers(tgen)
+
+ result = verify_bgp_convergence(tgen, topo)
+ if result != True:
+ assert False, "Testcase " + tc_name + " :Failed \n Error: {}".format(result)
write_test_footer(tc_name)
tc_name = request.node.name
write_test_header(tc_name)
+ # Creating configuration from JSON
+ reset_config_on_routers(tgen)
+
+ result = verify_bgp_convergence(tgen, topo)
+ if result != True:
+ assert False, "Testcase " + tc_name + " :Failed \n Error: {}".format(result)
+
# Api call to modify AS number
input_dict = {
"r1": {"bgp": {"local_as": 131079}},
if tgen.routers_have_failure():
pytest.skip(tgen.errors)
- # reset_config_on_routers(tgen)
+ # Creating configuration from JSON
+ reset_config_on_routers(tgen)
step("Configure static routes and redistribute in BGP on R3")
for addr_type in ADDR_TYPES: