Skip to content

Added get_system_mac support for cisco-8000 device#9104

Merged
abdosi merged 2 commits intosonic-net:masterfrom
anamehra:anamehra/get_system_mac
Nov 4, 2021
Merged

Added get_system_mac support for cisco-8000 device#9104
abdosi merged 2 commits intosonic-net:masterfrom
anamehra:anamehra/get_system_mac

Conversation

@anamehra
Copy link
Contributor

Signed-off-by: anamehra anamehra@cisco.com

Why I did it

This is required to assign unique MACs to namespaces on Backend and Frontend asics
for cisco-8000 platforms

How I did it

Add vendor specific hook in get_system_mac. The MAC address are read from /profile.ini
file

How to verify it

config load_minigraph on a multi-asic system
config save
check mac addresses in DEVICE_METADATA section in each config_db json file

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

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106

Description for the changelog

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

Signed-off-by: anamehra <anamehra@cisco.com>
@anamehra anamehra requested a review from lguohan as a code owner October 28, 2021 16:24
@anamehra
Copy link
Contributor Author

cc @abdosi

for child in root:
if child.tag == str(QName(ns, "MetadataDeclaration")):
_, _, switch_type, _ = parse_asic_meta(child, asic_name)
return switch_type
Copy link
Contributor

@abdosi abdosi Oct 28, 2021

Choose a reason for hiding this comment

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

can we handle failure case of return None when the if condition fails.

@rlhui rlhui added the Chassis 🤖 Modular chassis support label Oct 31, 2021
@abdosi abdosi merged commit fed19e3 into sonic-net:master Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Chassis 🤖 Modular chassis support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants