aristanetworks / sonic

Open source drivers and initialization library for Arista platforms running SONiC
GNU General Public License v2.0
22 stars 30 forks source link

[barefoot][platform][arista] Add sfp_type to Sfp class objects #28

Closed vboykox closed 3 years ago

vboykox commented 3 years ago

Fixes:

Traceback (most recent call last):
  File "/usr/bin/xcvrd", line 1208, in <module>
    main()
  File "/usr/bin/xcvrd", line 1205, in main
    xcvrd.run()
  File "/usr/bin/xcvrd", line 1166, in run
    self.init()
  File "/usr/bin/xcvrd", line 1145, in init
    post_port_sfp_dom_info_to_db(is_warm_start, self.stop_event)
  File "/usr/bin/xcvrd", line 432, in post_port_sfp_dom_info_to_db
    post_port_dom_info_to_db(logical_port_name, dom_tbl, stop_event)
  File "/usr/bin/xcvrd", line 357, in post_port_dom_info_to_db
    if platform_chassis.get_sfp(physical_port).sfp_type == 'QSFP_DD':
AttributeError: 'Sfp' object has no attribute 'sfp_type'

Environment SONiC Software Version: SONiC.HEAD.729-dirty-20200727.195955 Distribution: Debian 10.4 Kernel: 4.19.0-9-2-amd64 Build commit: 89184038

vboykox commented 3 years ago

@akokhan

vboykox commented 3 years ago

@tsuna @aaronbee @pooya @peadar

vboykox commented 3 years ago

@Staphylo

Staphylo commented 3 years ago

Thanks for the PR. It can't merge via github as it has to go through our internal process first. I'll be back on Tuesday to see to it if @zzhiyuan doesn't cherry-pick it by then.

Staphylo commented 3 years ago

I cherry-picked your change and it's now running some tests. I believe it should go well. Your change will motivate an upstreaming session in the coming days. I will resolve/close this issue once it's done.

Staphylo commented 3 years ago

Merged via https://github.com/aristanetworks/sonic/commit/99e5e07d91be1094e082cfb363a56c8d0db670bc