]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: add rotational property to Device class
authorAndrew Schoen <aschoen@redhat.com>
Mon, 8 Oct 2018 13:39:05 +0000 (09:39 -0400)
committerAndrew Schoen <aschoen@redhat.com>
Wed, 10 Oct 2018 19:30:29 +0000 (15:30 -0400)
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
src/ceph-volume/ceph_volume/util/device.py

index fdae6e85f49e180ffac702beaa83e4e42ccdd51a..0977cd0189d52916a2f5047455dedbdd02b8c1bc 100644 (file)
@@ -86,6 +86,12 @@ class Device(object):
     def exists(self):
         return os.path.exists(self.abspath)
 
+    @property
+    def rotational(self):
+        if self.sys_api['rotational'] == '1':
+            return True
+        return False
+
     @property
     def is_lvm_member(self):
         if self._is_lvm_member is None: