summaryrefslogtreecommitdiffstats
path: root/tests/topotests/ospfv3_basic_functionality
diff options
context:
space:
mode:
Diffstat (limited to 'tests/topotests/ospfv3_basic_functionality')
-rw-r--r--tests/topotests/ospfv3_basic_functionality/test_ospfv3_asbr_summary_topo1.py6
-rw-r--r--tests/topotests/ospfv3_basic_functionality/test_ospfv3_authentication.py11
-rw-r--r--tests/topotests/ospfv3_basic_functionality/test_ospfv3_ecmp.py4
-rw-r--r--tests/topotests/ospfv3_basic_functionality/test_ospfv3_ecmp_lan.py15
-rw-r--r--tests/topotests/ospfv3_basic_functionality/test_ospfv3_nssa.py2
-rw-r--r--tests/topotests/ospfv3_basic_functionality/test_ospfv3_nssa2.py14
-rw-r--r--tests/topotests/ospfv3_basic_functionality/test_ospfv3_routemaps.py2
-rw-r--r--tests/topotests/ospfv3_basic_functionality/test_ospfv3_rte_calc.py3
-rw-r--r--tests/topotests/ospfv3_basic_functionality/test_ospfv3_single_area.py158
9 files changed, 122 insertions, 93 deletions
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 49c25ab8..c431147e 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
@@ -29,7 +29,6 @@ from time import sleep
from lib.common_config import (
start_topology,
write_test_header,
- kill_router_daemons,
write_test_footer,
reset_config_on_routers,
stop_router,
@@ -37,7 +36,6 @@ from lib.common_config import (
verify_rib,
create_static_routes,
step,
- start_router_daemons,
create_route_maps,
shutdown_bringup_interface,
create_prefix_lists,
@@ -163,7 +161,7 @@ def setup_module(mod):
logger.info("Running setup_module() done")
-def teardown_module(mod):
+def teardown_module():
"""
Teardown the pytest environment.
@@ -2456,7 +2454,7 @@ def test_ospfv3_type5_summary_tc51_p2(request):
step("Configure and re configure all the commands 10 times in a loop.")
- for itrate in range(0, 10):
+ for _ in range(0, 10):
ospf_summ_r1 = {
"r0": {
"ospf6": {
diff --git a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_authentication.py b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_authentication.py
index 00c98ac9..5f88f6d8 100644
--- a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_authentication.py
+++ b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_authentication.py
@@ -14,9 +14,7 @@ import sys
import time
import pytest
from time import sleep
-from copy import deepcopy
import json
-from lib.topotest import frr_unicode
pytestmark = pytest.mark.ospf6d
@@ -39,11 +37,8 @@ from lib.common_config import (
shutdown_bringup_interface,
)
from lib.topolog import logger
-from lib.topojson import build_topo_from_json, build_config_from_json
-from lib.ospf import verify_ospf6_neighbor, config_ospf6_interface, clear_ospf
-from ipaddress import IPv4Address
-
-# Global variables
+from lib.topojson import build_config_from_json
+from lib.ospf import verify_ospf6_neighbor, config_ospf6_interface
topo = None
# Reading the data from JSON File for topology creation
jsonFile = "{}/ospfv3_authentication.json".format(CWD)
@@ -118,7 +113,7 @@ def setup_module(mod):
logger.info("Running setup_module() done")
-def teardown_module(mod):
+def teardown_module():
"""
Teardown the pytest environment.
* `mod`: module name
diff --git a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_ecmp.py b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_ecmp.py
index 0c1e3fa4..45652a3e 100644
--- a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_ecmp.py
+++ b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_ecmp.py
@@ -122,7 +122,7 @@ def setup_module(mod):
logger.info("Running setup_module() done")
-def teardown_module(mod):
+def teardown_module():
"""
Teardown the pytest environment.
@@ -285,7 +285,7 @@ def test_ospfv3_ecmp_tc16_p0(request):
step("Verify that route in R2 in stalled with 8 next hops.")
nh = []
- for item in range(1, 7):
+ for _ in range(1, 7):
nh.append(llip)
llip = get_llip("r0", "r1")
diff --git a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_ecmp_lan.py b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_ecmp_lan.py
index 7c677326..95f2493c 100644
--- a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_ecmp_lan.py
+++ b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_ecmp_lan.py
@@ -13,11 +13,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
-import ipaddress
# Save the Current Working Directory to find configuration files.
CWD = os.path.dirname(os.path.realpath(__file__))
@@ -37,9 +32,6 @@ from lib.common_config import (
verify_rib,
create_static_routes,
step,
- create_route_maps,
- shutdown_bringup_interface,
- create_interfaces_cfg,
get_frr_ipv6_linklocal,
)
from lib.topolog import logger
@@ -47,16 +39,11 @@ 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]
@@ -137,7 +124,7 @@ def setup_module(mod):
logger.info("Running setup_module() done")
-def teardown_module(mod):
+def teardown_module():
"""
Teardown the pytest environment.
diff --git a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_nssa.py b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_nssa.py
index dc4ce888..cc96cd17 100644
--- a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_nssa.py
+++ b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_nssa.py
@@ -78,7 +78,7 @@ def setup_module(mod):
logger.info("Running setup_module() done")
-def teardown_module(mod):
+def teardown_module():
"""
Teardown the pytest environment.
diff --git a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_nssa2.py b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_nssa2.py
index 5a6c377a..4ad725e3 100644
--- a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_nssa2.py
+++ b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_nssa2.py
@@ -13,15 +13,10 @@ import os
import sys
import time
import pytest
-from copy import deepcopy
import ipaddress
from lib.ospf import (
verify_ospf6_neighbor,
- config_ospf6_interface,
- clear_ospf,
verify_ospf6_rib,
- verify_ospf6_interface,
- verify_ospf6_database,
create_router_ospf,
)
@@ -29,12 +24,6 @@ from lib.ospf import (
# Import topogen and topotest helpers
from lib.topogen import Topogen, get_topogen
-from lib.bgp import (
- verify_bgp_convergence,
- create_router_bgp,
- clear_bgp_and_verify,
- verify_bgp_rib,
-)
from lib.topolog import logger
from lib.common_config import (
start_topology,
@@ -44,12 +33,9 @@ from lib.common_config import (
verify_rib,
create_static_routes,
step,
- create_route_maps,
- shutdown_bringup_interface,
create_interfaces_cfg,
check_router_status,
)
-from ipaddress import IPv4Address
from lib.topolog import logger
from lib.topojson import build_config_from_json
diff --git a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_routemaps.py b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_routemaps.py
index 069806a3..ff88bade 100644
--- a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_routemaps.py
+++ b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_routemaps.py
@@ -136,7 +136,7 @@ def setup_module(mod):
logger.info("Running setup_module() done")
-def teardown_module(mod):
+def teardown_module():
"""
Teardown the pytest environment.
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 916f6555..06989db8 100644
--- a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_rte_calc.py
+++ b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_rte_calc.py
@@ -45,7 +45,6 @@ from lib.ospf import (
verify_ospf6_neighbor,
clear_ospf,
verify_ospf6_rib,
- verify_ospf_database,
create_router_ospf,
config_ospf6_interface,
verify_ospf6_interface,
@@ -127,7 +126,7 @@ def setup_module(mod):
logger.info("Running setup_module() done")
-def teardown_module(mod):
+def teardown_module():
"""
Teardown the pytest environment.
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 f0b139a5..00d4e8ff 100644
--- a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_single_area.py
+++ b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_single_area.py
@@ -36,7 +36,6 @@ from lib.common_config import (
step,
create_interfaces_cfg,
create_debug_log_config,
- apply_raw_config,
)
from lib.topolog import logger
from lib.topojson import build_config_from_json
@@ -121,7 +120,7 @@ def setup_module(mod):
logger.info("Running setup_module() done")
-def teardown_module(mod):
+def teardown_module():
"""
Teardown the pytest environment.
@@ -389,6 +388,11 @@ def test_ospfv3_hello_tc10_p0(request):
step("Bring up the base config as per the topology")
reset_config_on_routers(tgen)
+ ospf_covergence = verify_ospf6_neighbor(tgen)
+ assert (
+ ospf_covergence is True
+ ), "Testcase {} [01]: Reset Failed \n Error: {}".format(tc_name, ospf_covergence)
+
step("modify hello timer from default value to some other value on r1")
topo1 = {
@@ -403,7 +407,9 @@ def test_ospfv3_hello_tc10_p0(request):
}
result = create_interfaces_cfg(tgen, topo1)
- assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+ assert result is True, "Testcase {} [02]: Failed \n Error: {}".format(
+ tc_name, result
+ )
step(
"verify that new timer value is configured and applied using "
@@ -423,7 +429,9 @@ def test_ospfv3_hello_tc10_p0(request):
}
}
result = verify_ospf6_interface(tgen, topo, dut=dut, input_dict=input_dict)
- assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+ assert result is True, "Testcase {} [03]: Failed \n Error: {}".format(
+ tc_name, result
+ )
step("modify hello timer from default value to r1 hello timer on r2")
@@ -439,7 +447,9 @@ def test_ospfv3_hello_tc10_p0(request):
}
result = create_interfaces_cfg(tgen, topo1)
- assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+ assert result is True, "Testcase {} [04]: Failed \n Error: {}".format(
+ tc_name, result
+ )
step("verify that new timer value is configured.")
input_dict = {
@@ -456,12 +466,14 @@ def test_ospfv3_hello_tc10_p0(request):
}
dut = "r0"
result = verify_ospf6_interface(tgen, topo, dut=dut, input_dict=input_dict)
- assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+ assert result is True, "Testcase {} [05]: Failed \n Error: {}".format(
+ tc_name, result
+ )
step("verify that ospf neighbours are full")
ospf_covergence = verify_ospf6_neighbor(tgen, topo, dut=dut)
- assert ospf_covergence is True, "Testcase Failed \n Error: {}".format(
- ospf_covergence
+ assert ospf_covergence is True, "Testcase {} [06]: Failed \n Error: {}".format(
+ tc_name, ospf_covergence
)
step("reconfigure the default hello timer value to default on r1 and r2")
@@ -478,7 +490,9 @@ def test_ospfv3_hello_tc10_p0(request):
}
result = create_interfaces_cfg(tgen, topo1)
- assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+ assert result is True, "Testcase {} [07]: Failed \n Error: {}".format(
+ tc_name, result
+ )
topo1 = {
"r1": {
@@ -492,7 +506,9 @@ def test_ospfv3_hello_tc10_p0(request):
}
result = create_interfaces_cfg(tgen, topo1)
- assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+ assert result is True, "Testcase {} [08]: Failed \n Error: {}".format(
+ tc_name, result
+ )
step("verify that new timer value is configured.")
input_dict = {
@@ -509,12 +525,14 @@ def test_ospfv3_hello_tc10_p0(request):
}
dut = "r0"
result = verify_ospf6_interface(tgen, topo, dut=dut, input_dict=input_dict)
- assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+ assert result is True, "Testcase {} [09]: Failed \n Error: {}".format(
+ tc_name, result
+ )
step("verify that ospf neighbours are full")
ospf_covergence = verify_ospf6_neighbor(tgen, topo, dut=dut)
- assert ospf_covergence is True, "Testcase Failed \n Error: {}".format(
- ospf_covergence
+ assert ospf_covergence is True, "Testcase {} [10]: Failed \n Error: {}".format(
+ tc_name, ospf_covergence
)
step("reconfigure the default hello timer value to default on r1 and r2")
@@ -531,7 +549,9 @@ def test_ospfv3_hello_tc10_p0(request):
}
result = create_interfaces_cfg(tgen, topo1)
- assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+ assert result is True, "Testcase {} [11]: Failed \n Error: {}".format(
+ tc_name, result
+ )
topo1 = {
"r1": {
@@ -545,7 +565,9 @@ def test_ospfv3_hello_tc10_p0(request):
}
result = create_interfaces_cfg(tgen, topo1)
- assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+ assert result is True, "Testcase {} [12]: Failed \n Error: {}".format(
+ tc_name, result
+ )
step("verify that new timer value is configured.")
input_dict = {
@@ -562,12 +584,14 @@ def test_ospfv3_hello_tc10_p0(request):
}
dut = "r0"
result = verify_ospf6_interface(tgen, topo, dut=dut, input_dict=input_dict)
- assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+ assert result is True, "Testcase {} [13]: Failed \n Error: {}".format(
+ tc_name, result
+ )
step("verify that ospf neighbours are full")
ospf_covergence = verify_ospf6_neighbor(tgen, topo, dut=dut)
- assert ospf_covergence is True, "Testcase Failed \n Error: {}".format(
- ospf_covergence
+ assert ospf_covergence is True, "Testcase {} [14]: Failed \n Error: {}".format(
+ tc_name, ospf_covergence
)
step("configure hello timer = 1 on r1 and r2")
@@ -583,7 +607,9 @@ def test_ospfv3_hello_tc10_p0(request):
}
result = create_interfaces_cfg(tgen, topo1)
- assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+ assert result is True, "Testcase {} [15]: Failed \n Error: {}".format(
+ tc_name, result
+ )
topo1 = {
"r1": {
@@ -597,7 +623,9 @@ def test_ospfv3_hello_tc10_p0(request):
}
result = create_interfaces_cfg(tgen, topo1)
- assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+ assert result is True, "Testcase {} [16]: Failed \n Error: {}".format(
+ tc_name, result
+ )
step("verify that new timer value is configured.")
input_dict = {
@@ -614,12 +642,14 @@ def test_ospfv3_hello_tc10_p0(request):
}
dut = "r0"
result = verify_ospf6_interface(tgen, topo, dut=dut, input_dict=input_dict)
- assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+ assert result is True, "Testcase {} [17]: Failed \n Error: {}".format(
+ tc_name, result
+ )
step("verify that ospf neighbours are full")
ospf_covergence = verify_ospf6_neighbor(tgen, topo, dut=dut)
- assert ospf_covergence is True, "Testcase Failed \n Error: {}".format(
- ospf_covergence
+ assert ospf_covergence is True, "Testcase {} [18]: Failed \n Error: {}".format(
+ tc_name, ospf_covergence
)
step(" Configure hello timer = 65535")
@@ -635,7 +665,9 @@ def test_ospfv3_hello_tc10_p0(request):
}
result = create_interfaces_cfg(tgen, topo1)
- assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+ assert result is True, "Testcase {} [19]: Failed \n Error: {}".format(
+ tc_name, result
+ )
topo1 = {
"r1": {
@@ -649,7 +681,9 @@ def test_ospfv3_hello_tc10_p0(request):
}
result = create_interfaces_cfg(tgen, topo1)
- assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+ assert result is True, "Testcase {} [20]: Failed \n Error: {}".format(
+ tc_name, result
+ )
step("verify that new timer value is configured.")
input_dict = {
@@ -666,7 +700,9 @@ def test_ospfv3_hello_tc10_p0(request):
}
dut = "r0"
result = verify_ospf6_interface(tgen, topo, dut=dut, input_dict=input_dict)
- assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+ assert result is True, "Testcase {} [21]: Failed \n Error: {}".format(
+ tc_name, result
+ )
step(" Try configuring timer values outside range for example 65536")
topo1 = {
@@ -683,7 +719,7 @@ def test_ospfv3_hello_tc10_p0(request):
result = create_interfaces_cfg(tgen, topo1)
assert (
result is not True
- ), "Testcase {} : Failed \n Create interface failed. Error: {}".format(
+ ), "Testcase {} [23]: Failed \n Create interface failed. Error: {}".format(
tc_name, result
)
@@ -702,13 +738,17 @@ def test_ospfv3_hello_tc10_p0(request):
}
result = create_interfaces_cfg(tgen, topo1)
- assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+ assert result is True, "Testcase {} [24]: Failed \n Error: {}".format(
+ tc_name, result
+ )
step("Verify that timer value is deleted from intf & set to default value 40 sec.")
input_dict = {"r1": {"links": {"r0": {"ospf6": {"timerIntervalsConfigHello": 10}}}}}
dut = "r1"
result = verify_ospf6_interface(tgen, topo, dut=dut, input_dict=input_dict)
- assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+ assert result is True, "Testcase {} [25]: Failed \n Error: {}".format(
+ tc_name, result
+ )
write_test_footer(tc_name)
@@ -745,7 +785,9 @@ def test_ospfv3_dead_tc11_p0(request):
}
result = create_interfaces_cfg(tgen, topo1)
- assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+ assert result is True, "Testcase {} [01]: Failed \n Error: {}".format(
+ tc_name, result
+ )
step(
"verify that new timer value is configured and applied using "
@@ -754,7 +796,9 @@ def test_ospfv3_dead_tc11_p0(request):
dut = "r1"
input_dict = {"r1": {"links": {"r0": {"ospf6": {"timerIntervalsConfigDead": 48}}}}}
result = verify_ospf6_interface(tgen, topo, dut=dut, input_dict=input_dict)
- assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+ assert result is True, "Testcase {} [02]: Failed \n Error: {}".format(
+ tc_name, result
+ )
step("modify dead interval from default value to r1 dead interval timer on r2")
@@ -763,31 +807,35 @@ def test_ospfv3_dead_tc11_p0(request):
"links": {
"r1": {
"interface": topo["routers"]["r0"]["links"]["r1"]["interface"],
- "ospf6": {"dead_interval": 48, "hello_interval": 12},
+ "ospf6": {"hello_interval": 12, "dead_interval": 48},
}
}
}
}
result = create_interfaces_cfg(tgen, topo1)
- assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+ assert result is True, "Testcase {} [03]: Failed \n Error: {}".format(
+ tc_name, result
+ )
step("verify that new timer value is configured.")
input_dict = {"r0": {"links": {"r1": {"ospf6": {"timerIntervalsConfigDead": 48}}}}}
dut = "r0"
result = verify_ospf6_interface(tgen, topo, dut=dut, input_dict=input_dict)
- assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+ assert result is True, "Testcase {} [04]: Failed \n Error: {}".format(
+ tc_name, result
+ )
step("verify that ospf neighbours are full")
ospf_covergence = verify_ospf6_neighbor(tgen, topo, dut=dut)
- assert ospf_covergence is True, "Testcase {} : Failed \n Error: {}".format(
+ assert ospf_covergence is True, "Testcase {} [05]: Failed \n Error: {}".format(
tc_name, ospf_covergence
)
step("remove ospf on R0")
ospf_del = {"r0": {"ospf6": {"delete": True}}}
result = create_router_ospf(tgen, topo, ospf_del)
- assert result is True, "Testcase : Failed \n Error: {}".format(result)
+ assert result is True, "Testcase [06]: Failed \n Error: {}".format(result)
# reconfiguring deleted ospf process by resetting the configs.
reset_config_on_routers(tgen)
@@ -805,7 +853,9 @@ def test_ospfv3_dead_tc11_p0(request):
}
result = create_interfaces_cfg(tgen, topo1)
- assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+ assert result is True, "Testcase {} [07]: Failed \n Error: {}".format(
+ tc_name, result
+ )
topo1 = {
"r1": {
@@ -819,17 +869,21 @@ def test_ospfv3_dead_tc11_p0(request):
}
result = create_interfaces_cfg(tgen, topo1)
- assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+ assert result is True, "Testcase {} [08]: Failed \n Error: {}".format(
+ tc_name, result
+ )
step("verify that new timer value is configured.")
input_dict = {"r0": {"links": {"r1": {"ospf6": {"timerIntervalsConfigDead": 40}}}}}
dut = "r0"
result = verify_ospf6_interface(tgen, topo, dut=dut, input_dict=input_dict)
- assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+ assert result is True, "Testcase {} [09]: Failed \n Error: {}".format(
+ tc_name, result
+ )
step("verify that ospf neighbours are full")
ospf_covergence = verify_ospf6_neighbor(tgen, topo, dut=dut)
- assert ospf_covergence is True, "Testcase {} : Failed \n Error: {}".format(
+ assert ospf_covergence is True, "Testcase {} [10]: Failed \n Error: {}".format(
tc_name, ospf_covergence
)
@@ -847,7 +901,9 @@ def test_ospfv3_dead_tc11_p0(request):
}
result = create_interfaces_cfg(tgen, topo1)
- assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+ assert result is True, "Testcase {} [11]: Failed \n Error: {}".format(
+ tc_name, result
+ )
topo1 = {
"r1": {
@@ -861,7 +917,9 @@ def test_ospfv3_dead_tc11_p0(request):
}
result = create_interfaces_cfg(tgen, topo1)
- assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+ assert result is True, "Testcase {} [12]: Failed \n Error: {}".format(
+ tc_name, result
+ )
step("verify that new timer value is configured.")
input_dict = {
@@ -869,11 +927,13 @@ def test_ospfv3_dead_tc11_p0(request):
}
dut = "r0"
result = verify_ospf6_interface(tgen, topo, dut=dut, input_dict=input_dict)
- assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+ assert result is True, "Testcase {} [13]: Failed \n Error: {}".format(
+ tc_name, result
+ )
step("verify that ospf neighbours are full")
ospf_covergence = verify_ospf6_neighbor(tgen, topo, dut=dut)
- assert ospf_covergence is True, "Testcase {} : Failed \n Error: {}".format(
+ assert ospf_covergence is True, "Testcase {} [14]: Failed \n Error: {}".format(
tc_name, ospf_covergence
)
@@ -892,7 +952,7 @@ def test_ospfv3_dead_tc11_p0(request):
result = create_interfaces_cfg(tgen, topo1)
assert (
result is not True
- ), "Testcase {} : Failed \n Create interface config failed. Error: {}".format(
+ ), "Testcase {} [15]: Failed \n Create interface config failed. Error: {}".format(
tc_name, result
)
@@ -911,13 +971,17 @@ def test_ospfv3_dead_tc11_p0(request):
}
result = create_interfaces_cfg(tgen, topo1)
- assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+ assert result is True, "Testcase {} [16]: Failed \n Error: {}".format(
+ tc_name, result
+ )
step("Verify that timer value is deleted from intf & set to default value 40 sec.")
input_dict = {"r1": {"links": {"r0": {"ospf6": {"timerIntervalsConfigDead": 40}}}}}
dut = "r1"
result = verify_ospf6_interface(tgen, topo, dut=dut, input_dict=input_dict)
- assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+ assert result is True, "Testcase {} [17]: Failed \n Error: {}".format(
+ tc_name, result
+ )
write_test_footer(tc_name)