Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add get_presence implementation for SFP on Mellanox platforms #1056

Merged
merged 1 commit into from
Oct 20, 2017

Conversation

andriymoroz-mlnx
Copy link
Collaborator

Signed-off-by: Andriy Moroz c_andriym@mellanox.com

- What I did
Add get_presence implementation for SFP on Mellanox platforms

- How I did it
Added implementation in sfputil.py

- How to verify it
Before implementation:

root@arc-switch1028:/# sfputil show presence
Traceback (most recent call last):
  File "/usr/bin/sfputil", line 9, in <module>
    load_entry_point('sonic-utilities==1.1', 'console_scripts', 'sfputil')()
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python2.7/dist-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/sfputil/main.py", line 469, in presence
    presence = platform_sfputil.get_presence(physical_port)
  File "/usr/share/sonic/device/x86_64-mlnx_msn2700-r0/plugins/sfputil.py", line 50, in get_presence
    raise NotImplementedError
NotImplementedError
root@arc-switch1028:/#

After implementation

root@arc-switch1028:/# sfputil show presence
Port         Presence
-----------  -----------
Ethernet0    Present
Ethernet4    Present
Ethernet8    Present
Ethernet12   Not present
Ethernet16   Not present
Ethernet20   Not present
Ethernet24   Not present
Ethernet28   Not present
Ethernet32   Present
Ethernet36   Present
Ethernet40   Not present
Ethernet44   Not present
Ethernet48   Not present
Ethernet52   Not present
Ethernet56   Not present
Ethernet60   Not present
Ethernet64   Not present
Ethernet68   Not present
Ethernet72   Not present
Ethernet76   Not present
Ethernet80   Not present
Ethernet84   Not present
Ethernet88   Not present
Ethernet92   Not present
Ethernet96   Not present
Ethernet100  Not present
Ethernet104  Not present
Ethernet108  Not present
Ethernet112  Not present
Ethernet116  Present
Ethernet120  Present
Ethernet124  Present
root@arc-switch1028:/#

Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>
@sonic-net sonic-net deleted a comment from jleveque Oct 19, 2017
@stcheng stcheng merged commit 587b14a into sonic-net:master Oct 20, 2017
@daall daall mentioned this pull request Nov 4, 2020
3 tasks
lguohan pushed a commit that referenced this pull request Nov 6, 2020
Add a switch to route_check to control whether write log to syslog (#1215)
[consutil] Store console port state in STATE_DB (#1208)
[sfputil] Display 'N/A' for non-SFP ports (#1078)
Show FG_NHG CLI Commands Added (#1056)
[show] remove 'device2interface_dict' in show interface neighbor expected (#1188)
Add license file, remove third-party licenses file (#1192)
[fwutil]: Set min log priority to INFO. (#1191)
[CLI][show][platform] Added ASIC count in the output. (#1185)
fdbshow and nbrshow use SonicV2Connector with decode_responses=True, and remove all the decode() (#1187)
Remove stdeb.cfg; no longer used now that we build as wheel (#1182) 
[counterpoll] Disable Counter Poll When Entering Fast Reboot (#1174) 
Fixes the issue with show interface counters and for pfc and queue counters. (#1180)
[config/show] Add CLI support for proxy arp (#1168)
[consutil] Add brief option to show line command (#1176)
Modify fast-reboot script to use BGP service script to stop bgp service (#1177)
[config/console] Support update console configuration related commands (#1166)
[consutil] Fix issue where the show line command crash if no ttyUSB exists (#1173)
[watermarkstat] Add unit tests for watermarkstat show commands (#1157)
Fix exception for ipaddress in python2 (#1164) 
[celestica] consutil to support customize tty device name (#1155)

Signed-off-by: Danny Allen <daall@microsoft.com>
santhosh-kt pushed a commit to santhosh-kt/sonic-buildimage that referenced this pull request Feb 25, 2021
Add a switch to route_check to control whether write log to syslog (sonic-net#1215)
[consutil] Store console port state in STATE_DB (sonic-net#1208)
[sfputil] Display 'N/A' for non-SFP ports (sonic-net#1078)
Show FG_NHG CLI Commands Added (sonic-net#1056)
[show] remove 'device2interface_dict' in show interface neighbor expected (sonic-net#1188)
Add license file, remove third-party licenses file (sonic-net#1192)
[fwutil]: Set min log priority to INFO. (sonic-net#1191)
[CLI][show][platform] Added ASIC count in the output. (sonic-net#1185)
fdbshow and nbrshow use SonicV2Connector with decode_responses=True, and remove all the decode() (sonic-net#1187)
Remove stdeb.cfg; no longer used now that we build as wheel (sonic-net#1182) 
[counterpoll] Disable Counter Poll When Entering Fast Reboot (sonic-net#1174) 
Fixes the issue with show interface counters and for pfc and queue counters. (sonic-net#1180)
[config/show] Add CLI support for proxy arp (sonic-net#1168)
[consutil] Add brief option to show line command (sonic-net#1176)
Modify fast-reboot script to use BGP service script to stop bgp service (sonic-net#1177)
[config/console] Support update console configuration related commands (sonic-net#1166)
[consutil] Fix issue where the show line command crash if no ttyUSB exists (sonic-net#1173)
[watermarkstat] Add unit tests for watermarkstat show commands (sonic-net#1157)
Fix exception for ipaddress in python2 (sonic-net#1164) 
[celestica] consutil to support customize tty device name (sonic-net#1155)

Signed-off-by: Danny Allen <daall@microsoft.com>
stepanblyschak pushed a commit to stepanblyschak/sonic-buildimage that referenced this pull request May 10, 2021
1. show fg-nhg-hash-view
   (shows the current hash bucket view of fg nhg)

2. show fg-nhg-active-hops
   (shows which set of next-hops are active)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants