diff options
author | Adrian Likins <alikins@redhat.com> | 2008-06-26 17:03:55 -0400 |
---|---|---|
committer | Adrian Likins <alikins@redhat.com> | 2008-06-26 17:03:55 -0400 |
commit | c32f90cfb0ec131eded7cf7da7568e3853a1b265 (patch) | |
tree | 8e3d1dd5e69e06d7ade3f38a362666fc3f69e7d4 /func | |
parent | 7130f3b2bcd01d978a564eca9e2a4f739db22262 (diff) | |
download | third_party-func-c32f90cfb0ec131eded7cf7da7568e3853a1b265.tar.gz third_party-func-c32f90cfb0ec131eded7cf7da7568e3853a1b265.tar.xz third_party-func-c32f90cfb0ec131eded7cf7da7568e3853a1b265.zip |
add a "summary" to the cmd_module classes so the help can get to them.
make "func help" work again. Sorta. It's better, but it's still not right. At
least it doesnt traceback now.
remove a spurious debug statement in the command parser
Diffstat (limited to 'func')
-rw-r--r-- | func/overlord/cmd_modules/call.py | 1 | ||||
-rw-r--r-- | func/overlord/cmd_modules/check.py | 1 | ||||
-rw-r--r-- | func/overlord/cmd_modules/copyfile.py | 1 | ||||
-rw-r--r-- | func/overlord/cmd_modules/listminions.py | 1 | ||||
-rw-r--r-- | func/overlord/cmd_modules/ping.py | 1 | ||||
-rw-r--r-- | func/overlord/cmd_modules/show.py | 1 | ||||
-rw-r--r-- | func/overlord/command.py | 2 |
7 files changed, 7 insertions, 1 deletions
diff --git a/func/overlord/cmd_modules/call.py b/func/overlord/cmd_modules/call.py index 4615dd5..18af3a6 100644 --- a/func/overlord/cmd_modules/call.py +++ b/func/overlord/cmd_modules/call.py @@ -28,6 +28,7 @@ DEFAULT_FORKS = 1 class Call(base_command.BaseCommand): name = "call" usage = "call module method name arg1 arg2..." + summary = "allows a specific module and method to be called" def addOptions(self): self.parser.add_option("-v", "--verbose", dest="verbose", action="store_true") diff --git a/func/overlord/cmd_modules/check.py b/func/overlord/cmd_modules/check.py index 18bcd52..80913e4 100644 --- a/func/overlord/cmd_modules/check.py +++ b/func/overlord/cmd_modules/check.py @@ -28,6 +28,7 @@ from certmaster.commonconfig import MinionConfig class CheckAction(base_command.BaseCommand): name = "check" usage = "check func for possible setup problems" + summary = usage def addOptions(self): self.parser.add_option("-c", "--certmaster", action="store_true", help="check the certmaster configuration on this box") diff --git a/func/overlord/cmd_modules/copyfile.py b/func/overlord/cmd_modules/copyfile.py index f464575..ade0064 100644 --- a/func/overlord/cmd_modules/copyfile.py +++ b/func/overlord/cmd_modules/copyfile.py @@ -26,6 +26,7 @@ from func.overlord import client class CopyFile(base_command.BaseCommand): name = "copyfile" usage = "copy a file to a client" + summary = "copy a file to a minion" def addOptions(self): diff --git a/func/overlord/cmd_modules/listminions.py b/func/overlord/cmd_modules/listminions.py index 6e9c657..cf52855 100644 --- a/func/overlord/cmd_modules/listminions.py +++ b/func/overlord/cmd_modules/listminions.py @@ -22,6 +22,7 @@ from func.overlord import base_command class ListMinions(base_command.BaseCommand): name = "list_minions" usage = "show known minions" + summary = usage def addOptions(self): self.parser.add_option("-v", "--verbose", dest="verbose", diff --git a/func/overlord/cmd_modules/ping.py b/func/overlord/cmd_modules/ping.py index ef866ae..4e45af8 100644 --- a/func/overlord/cmd_modules/ping.py +++ b/func/overlord/cmd_modules/ping.py @@ -26,6 +26,7 @@ from func.overlord import client class Ping(base_command.BaseCommand): name = "ping" usage = "see what func minions are up/accessible" + summary = usage def addOptions(self): """ diff --git a/func/overlord/cmd_modules/show.py b/func/overlord/cmd_modules/show.py index 0e42759..92b094e 100644 --- a/func/overlord/cmd_modules/show.py +++ b/func/overlord/cmd_modules/show.py @@ -23,6 +23,7 @@ from func.overlord import base_command class ShowHardware(base_command.BaseCommand): name = "hardware" usage = "show hardware details" + summary = usage # FIXME: we might as well make verbose be in the subclass # and probably an inc variable while we are at it diff --git a/func/overlord/command.py b/func/overlord/command.py index aa21ddb..4b815f0 100644 --- a/func/overlord/command.py +++ b/func/overlord/command.py @@ -135,6 +135,7 @@ class Command: for name, command in self.subCommands.items(): formatter.addCommand(name, command.summary or command.description) + print formatter.format_description("") # expand %command for the bottom usage usage = self.usage or self.name @@ -197,7 +198,6 @@ class Command: # handle pleas for help if args and args[0] == 'help': - self.debug('Asked for help, args %r' % args) # give help on current command if only 'help' is passed if len(args) == 1: |