-
Notifications
You must be signed in to change notification settings - Fork 353
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
Get list of required mount points for mount point assignment from backend #5121
Get list of required mount points for mount point assignment from backend #5121
Conversation
552e272
to
debe428
Compare
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.
Looks good to me, thank you.
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.
Thank you, for the backend structure/archtecture/form, LGTM.
I don't want to pressure you into renaming all the things, but we don't want to propagate legacy anaconda internals names as API.
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 am not a fan of the PartSpec
class and it is definitely a candidate for refactorization, but there was never a good time to do that. So instead of replicating the PartSpec
class in the DBus API, it would be better to modernize the DBus structure and eventually apply these changes to the PartSpec
class (or replace it completely).
@@ -453,3 +453,61 @@ def get_root_device(self): | |||
:return: a device name or None | |||
""" | |||
return self.mount_points.get("/") | |||
|
|||
|
|||
class PlatformMountPointData(DBusData): |
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.
The same structure can eventually used to expose the autopart specification. Please, take it into account when choosing a name of this structure.
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 am not sure what would be the best name for this, I changed it to RequiredMountPointData
and added a better docstring (or at least I hope it is better).
tests/unit_tests/pyanaconda_tests/modules/storage/test_module_device_tree.py
Outdated
Show resolved
Hide resolved
05bed5b
to
d5ce9b4
Compare
Hello @vojtechtrefny! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2023-09-22 15:09:33 UTC |
d5ce9b4
to
0c111af
Compare
I hope I addressed all the review comments so I think this is ready for a final review. Thank you for all the suggestions for better function/argument names. |
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 think this is fine.
tests/unit_tests/pyanaconda_tests/modules/storage/test_module_device_tree.py
Outdated
Show resolved
Hide resolved
0c111af
to
d308ce5
Compare
This uses the Platform class to get list of required partitions/ mount points needed for manual partitioning. Root filesystem is manually added to the list provided by Platform.partitions.
We now have a backend function to get list of mount points required for mount point assignment.
The only mount point with a special file system requirement is currently /boot/efi, but on some systems the requirement can be different than EFI boot (e.g. hfs+ for older Apple hardware) so we should use the fstype from the backend instead of hardcoding EFI in the WebUI.
d308ce5
to
d481ba2
Compare
/kickstart-test --testtype smoke |
…i-backend Get list of required mount points for mount point assignment from backend
Follow up for #5066 I've added a new backend function which uses modules/storage/platform.py to get the list of required boot-related required mount points.
I opening this as a draft to be able to discuss the backend changes, I plan to make some more changes in the webUI with the additional information we cna get from the platform module (like checking for correct filesystem and device types for the mount points).