mirror of
https://github.com/ceph/ceph
synced 2025-02-24 03:27:10 +00:00
ceph-volume: util.device - add vg_free_percent property
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
This commit is contained in:
parent
de7d67603a
commit
f48d225454
@ -418,6 +418,12 @@ class Device(object):
|
||||
if lv.tags.get("ceph.type") in ["data", "block"]]
|
||||
return any(osd_ids)
|
||||
|
||||
@property
|
||||
def vg_free_percent(self):
|
||||
if self.vgs:
|
||||
return [vg.vg_free_count / vg.vg_extent_count for vg in self.vgs]
|
||||
else:
|
||||
return [1]
|
||||
|
||||
def _check_generic_reject_reasons(self):
|
||||
reasons = [
|
||||
|
Loading…
Reference in New Issue
Block a user