From: "Vratislav Podzimek" <vpodzime(a)redhat.com>
To: anaconda-patches(a)lists.fedorahosted.org
Sent: Wednesday, July 30, 2014 1:47:26 PM
Subject: [blivet] Move _verifyLUKSDevicesHaveKey and its exception to anaconda
They are only used by sanity check that has been moved to anaconda's
codebase.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
blivet/__init__.py | 18 +-----------------
blivet/errors.py | 3 ---
2 files changed, 1 insertion(+), 20 deletions(-)
diff --git a/blivet/__init__.py b/blivet/__init__.py
index f2240ce..e16cc3a 100644
--- a/blivet/__init__.py
+++ b/blivet/__init__.py
@@ -70,7 +70,7 @@ import parted
from pykickstart.constants import AUTOPART_TYPE_LVM, CLEARPART_TYPE_ALL,
CLEARPART_TYPE_LINUX, CLEARPART_TYPE_LIST, CLEARPART_TYPE_NONE
from .storage_log import log_exception_info, log_method_call
-from .errors import DeviceError, DirtyFSError, FSResizeError,
FSTabTypeMismatchError, UnknownSourceDeviceError, StorageError,
UnrecognizedFSTabEntryError, LUKSDeviceWithoutKeyError
+from .errors import DeviceError, DirtyFSError, FSResizeError,
FSTabTypeMismatchError, UnknownSourceDeviceError, StorageError,
UnrecognizedFSTabEntryError
from .devices import BTRFSDevice, BTRFSSubVolumeDevice, BTRFSVolumeDevice,
DirectoryDevice, FileDevice, LVMLogicalVolumeDevice,
LVMThinLogicalVolumeDevice, LVMThinPoolDevice, LVMVolumeGroupDevice,
MDRaidArrayDevice, NetworkStorageDevice, NFSDevice, NoDevice,
OpticalDevice, PartitionDevice, TmpFSDevice, devicePathToName
from .devicetree import DeviceTree
from .deviceaction import ActionCreateDevice, ActionCreateFormat,
ActionDestroyDevice, ActionDestroyFormat, ActionResizeDevice,
ActionResizeFormat
@@ -1546,22 +1546,6 @@ class Blivet(object):
return free
- def _verifyLUKSDevicesHaveKey(self):
- """Verify that all non-existant LUKS devices have some way of
obtaining
- a key.
-
- Note: LUKS device creation will fail without a key.
-
- :rtype: generator of str
- :returns: a generator of error messages, may yield no error
messages
-
- """
- for dev in (d for d in self.devices if \
- d.format.type == "luks" and \
- not d.format.exists and \
- not d.format.hasKey):
- yield LUKSDeviceWithoutKeyError(_("LUKS device %s has no
encryption key") % (dev.name,))
-
def dumpState(self, suffix):
""" Dump the current device list to the storage shelf.
"""
key = "devices.%d.%s" % (time.time(), suffix)
diff --git a/blivet/errors.py b/blivet/errors.py
index d9f1f76..508e3ef 100644
--- a/blivet/errors.py
+++ b/blivet/errors.py
@@ -137,9 +137,6 @@ class LVMError(StorageError):
class CryptoError(StorageError):
pass
-class LUKSDeviceWithoutKeyError(StorageError):
- pass
-
class MPathError(StorageError):
pass
--
1.9.3
_______________________________________________
anaconda-patches mailing list
anaconda-patches(a)lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches