]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume lvm.strategies update filestore use of Size objects
authorAlfredo Deza <adeza@redhat.com>
Wed, 8 Aug 2018 19:37:42 +0000 (15:37 -0400)
committerAndrew Schoen <aschoen@redhat.com>
Wed, 29 Aug 2018 18:31:56 +0000 (13:31 -0500)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit f29ec4c6077e9ab36a9eb5ac030b17cd3a47567c)

src/ceph-volume/ceph_volume/devices/lvm/strategies/filestore.py

index 914772f3b566aceea73762cc9157ba1f0581e262..6651b4e94ec21bd65d246bf73c771e35b004a660 100644 (file)
@@ -27,10 +27,10 @@ class SingleType(object):
 
     def report_pretty(self):
         string = ""
-        string += templates.osd_header.format(
+        string += templates.total_osds.format(
             total_osds=len(self.hdds) or len(self.ssds) * 2
         )
-        string += templates.osd_component
+        string += templates.osd_component_titles
 
         for osd in self.computed['osds']:
             string += templates.osd_header
@@ -76,11 +76,11 @@ class SingleType(object):
             osd = {'data': {}, 'journal': {}}
             osd['data']['path'] = device['path']
             osd['data']['size'] = data_size.b
-            osd['data']['percentage'] = round(data_percentage.b)
-            osd['data']['human_readable_size'] = str(data_size / 100)
+            osd['data']['percentage'] = int(data_percentage)
+            osd['data']['human_readable_size'] = str(data_size)
             osd['journal']['path'] = device['path']
             osd['journal']['size'] = journal_size.b
-            osd['journal']['percentage'] = round(100 - data_percentage.b)
+            osd['journal']['percentage'] = int(100 - data_percentage)
             osd['journal']['human_readable_size'] = str(journal_size)
             osds.append(osd)