Skip to content

Commit

Permalink
storage: Remove GetRecommendedMountPoints
Browse files Browse the repository at this point in the history
It is replaced by GetMountPointConstraints.
GetRequiredMountPoints will be replaced after replacing it
with GetMountPointConstraints in webui.
  • Loading branch information
rvykydal committed Dec 11, 2023
1 parent 910ebf6 commit 654b9c5
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 41 deletions.
16 changes: 0 additions & 16 deletions pyanaconda/modules/storage/devicetree/viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -541,19 +541,3 @@ def get_required_mount_points(self):
[p for p in platform.partitions if p.mountpoint and p.mountpoint != "/boot"]
+ [root_partition]))
return ret

def get_recommended_mount_points(self):
"""Get list of recommended mount points for the current platform
Currently it contains only /boot partition if it is default the for
platform.
:return: a list of mount points with its constraints
"""
# FIXME in general /boot is not required, just recommended. Depending
# on the filesystem on the root partition it may be required (ie
# crypted root).
recommended = ["/boot"]
ret = list(map(self._get_platform_mount_point_data,
[p for p in platform.partitions if p.mountpoint in recommended]))
return ret
11 changes: 0 additions & 11 deletions pyanaconda/modules/storage/devicetree/viewer_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,3 @@ def GetRequiredMountPoints(self) -> List[Structure]:
"""
return MountPointConstraintsData.to_structure_list(
self.implementation.get_required_mount_points())

def GetRecommendedMountPoints(self) -> List[Structure]:
"""Get list of recommended mount points for the current platform
Currently it contains only /boot partition if it is default the for
platform.
:return: a list of mount points with its constraints
"""
return MountPointConstraintsData.to_structure_list(
self.implementation.get_recommended_mount_points())
Original file line number Diff line number Diff line change
Expand Up @@ -848,20 +848,6 @@ def test_get_required_mount_points(self):
assert root.mount_point == "/"
assert root.required_filesystem_type == ""

def test_get_recommended_mount_points(self):
"""Test GetRecommendedMountPoints."""
result = self.interface.GetRecommendedMountPoints()
assert isinstance(result, list)
assert len(result) == 1

result = MountPointConstraintsData.from_structure_list(self.interface.GetRecommendedMountPoints())
boot = result[0]
assert boot is not None
assert boot.encryption_allowed is False
assert boot.logical_volume_allowed is False
assert boot.mount_point == "/boot"
assert boot.required_filesystem_type == ""

class DeviceTreeTasksTestCase(unittest.TestCase):
"""Test the storage tasks."""

Expand Down

0 comments on commit 654b9c5

Please sign in to comment.