-
Notifications
You must be signed in to change notification settings - Fork 185
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
feat: Add is_rhel_ai to parser of os_release #4313
feat: Add is_rhel_ai to parser of os_release #4313
Conversation
Signed-off-by: jiazhang <[email protected]> rh-pre-commit.version: 2.3.1 rh-pre-commit.check-secrets: ENABLED
2540787
to
2430b52
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4313 +/- ##
==========================================
+ Coverage 77.17% 77.18% +0.01%
==========================================
Files 765 765
Lines 41753 41773 +20
Branches 8815 8821 +6
==========================================
+ Hits 32221 32243 +22
+ Misses 8464 8463 -1
+ Partials 1068 1067 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
insights/parsers/os_release.py
Outdated
Returns: | ||
bool: True when the system is from RHEL AI image. | ||
""" | ||
return True if self.get("VARIANT", None) == "RHEL AI" and self.get("VARIANT_ID", None) == "rhel_ai" else False |
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.
nitpick, how about
return self.get("VARIANT") == "RHEL AI" and self.get("VARIANT_ID") == "rhel_ai"
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.
@xiangce - updated, please confirm
Signed-off-by: jiazhang <[email protected]> rh-pre-commit.version: 2.3.1 rh-pre-commit.check-secrets: ENABLED
Signed-off-by: jiazhang <[email protected]> rh-pre-commit.version: 2.3.1 rh-pre-commit.check-secrets: ENABLED (cherry picked from commit da76be4)
Signed-off-by: jiazhang <[email protected]> rh-pre-commit.version: 2.3.1 rh-pre-commit.check-secrets: ENABLED (cherry picked from commit da76be4) (cherry picked from commit cd9ddc8)
rh-pre-commit.version: 2.3.1
rh-pre-commit.check-secrets: ENABLED
All Pull Requests:
Check all that apply:
Complete Description of Additions/Changes:
Add
is_rhel_ai
function to check if the system is from RHEL AI image