Skip to content

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

Merged
jleveque merged 2 commits intosonic-net:202012from
jleveque:parse_autoneg_202012
Mar 31, 2021
Merged

[202012][sonic-config-engine] Parse AutoNegotiation element from LinkMetadata section of minigraph file#7166
jleveque merged 2 commits intosonic-net:202012from
jleveque:parse_autoneg_202012

Conversation

@jleveque
Copy link
Copy Markdown
Contributor

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.

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

…Metadata section of minigraph file (#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.
@lguohan
Copy link
Copy Markdown
Collaborator

lguohan commented Mar 27, 2021

can you check build issue?

@jleveque jleveque merged commit 7155d02 into sonic-net:202012 Mar 31, 2021
@jleveque jleveque deleted the parse_autoneg_202012 branch March 31, 2021 21:25
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.

3 participants