From: Andrew Schoen Date: Tue, 13 Nov 2018 18:27:19 +0000 (-0600) Subject: ceph-volume: adds has_gpt_headers property to Device class X-Git-Tag: v13.2.3~54^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=73c72879ddddb357fdf6e28b61e2cd90ddaf6479;p=ceph.git ceph-volume: adds has_gpt_headers property to Device class Signed-off-by: Andrew Schoen Resolves: rm#27062 (cherry picked from commit 568a0ce5be0161541772ceacb9b81652f51659f5) --- diff --git a/src/ceph-volume/ceph_volume/util/device.py b/src/ceph-volume/ceph_volume/util/device.py index d6e83be41a9d..f5362bc1f378 100644 --- a/src/ceph-volume/ceph_volume/util/device.py +++ b/src/ceph-volume/ceph_volume/util/device.py @@ -211,6 +211,10 @@ class Device(object): def exists(self): 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'