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

Does sfputil/main.py get platform success in current version?? #215

Closed
philipwangCP opened this issue Mar 1, 2018 · 4 comments
Closed
Assignees
Labels

Comments

@philipwangCP
Copy link


BUG REPORT INFORMATION

sfputil/main.py platform_key define maybe not revise for new design.

Description
In sfputil/main.py HWSKU_KEY and PLATFORM_KEY define:
HWSKU_KEY = "DEVICE_METADATA['localhost']['hwsku']"
PLATFORM_KEY = 'platform'

Steps to reproduce the issue

  1. sudo sfputil version

Describe the results you received
Failed to load platform module 'sfputil': [Errno 2] No such file or directory

Describe the results you expected
sfputil version 2.0

Additional information you deem important (e.g. issue happens only occasionally)
this issue is get platform string fail cause sfputil not find.

@jleveque
Copy link
Contributor

jleveque commented Mar 1, 2018

@taoyl-ms: It appears you missed sfputil/main.py in PR #205. Can you please take care of this?

@philipwangCP
Copy link
Author

sfputil/main.py maybe not revise as psuutil/main.py. And psuutil/main.py has updated few days ago.

psuutil/main.py
31: HWSKU_KEY = 'DEVICE_METADATA.localhost.hwsku'
32: PLATFORM_KEY = 'DEVICE_METADATA.localhost.platform'
...
71: def get_platform_and_hwsku():
72: try:
73: proc = subprocess.Popen([SONIC_CFGGEN_PATH, '-H', '-v', PLATFORM_KEY],

sfputil/main.py
31: HWSKU_KEY = "DEVICE_METADATA['localhost']['hwsku']"
32: PLATFORM_KEY = 'platform'
...
289: def get_platform_and_hwsku():
290: try:
291: proc = subprocess.Popen([SONIC_CFGGEN_PATH, '-v', PLATFORM_KEY],

@philipwangCP
Copy link
Author

sfputil/main.py miss revise.

@jleveque
Copy link
Contributor

jleveque commented Mar 1, 2018

Fixed in #216

@jleveque jleveque closed this as completed Mar 1, 2018
mihirpat1 pushed a commit to mihirpat1/sonic-utilities that referenced this issue Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants