-
Notifications
You must be signed in to change notification settings - Fork 73
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
Add ABS support for Rocky and Alma 8 #228
Add ABS support for Rocky and Alma 8 #228
Conversation
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.
In general I'm not a fan of multiple changes in the same commit. This appears to do 3 things:
- ABS support for Rocky/Alma 8
- Use
||=
- Change the coding style on Ubuntu POWER
@@ -37,12 +37,12 @@ def generate_node(node_info, base_config, bhg_version) | |||
when 'AARCH64' | |||
'arm64' | |||
when 'POWER' | |||
base_template = node_info['ostype'].sub(/ubuntu(\d\d)/, 'ubuntu-\1.') | |||
base_template.sub!(/ubuntu-(\d\d)/, 'ubuntu-\1.') |
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 this change? It looks unrelated.
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.
I wanted to make things more similar with the vmpooler generator.
About this line I noticed we ran a sub on node_info['ostype']
on line 31 to add a dash which is needed for all Ubuntu templates.
This line should just add a dot between the major and minor versions of Ubuntu (1804 -> 18.04) when the arch is POWER. I guess we can document this a bit though.
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.
My point is that in general it's a good practice to separate your changes to multiple commits.
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.
Yeah, I usually start with something simple and then tinker with stuff more and more lol
I'll update the commit messages to reflect these changes.
Unfortunately beaker-hostgenerator doesn't generate ABS fixtures, so I tested this by running:
before and after my changes and comparing them, the only additions were the alma and rocky templates. |
Makes sense. In the future I'd like to have some parity between abs and vmpooler, and hopefully better document how these templates should be generated. |
I missed this in my previous PR, only added vmpooler support initially. Only update the 'template' key if it was not previously declared in the host's base config.
This should accomplish the same functionality as before, but calls sub on the base_template variable instead of node_info which is also done on line 31. The purpose of the initial sub is to add a dash between the platform name and version.
38a9f4a
to
d9126a4
Compare
I missed this in my previous PR, only added vmpooler support initially.