-
Notifications
You must be signed in to change notification settings - Fork 650
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
Fix to get all port related attributes from config_db #362
Conversation
This fix address the issue |
@paavaanan thanks for addresing the commits. could you also change the title of this pull request into a brief one? the current one contains some details that shall be moved into the commit message. |
@paavaanan this is a nice article about the git commit message: https://medium.com/@preslavrachev/what-s-with-the-50-72-rule-8a906f61f09c |
Thanks shoutian |
config/main.py
Outdated
PLATFORM_ROOT_PATH = '/usr/share/sonic/device' | ||
SONIC_CFGGEN_PATH = '/usr/local/bin/sonic-cfggen' | ||
HWSKU_KEY = 'DEVICE_METADATA.localhost.hwsku' | ||
PLATFORM_KEY = 'DEVICE_METADATA.localhost.platform' |
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.
Why did you add definitions for PLATFORM_ROOT_PATH
, HWSKU_KEY
and PLATFORM_KEY
? They are not used anywhere in the file.
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.
Joe, it is added as part of the initiall pull request. This is not necessary. Will remove the lines
config/main.py
Outdated
@@ -12,17 +12,20 @@ | |||
from swsssdk import ConfigDBConnector | |||
from natsort import natsorted | |||
from minigraph import parse_device_desc_xml | |||
from portconfig import get_port_config |
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.
Why add this import if you are not using it?
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.
removed in the new commit
show/main.py
Outdated
PLATFORM_ROOT_PATH = '/usr/share/sonic/device' | ||
SONIC_CFGGEN_PATH = '/usr/local/bin/sonic-cfggen' | ||
HWSKU_KEY = 'DEVICE_METADATA.localhost.hwsku' | ||
PLATFORM_KEY = 'DEVICE_METADATA.localhost.platform' |
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.
Why add these four constants? They are not used anywhere in the file.
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.
Other than SONIC_CFGGEN_PATH removed unused constants
show/main.py
Outdated
@@ -15,9 +15,15 @@ | |||
import sonic_platform | |||
from swsssdk import ConfigDBConnector | |||
from swsssdk import SonicV2Connector | |||
from portconfig import get_port_config |
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.
Why add this import if you are not using it?
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.
removed in new commit
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.
? This was not removed.
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.
Addressed in new commit!
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.
As comments. Also, as Shuotian has requested, please abbreviate your PR title. It is a bit long. One place to start is to remove the opening [sonic-cfggen]:
because this PR doesn't directly affect sonic-cfggen, which resides in the sonic-buildimage repo.
thanks for fixing that! |
Add support for attribute capability query in lua script (sonic-net#362)
EmmcUtil class implements SsdBase API and can be used by ssdutil instead of the default SsdUtil class on platforms that have eMMC. The class is copied from Arista platform. Signed-off-by: Yakiv Huryk <[email protected]>
- What I did
- How I did it
NOTE: config commands are entirely modified from linux commands to db format. This fix does not cover interface validation for those commands.