-
Notifications
You must be signed in to change notification settings - Fork 899
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
Move dmi functions out of util. #622
Conversation
668c188
to
b8c8000
Compare
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.
first pass of reading over this, and it looks quite straightforward
This just separates the reading of dmi values into its own file. Some things of note: * left import of util in dmi.py only for 'is_container' It'd be good if is_container was not in util. * just the use of 'util.is_x86' to dmi.py * open() is used directly rather than load_file.
b8c8000
to
8e7debf
Compare
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.
👍
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.
LGTM, thanks! I have one inline comment with a suggested follow-up.
if syspath_value is not None: | ||
return syspath_value | ||
|
||
def is_x86(arch): |
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.
The one place that the util.is_x86
is now used is in DataSourceOpenStack
:
cloud-init/cloudinit/sources/DataSourceOpenStack.py
Lines 226 to 227 in 0f8be87
if not util.is_x86(): | |
return True # Non-Intel cpus don't properly report dmi product names |
is_x86
from util
? (If not, then perhaps we could relocate is_x86
there?)
This just separates the reading of dmi values into its own file.
Some things of note:
It'd be good if is_container was not in util.