From: Sage Weil Date: Wed, 18 Sep 2019 23:19:41 +0000 (-0500) Subject: pybind/ceph_argparse: simplify osd name and target types X-Git-Tag: v15.1.0~1389^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=46fe1bd8d3f059a6d56edd5178311fac349af531;p=ceph.git pybind/ceph_argparse: simplify osd name and target types In both cases there is only ever one of these, so a simple '' or '' is sufficient. Signed-off-by: Sage Weil --- diff --git a/src/pybind/ceph_argparse.py b/src/pybind/ceph_argparse.py index 6920d75e77c4..bda37e6ab6ee 100644 --- a/src/pybind/ceph_argparse.py +++ b/src/pybind/ceph_argparse.py @@ -708,6 +708,14 @@ class argdesc(object): chunk = "--{0}".format(self.name.replace("_", "-")) elif self.t == CephPrefix or self.t == CephChoices: chunk = str(self.instance) + elif self.t == CephOsdName: + # it just so happens all CephOsdName commands are named 'id' anyway, + # so is perfect. + chunk = '' + elif self.t == CephName: + # CephName commands similarly only have one arg of the + # type, so is good. + chunk = '' else: chunk = '<{0}>'.format(self.name) s = chunk