4 # Copyright (c) 2022 by VMware, Inc. ("VMware")
5 # Used Copyright (c) 2018 by Network Device Education Foundation,
6 # Inc. ("NetDEF") in this file.
8 # Permission to use, copy, modify, and/or distribute this software
9 # for any purpose with or without fee is hereby granted, provided
10 # that the above copyright notice and this permission notice appear
13 # THE SOFTWARE IS PROVIDED "AS IS" AND VMWARE DISCLAIMS ALL WARRANTIES
14 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
15 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL VMWARE BE LIABLE FOR
16 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
17 # DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
18 # WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
19 # ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
24 Following tests are covered to test Multicast basic functionality:
31 r0-----r1-------------r3-----r5
37 - Create topology (setup module)
40 1. Configure multiple groups (10 grps) with same RP address
41 2. Verify IIF and OIL in updated in mroute when upstream interface
43 3. Verify RP info and (*,G) mroute after deleting the RP and shut /
44 no shut the RPF interface.
53 # Save the Current Working Directory to find configuration files.
54 CWD
= os
.path
.dirname(os
.path
.realpath(__file__
))
55 sys
.path
.append(os
.path
.join(CWD
, "../"))
56 sys
.path
.append(os
.path
.join(CWD
, "../lib/"))
58 # Required to instantiate the topology builder class.
60 # pylint: disable=C0413
61 # Import topogen and topotest helpers
62 from lib
.topogen
import Topogen
, get_topogen
64 from lib
.common_config
import (
68 reset_config_on_routers
,
70 shutdown_bringup_interface
,
76 socat_send_pim6_traffic
,
78 create_debug_log_config
,
83 verify_join_state_and_timer
,
86 verify_pim_interface_traffic
,
89 clear_pim6_interface_traffic
,
91 verify_pim6_neighbors
,
92 get_pim6_interface_traffic
,
93 clear_pim6_interfaces
,
96 from lib
.topolog
import logger
97 from lib
.topojson
import build_topo_from_json
, build_config_from_json
100 GROUP_RANGE_1
= "ff08::/64"
101 GROUP_ADDRESS_1
= "ff08::1"
102 GROUP_RANGE_3
= "ffaa::/64"
103 GROUP_ADDRESS_3
= "ffaa::1"
104 GROUP_RANGE_LIST_1
= [
111 GROUP_RANGE_LIST_2
= [
118 GROUP_ADDRESS_LIST_1
= ["ffaa::1", "ffaa::2", "ffaa::3", "ffaa::4", "ffaa::5"]
119 GROUP_ADDRESS_LIST_2
= ["ffaa::6", "ffaa::7", "ffaa::8", "ffaa::9", "ffaa::10"]
122 ASSERT_MSG
= "Testcase {} : Failed Error: {}"
124 pytestmark
= [pytest
.mark
.pim6d
]
127 def build_topo(tgen
):
130 # Building topology from json file
131 build_topo_from_json(tgen
, TOPO
)
134 def setup_module(mod
):
136 Sets up the pytest environment
141 testsuite_run_time
= time
.asctime(time
.localtime(time
.time()))
142 logger
.info("Testsuite start time: %s", testsuite_run_time
)
143 logger
.info("=" * 40)
150 r0-----r1-------------r3-----r5
156 logger
.info("Master Topology: \n %s", topology
)
158 logger
.info("Running setup_module to create topology")
160 # This function initiates the topology build with Topogen...
161 json_file
= "{}/multicast_pim6_static_rp.json".format(CWD
)
162 tgen
= Topogen(json_file
, mod
.__name
__)
164 TOPO
= tgen
.json_topo
166 # ... and here it calls Mininet initialization functions.
168 # Starting topology, create tmp files which are loaded to routers
169 # to start daemons and then start routers
172 # Don"t run this test if we have any failure.
173 if tgen
.routers_have_failure():
174 pytest
.skip(tgen
.errors
)
176 # Creating configuration from JSON
177 build_config_from_json(tgen
, TOPO
)
179 # Verify PIM6 neighbors
180 result
= verify_pim6_neighbors(tgen
, TOPO
)
181 assert result
is True, "setup_module :Failed \n Error:" " {}".format(result
)
183 logger
.info("Running setup_module() done")
186 def teardown_module():
187 """Teardown the pytest environment"""
189 logger
.info("Running teardown_module to delete topology")
192 # Stop toplogy and Remove tmp files
195 logger
.info("Testsuite end time: %s", time
.asctime(time
.localtime(time
.time())))
196 logger
.info("=" * 40)
199 #####################################################
203 #####################################################
206 def verify_state_incremented(state_before
, state_after
):
208 API to compare interface traffic state incrementing
212 * `state_before` : State dictionary for any particular instance
213 * `state_after` : State dictionary for any particular instance
216 for router
, state_data
in state_before
.items():
217 for state
, value
in state_data
.items():
218 if state_before
[router
][state
] >= state_after
[router
][state
]:
220 "[DUT: %s]: state %s value has not"
221 " incremented, Initial value: %s, "
222 "Current value: %s [FAILED!!]"
226 state_before
[router
][state
],
227 state_after
[router
][state
],
233 "[DUT: %s]: State %s value is "
234 "incremented, Initial value: %s, Current value: %s"
238 state_before
[router
][state
],
239 state_after
[router
][state
],
245 #####################################################
249 #####################################################
252 def test_pim6_multiple_groups_same_RP_address_p2(request
):
254 Configure multiple groups (10 grps) with same RP address
260 r0-----r1-------------r3-----r5
268 tc_name
= request
.node
.name
269 write_test_header(tc_name
)
271 # Don"t run this test if we have any failure.
272 if tgen
.routers_have_failure():
273 pytest
.skip(tgen
.errors
)
275 step("Creating configuration from JSON")
276 reset_config_on_routers(tgen
)
279 "r1": {"debug": {"log_file": "r1_debug.log", "enable": ["pim6d"]}},
280 "r2": {"debug": {"log_file": "r2_debug.log", "enable": ["pim6d"]}},
281 "r3": {"debug": {"log_file": "r3_debug.log", "enable": ["pim6d"]}},
282 "r4": {"debug": {"log_file": "r4_debug.log", "enable": ["pim6d"]}},
285 result
= create_debug_log_config(tgen
, input_dict
)
287 step("Enable MLD on r1 interface")
288 step("Enable the PIM6 on all the interfaces of r1, r2, r3 and r4 routers")
289 step("r2: Configure r2 as RP")
295 "rp_addr": TOPO
["routers"]["r2"]["links"]["lo"]["ipv6"].split(
298 "group_addr_range": GROUP_RANGE_3
,
305 result
= create_pim_config(tgen
, TOPO
, input_dict
)
306 assert result
is True, "Testcase {} : Failed Error: {}".format(tc_name
, result
)
308 step("r2: verify rp-info")
311 rp_address
= TOPO
["routers"]["r2"]["links"]["lo"]["ipv6"].split("/")[0]
312 result
= verify_pim_rp_info(tgen
, TOPO
, dut
, GROUP_RANGE_3
, oif
, rp_address
, SOURCE
)
313 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
315 group_address_list
= GROUP_ADDRESS_LIST_1
+ GROUP_ADDRESS_LIST_2
316 step("r0: Send MLD join for 10 groups")
317 intf
= TOPO
["routers"]["r0"]["links"]["r1"]["interface"]
318 intf_ip
= TOPO
["routers"]["r0"]["links"]["r1"]["ipv6"].split("/")[0]
319 result
= socat_send_mld_join(
320 tgen
, "r0", "UDP6-RECV", group_address_list
, intf
, intf_ip
322 assert result
is True, "Testcase {}: Failed Error: {}".format(tc_name
, result
)
324 step("r1: Verify MLD groups")
326 intf_r1_r0
= TOPO
["routers"]["r1"]["links"]["r0"]["interface"]
327 result
= verify_mld_groups(tgen
, dut
, intf_r1_r0
, group_address_list
)
328 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
330 step("r5: Send multicast traffic for group {}".format(group_address_list
))
331 intf
= TOPO
["routers"]["r5"]["links"]["r3"]["interface"]
332 SOURCE_ADDRESS
= TOPO
["routers"]["r5"]["links"]["r3"]["ipv6"].split("/")[0]
333 result
= socat_send_pim6_traffic(tgen
, "r5", "UDP6-SEND", group_address_list
, intf
)
334 assert result
is True, "Testcase {}: Failed Error: {}".format(tc_name
, result
)
336 step("r1: Verify (*, G) upstream IIF interface")
338 iif
= TOPO
["routers"]["r1"]["links"]["r2"]["interface"]
339 result
= verify_upstream_iif(tgen
, dut
, iif
, STAR
, group_address_list
)
340 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
342 step("r1: Verify (*, G) upstream join state and join timer")
343 result
= verify_join_state_and_timer(
344 tgen
, dut
, iif
, STAR
, group_address_list
, addr_type
="ipv6"
346 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
348 step("r1: Verify (*, G) ip mroutes")
349 oif
= TOPO
["routers"]["r1"]["links"]["r0"]["interface"]
350 result
= verify_mroutes(tgen
, dut
, STAR
, group_address_list
, iif
, oif
)
351 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
353 step("r1: Verify (S, G) ip mroutes")
354 iif
= TOPO
["routers"]["r1"]["links"]["r3"]["interface"]
355 result
= verify_mroutes(tgen
, dut
, SOURCE_ADDRESS
, group_address_list
, iif
, oif
)
356 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
358 step("r1: Verify (S, G) upstream IIF interface")
359 result
= verify_upstream_iif(tgen
, dut
, iif
, SOURCE_ADDRESS
, group_address_list
)
360 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
362 step("r1: Verify (S, G) upstream join state and join timer")
363 result
= verify_join_state_and_timer(
364 tgen
, dut
, iif
, SOURCE_ADDRESS
, group_address_list
, addr_type
="ipv6"
366 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
368 step("r2: Verify (*, G) upstream IIF interface")
371 result
= verify_upstream_iif(tgen
, dut
, iif
, STAR
, group_address_list
)
372 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
374 step("r2: Verify (*, G) upstream join state and join timer")
375 result
= verify_join_state_and_timer(
376 tgen
, dut
, iif
, STAR
, group_address_list
, addr_type
="ipv6"
378 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
380 step("r2: Verify (*, G) ip mroutes")
381 oif
= TOPO
["routers"]["r2"]["links"]["r1"]["interface"]
382 result
= verify_mroutes(tgen
, dut
, STAR
, group_address_list
, iif
, oif
)
383 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
385 step("r3: Verify (S, G) upstream IIF interface")
387 iif
= TOPO
["routers"]["r3"]["links"]["r5"]["interface"]
388 result
= verify_upstream_iif(tgen
, dut
, iif
, SOURCE_ADDRESS
, group_address_list
)
389 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
391 step("r3: Verify (S, G) upstream join state and join timer")
392 result
= verify_join_state_and_timer(
401 assert result
is not True, (
402 "Testcase {} : Failed \n "
403 "r3: (S,G) upstream state is joined and join timer is running\n Error: {}".format(
408 step("r3: Verify (S, G) ip mroutes")
409 oif
= TOPO
["routers"]["r3"]["links"]["r1"]["interface"]
410 result
= verify_mroutes(tgen
, dut
, SOURCE_ADDRESS
, group_address_list
, iif
, oif
)
411 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
413 step("r2: Verify (S, G) upstream IIF interface")
415 iif
= TOPO
["routers"]["r2"]["links"]["r3"]["interface"]
416 result
= verify_upstream_iif(
417 tgen
, dut
, iif
, SOURCE_ADDRESS
, group_address_list
, joinState
="NotJoined"
419 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
421 step("r2: Verify (S, G) upstream join state and join timer")
422 result
= verify_join_state_and_timer(
431 assert result
is not True, (
432 "Testcase {} : Failed \n "
433 "r2: (S,G) upstream state is joined and join timer is running\n Error: {}".format(
438 step("r2: Verify (S, G) ip mroutes")
440 result
= verify_mroutes(tgen
, dut
, SOURCE_ADDRESS
, group_address_list
, iif
, oif
)
441 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
443 step("r1: Delete RP configuration")
449 "rp_addr": TOPO
["routers"]["r2"]["links"]["lo"]["ipv6"].split(
452 "group_addr_range": GROUP_RANGE_3
,
460 result
= create_pim_config(tgen
, TOPO
, input_dict
)
461 assert result
is True, "Testcase {} : Failed Error: {}".format(tc_name
, result
)
463 step("r1: Shut the interface r1-r2-eth1 from R1 to R2")
465 intf
= TOPO
["routers"]["r1"]["links"]["r2"]["interface"]
466 shutdown_bringup_interface(tgen
, dut
, intf
, False)
468 step("r1: No Shut the interface r1-r2-eth1 from R1 to R2")
469 shutdown_bringup_interface(tgen
, dut
, intf
, True)
471 step("r1: Configure RP")
477 "rp_addr": TOPO
["routers"]["r2"]["links"]["lo"]["ipv6"].split(
480 "group_addr_range": GROUP_RANGE_3
,
487 result
= create_pim_config(tgen
, TOPO
, input_dict
)
488 assert result
is True, "Testcase {} : Failed Error: {}".format(tc_name
, result
)
490 step("r1: Shut the interface r1-r0-eth0 from R1 to R2")
491 intf
= TOPO
["routers"]["r1"]["links"]["r0"]["interface"]
492 shutdown_bringup_interface(tgen
, dut
, intf
, False)
494 step("r1: No Shut the interface r1-r0-eth0 from R1 to R2")
495 shutdown_bringup_interface(tgen
, dut
, intf
, True)
497 step("r1: Verify (*, G) upstream IIF interface")
499 iif
= TOPO
["routers"]["r1"]["links"]["r2"]["interface"]
500 result
= verify_upstream_iif(tgen
, dut
, iif
, STAR
, group_address_list
)
501 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
503 step("r1: Verify (*, G) upstream join state and join timer")
504 result
= verify_join_state_and_timer(
505 tgen
, dut
, iif
, STAR
, group_address_list
, addr_type
="ipv6"
507 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
509 step("r1: Verify (*, G) ip mroutes")
510 oif
= TOPO
["routers"]["r1"]["links"]["r0"]["interface"]
511 result
= verify_mroutes(tgen
, dut
, STAR
, group_address_list
, iif
, oif
)
512 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
514 step("r1: Verify (S, G) upstream IIF interface")
515 iif
= TOPO
["routers"]["r1"]["links"]["r3"]["interface"]
516 result
= verify_upstream_iif(tgen
, dut
, iif
, SOURCE_ADDRESS
, group_address_list
)
517 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
519 step("r1: Verify (S, G) upstream join state and join timer")
520 result
= verify_join_state_and_timer(
521 tgen
, dut
, iif
, SOURCE_ADDRESS
, group_address_list
, addr_type
="ipv6"
523 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
525 step("r1: Verify (S, G) ip mroutes")
526 result
= verify_mroutes(tgen
, dut
, SOURCE_ADDRESS
, group_address_list
, iif
, oif
)
527 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
529 step("r2: Verify (*, G) upstream IIF interface")
532 result
= verify_upstream_iif(tgen
, dut
, iif
, STAR
, group_address_list
)
533 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
535 step("r2: Verify (*, G) upstream join state and join timer")
536 result
= verify_join_state_and_timer(
537 tgen
, dut
, iif
, STAR
, group_address_list
, addr_type
="ipv6"
539 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
541 step("r2: Verify (*, G) ip mroutes")
542 oif
= TOPO
["routers"]["r2"]["links"]["r1"]["interface"]
543 result
= verify_mroutes(tgen
, dut
, STAR
, group_address_list
, iif
, oif
)
544 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
546 step("r3: Verify (S, G) upstream IIF interface")
548 iif
= TOPO
["routers"]["r3"]["links"]["r5"]["interface"]
549 result
= verify_upstream_iif(tgen
, dut
, iif
, SOURCE_ADDRESS
, group_address_list
)
550 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
552 step("r3: Verify (S, G) upstream join state and join timer")
553 result
= verify_join_state_and_timer(
562 assert result
is not True, (
563 "Testcase {} : Failed \n "
564 "r3: (S,G) upstream state is joined and join timer is running\n Error: {}".format(
569 step("r3: Verify (S, G) ip mroutes")
570 oif
= TOPO
["routers"]["r3"]["links"]["r1"]["interface"]
571 result
= verify_mroutes(tgen
, dut
, SOURCE_ADDRESS
, group_address_list
, iif
, oif
)
572 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
574 write_test_footer(tc_name
)
577 def test_pim6_multiple_groups_different_RP_address_p2(request
):
579 Verify IIF and OIL in updated in mroute when upstream interface
586 r0-----r1-------------r3-----r5
596 tc_name
= request
.node
.name
597 write_test_header(tc_name
)
599 # Don"t run this test if we have any failure.
600 if tgen
.routers_have_failure():
601 pytest
.skip(tgen
.errors
)
603 step("Creating configuration from JSON")
604 reset_config_on_routers(tgen
)
606 step("Enable MLD on r1 interface")
607 step("Enable the PIM6 on all the interfaces of r1, r2, r3 and r4 routers")
608 step("r2: Configure r2 as RP")
609 step("r4: Configure r4 as RP")
615 "rp_addr": TOPO
["routers"]["r2"]["links"]["lo"]["ipv6"].split(
618 "group_addr_range": GROUP_RANGE_LIST_1
,
627 "rp_addr": TOPO
["routers"]["r4"]["links"]["lo"]["ipv6"].split(
630 "group_addr_range": GROUP_RANGE_LIST_2
,
637 result
= create_pim_config(tgen
, TOPO
, input_dict
)
638 assert result
is True, "Testcase {} : Failed Error: {}".format(tc_name
, result
)
640 step("r2: Verify RP info")
643 rp_address
= TOPO
["routers"]["r2"]["links"]["lo"]["ipv6"].split("/")[0]
644 result
= verify_pim_rp_info(
645 tgen
, TOPO
, dut
, GROUP_RANGE_LIST_1
, oif
, rp_address
, SOURCE
647 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
649 step("r4: Verify RP info")
651 rp_address
= TOPO
["routers"]["r4"]["links"]["lo"]["ipv6"].split("/")[0]
652 result
= verify_pim_rp_info(
653 tgen
, TOPO
, dut
, GROUP_RANGE_LIST_2
, oif
, rp_address
, SOURCE
655 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
657 group_address_list
= GROUP_ADDRESS_LIST_1
+ GROUP_ADDRESS_LIST_2
658 step("r0: Send MLD join for 10 groups")
659 intf
= TOPO
["routers"]["r0"]["links"]["r1"]["interface"]
660 intf_ip
= TOPO
["routers"]["r0"]["links"]["r1"]["ipv6"].split("/")[0]
661 result
= socat_send_mld_join(
662 tgen
, "r0", "UDP6-RECV", group_address_list
, intf
, intf_ip
664 assert result
is True, "Testcase {}: Failed Error: {}".format(tc_name
, result
)
666 step("r1: Verify MLD groups")
668 intf_r1_r0
= TOPO
["routers"]["r1"]["links"]["r0"]["interface"]
669 result
= verify_mld_groups(tgen
, dut
, intf_r1_r0
, group_address_list
)
670 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
672 step("r5: Send multicast traffic for group {}".format(group_address_list
))
673 intf
= TOPO
["routers"]["r5"]["links"]["r3"]["interface"]
674 SOURCE_ADDRESS
= TOPO
["routers"]["r5"]["links"]["r3"]["ipv6"].split("/")[0]
675 result
= socat_send_pim6_traffic(tgen
, "r5", "UDP6-SEND", group_address_list
, intf
)
676 assert result
is True, "Testcase {}: Failed Error: {}".format(tc_name
, result
)
678 step("r1: Verify (*, G) upstream IIF interface")
680 iif1
= TOPO
["routers"]["r1"]["links"]["r2"]["interface"]
681 iif2
= TOPO
["routers"]["r1"]["links"]["r4"]["interface"]
683 for _iif
, _group
in zip([iif1
, iif2
], [GROUP_ADDRESS_LIST_1
, GROUP_ADDRESS_LIST_2
]):
684 result
= verify_upstream_iif(tgen
, dut
, _iif
, STAR
, _group
)
685 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
687 step("r1: Verify (*, G) upstream join state and join timer")
688 result
= verify_join_state_and_timer(
689 tgen
, dut
, _iif
, STAR
, _group
, addr_type
="ipv6"
691 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
693 step("r1: Verify (*, G) ip mroutes")
694 iif
= TOPO
["routers"]["r1"]["links"]["r2"]["interface"]
695 oif
= TOPO
["routers"]["r1"]["links"]["r0"]["interface"]
696 result
= verify_mroutes(tgen
, dut
, STAR
, GROUP_ADDRESS_LIST_1
, iif
, oif
)
697 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
699 step("r1: Verify (S, G) upstream IIF interface")
700 iif
= TOPO
["routers"]["r1"]["links"]["r3"]["interface"]
701 result
= verify_upstream_iif(tgen
, dut
, iif
, SOURCE_ADDRESS
, GROUP_ADDRESS_LIST_1
)
702 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
704 step("r1: Verify (S, G) upstream join state and join timer")
705 result
= verify_join_state_and_timer(
706 tgen
, dut
, iif
, SOURCE_ADDRESS
, GROUP_ADDRESS_LIST_1
, addr_type
="ipv6"
708 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
710 step("r1: Verify (S, G) ip mroutes")
711 result
= verify_mroutes(tgen
, dut
, SOURCE_ADDRESS
, GROUP_ADDRESS_LIST_1
, iif
, oif
)
712 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
714 step("r2: Verify (*, G) upstream IIF interface")
717 result
= verify_upstream_iif(tgen
, dut
, iif
, STAR
, GROUP_ADDRESS_LIST_1
)
718 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
720 step("r2: Verify (*, G) upstream join state and join timer")
721 result
= verify_join_state_and_timer(
722 tgen
, dut
, iif
, STAR
, GROUP_ADDRESS_LIST_1
, addr_type
="ipv6"
724 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
726 step("r2: Verify (*, G) ip mroutes")
727 oif
= TOPO
["routers"]["r2"]["links"]["r1"]["interface"]
728 result
= verify_mroutes(tgen
, dut
, STAR
, GROUP_ADDRESS_LIST_1
, iif
, oif
)
729 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
731 step("r2: Verify (S, G) upstream IIF interface")
732 iif
= TOPO
["routers"]["r2"]["links"]["r3"]["interface"]
733 result
= verify_upstream_iif(
734 tgen
, dut
, iif
, SOURCE_ADDRESS
, GROUP_ADDRESS_LIST_1
, joinState
="NotJoined"
736 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
738 step("r2: Verify (S, G) upstream join state and join timer")
739 result
= verify_join_state_and_timer(
744 GROUP_ADDRESS_LIST_1
,
748 assert result
is not True, (
749 "Testcase {} : Failed \n "
750 "r2: (S,G) upstream state is joined and join timer is running\n Error: {}".format(
755 step("r2: Verify (S, G) ip mroutes")
757 result
= verify_mroutes(tgen
, dut
, SOURCE_ADDRESS
, GROUP_ADDRESS_LIST_1
, iif
, oif
)
758 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
760 step("r3: Verify (S, G) upstream IIF interface")
762 iif
= TOPO
["routers"]["r3"]["links"]["r5"]["interface"]
763 result
= verify_upstream_iif(tgen
, dut
, iif
, SOURCE_ADDRESS
, GROUP_ADDRESS_LIST_1
)
764 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
766 step("r3: Verify (S, G) upstream join state and join timer")
767 result
= verify_join_state_and_timer(
772 GROUP_ADDRESS_LIST_1
,
776 assert result
is not True, (
777 "Testcase {} : Failed \n "
778 "r3: (S,G) upstream state is joined and join timer is running\n Error: {}".format(
783 step("r3: Verify (S, G) ip mroutes")
784 oif
= TOPO
["routers"]["r3"]["links"]["r1"]["interface"]
785 result
= verify_mroutes(tgen
, dut
, SOURCE_ADDRESS
, GROUP_ADDRESS_LIST_1
, iif
, oif
)
786 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
788 step("r1: Verify (*, G) upstream IIF interface")
790 iif
= TOPO
["routers"]["r1"]["links"]["r4"]["interface"]
791 result
= verify_upstream_iif(tgen
, dut
, iif
, STAR
, GROUP_ADDRESS_LIST_2
)
792 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
794 step("r1: Verify (*, G) upstream join state and join timer")
795 result
= verify_join_state_and_timer(
796 tgen
, dut
, iif
, STAR
, GROUP_ADDRESS_LIST_2
, addr_type
="ipv6"
798 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
800 step("r1: Verify (*, G) ip mroutes")
801 oif
= TOPO
["routers"]["r1"]["links"]["r0"]["interface"]
802 result
= verify_mroutes(tgen
, dut
, STAR
, GROUP_ADDRESS_LIST_2
, iif
, oif
)
803 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
805 step("r1: Verify (S, G) upstream IIF interface")
806 iif
= TOPO
["routers"]["r1"]["links"]["r3"]["interface"]
807 result
= verify_upstream_iif(tgen
, dut
, iif
, SOURCE_ADDRESS
, GROUP_ADDRESS_LIST_2
)
808 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
810 step("r1: Verify (S, G) upstream join state and join timer")
811 result
= verify_join_state_and_timer(
812 tgen
, dut
, iif
, SOURCE_ADDRESS
, GROUP_ADDRESS_LIST_2
, addr_type
="ipv6"
814 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
816 step("r1: Verify (S, G) ip mroutes")
817 result
= verify_mroutes(tgen
, dut
, SOURCE_ADDRESS
, GROUP_ADDRESS_LIST_2
, iif
, oif
)
818 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
820 step("r4: Verify (*, G) upstream IIF interface")
823 result
= verify_upstream_iif(tgen
, dut
, iif
, STAR
, GROUP_ADDRESS_LIST_2
)
824 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
826 step("r4: Verify (*, G) upstream join state and join timer")
827 result
= verify_join_state_and_timer(
828 tgen
, dut
, iif
, STAR
, GROUP_ADDRESS_LIST_2
, addr_type
="ipv6"
830 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
832 step("r4: Verify (*, G) ip mroutes")
833 oif
= TOPO
["routers"]["r4"]["links"]["r1"]["interface"]
834 result
= verify_mroutes(tgen
, dut
, STAR
, GROUP_ADDRESS_LIST_2
, iif
, oif
)
835 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
837 step("r4: Verify (S, G) upstream IIF interface")
838 iif
= TOPO
["routers"]["r4"]["links"]["r3"]["interface"]
839 result
= verify_upstream_iif(
840 tgen
, dut
, iif
, SOURCE_ADDRESS
, GROUP_ADDRESS_LIST_2
, joinState
="NotJoined"
842 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
844 step("r4: Verify (S, G) upstream join state and join timer")
845 result
= verify_join_state_and_timer(
850 GROUP_ADDRESS_LIST_2
,
854 assert result
is not True, (
855 "Testcase {} : Failed \n "
856 "r4: (S,G) upstream state is joined and join timer is running\n Error: {}".format(
861 step("r4: Verify (S, G) ip mroutes")
863 result
= verify_mroutes(tgen
, dut
, SOURCE_ADDRESS
, GROUP_ADDRESS_LIST_2
, iif
, oif
)
864 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
866 step("r3: Verify (S, G) upstream IIF interface")
868 iif
= TOPO
["routers"]["r3"]["links"]["r5"]["interface"]
869 result
= verify_upstream_iif(tgen
, dut
, iif
, SOURCE_ADDRESS
, GROUP_ADDRESS_LIST_2
)
870 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
872 step("r3: Verify (S, G) upstream join state and join timer")
873 result
= verify_join_state_and_timer(
878 GROUP_ADDRESS_LIST_2
,
882 assert result
is not True, "Testcase {} :Failed \n Error: {}".format(
886 step("r3: Verify (S, G) ip mroutes")
887 oif
= TOPO
["routers"]["r3"]["links"]["r1"]["interface"]
888 result
= verify_mroutes(tgen
, dut
, SOURCE_ADDRESS
, GROUP_ADDRESS_LIST_2
, iif
, oif
)
889 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
891 step("Delete RP configuration")
897 "rp_addr": TOPO
["routers"]["r2"]["links"]["lo"]["ipv6"].split(
900 "group_addr_range": GROUP_RANGE_LIST_1
,
910 "rp_addr": TOPO
["routers"]["r4"]["links"]["lo"]["ipv6"].split(
913 "group_addr_range": GROUP_RANGE_LIST_2
,
921 result
= create_pim_config(tgen
, TOPO
, input_dict
)
922 assert result
is True, "Testcase {} : Failed Error: {}".format(tc_name
, result
)
924 step("r1, r2, r3, r4: Re-configure RP")
930 "rp_addr": TOPO
["routers"]["r2"]["links"]["lo"]["ipv6"].split(
933 "group_addr_range": GROUP_RANGE_LIST_1
,
942 "rp_addr": TOPO
["routers"]["r4"]["links"]["lo"]["ipv6"].split(
945 "group_addr_range": GROUP_RANGE_LIST_2
,
952 result
= create_pim_config(tgen
, TOPO
, input_dict
)
953 assert result
is True, "Testcase {} : Failed Error: {}".format(tc_name
, result
)
955 step("r1: Shut/No Shut the interfacesfrom R1 to R2, R4 and R0")
957 intf1
= TOPO
["routers"]["r1"]["links"]["r2"]["interface"]
958 intf2
= TOPO
["routers"]["r1"]["links"]["r4"]["interface"]
959 intf3
= TOPO
["routers"]["r1"]["links"]["r0"]["interface"]
960 for intf
in [intf1
, intf2
, intf3
]:
961 shutdown_bringup_interface(tgen
, dut
, intf
, False)
962 shutdown_bringup_interface(tgen
, dut
, intf
, True)
964 step("r1: Verify (*, G) upstream IIF interface")
966 iif
= TOPO
["routers"]["r1"]["links"]["r2"]["interface"]
967 result
= verify_upstream_iif(tgen
, dut
, iif
, STAR
, GROUP_ADDRESS_LIST_1
)
968 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
970 step("r1: Verify (*, G) upstream join state and join timer")
971 result
= verify_join_state_and_timer(
972 tgen
, dut
, iif
, STAR
, GROUP_ADDRESS_LIST_1
, addr_type
="ipv6"
974 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
976 step("r1: Verify (*, G) ip mroutes")
977 oif
= TOPO
["routers"]["r1"]["links"]["r0"]["interface"]
978 result
= verify_mroutes(tgen
, dut
, STAR
, GROUP_ADDRESS_LIST_1
, iif
, oif
)
979 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
981 step("r1: Verify (S, G) upstream IIF interface")
982 iif
= TOPO
["routers"]["r1"]["links"]["r3"]["interface"]
983 result
= verify_upstream_iif(tgen
, dut
, iif
, SOURCE_ADDRESS
, GROUP_ADDRESS_LIST_1
)
984 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
986 step("r1: Verify (S, G) upstream join state and join timer")
987 result
= verify_join_state_and_timer(
988 tgen
, dut
, iif
, SOURCE_ADDRESS
, GROUP_ADDRESS_LIST_1
, addr_type
="ipv6"
990 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
992 step("r1: Verify (S, G) ip mroutes")
993 result
= verify_mroutes(tgen
, dut
, SOURCE_ADDRESS
, GROUP_ADDRESS_LIST_1
, iif
, oif
)
994 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
996 step("r2: Verify (*, G) upstream IIF interface")
999 result
= verify_upstream_iif(tgen
, dut
, iif
, STAR
, GROUP_ADDRESS_LIST_1
)
1000 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
1002 step("r2: Verify (*, G) upstream join state and join timer")
1003 result
= verify_join_state_and_timer(
1004 tgen
, dut
, iif
, STAR
, GROUP_ADDRESS_LIST_1
, addr_type
="ipv6"
1006 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
1008 step("r2: Verify (*, G) ip mroutes")
1009 oif
= TOPO
["routers"]["r2"]["links"]["r1"]["interface"]
1010 result
= verify_mroutes(tgen
, dut
, STAR
, GROUP_ADDRESS_LIST_1
, iif
, oif
)
1011 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
1013 step("r2: Verify (S, G) upstream IIF interface")
1014 iif
= TOPO
["routers"]["r2"]["links"]["r3"]["interface"]
1015 result
= verify_upstream_iif(
1016 tgen
, dut
, iif
, SOURCE_ADDRESS
, GROUP_ADDRESS_LIST_1
, joinState
="NotJoined"
1018 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
1020 step("r2: Verify (S, G) upstream join state and join timer")
1021 result
= verify_join_state_and_timer(
1026 GROUP_ADDRESS_LIST_1
,
1030 assert result
is not True, (
1031 "Testcase {} : Failed \n "
1032 "r2: (S,G) upstream state is joined and join timer is running\n Error: {}".format(
1037 step("r2: Verify (S, G) ip mroutes")
1039 result
= verify_mroutes(tgen
, dut
, SOURCE_ADDRESS
, GROUP_ADDRESS_LIST_1
, iif
, oif
)
1040 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
1042 step("r3: Verify (S, G) upstream IIF interface")
1044 iif
= TOPO
["routers"]["r3"]["links"]["r5"]["interface"]
1045 result
= verify_upstream_iif(tgen
, dut
, iif
, SOURCE_ADDRESS
, GROUP_ADDRESS_LIST_1
)
1046 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
1048 step("r3: Verify (S, G) upstream join state and join timer")
1049 result
= verify_join_state_and_timer(
1054 GROUP_ADDRESS_LIST_1
,
1058 assert result
is not True, (
1059 "Testcase {} : Failed \n "
1060 "r3: (S,G) upstream state is joined and join timer is running\n Error: {}".format(
1065 step("r3: Verify (S, G) ip mroutes")
1066 oif
= TOPO
["routers"]["r3"]["links"]["r1"]["interface"]
1067 result
= verify_mroutes(tgen
, dut
, SOURCE_ADDRESS
, GROUP_ADDRESS_LIST_1
, iif
, oif
)
1068 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
1070 step("r1: Verify (*, G) upstream IIF interface")
1072 iif
= TOPO
["routers"]["r1"]["links"]["r4"]["interface"]
1073 result
= verify_upstream_iif(tgen
, dut
, iif
, STAR
, GROUP_ADDRESS_LIST_2
)
1074 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
1076 step("r1: Verify (*, G) upstream join state and join timer")
1077 result
= verify_join_state_and_timer(
1078 tgen
, dut
, iif
, STAR
, GROUP_ADDRESS_LIST_2
, addr_type
="ipv6"
1080 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
1082 step("r1: Verify (*, G) ip mroutes")
1083 oif
= TOPO
["routers"]["r1"]["links"]["r0"]["interface"]
1084 result
= verify_mroutes(tgen
, dut
, STAR
, GROUP_ADDRESS_LIST_2
, iif
, oif
)
1085 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
1087 step("r1: Verify (S, G) upstream IIF interface")
1088 iif
= TOPO
["routers"]["r1"]["links"]["r3"]["interface"]
1089 result
= verify_upstream_iif(tgen
, dut
, iif
, SOURCE_ADDRESS
, GROUP_ADDRESS_LIST_2
)
1090 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
1092 step("r1: Verify (S, G) upstream join state and join timer")
1093 result
= verify_join_state_and_timer(
1094 tgen
, dut
, iif
, SOURCE_ADDRESS
, GROUP_ADDRESS_LIST_2
, addr_type
="ipv6"
1096 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
1098 step("r1: Verify (S, G) ip mroutes")
1099 result
= verify_mroutes(tgen
, dut
, SOURCE_ADDRESS
, GROUP_ADDRESS_LIST_2
, iif
, oif
)
1100 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
1102 step("r4: Verify (*, G) upstream IIF interface")
1105 result
= verify_upstream_iif(tgen
, dut
, iif
, STAR
, GROUP_ADDRESS_LIST_2
)
1106 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
1108 step("r4: Verify (*, G) upstream join state and join timer")
1109 result
= verify_join_state_and_timer(
1110 tgen
, dut
, iif
, STAR
, GROUP_ADDRESS_LIST_2
, addr_type
="ipv6"
1112 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
1114 step("r4: Verify (*, G) ip mroutes")
1115 oif
= TOPO
["routers"]["r4"]["links"]["r1"]["interface"]
1116 result
= verify_mroutes(tgen
, dut
, STAR
, GROUP_ADDRESS_LIST_2
, iif
, oif
)
1117 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
1119 step("r4: Verify (S, G) upstream IIF interface")
1120 iif
= TOPO
["routers"]["r4"]["links"]["r3"]["interface"]
1121 result
= verify_upstream_iif(
1122 tgen
, dut
, iif
, SOURCE_ADDRESS
, GROUP_ADDRESS_LIST_2
, joinState
="NotJoined"
1124 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
1126 step("r4: Verify (S, G) upstream join state and join timer")
1127 result
= verify_join_state_and_timer(
1132 GROUP_ADDRESS_LIST_2
,
1136 assert result
is not True, (
1137 "Testcase {} : Failed \n "
1138 "r4: (S,G) upstream state is joined and join timer is running\n Error: {}".format(
1143 step("r4: Verify (S, G) ip mroutes")
1145 result
= verify_mroutes(tgen
, dut
, SOURCE_ADDRESS
, GROUP_ADDRESS_LIST_2
, iif
, oif
)
1146 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
1148 step("r3: Verify (S, G) upstream IIF interface")
1150 iif
= TOPO
["routers"]["r3"]["links"]["r5"]["interface"]
1151 result
= verify_upstream_iif(tgen
, dut
, iif
, SOURCE_ADDRESS
, GROUP_ADDRESS_LIST_2
)
1152 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
1154 step("r3: Verify (S, G) upstream join state and join timer")
1155 result
= verify_join_state_and_timer(
1160 GROUP_ADDRESS_LIST_2
,
1164 assert result
is not True, (
1165 "Testcase {} : Failed \n "
1166 "r3: (S,G) upstream state is joined and join timer is running\n Error: {}".format(
1171 step("r3: Verify (S, G) ip mroutes")
1172 oif
= TOPO
["routers"]["r3"]["links"]["r1"]["interface"]
1173 result
= verify_mroutes(tgen
, dut
, SOURCE_ADDRESS
, GROUP_ADDRESS_LIST_2
, iif
, oif
)
1174 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
1176 write_test_footer(tc_name
)
1179 def test_pim6_delete_RP_shut_noshut_upstream_interface_p1(request
):
1181 Verify RP info and (*,G) mroute after deleting the RP and shut /
1182 no shut the RPF interface.
1188 r0-----r1-------------r3
1191 tgen
= get_topogen()
1192 tc_name
= request
.node
.name
1193 write_test_header(tc_name
)
1195 # Don"t run this test if we have any failure.
1196 if tgen
.routers_have_failure():
1197 pytest
.skip(tgen
.errors
)
1199 step("Creating configuration from JSON")
1200 reset_config_on_routers(tgen
)
1202 step("Enable MLD on r1 interface")
1203 step("Enable the PIM6 on all the interfaces of r1, r2, r3 and r4 routers")
1204 step("r2: Configure r2 as RP")
1210 "rp_addr": TOPO
["routers"]["r2"]["links"]["lo"]["ipv6"].split(
1213 "group_addr_range": GROUP_RANGE_1
,
1220 result
= create_pim_config(tgen
, TOPO
, input_dict
)
1221 assert result
is True, "Testcase {} : Failed Error: {}".format(tc_name
, result
)
1223 step("r2: verify rp-info")
1226 rp_address
= TOPO
["routers"]["r2"]["links"]["lo"]["ipv6"].split("/")[0]
1227 result
= verify_pim_rp_info(
1228 tgen
, TOPO
, dut
, GROUP_ADDRESS_1
, oif
, rp_address
, SOURCE
1230 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
1232 step("r0: Send MLD join")
1233 intf
= TOPO
["routers"]["r0"]["links"]["r1"]["interface"]
1234 intf_ip
= TOPO
["routers"]["r0"]["links"]["r1"]["ipv6"].split("/")[0]
1235 result
= socat_send_mld_join(
1236 tgen
, "r0", "UDP6-RECV", GROUP_ADDRESS_1
, intf
, intf_ip
1238 assert result
is True, "Testcase {}: Failed Error: {}".format(tc_name
, result
)
1240 step("r1: Verify MLD groups")
1242 intf_r1_r0
= TOPO
["routers"]["r1"]["links"]["r0"]["interface"]
1243 result
= verify_mld_groups(tgen
, dut
, intf_r1_r0
, GROUP_ADDRESS_1
)
1244 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
1246 step("r1: Verify (*, G) ip mroutes created")
1247 iif
= TOPO
["routers"]["r1"]["links"]["r2"]["interface"]
1248 oif
= TOPO
["routers"]["r1"]["links"]["r0"]["interface"]
1249 result
= verify_mroutes(tgen
, dut
, STAR
, GROUP_ADDRESS_1
, iif
, oif
)
1250 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
1252 step("r2: Verify (*, G) ip mroutes created")
1255 oif
= TOPO
["routers"]["r2"]["links"]["r1"]["interface"]
1256 result
= verify_mroutes(tgen
, dut
, STAR
, GROUP_ADDRESS_1
, iif
, oif
)
1257 assert result
is True, ASSERT_MSG
.format(tc_name
, result
)
1259 step("r1: Delete RP configuration")
1265 "rp_addr": TOPO
["routers"]["r2"]["links"]["lo"]["ipv6"].split(
1268 "group_addr_range": GROUP_RANGE_1
,
1276 result
= create_pim_config(tgen
, TOPO
, input_dict
)
1277 assert result
is True, "Testcase {} : Failed Error: {}".format(tc_name
, result
)
1279 step("r1: Shut/No Shut the interface r1-r2-eth1/r1-r0-eth0 from R1 to R2")
1281 intf1
= TOPO
["routers"]["r1"]["links"]["r2"]["interface"]
1282 intf2
= TOPO
["routers"]["r1"]["links"]["r0"]["interface"]
1283 for intf
in [intf1
, intf2
]:
1284 shutdown_bringup_interface(tgen
, dut
, intf
, False)
1285 shutdown_bringup_interface(tgen
, dut
, intf
, True)
1287 step("r2: Shut the RP interface lo")
1290 shutdown_bringup_interface(tgen
, dut
, intf
, False)
1292 step("r1: Shut the interface r1-r2-eth1/r1-r3-eth2 towards RP")
1293 intf3
= TOPO
["routers"]["r1"]["links"]["r3"]["interface"]
1294 for intf
in [intf1
, intf3
]:
1295 shutdown_bringup_interface(tgen
, dut
, intf
, False)
1297 step("r1: Verify (*, G) ip mroutes cleared")
1299 iif
= TOPO
["routers"]["r1"]["links"]["r2"]["interface"]
1300 oif
= TOPO
["routers"]["r1"]["links"]["r0"]["interface"]
1301 result
= verify_mroutes(tgen
, dut
, STAR
, GROUP_ADDRESS_1
, iif
, oif
, expected
=False)
1302 assert result
is not True, (
1303 "Testcase {} : Failed \n "
1304 "r1: (*,G) mroutes are not cleared after shut of R1 to R0 link\n Error: {}".format(
1309 step("r2: Verify (*, G) ip mroutes cleared")
1312 oif
= TOPO
["routers"]["r2"]["links"]["r1"]["interface"]
1313 result
= verify_mroutes(tgen
, dut
, STAR
, GROUP_ADDRESS_1
, iif
, oif
, expected
=False)
1314 assert result
is not True, (
1315 "Testcase {} : Failed \n "
1316 "r2: (*,G) mroutes are not cleared after shut of R1 to R0 link\n Error: {}".format(
1321 write_test_footer(tc_name
)
1324 if __name__
== "__main__":
1325 args
= ["-s"] + sys
.argv
[1:]
1326 sys
.exit(pytest
.main(args
))