-
Notifications
You must be signed in to change notification settings - Fork 708
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
install_vm: Add default osinfo for RHEL distro #12858
base: master
Are you sure you want to change the base?
install_vm: Add default osinfo for RHEL distro #12858
Conversation
rhel8-unknown should work for RHEL8+ installations.
LGTM, although I'm not sure if you want such a long |
That was also something I didn't like, but considering I struggled with this option since from the beginning, I'd rather have extra information than too little |
Can I have a bit more context on this pull request? A least for me the only time I need to provide |
You can also do what some of our other projects do with long help texts - put extra details at the end. In Python epilog = textwrap.dedent(r"""
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque ege
efficitur turpis. Nam malesuada nec dolor eget auctor. Donec accumsan enim
id sem tempus, a sodales ligula sollicitudin. Quisque at tortor at risus congue
commodo.
""")
parser = argparse.ArgumentParser(
epilog=epilog,
formatter_class=argparse.RawTextHelpFormatter,
usage=f'{sys.argv[0]} [options]',
)
parser.add_argument( ... ) The epilog will appear as a block of text (even with multiple paragraphs, space indentation, etc. if used with I'm not sure if it's worth doing it here, just mentioning it as an option. |
AFAIK Yes, but it's been implemented in a fairly generic way to be applicable to all RHELs, as to not single out RHEL-10. Either way, But a forced Either way works, I guess. |
Agreed, both ways work. I guess I'm fine with this, I would prefer to use autodetect vs this static assign, but this does make installing new versions of RHEL easier. |
With @comps suggestion, the help output looks like:
|
Another option here would be to just include hints on which osinfo to use for unreleased RHEL major versions or to split the KNOWN_DISTROS into two and the second would contain unreleased distros, so we can set the osinfo by default for those unreleased distros. This could be useful for other distros as well. |
The help text will be truncated no matter how long they are. Improve legibility.
That might work, and I agree it would be flexible for other distros. |
Whenever a distro is being develop there might be a need to install this distro and virt-install requires an osinfo that in this case cannot be detected because the distro has not been released yet. Usually the previous major version osinfo data works just fine for the installation to succeed.
I have expanded the script with the concept of unreleased distro which might make it clearer. The problem is that there is a time expiration for that code to become obsolete. I'm going to setup a reminder for that to be updated. |
Code Climate has analyzed commit cfbdea1 and detected 4 issues on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 61.9% (0.0% change). View more on Code Climate. |
Description: