Skip to content

Commit 76a90ce

Browse files
committed
reorganize
1 parent 065340f commit 76a90ce

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

generic_config_updater/field_operation_validators.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ def get_asic_name():
1616
proc.communicate()
1717
output = proc.stdout.readlines()
1818

19-
if proc.returncode == 0:
19+
if device_info.get_sonic_version_info()['asic_type'] == 'cisco-8000':
20+
asic = "cisco-8000"
21+
elif proc.returncode == 0:
2022
if "Broadcom Limited Device b960" in output or "Broadcom Limited Broadcom BCM56960" in output:
2123
asic = "th"
2224
elif "Broadcom Limited Device b971" in output:
@@ -25,10 +27,7 @@ def get_asic_name():
2527
asic = "td2"
2628
elif "Broadcom Limited Device b870" in output or "Broadcom Inc. and subsidiaries Device b870" in output:
2729
asic = "td3"
28-
29-
if device_info.get_sonic_version_info()['asic_type'] == 'cisco-8000':
30-
asic = "cisco-8000"
31-
elif asic == "unknown":
30+
else:
3231
spc1_hwskus = [ 'ACS-MSN2700', 'ACS-MSN2740', 'ACS-MSN2100', 'ACS-MSN2410', 'ACS-MSN2010', 'Mellanox-SN2700', 'Mellanox-SN2700-D48C8' ]
3332
if hwsku.lower() in [spc1_hwsku.lower() for spc1_hwsku in spc1_hwskus]:
3433
asic = "spc1"

0 commit comments

Comments
 (0)