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

Feed device info to orchagent process #2818

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dockers/docker-orchagent/orchagent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Export platform information. Required to be able to write
# vendor specific code.
export platform=`sonic-cfggen -y /etc/sonic/sonic_version.yml -v asic_type`
export device=`sonic-cfggen -H -v DEVICE_METADATA.localhost.platform`
Copy link
Contributor

@jleveque jleveque Apr 23, 2019

Choose a reason for hiding this comment

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

I think the variable naming here is confusing. device is actually what we commonly refer to as platform elsewhere and platform is what we commonly refer to as asic_type (or preferably, asic_vendor). I would prefer it if we stick to a common naming convention.

Can you assess how large/messy a change like this would be?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is a mess because platform is being asic_type in the first place. There are codes everywhere in swss using platform.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ugh. That's unfortunate, because I'm really not a fan of this convention; it's confusing.


MAC_ADDRESS=`ip link show eth0 | grep ether | awk '{print $2}'`

Expand Down