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

Move dmi functions out of util. #622

Merged
merged 3 commits into from
Nov 2, 2020

Conversation

smoser
Copy link
Collaborator

@smoser smoser commented Oct 22, 2020

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.

Copy link
Collaborator

@igalic igalic left a 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.
@smoser smoser force-pushed the cleanup/separate-dmi branch from b8c8000 to 8e7debf Compare October 28, 2020 02:58
Copy link
Collaborator

@igalic igalic left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Collaborator

@OddBloke OddBloke left a 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):
Copy link
Collaborator

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:

if not util.is_x86():
return True # Non-Intel cpus don't properly report dmi product names
Is there a way we could drop that call and thereby remove is_x86 from util? (If not, then perhaps we could relocate is_x86 there?)

@OddBloke OddBloke merged commit 0af1ff1 into canonical:master Nov 2, 2020
This was referenced May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants