summaryrefslogtreecommitdiffstats
path: root/src/ceph-volume/ceph_volume/util
diff options
context:
space:
mode:
authorAndrew Schoen <aschoen@redhat.com>2018-11-13 19:27:19 +0100
committerAndrew Schoen <aschoen@redhat.com>2018-11-14 17:36:29 +0100
commit568a0ce5be0161541772ceacb9b81652f51659f5 (patch)
tree377b41585f0f2f17edeefeafe971c63c2ebb1986 /src/ceph-volume/ceph_volume/util
parentceph-volume: add PTTYPE to blkid parser (diff)
downloadceph-568a0ce5be0161541772ceacb9b81652f51659f5.tar.xz
ceph-568a0ce5be0161541772ceacb9b81652f51659f5.zip
ceph-volume: adds has_gpt_headers property to Device class
Signed-off-by: Andrew Schoen <aschoen@redhat.com> Resolves: rm#27062
Diffstat (limited to '')
-rw-r--r--src/ceph-volume/ceph_volume/util/device.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ceph-volume/ceph_volume/util/device.py b/src/ceph-volume/ceph_volume/util/device.py
index d6e83be41a9..f5362bc1f37 100644
--- a/src/ceph-volume/ceph_volume/util/device.py
+++ b/src/ceph-volume/ceph_volume/util/device.py
@@ -212,6 +212,10 @@ class Device(object):
return os.path.exists(self.abspath)
@property
+ def has_gpt_headers(self):
+ return self.blkid_api.get("PTTYPE") == "gpt"
+
+ @property
def rotational(self):
return self.sys_api['rotational'] == '1'