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: v12.2.9~5^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8bf8f97459c86ddb1c4d78e128098f56fac529a1;p=ceph.git ceph-volume: add rotational property to Device class Signed-off-by: Andrew Schoen (cherry picked from commit 7f6bfaaf0cf30a56481d6d67f2fa2a7e785cc344) --- diff --git a/src/ceph-volume/ceph_volume/util/device.py b/src/ceph-volume/ceph_volume/util/device.py index fdae6e85f49..0977cd0189d 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: