[blivet:master 06/14] Remove DeviceFormat.probe() method
mulhern
amulhern at redhat.com
Wed Jul 16 16:56:39 UTC 2014
These functions haven't been changed since the split from anaconda and they
weren't in use then.
I expect that their use was replace by udev/pyudev, etc.
MDRaidMember.probe() would raise a KeyError if it were ever run,
since mdexamine() result has no 'uuid' value.
Signed-off-by: mulhern <amulhern at redhat.com>
---
blivet/formats/__init__.py | 4 ----
blivet/formats/luks.py | 7 -------
blivet/formats/lvmpv.py | 11 -----------
blivet/formats/mdraid.py | 12 ------------
4 files changed, 34 deletions(-)
diff --git a/blivet/formats/__init__.py b/blivet/formats/__init__.py
index 0f6a8b1..eabd22f 100644
--- a/blivet/formats/__init__.py
+++ b/blivet/formats/__init__.py
@@ -315,10 +315,6 @@ class DeviceFormat(ObjectID):
def type(self):
return self._type
- def probe(self):
- log_method_call(self, device=self.device,
- type=self.type, status=self.status)
-
def notifyKernel(self):
log_method_call(self, device=self.device,
type=self.type)
diff --git a/blivet/formats/luks.py b/blivet/formats/luks.py
index 4d1377b..bcececb 100644
--- a/blivet/formats/luks.py
+++ b/blivet/formats/luks.py
@@ -159,13 +159,6 @@ class LUKS(DeviceFormat):
return False
return os.path.exists("/dev/mapper/%s" % self.mapName)
- def probe(self):
- """ Probe for any missing information about this format.
-
- cipher mode, key size
- """
- raise NotImplementedError("probe method not defined for LUKS")
-
def setup(self, **kwargs):
""" Open the encrypted block device.
diff --git a/blivet/formats/lvmpv.py b/blivet/formats/lvmpv.py
index bff1052..a9d2801 100644
--- a/blivet/formats/lvmpv.py
+++ b/blivet/formats/lvmpv.py
@@ -90,17 +90,6 @@ class LVMPhysicalVolume(DeviceFormat):
"peStart": self.peStart})
return d
- def probe(self):
- """ Probe for any missing information about this device. """
- log_method_call(self, device=self.device,
- type=self.type, status=self.status)
- if not self.exists:
- raise PhysicalVolumeError("format has not been created")
-
- #info = lvm.pvinfo(self.device)
- #self.vgName = info['vg_name']
- #self.vgUuid = info['vg_uuid']
-
def create(self, **kwargs):
""" Write the formatting to the specified block device.
diff --git a/blivet/formats/mdraid.py b/blivet/formats/mdraid.py
index 1f3152c..5525eba 100644
--- a/blivet/formats/mdraid.py
+++ b/blivet/formats/mdraid.py
@@ -62,7 +62,6 @@ class MDRaidMember(DeviceFormat):
DeviceFormat.__init__(self, **kwargs)
self.mdUuid = kwargs.get("mdUuid")
- #self.probe()
self.biosraid = kwargs.get("biosraid")
def __repr__(self):
@@ -77,17 +76,6 @@ class MDRaidMember(DeviceFormat):
d.update({"mdUUID": self.mdUuid, "biosraid": self.biosraid})
return d
- def probe(self):
- """ Probe for any missing information about this format. """
- log_method_call(self, device=self.device,
- type=self.type, status=self.status)
- if not self.exists:
- raise MDMemberError("format does not exist")
-
- info = mdraid.mdexamine(self.device)
- if self.uuid is None:
- self.uuid = info['uuid']
-
def destroy(self, **kwargs):
""" Remove the formatting from the associated block device.
--
1.9.3
More information about the anaconda-patches
mailing list