-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 peer switch hostname to device metadata #6405
Conversation
Signed-off-by: Lawrence Lee <[email protected]>
Signed-off-by: Lawrence Lee <[email protected]>
retest vsimage please |
retest broadcom please |
retest mellanox please |
az pipeline passes |
To make the peer switch hostname easily accessible from config DB. Add peer_switch field to DEVICE_METADATA table Signed-off-by: Lawrence Lee <[email protected]>
@@ -1178,6 +1178,10 @@ def parse_xml(filename, platform=None, port_config_file=None, asic_name=None, hw | |||
|
|||
if bool(results['PEER_SWITCH']): | |||
results['DEVICE_METADATA']['localhost']['subtype'] = 'DualToR' | |||
if len(results['PEER_SWITCH'].keys()) > 1: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the underlying cause of the two peers entities? Is this coming from the GeminiPeeringLink property? If so, can we use the hostname from the graph to pick the correct peer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should never have two peer entities, it would only occur if there were an error in the minigraph (if it had two of the peering link tags).
Signed-off-by: Lawrence Lee [email protected]
- Why I did it
To make the peer switch hostname easily accessible from config DB
- How I did it
Add
peer_switch
field to DEVICE_METADATA table- How to verify it
Run the sonic-cfggen tests
- Which release branch to backport (provide reason below if selected)
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)