2222from tests .common .dualtor .dual_tor_mock import mock_server_base_ip_addr # noqa F401
2323from tests .common .helpers .constants import DEFAULT_NAMESPACE
2424from tests .common .utilities import get_upstream_neigh_type , get_downstream_neigh_type
25+ from tests .common .fixtures .conn_graph_facts import conn_graph_facts # noqa F401
26+ from tests .common .platform .processes_utils import wait_critical_processes
27+ from tests .common .platform .interface_utils import check_all_interface_information
2528
2629logger = logging .getLogger (__name__ )
2730
3134 pytest .mark .topology ("t0" , "t1" , "t2" , "m0" , "mx" ),
3235]
3336
37+ MAX_WAIT_TIME_FOR_INTERFACES = 360
38+
3439BASE_DIR = os .path .dirname (os .path .realpath (__file__ ))
3540DUT_TMP_DIR = "acl_test_dir" # Keep it under home dir so it persists through reboot
3641FILES_DIR = os .path .join (BASE_DIR , "files" )
@@ -582,7 +587,7 @@ def setup_rules(self, dut, acl_table, ip_version):
582587 """
583588 pass
584589
585- def post_setup_hook (self , dut , localhost , populate_vlan_arp_entries , tbinfo ):
590+ def post_setup_hook (self , dut , localhost , populate_vlan_arp_entries , tbinfo , conn_graph_facts ): # noqa F811
586591 """Perform actions after rules have been applied.
587592
588593 Args:
@@ -611,7 +616,8 @@ def teardown_rules(self, dut):
611616 dut .command ("config acl update full {}" .format (remove_rules_dut_path ))
612617
613618 @pytest .fixture (scope = "class" , autouse = True )
614- def acl_rules (self , duthosts , localhost , setup , acl_table , populate_vlan_arp_entries , tbinfo , ip_version ):
619+ def acl_rules (self , duthosts , localhost , setup , acl_table , populate_vlan_arp_entries , tbinfo ,
620+ ip_version , conn_graph_facts ): # noqa F811
615621 """Setup/teardown ACL rules for the current set of tests.
616622
617623 Args:
@@ -638,7 +644,7 @@ def acl_rules(self, duthosts, localhost, setup, acl_table, populate_vlan_arp_ent
638644 with loganalyzer :
639645 self .setup_rules (duthost , acl_table , ip_version )
640646
641- self .post_setup_hook (duthost , localhost , populate_vlan_arp_entries , tbinfo )
647+ self .post_setup_hook (duthost , localhost , populate_vlan_arp_entries , tbinfo , conn_graph_facts )
642648
643649 assert self .check_rule_counters (duthost ), "Rule counters should be ready!"
644650
@@ -1182,7 +1188,7 @@ class TestAclWithReboot(TestBasicAcl):
11821188 upon startup.
11831189 """
11841190
1185- def post_setup_hook (self , dut , localhost , populate_vlan_arp_entries , tbinfo ):
1191+ def post_setup_hook (self , dut , localhost , populate_vlan_arp_entries , tbinfo , conn_graph_facts ): # noqa F811
11861192 """Save configuration and reboot after rules are applied.
11871193
11881194 Args:
@@ -1196,6 +1202,19 @@ def post_setup_hook(self, dut, localhost, populate_vlan_arp_entries, tbinfo):
11961202 # We need some additional delay on e1031
11971203 if dut .facts ["platform" ] == "x86_64-cel_e1031-r0" :
11981204 time .sleep (240 )
1205+
1206+ # We need additional delay and make sure ports are up for Nokia-IXR7250E-36x400G
1207+ if dut .facts ["hwsku" ] == "Nokia-IXR7250E-36x400G" :
1208+ interfaces = conn_graph_facts ["device_conn" ][dut .hostname ]
1209+ logging .info ("Wait until all critical services are fully started" )
1210+ wait_critical_processes (dut )
1211+
1212+ xcvr_skip_list = {dut .hostname : []}
1213+ result = wait_until (MAX_WAIT_TIME_FOR_INTERFACES , 20 , 0 , check_all_interface_information , dut , interfaces ,
1214+ xcvr_skip_list )
1215+ assert result , "Not all transceivers are detected or interfaces are up in {} seconds" .format (
1216+ MAX_WAIT_TIME_FOR_INTERFACES )
1217+
11991218 populate_vlan_arp_entries ()
12001219
12011220
@@ -1206,7 +1225,7 @@ class TestAclWithPortToggle(TestBasicAcl):
12061225 Verify that ACLs still function as expected after links flap.
12071226 """
12081227
1209- def post_setup_hook (self , dut , localhost , populate_vlan_arp_entries , tbinfo ):
1228+ def post_setup_hook (self , dut , localhost , populate_vlan_arp_entries , tbinfo , conn_graph_facts ): # noqa F811
12101229 """Toggle ports after rules are applied.
12111230
12121231 Args:
0 commit comments