Skip to content

Commit 6a1fdfe

Browse files
echuawumssonicbld
authored andcommitted
Update script to make script test_mux_port_iptables_entries pass (sonic-net#18798)
Add Mellanox-SN4700-V64 into mellanox_dualtor_hwskus Update key sonic_hwsku for parameter host_vars
1 parent 1ab1640 commit 6a1fdfe

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

ansible/group_vars/sonic/variables

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ mellanox_spc4_hwskus: [ 'ACS-SN5600' , 'Mellanox-SN5600-V256', 'Mellanox-SN5600-
2626
'Mellanox-SN5610N-C256S2', 'Mellanox-SN5610N-C224O8']
2727
mellanox_spc5_hwskus: [ 'Mellanox-SN5640-C512S2', 'Mellanox-SN5640-C448O16']
2828
mellanox_hwskus: "{{ mellanox_spc1_hwskus + mellanox_spc2_hwskus + mellanox_spc3_hwskus + mellanox_spc4_hwskus + mellanox_spc5_hwskus }}"
29-
mellanox_dualtor_hwskus: [ 'Mellanox-SN4600C-C64' ]
29+
mellanox_dualtor_hwskus: [ 'Mellanox-SN4600C-C64', 'Mellanox-SN4700-V64' ]
3030

3131
cavium_hwskus: [ "AS7512", "XP-SIM" ]
3232

ansible/library/dual_tor_facts.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ def parse_neighbor_tor(self):
4242
neighbor['hostname'] = [
4343
dut for dut in self.testbed_facts['duts'] if dut != self.hostname][0]
4444
neighbor['ip'] = self.host_vars[neighbor['hostname']]['ansible_host']
45-
neighbor['hwsku'] = self.host_vars[neighbor['hostname']]['hwsku']
45+
if 'hwsku' in self.host_vars[neighbor['hostname']]:
46+
neighbor['hwsku'] = self.host_vars[neighbor['hostname']]['hwsku']
47+
else:
48+
neighbor['hwsku'] = self.host_vars[neighbor['hostname']]['sonic_hwsku']
4649

4750
self.dual_tor_facts['neighbor'] = neighbor
4851

0 commit comments

Comments
 (0)