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

[sonic-utilities] CLI support for port auto negotiation #1568

Merged
merged 22 commits into from
May 7, 2021

Conversation

Junchao-Mellanox
Copy link
Collaborator

What I did

  1. Add CLI support for port auto negotiation feature.
  2. Add db_migrator change for auto negotiation feature
  3. Add unit test cases for all changes

How I did it

  1. Add new subcommands to "config interface" command group to allow user configuring port auto negotiation
  2. Add new subcommands to "show interfaces" command group to allow user show auto negotiation status
  3. In db_migrator.py, change auto negotiation related DB field to latest one

How to verify it

Add unit tests for each new commands and db_migrator

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

@lgtm-com
Copy link

lgtm-com bot commented Apr 17, 2021

This pull request introduces 1 alert when merging edc5f51 into e296a69 - view on LGTM.com

new alerts:

  • 1 for Unused import

@Junchao-Mellanox
Copy link
Collaborator Author

The test case failures are not related to this change, could you please help re-trigger the test?

@Junchao-Mellanox
Copy link
Collaborator Author

The LGTM warning can be ignored. The warning code is for mock purpose.

@prsunny
Copy link
Contributor

prsunny commented Apr 22, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@lgtm-com
Copy link

lgtm-com bot commented Apr 28, 2021

This pull request introduces 1 alert when merging 87d9861 into c166f66 - view on LGTM.com

new alerts:

  • 1 for Unused import

Copy link
Contributor

@jleveque jleveque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove unused import per LGTM

@Junchao-Mellanox
Copy link
Collaborator Author

Please remove unused import per LGTM

The unused import is for mock purpose:

import mock_tables.dbconnector

@jleveque
Copy link
Contributor

Please remove unused import per LGTM

The unused import is for mock purpose:

import mock_tables.dbconnector

Ah, yeah. That's annoying. We need to find a better way to do this (maybe using mock.patch?). So in the meantime this is OK. However, I think we should change this to align with Python 3's explicit relative import syntax: from .mock_tables import dbconnector

jleveque
jleveque previously approved these changes Apr 30, 2021
@stephenxs
Copy link
Collaborator

This PR contains the same fix that is already in #1566.
#1566 needs to be cherry-picked to 202012 but this one doesn't.
So I suggest merging #1566 first.

@lgtm-com
Copy link

lgtm-com bot commented May 6, 2021

This pull request introduces 1 alert when merging 8eaf2e8 into 615e531 - view on LGTM.com

new alerts:

  • 1 for Unused import

@Junchao-Mellanox
Copy link
Collaborator Author

This pull request introduces 1 alert when merging 8eaf2e8 into 615e531 - view on LGTM.com

new alerts:

  • 1 for Unused import

The unused import is for mock purpose

Copy link
Contributor

@jleveque jleveque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please also update the Command Reference guide to reflect the new show and config commands?

@lgtm-com
Copy link

lgtm-com bot commented May 7, 2021

This pull request introduces 1 alert when merging 4adca3e into a71ff02 - view on LGTM.com

new alerts:

  • 1 for Unused import

@jleveque jleveque merged commit 8c2980a into sonic-net:master May 7, 2021
@Junchao-Mellanox Junchao-Mellanox deleted the port-auto-neg branch May 8, 2021 01:10
liat-grozovik pushed a commit that referenced this pull request May 23, 2021
…rator test cases as well (#1614)

- What I did
Originally, the method advance_version_for_expected_database was introduced (in #1566) to handle the case the latest version in CONFIG_DB is greater than the latest version in mellanox_buffer_migrator.
Now there are other database migrators whose test cases can also encounter this situation, like port auto-negotiation (#1568) and port-channel for LACP key (#1473).
So I would like to make the method public, available for all database migrators.
Related database migrator test cases have been updated accordingly.

- How to verify it
Run the unit test.

Signed-off-by: Stephen Sun <stephens@nvidia.com>
gitsabari pushed a commit to gitsabari/sonic-utilities that referenced this pull request Jun 15, 2021
#### What I did

1. Add CLI support for port auto negotiation feature.
2. Add db_migrator change for auto negotiation feature
2. Add unit test cases for all changes

#### How I did it

1. Add new subcommands to "config interface" command group to allow user configuring port auto negotiation
2. Add new subcommands to "show interfaces" command group to allow user show auto negotiation status
3. In db_migrator.py, change auto negotiation related DB field to latest one
gitsabari pushed a commit to gitsabari/sonic-utilities that referenced this pull request Jun 15, 2021
…rator test cases as well (sonic-net#1614)

- What I did
Originally, the method advance_version_for_expected_database was introduced (in sonic-net#1566) to handle the case the latest version in CONFIG_DB is greater than the latest version in mellanox_buffer_migrator.
Now there are other database migrators whose test cases can also encounter this situation, like port auto-negotiation (sonic-net#1568) and port-channel for LACP key (sonic-net#1473).
So I would like to make the method public, available for all database migrators.
Related database migrator test cases have been updated accordingly.

- How to verify it
Run the unit test.

Signed-off-by: Stephen Sun <stephens@nvidia.com>
raphaelt-nvidia pushed a commit to raphaelt-nvidia/sonic-utilities that referenced this pull request Aug 10, 2021
…rator test cases as well (sonic-net#1614)

- What I did
Originally, the method advance_version_for_expected_database was introduced (in sonic-net#1566) to handle the case the latest version in CONFIG_DB is greater than the latest version in mellanox_buffer_migrator.
Now there are other database migrators whose test cases can also encounter this situation, like port auto-negotiation (sonic-net#1568) and port-channel for LACP key (sonic-net#1473).
So I would like to make the method public, available for all database migrators.
Related database migrator test cases have been updated accordingly.

- How to verify it
Run the unit test.

Signed-off-by: Stephen Sun <stephens@nvidia.com>
vdahiya12 pushed a commit to vdahiya12/sonic-utilities that referenced this pull request Sep 13, 2021
1. Add CLI support for port auto negotiation feature.
2. Add db_migrator change for auto negotiation feature
2. Add unit test cases for all changes

1. Add new subcommands to "config interface" command group to allow user configuring port auto negotiation
2. Add new subcommands to "show interfaces" command group to allow user show auto negotiation status
3. In db_migrator.py, change auto negotiation related DB field to latest one
lguohan pushed a commit that referenced this pull request Sep 15, 2021
* [sonic-utilities] CLI support for port auto negotiation (#1568)

1. Add CLI support for port auto negotiation feature.
2. Add db_migrator change for auto negotiation feature
2. Add unit test cases for all changes

1. Add new subcommands to "config interface" command group to allow user configuring port auto negotiation
2. Add new subcommands to "show interfaces" command group to allow user show auto negotiation status
3. In db_migrator.py, change auto negotiation related DB field to latest one

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Co-authored-by: Junchao-Mellanox <57339448+Junchao-Mellanox@users.noreply.github.com>
@qiluo-msft
Copy link
Contributor

This PR could not be cleanly cherry-picked to 202012. Please submit another PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants