]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume api.lvm force vgs to display units in 'g'
authorAlfredo Deza <adeza@redhat.com>
Mon, 21 May 2018 17:35:57 +0000 (13:35 -0400)
committerAndrew Schoen <aschoen@redhat.com>
Mon, 11 Jun 2018 14:47:17 +0000 (09:47 -0500)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit da9f90fcb40e1e82c322f6020253b63da69238da)

src/ceph-volume/ceph_volume/api/lvm.py

index 2f2bd17388f656159a8608eee1a3511693e04942..6a69f257d3b93c272adcfd15c2db8b5d9807360b 100644 (file)
@@ -174,15 +174,17 @@ def get_api_vgs():
 
     Command and sample delimited output should look like::
 
-        $ vgs --noheadings --readonly --separator=';' \
+        $ vgs --noheadings --units=g --readonly --separator=';' \
           -o vg_name,pv_count,lv_count,snap_count,vg_attr,vg_size,vg_free
           ubuntubox-vg;1;2;0;wz--n-;299.52g;12.00m
           osd_vg;3;1;0;wz--n-;29.21g;9.21g
 
+    To normalize sizing, the units are forced in 'g' which is equivalent to
+    gigabytes, which uses multiples of 1024 (as opposed to 1000)
     """
     fields = 'vg_name,pv_count,lv_count,snap_count,vg_attr,vg_size,vg_free'
     stdout, stderr, returncode = process.call(
-        ['vgs', '--noheadings', '--readonly', '--separator=";"', '-o', fields]
+        ['vgs', '--noheadings', '--readonly', '--units=g', '--separator=";"', '-o', fields]
     )
     return _output_parser(stdout, fields)