From f60290bb11b16fee94a3eb8f020b9000264ac256 Mon Sep 17 00:00:00 2001 From: Dan Bungert Date: Wed, 21 Feb 2024 11:49:24 -0700 Subject: [PATCH] types: rename ZFS_LUKS -> ZFS_LUKS_KEYSTORE Clarify that the implemented mechanism is the keystore setup. An implementation that doesn't use native ZFS encryption is plausibly interesting, which is a better use of the term ZFS_LUKS. --- subiquity/common/types.py | 4 ++-- subiquity/server/controllers/filesystem.py | 2 +- subiquity/server/controllers/tests/test_filesystem.py | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/subiquity/common/types.py b/subiquity/common/types.py index 2c656753..b7e3bf0c 100644 --- a/subiquity/common/types.py +++ b/subiquity/common/types.py @@ -347,7 +347,7 @@ class GuidedCapability(enum.Enum): LVM = enum.auto() LVM_LUKS = enum.auto() ZFS = enum.auto() - ZFS_LUKS = enum.auto() + ZFS_LUKS_KEYSTORE = enum.auto() CORE_BOOT_ENCRYPTED = enum.auto() CORE_BOOT_UNENCRYPTED = enum.auto() @@ -384,7 +384,7 @@ class GuidedCapability(enum.Enum): def is_zfs(self) -> bool: return self in [ GuidedCapability.ZFS, - GuidedCapability.ZFS_LUKS, + GuidedCapability.ZFS_LUKS_KEYSTORE, ] diff --git a/subiquity/server/controllers/filesystem.py b/subiquity/server/controllers/filesystem.py index ce51167d..6ec06ceb 100644 --- a/subiquity/server/controllers/filesystem.py +++ b/subiquity/server/controllers/filesystem.py @@ -217,7 +217,7 @@ class VariationInfo: GuidedCapability.LVM, GuidedCapability.LVM_LUKS, GuidedCapability.ZFS, - GuidedCapability.ZFS_LUKS, + GuidedCapability.ZFS_LUKS_KEYSTORE, ] ), ) diff --git a/subiquity/server/controllers/tests/test_filesystem.py b/subiquity/server/controllers/tests/test_filesystem.py index 252a41cf..ab767374 100644 --- a/subiquity/server/controllers/tests/test_filesystem.py +++ b/subiquity/server/controllers/tests/test_filesystem.py @@ -76,7 +76,7 @@ default_capabilities = [ GuidedCapability.LVM, GuidedCapability.LVM_LUKS, GuidedCapability.ZFS, - GuidedCapability.ZFS_LUKS, + GuidedCapability.ZFS_LUKS_KEYSTORE, ] @@ -590,7 +590,7 @@ class TestGuided(IsolatedAsyncioTestCase): self.assertEqual("zfs", zfs_boot.type) @parameterized.expand(boot_expectations) - async def test_guided_zfs_luks(self, bootloader, ptable, p1mnt): + async def test_guided_zfs_luks_keystore(self, bootloader, ptable, p1mnt): await self._guided_setup(bootloader, ptable) target = GuidedStorageTargetReformat( disk_id=self.d1.id, allowed=default_capabilities @@ -598,7 +598,7 @@ class TestGuided(IsolatedAsyncioTestCase): await self.controller.guided( GuidedChoiceV2( target=target, - capability=GuidedCapability.ZFS_LUKS, + capability=GuidedCapability.ZFS_LUKS_KEYSTORE, password="passw0rd", ) )