Skip to content

Commit 6e70e38

Browse files
authored
fix setup for single asic lc (#6951)
Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <[email protected]> How did you do it? Fix the acl setup function for t2 to handle single asic linecards How did you verify/test it? Run t2 tests on the T2 testbed with single and multi asic linecards
1 parent 857ad7a commit 6e70e38

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/acl/test_acl.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from tests.common.fixtures.ptfhost_utils import copy_arp_responder_py, run_garp_service, change_mac_addresses # noqa F401
2121
from tests.common.utilities import wait_until
2222
from tests.common.dualtor.dual_tor_mock import mock_server_base_ip_addr # noqa F401
23+
from tests.common.helpers.constants import DEFAULT_NAMESPACE
2324

2425
logger = logging.getLogger(__name__)
2526

@@ -136,8 +137,8 @@ def get_t2_info(duthosts, tbinfo):
136137
defaultdict(list), defaultdict(list))
137138

138139
for sonic_host_or_asic_inst in duthost.get_sonic_host_and_frontend_asic_instance():
139-
namespace = sonic_host_or_asic_inst.namespace if hasattr(sonic_host_or_asic_inst, 'namespace') else ''
140-
if namespace == '':
140+
namespace = sonic_host_or_asic_inst.namespace if hasattr(sonic_host_or_asic_inst, 'namespace') else DEFAULT_NAMESPACE
141+
if duthost.sonichost.is_multi_asic and namespace == DEFAULT_NAMESPACE:
141142
continue
142143
asic_id = duthost.get_asic_id_from_namespace(namespace)
143144
router_mac = duthost.asic_instance(asic_id).get_router_mac()

0 commit comments

Comments
 (0)