]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/ceph_argparse: add :int or :float to numerical args 30431/head
authorSage Weil <sage@redhat.com>
Wed, 18 Sep 2019 23:23:12 +0000 (18:23 -0500)
committerSage Weil <sage@redhat.com>
Wed, 18 Sep 2019 23:23:12 +0000 (18:23 -0500)
For example,

osd tier add-cache <pool> <tierpool> <size:int>

Leave off permissible ranges for the sake of brevity.

Signed-off-by: Sage Weil <sage@redhat.com>
src/pybind/ceph_argparse.py

index bda37e6ab6ee40b6acd45ae1208e400b2e54af0d..eac7005e2e5e2eae55213e8ccbf44fe7f32486e1 100644 (file)
@@ -716,6 +716,10 @@ class argdesc(object):
             # CephName commands similarly only have one arg of the
             # type, so <type.id> is good.
             chunk = '<type.id>'
+        elif self.t == CephInt:
+            chunk = '<{0}:int>'.format(self.name)
+        elif self.t == CephFloat:
+            chunk = '<{0}:float>'.format(self.name)
         else:
             chunk = '<{0}>'.format(self.name)
         s = chunk