sonic-buildimage/device
Zhijian Li ab966ceeea
[E1031] Bugfix for Python syntax error in sonic_platform/common.py (#18386)
Why I did it
Bugfix for Python syntax error in sonic_platform/common.py.
A method of class need to have self as parameter.

Fixing below issue:

e1031:~$ show int st
Traceback (most recent call last):
  File "/usr/local/bin/intfutil", line 836, in <module>
    main()
  File "/usr/local/bin/intfutil", line 819, in main
    interface_stat.display_intf_status()
  File "/usr/local/bin/intfutil", line 448, in display_intf_status
    self.get_intf_status()
  File "/usr/local/lib/python3.9/dist-packages/utilities_common/multi_asic.py", line 157, in wrapped_run_on_all_asics
    func(self,  *args, **kwargs)
  File "/usr/local/bin/intfutil", line 529, in get_intf_status
    self.portchannel_speed_dict = po_speed_dict(self.po_int_dict, self.db)
  File "/usr/local/bin/intfutil", line 334, in po_speed_dict
    optics_type = port_optics_get(appl_db, value[0], PORT_OPTICS_TYPE)
  File "/usr/local/bin/intfutil", line 224, in port_optics_get
    if is_rj45_port(intf_name):
  File "/usr/local/lib/python3.9/dist-packages/utilities_common/platform_sfputil_helper.py", line 120, in is_rj45_port
    platform_chassis = sonic_platform.platform.Platform().get_chassis()
  File "/usr/local/lib/python3.9/dist-packages/sonic_platform/platform.py", line 21, in __init__
    self._chassis = Chassis()
  File "/usr/local/lib/python3.9/dist-packages/sonic_platform/chassis.py", line 37, in __init__
    self._is_host = self._api_common.is_host()
TypeError: is_host() takes 0 positional arguments but 1 was given
Work item tracking
Microsoft ADO (number only): 27208152
How I did it
Add self parameter to function Common::is_host().

How to verify it
Verified on E1031 DUT with this patch.
2024-03-19 14:04:38 +08:00
..
accton [Edgecore][device/accton] Fix subprocess.call issue in is_host(). (#13111) 2022-12-20 13:13:42 -08:00
alphanetworks Fix code issue when SonicV2Connector.get() return None. (#13250) 2023-01-09 11:37:43 -08:00
arista [Arista] Update config.bcm of 7060_cx32s for handling 40g optics with unreliable los settings (#17768) 2024-01-16 11:34:19 -08:00
barefoot [BFN] Remove not common entries from pcie yaml configuration (#12816) 2023-02-06 09:54:43 -08:00
broadcom [broadcom]: Set default SYNCD_SHM_SIZE for Broadcom XGS devices (#13297) 2023-01-30 20:23:03 -08:00
celestica [E1031] Bugfix for Python syntax error in sonic_platform/common.py (#18386) 2024-03-19 14:04:38 +08:00
centec [device/centec] Replace os.system and remove subprocess with shell=True (#12024) 2022-10-07 10:48:25 -04:00
cig Add platform_asic file to each platform folder in sonic-device-data based package (#8542) 2021-10-08 19:27:48 -07:00
common [Arista] Add support for DCS-7060DX5-32 (#14793) 2023-08-05 22:11:45 +08:00
dell Revert "Move /var/log to RAM for Mellanox SN2700, Nokia 7215 and Dell S6100 (#15077)" (#16775) 2023-10-11 10:36:29 -07:00
delta [device/delta] Mitigation for command injection vulnerability (#11865) 2022-10-13 21:11:51 -07:00
facebook/x86_64-facebook_wedge100-r0 Add platform_asic file to each platform folder in sonic-device-data based package (#8542) 2021-10-08 19:27:48 -07:00
fs/arm64-fs_s5800_48t4s-r0 [FS][arm64] support new boars s5800-48t4s and s5800-48t8s-mars8p (#12994) 2022-12-17 14:48:02 -08:00
ingrasys [BFN] Update configuration files (#9913) 2022-03-09 09:57:08 +05:30
inventec [BRCMSAI 6.0.0.13-1] Fix Cancun file directory at new location causing TD3 platform boot issue (#9922) 2022-02-07 08:56:06 -08:00
juniper [device/juniper] Mitigation for security vulnerability (#11838) 2022-11-22 10:46:12 -05:00
marvell [Marvell-arm64] Add platform support for rd98DX35xx (#16874) 2023-11-20 09:43:02 -08:00
mellanox [Mellanox] Support DSCP remapping in Dual-ToR topo for SN4700-O8V48, update buffers for t0 (#18293) 2024-03-18 14:32:24 -07:00
mitac/x86_64-mitac_ly1200_b32h0_c3-r0 Add platform_asic file to each platform folder in sonic-device-data based package (#8542) 2021-10-08 19:27:48 -07:00
netberg [Netberg][Barefoot] Added support for Aurora 750 (#16342) 2023-09-01 22:52:39 -07:00
nokia [armhf][Nokia-7215]Update HWSKU files for new SAI (#18294) 2024-03-10 21:44:31 -07:00
pegatron/x86_64-pegatron_porsche-r0 Add platform_asic file to each platform folder in sonic-device-data based package (#8542) 2021-10-08 19:27:48 -07:00
pensando/arm64-elba-asic-r0 Add pensando platform (#15978) 2023-12-04 14:41:52 -08:00
quanta [device/quanta] Mitigation for security vulnerability (#11867) 2022-10-19 10:05:36 -04:00
ragile Revert "[Ragile]: Add new centec platform ra-b6010 (#14819)" 2023-09-01 22:43:18 -07:00
ruijie/x86_64-ruijie_b6510-48vs8cq-r0 [device/ruijie] Mitigation for security vulnerability #11779 2022-08-23 09:48:42 -04:00
supermicro/x86_64-supermicro_sse_t7132s-r0 [Supermicro]: Add a new supported device and platform, SSE-T7132S. (#15368) 2023-07-20 10:24:56 -07:00
tencent two platforms supporting S3IP SYSFS (TCS8400, TCS9400) (#12386) 2022-12-18 16:16:53 +08:00
ufispace [Ufispace][PDDF] Add PDDF support on S9110-32X, S8901-54XC, S7801-54XS and S6301-56ST (#16017) 2023-08-14 15:56:03 -07:00
virtual [sonic-vs]: Add fabric port data for vs test, and start fabricmgrd in vs environment (#16791) 2023-11-20 16:21:03 -08:00
wistron [devices]: Update the Wistron platform support in master branch (#12110) 2023-02-23 09:08:13 -08:00
wnc/x86_64-wnc_osw1800-r0 [BFN] Update configuration files (#9913) 2022-03-09 09:57:08 +05:30