-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Port #47620 to master #56817
Port #47620 to master #56817
Conversation
ping @cbosdo would you mind reviewing here. I had to rebase with the changes you recently got merged and make some changes from the original PR to ensure loader worked with the new defined function as well. |
@Ch3LL I completely forgot about that PR... and there are some bits in the UEFI / loader handling that would need to be rethinked.
How do you see this backport PR? Just stick to what was in the original PR and then file another PR to fix the above mentioned points or add the above points to this PR? In the latter case I would probably have to take over your PR to complete and fix it. |
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.
Apart from the missing documentation in the new virt.defined
state, the backport is matching the original PR. However as mentioned in the previous comment, the original PR would have needed changes. These may be lifted in a subsequent PR.
Path to the UEFI firmware binary | ||
|
||
Optionally, you can provide arbitrary attributes such as ``readonly`` or ``type``. See | ||
the libvirt documentation for all supported loader parameters. |
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 don't really like the way this parameter is handled. This really flexible, but doesn't help clarifying what users can put here. Furthermore it doesn't handle the nvram templates needed for most UEFI loaders... and should be merged with the boot
parameter.
if key == "path": | ||
continue | ||
loader_attributes.append("{key}='{val}'".format(key=key, val=val)) | ||
loader["_attributes"] = " ".join(loader_attributes) |
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.
Opens the door to undocumented parameters
See the **Loader Definition** section of the :py:func:`virt.init | ||
<salt.modules.virt.init>` function for more details on this dictionary. | ||
|
||
.. versionadded:: Sodium |
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.
That parameter documentation should also be in the defined()
state
) | ||
root = ET.fromstring(xml_data) | ||
self.assertFalse("loader" in root.find("os")) | ||
|
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.
Missing a test case for virt.update
with loader defined
For reference the UEFI part of this PR overlaps with merged PR #56613 |
since the other PR has been merged, this one can be closed |
Thanks your awesome! |
Port #47620 to master