You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes in tests, we compose docker container with the asic_index,
for example, the swss container for asic1(asic_index: 1) will be swss1,
For multi-asic device, the format is f"swss{self.asic_index}"
But the format is not applicable to single-asic,
f"swss{self.asic_index}" -> 'swss0'
but actually the container is 'swss'
This causes the infra and logic to be not compatible between single-asic and multi-asic.
Sample issue: #16314
Results you see
f"swss{self.asic_index}" on single_asic -> swss0
Which != actual value: swss.
Results you expected to see
We should have a compatible function for SonicAsic
class SonicAsic(object):
def asic_index_for_service(self):
if self.sonichost.is_multi_asic:
return self.asic_index
else:
return None
Issue Description
For single-asic device, the self.asic_index will be set as 0
sonic-mgmt/tests/common/devices/multi_asic.py
Line 37 in 8b4f733
Sometimes in tests, we compose docker container with the asic_index,
for example, the swss container for asic1(asic_index: 1) will be swss1,
For multi-asic device, the format is f"swss{self.asic_index}"
But the format is not applicable to single-asic,
f"swss{self.asic_index}" -> 'swss0'
but actually the container is 'swss'
This causes the infra and logic to be not compatible between single-asic and multi-asic.
Sample issue: #16314
Results you see
f"swss{self.asic_index}" on single_asic -> swss0
Which != actual value: swss.
Results you expected to see
We should have a compatible function for SonicAsic
then
Is it platform specific
generic
Relevant log output
No response
Output of
show version
No response
Attach files (if any)
No response
The text was updated successfully, but these errors were encountered: