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

[minigraph.py]: Add support for parsing mux cable #5676

Merged
merged 5 commits into from
Oct 26, 2020

Conversation

theasianpianist
Copy link
Contributor

@theasianpianist theasianpianist commented Oct 20, 2020

Signed-off-by: Lawrence Lee lawlee@microsoft.com

- Why I did it

- How I did it
Find LogicalLinks in minigraph and parse the port information. A new field called mux_cable is added to each port's entry in the Port table in config DB:

PORT|Ethernet0: {
	"alias": "Ethernet4/1"
	...
	"mux_cable": "true"
}

If a mux cable is present on a port, the value for mux_cable will be "true". If no mux cable is present, the attribute will either be omitted (default behavior) or set to "false".

- How to verify it
Run sonic-config-engine tests

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

  • 201811
  • 201911
  • 202006

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
* Previous behavior was to set `mux_cable_connection = 'none'` if the
port was not connected to a mux cable

Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
@lguohan
Copy link
Collaborator

lguohan commented Oct 21, 2020

do we need to differentiate U and L for a mux cable port? what is the motivation here? can this be true or false?

@theasianpianist
Copy link
Contributor Author

@lguohan the minigraph will list the <StartPort> as either U or L to distinguish the upper and lower ToRs. We can change this field to true/false and move upper/lower ToR info to somewhere else if necessary.

@vdahiya12 for visibility

@theasianpianist
Copy link
Contributor Author

retest broadcom please

@vdahiya12
Copy link
Contributor

@lguohan the minigraph will list the <StartPort> as either U or L to distinguish the upper and lower ToRs. We can change this field to true/false and move upper/lower ToR info to somewhere else if necessary.

@vdahiya12 for visibility

@lguohan Can the Cli request to change the active TOR to be U or L, if not we can omit this ?

vdahiya12
vdahiya12 previously approved these changes Oct 23, 2020
jleveque
jleveque previously approved these changes Oct 23, 2020
Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
@lguohan
Copy link
Collaborator

lguohan commented Oct 24, 2020

retest vsimage please

@theasianpianist theasianpianist merged commit c4f9bec into sonic-net:master Oct 26, 2020
@theasianpianist theasianpianist deleted the mux-cable-mg branch October 26, 2020 15:52
santhosh-kt pushed a commit to santhosh-kt/sonic-buildimage that referenced this pull request Feb 25, 2021
Find LogicalLinks in minigraph and parse the port information. A new field called `mux_cable` is added to each port's entry in the Port table in config DB:

```
PORT|Ethernet0: {
	"alias": "Ethernet4/1"
	...
	"mux_cable": "true"
}
```

If a mux cable is present on a port, the value for `mux_cable` will be `"true"`. If no mux cable is present, the attribute will either be omitted (default behavior) or set to `"false"`.
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.

4 participants