diff options
author | Andrew Schoen <aschoen@redhat.com> | 2018-11-13 19:27:19 +0100 |
---|---|---|
committer | Andrew Schoen <aschoen@redhat.com> | 2018-11-14 17:36:29 +0100 |
commit | 568a0ce5be0161541772ceacb9b81652f51659f5 (patch) | |
tree | 377b41585f0f2f17edeefeafe971c63c2ebb1986 | |
parent | ceph-volume: add PTTYPE to blkid parser (diff) | |
download | ceph-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
-rw-r--r-- | src/ceph-volume/ceph_volume/util/device.py | 4 |
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' |