Skip to content

Updated 201709 branch using current working commit from master.#176

Open
nazarii-gnydyn wants to merge 21 commits intosonic-net:201709from
nazarii-gnydyn:201709
Open

Updated 201709 branch using current working commit from master.#176
nazarii-gnydyn wants to merge 21 commits intosonic-net:201709from
nazarii-gnydyn:201709

Conversation

@nazarii-gnydyn
Copy link
Copy Markdown

- What I did
Updated sonic-utilities [201709] with commit <77c9f81> from sonic-utilities [master].

pavel-shirshov and others added 21 commits August 14, 2017 15:45
This sparse file is HUGE and without ignoring this file, it will take
forever to gzip this file and ultimately causing the script to hang.
…licate commands ('bgp,' 'route') from under root group (sonic-net#102)
* CLI support to show MAC/FDB entries learnt in Hardware
* Updated to use common library API to get bridge port mapping
* Rearranged imports
* Addressed review comments, check-logic modified
* Show command hookup added
sonic-net#113)

- added script to get interface status.
- added few subcommands under "show interfaces" command.
- enhanced "show process" to get all processes sorted by CPU & memory.
- added "show services" command to get all the running process from all the dockers.
- added "show vlan" command.
- enhanced multiple subcommands under
- added debug', and 'undebug' CLI utilities.
* Flush DB first when loading from minigraph and add a config reload command to flush db and reload from json.
* [show]: Remove default groups; add missing docstrings

* Copy all bash completion files by glob
Fixed parser logic to handle non mandatory TLV.
@msftclas
Copy link
Copy Markdown

msftclas commented Dec 19, 2017

CLA assistant check
All CLA requirements met.

@nazarii-gnydyn
Copy link
Copy Markdown
Author

@stcheng @lguohan Please review & merge.

vdahiya12 added a commit to vdahiya12/sonic-utilities that referenced this pull request Jul 23, 2021
… identifier from Config DB (sonic-net#176)

* [xcvrd] Change the y_cable presence logic to use "mux_cable" table as
identfier from Config DB

This PR changes the logic to use "mux_cable" table as identifier, and only those ports which have this table inside config DB and key pair of "state:auto/active" will be processed as having a Y-Cable port.
The earlier logic was using the PORT table tag with a mux_cable:true key-value pair.

Description
change the logic to initiate Y-Cable logic

Motivation and Context
Required for changing the logic, so that this can be integrated with images which don't support "mux_cable" tag inside config DB

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
mihirpat1 pushed a commit to mihirpat1/sonic-utilities that referenced this pull request Sep 15, 2023
sonic-net#176)

This PR adds functions definition with details for enabling/disabling Y cable auto-switch feature

Description
Added functions for enabling/disabling auto-switch on Y cable

def set_switching_mode(physical_port, mode)
def get_switching_mode(physical_port)
Motivation and Context
We need to have this feature within host cli so that a user can enable/disable the autoswitch on Y cable

How Has This Been Tested?
opened a python shell and executed API's for correctness

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
stepanblyschak pushed a commit to stepanblyschak/sonic-utilities that referenced this pull request May 20, 2025
…es (sonic-net#176)

<!--
 Please make sure you've read and understood our contributing guidelines:
 https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md

 failure_prs.log skip_prs.log Make sure all your commits include a signature generated with `git commit -s` **

 If this is a bug fix, make sure your description includes "closes #xxxx",
 "fixes #xxxx" or "resolves #xxxx" so that GitHub automatically closes the related
 issue when the PR is merged.

 If you are adding/modifying/removing any command or utility script, please also
 make sure to add/modify/remove any unit tests from the tests
 directory as appropriate.

 If you are modifying or removing an existing 'show', 'config' or 'sonic-clear'
 subcommand, or you are adding a new subcommand, please make sure you also
 update the Command Line Reference Guide (doc/Command-Reference.md) to reflect
 your changes.

 Please provide the following information:
-->

#### What I did
1. With the recent transceiver DOM and STATUS table related changes, the handles of the following CLIs need to be modified to ensure that the CLI function inline to the existing behavior
 1. show int transceiver eeprom -d
 2. show int transceiver status
 3. show int transceiver pm
 4. sfputil show eeprom -d -p EthernetXX

2. Also, all the diagnostics related tables will not be present only for the first subport for breakout ports. Hence, made the corresponding CLI handler related changes to support this
3. Modified the `sfputil show error-status` CLI handler to use `TRANSCEIVER_STATUS_SW` instead of `TRANSCEIVER_STATUS` table

#### How I did it
1. Replaced function call for get_transceiver_bulk_status with get_transceiver_dom_real_value
5. As part of displaying o/p for "show int transceiver status" CLI, we are now fetching data from TRANSCEIVER_DOM_FLAG, VDM flag tables and TRANSCEIVER_STATUS_FLAG tables as well since the relevant fields have been moved to these new tables
6. As part of display o/p for "show int transceiver pm" CLI, we are now fetching data from VDM threshold tables as well since the relevant fields have been moved to these new tables

Related PRs
sonic-net/SONiC#1954
[[cmis] Separate Flag-Specific Fields for DOM and Status APIs by mihirpat1 · Pull Request sonic-net#556 · sonic-net/sonic-platform-common](sonic-net/sonic-platform-common#556)
[[xcvrd] Re-organize transceiver DOM and STATUS tables by mihirpat1 · Pull Request sonic-net#604 · sonic-net/sonic-platform-daemons](sonic-net/sonic-platform-daemons#604)

#### How to verify it
Following tests were attempted and confirmed to pass

1. Diagnostic table related verification
	1. Compare tables with nightly image and ensure non-CMIS transceivers do not change their mapping for DOM and status tables
	2. Compare DOM sensor, threshold and status tables between current and nightly. Ensure units are not shown
	3. Dump TRANSCEIVER_INFO table for CMIS transceiver to ensure is_replaceable field is present
2. CLI verification
	1. sudo sfputil show error-status - This should dump output for all the ports and the behavior should not change between nightly and private image
	2. Use invalid port name (Ethernet2033) to dump show int transceiver info, status CLI. Ensure to note new errors in PR description for invalid ports
	3. For breakout scenario, keep 2 subports in different CMIS_STATES and ensure the CLI o/p is different for status CLI for both subports
3. Run transceiver onboarding test due to TRANSCEIVER_INFO table deletion change
4. XCVRD stop/start
	1. Stop xcvrd and ensure all diagnostic tables are deleted
	2. Start xcvrd and ensure all diagnostic tables are populated
5. Link flap event handling
	1. Change link flap count for different types of transceivers and ensure no crash is seen. This is to ensure that the link event handler code does not cause any crash for non-CMIS transceivers
	2. Shutdown peer port and ensure the tables get updated which are handled via link event update handler.
		Also, execute sfputil reset on 10 different physical ports and ensure that all the corresponding flags on the remote side are updated for all 8 lanes of a DR8 optic
		Specifically, we need to ensure that the following flags are set wherein X represents the lane number
		1. LOSFlagRxX (page 11, byte 147)
		2. CDRLOLFlagRxX (page 11, byte 148)
		3. OpticalPowerLowAlarmFlagRxX (page 11, byte 150)
		4. OpticalPowerLowWarningFlagRxX (page 11, byte 152)
6. Transceiver OIR test
	1. Remove transceiver and ensure all diagnostic related tables are deleted
	2. Insert transceiver and ensure all diagnostic tables are populated
	3. Stop xcvrd and remove transceiver and ensure TRANSCEIVER_INFO table is present. Start xcvrd and ensure that the TRANSCEIVER_INFO table is now deleted
	4. Insert the transceiver now
7. Ensure firmware upgrade is successfull and TRANSCEIVER_FIRMWARE_INFO table changes only for the primary subport eventhough, the upgrade was triggered for a non-primary subport
8. Ensure SFF manager crash is seen with nightly and is resolved with this PR (since the PR has the fix for [SffLoggerForPortUpdateEvent class does not have log_debug function · Issue sonic-net#605 · sonic-net/sonic-platform-daemons](sonic-net/sonic-platform-daemons#605))

#### Previous command output (if the output of a command-line utility has changed)
The output of show int transceiver info and show int transceiver eeprom will change if an invalid port name is passed to the CLI

```
root@str4-sn5600-3:/home/admin# show int transceiver info Ethernet8
Ethernet8: SFP EEPROM Not detected
root@str4-sn5600-3:/home/admin#
```

#### New command output (if the output of a command-line utility has changed)
```
root@str4-sn5600-3:/home/admin# show int transceiver info Ethernet8
Error: Found KeyError while getting first subport for Ethernet8
Error: Unable to get first subport for Ethernet8 while converting SFP info
Ethernet8: SFP EEPROM Not detected
root@str4-sn5600-3:/home/admin#
```
MSFT ADO - 32238285
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.

7 participants