From: Andrew Schoen Date: Mon, 8 Oct 2018 13:39:05 +0000 (-0400) Subject: ceph-volume: add rotational property to Device class X-Git-Tag: v14.0.1~78^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7f6bfaaf0cf30a56481d6d67f2fa2a7e785cc344;p=ceph.git ceph-volume: add rotational property to Device class Signed-off-by: Andrew Schoen --- diff --git a/src/ceph-volume/ceph_volume/util/device.py b/src/ceph-volume/ceph_volume/util/device.py index fdae6e85f49e..0977cd0189d5 100644 --- a/src/ceph-volume/ceph_volume/util/device.py +++ b/src/ceph-volume/ceph_volume/util/device.py @@ -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: