]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: main: if no args are passed mention the --help usage, print some information
authorAlfredo Deza <adeza@redhat.com>
Wed, 12 Jul 2017 16:31:39 +0000 (12:31 -0400)
committerAlfredo Deza <adeza@redhat.com>
Fri, 4 Aug 2017 14:25:58 +0000 (10:25 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
src/ceph-volume/ceph_volume/main.py

index a7208306a61b9ec2defab678dce463fbcbe26de2..0a269ebd7ac56bc782e9e7fa7140d7381703216b 100644 (file)
@@ -12,22 +12,17 @@ from ceph_volume import log, devices, configuration, conf, exceptions, terminal
 class Volume(object):
     _help = """
 ceph-volume: Deploy Ceph OSDs using different device technologies like lvm or
-physical disks
+physical disks.
 
 Version: {version}
 
-Global Options:
---log, --logging    Set the level of logging. Acceptable values:
-                    debug, warning, error, critical
---log-path          Change the default location ('/var/lib/ceph') for logging
---cluster           Change the default cluster name ('ceph')
-
 Log Path: {log_path}
 Ceph Conf: {ceph_path}
 
 {sub_help}
 {plugins}
 {environ_vars}
+{warning}
     """
 
     def __init__(self, argv=None, parse=True):
@@ -38,8 +33,10 @@ Ceph Conf: {ceph_path}
         if parse:
             self.main(argv)
 
-    def help(self):
+    def help(self, warning=False):
+        warning = 'See "ceph-volume --help" for full list of options.' if warning else ''
         return self._help.format(
+            warning=warning,
             version=ceph_volume.__version__,
             log_path=conf.log_path,
             ceph_path=self.stat_ceph_conf(),
@@ -106,16 +103,15 @@ Ceph Conf: {ceph_path}
         self.load_log_path()
         self.enable_plugins()
         sanitized_args = self._get_sanitized_args()
-        help_text = self.help()
         # no flags where passed in, return the help menu instead of waiting for
         # argparse which will end up complaning that there are no args
         if len(sys.argv) <= 1:
-            print help_text
+            print self.help(warning=True)
             return
         parser = argparse.ArgumentParser(
             prog='ceph-volume',
             formatter_class=argparse.RawDescriptionHelpFormatter,
-            description=help_text,
+            description=self.help(),
         )
         parser.add_argument(
             '--cluster',