sonic-buildimage/device
Zhijian Li 5bc2aa3c63 [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-20 01:01:07 +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-18 04:32:39 +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-20 01:01:07 +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) (#16176) 2023-09-03 09:21:33 +08:00
dell Fix ecmp hash polarization by enable hash seed/offset config on T1 and upgrade xgs SAI to 8.4.35.0 (#17505) 2023-12-15 19:33:47 +08: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 [device/marvell] Mitigation for security vulnerability (#11876) 2022-11-30 00:06:28 -08:00
mellanox [Mellanox] Disable SSD NCQ on Mellanox platforms (#17567) 2024-02-01 04:32:27 +08: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 610 (#10579) 2022-06-30 10:40:47 -07:00
nokia [Nokia-IXR7250E][Devicedata] Update the device data for Nokia IXR7250E platform (thermal logging thresholds) (#18063) (#18171) 2024-02-25 09:06:59 +08: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
quanta [device/quanta] Mitigation for security vulnerability (#11867) 2022-10-19 10:05:36 -04:00
ragile [ragile] adapter for kernel 5.x (#10762) 2023-01-12 18:01:47 -08:00
ruijie/x86_64-ruijie_b6510-48vs8cq-r0 [device/ruijie] Mitigation for security vulnerability #11779 2022-08-23 09:48:42 -04:00
tencent two platforms supporting S3IP SYSFS (TCS8400, TCS9400) (#12386) 2022-12-18 16:16:53 +08:00
virtual Add gearbox taps to vs gearbox_config.json (#11480) 2022-10-10 13:35:06 -07: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