]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
ceph_volume: Checking device validity at init time
authorErwan Velu <erwan@redhat.com>
Wed, 10 Oct 2018 18:26:01 +0000 (20:26 +0200)
committerErwan Velu <erwan@redhat.com>
Mon, 22 Oct 2018 09:56:19 +0000 (11:56 +0200)
When initializing the Device structure, it have to run is_valid() to
ensure the data structures (_is_valid & rejected_reasons) to be
populated accordingly to the device state.

Signed-off-by: Erwan Velu <erwan@redhat.com>
src/ceph-volume/ceph_volume/util/device.py

index a8b236fd1ee1327f08fdb25c01e2f3c55b31cfc0..96cf2b12a7c1c18d961fd41c3512537b956675c5 100644 (file)
@@ -22,6 +22,7 @@ class Device(object):
         self._valid = False
         self._rejected_reasons = []
         self._parse()
+        self.is_valid
 
     def _parse(self):
         # start with lvm since it can use an absolute or relative path