sonic-buildimage/device/celestica/x86_64-cel_e1031-r0
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
..
Celestica-E1031-T48S4 Fix issue test_crm and test_fib (#10585) 2022-04-22 20:35:52 +08:00
plugins [device/celestica]: Fix failed test cases of Haliburton platform API (#7579) 2021-07-23 06:18:39 -07:00
sonic_platform [E1031] Bugfix for Python syntax error in sonic_platform/common.py (#18386) 2024-03-19 14:04:38 +08:00
default_sku [updategraph] add support to use preset config instead of default minigraph (#2050) 2018-09-21 22:01:10 -07:00
fancontrol-B2F [device/celestica]: Add thermalctld support on Haliburton platform APIs (#6493) 2021-05-03 09:14:35 -07:00
fancontrol-F2B [device/celestica]: Add thermalctld support on Haliburton platform APIs (#6493) 2021-05-03 09:14:35 -07:00
installer.conf [platform]: Disable interrupt for intel i2c-i801 driver (#16309) 2023-09-05 10:23:57 -07:00
pcie.yaml [pcie.yaml] Move pcie configuration file path to platform directory (#6475) 2021-02-21 08:27:37 -08:00
platform_asic Add platform_asic file to each platform folder in sonic-device-data based package (#8542) 2021-10-08 19:27:48 -07:00
platform_components.json [device/celestica]: Fix failed test cases of Haliburton platform API (#7579) 2021-07-23 06:18:39 -07:00
platform_reboot [E1031] add platform specific reboot command support (#15889) 2023-08-02 17:20:53 -07:00
platform_update_reboot_cause [E1031] add platform specific reboot command support (#15889) 2023-08-02 17:20:53 -07:00
platform.json [device/celestica]: add controllable config to platform.json of e1031 (#9183) 2021-11-30 13:59:21 +08:00
pmon_daemon_control.json [device/celestica]: Fix xcvrd error (#3979) 2020-01-10 12:50:51 -08:00
sensors.conf [device/celestica]: Implement thermal base API based on the new platform API (#3220) 2019-08-05 09:01:50 -07:00
system_health_monitoring_config.json [healthd] Add system health configuration for platform Celestica E1031 (#8783) 2021-09-18 10:31:36 -07:00
thermal_overload_control.sh [device/celestica]: Add thermalctld support on Haliburton platform APIs (#6493) 2021-05-03 09:14:35 -07:00
thermal_policy.json [device/celestica]: Add thermalctld support on Haliburton platform APIs (#6493) 2021-05-03 09:14:35 -07:00