]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/status: add exabytes unit
authorJohn Spray <john.spray@redhat.com>
Wed, 27 Jun 2018 15:26:51 +0000 (16:26 +0100)
committerJohn Spray <john.spray@redhat.com>
Wed, 27 Jun 2018 15:26:51 +0000 (16:26 +0100)
So far I've only run into this from bugs, but hey,
one day someone'll build a real cluster that big!

Signed-off-by: John Spray <john.spray@redhat.com>
src/pybind/mgr/status/module.py

index b4a0f25e0af70db7447cbee7b9d113573f323ba6..e7662a4a3e57f28a0195563b9e325bc1f02d5fb3 100644 (file)
@@ -67,7 +67,7 @@ class Module(MgrModule):
         """
         
         factor = 1000 if decimal else 1024
-        units = [' ', 'k', 'M', 'G', 'T', 'P']
+        units = [' ', 'k', 'M', 'G', 'T', 'P', 'E']
         unit = 0
         while len("%s" % (int(n) // (factor**unit))) > width - 1:
             unit += 1