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-config-engine] Parse AutoNegotiation element from LinkMetadata section of minigraph file #7031

Merged
merged 2 commits into from
Mar 13, 2021
Merged

[sonic-config-engine] Parse AutoNegotiation element from LinkMetadata section of minigraph file #7031

merged 2 commits into from
Mar 13, 2021

Conversation

jleveque
Copy link
Contributor

@jleveque jleveque commented Mar 11, 2021

Why I did it

To enable parsing the AutoNegotiation element from the LinkMetadata section of minigraph file

How I did it

Parse the value AutoNegotiation element from the LinkMetadata section of minigraph file. If the element is present, an autoneg key will be added to the port in the PORT table of Config DB with a value of either off or on

If an autoneg value is present in port_config.ini, the value from the minigraph will take precedence, overriding that value.

Also remove AutoNegotiation and EnableAutoNegotiation elements from the DeviceInfo section, as we will use this data in the LinkMetadata section to determine whether to enable auto-negotiation for a port.

How to verify it

Added unit tests to validate the behavior described above

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012

@jleveque jleveque added Enhancement ➕ sonic-cfggen SONiC Configuration Generator Tool labels Mar 11, 2021
@jleveque jleveque requested a review from lguohan March 11, 2021 19:58
@jleveque jleveque self-assigned this Mar 11, 2021
@daall
Copy link
Contributor

daall commented Mar 16, 2021

@jleveque hit a merge conflict on the tests cherry-picking to 202012, can you please submit a PR for 202012

@jleveque
Copy link
Contributor Author

jleveque commented Mar 16, 2021

@jleveque hit a merge conflict on the tests cherry-picking to 202012, can you please submit a PR for 202012

@daall: I think it will cherry-pick cleanly after #6901 is cherry-picked.

jleveque added a commit that referenced this pull request Mar 18, 2021
…Metadata section of minigraph file (#7048)

Backport of #7031 to the 201811 branch

#### Why I did it

To enable parsing the `AutoNegotiation` element from the LinkMetadata section of minigraph file

#### How I did it

Parse the value `AutoNegotiation` element from the `LinkMetadata` section of minigraph file. If the element is present, an `autoneg` key will be added to the port in the `PORT` table of Config DB with a value of either `0` or `1`

If an `autoneg` value is present in port_config.ini, the value from the minigraph will take precedence, overriding that value.

Also remove `AutoNegotiation` and `EnableAutoNegotiation` elements from the `DeviceInfo` section, as we will use this data in the `LinkMetadata` section to determine whether to enable auto-negotiation for a port.
jleveque added a commit that referenced this pull request Mar 18, 2021
…Metadata section of minigraph file (#7047)

Backport of #7031 to the 201911 branch

#### Why I did it

To enable parsing the `AutoNegotiation` element from the LinkMetadata section of minigraph file

#### How I did it

Parse the value `AutoNegotiation` element from the `LinkMetadata` section of minigraph file. If the element is present, an `autoneg` key will be added to the port in the `PORT` table of Config DB with a value of either `0` or `1`

If an `autoneg` value is present in port_config.ini, the value from the minigraph will take precedence, overriding that value.

Also remove `AutoNegotiation` and `EnableAutoNegotiation` elements from the `DeviceInfo` section, as we will use this data in the `LinkMetadata` section to determine whether to enable auto-negotiation for a port.
@jleveque
Copy link
Contributor Author

Opened dedicated PR against 202012 branch here. Removing "Request for 202012 branch" label.

jleveque added a commit that referenced this pull request Mar 31, 2021
…Metadata section of minigraph file (#7166)

Backport of #7031 to the 202012 branch

#### Why I did it

To enable parsing the `AutoNegotiation` element from the LinkMetadata section of minigraph file

#### How I did it

Parse the value `AutoNegotiation` element from the `LinkMetadata` section of minigraph file. If the element is present, an `autoneg` key will be added to the port in the `PORT` table of Config DB with a value of either `0` or `1`

If an `autoneg` value is present in port_config.ini, the value from the minigraph will take precedence, overriding that value.

Also remove `AutoNegotiation` and `EnableAutoNegotiation` elements from the `DeviceInfo` section, as we will use this data in the `LinkMetadata` section to determine whether to enable auto-negotiation for a port.
raphaelt-nvidia pushed a commit to raphaelt-nvidia/sonic-buildimage that referenced this pull request May 23, 2021
… section of minigraph file (sonic-net#7031)

Parse the value `AutoNegotiation` element from the `LinkMetadata` section of minigraph file. If the element is present, an `autoneg` key will be added to the port in the `PORT` table of Config DB with a value of either `off` or `on`

If an `autoneg` value is present in port_config.ini, the value from the minigraph will take precedence, overriding that value.

Also remove `AutoNegotiation` and `EnableAutoNegotiation` elements from the `DeviceInfo` section, as we will use this data in the `LinkMetadata` section to determine whether to enable auto-negotiation for a port.
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this pull request Aug 7, 2021
… section of minigraph file (sonic-net#7031)

Parse the value `AutoNegotiation` element from the `LinkMetadata` section of minigraph file. If the element is present, an `autoneg` key will be added to the port in the `PORT` table of Config DB with a value of either `off` or `on`

If an `autoneg` value is present in port_config.ini, the value from the minigraph will take precedence, overriding that value.

Also remove `AutoNegotiation` and `EnableAutoNegotiation` elements from the `DeviceInfo` section, as we will use this data in the `LinkMetadata` section to determine whether to enable auto-negotiation for a port.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants