summaryrefslogtreecommitdiffstats
path: root/cobbler/commands.py
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2007-11-19 17:39:15 -0500
committerMichael DeHaan <mdehaan@redhat.com>2007-11-19 17:39:15 -0500
commit995bf878e03aabd8036498b641253a2c419e3c01 (patch)
tree38301f5c0300f721185b08a398be29a7f93eca85 /cobbler/commands.py
parent5883ca6b1b8fe371f98db68ac71982affed8b974 (diff)
downloadcobbler-995bf878e03aabd8036498b641253a2c419e3c01.tar.gz
cobbler-995bf878e03aabd8036498b641253a2c419e3c01.tar.xz
cobbler-995bf878e03aabd8036498b641253a2c419e3c01.zip
Further work on CLI modularization. All commands implemented now, except for old
school compatibility translation for list/report. All commands will then need to be tested...
Diffstat (limited to 'cobbler/commands.py')
-rw-r--r--cobbler/commands.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/cobbler/commands.py b/cobbler/commands.py
index 88d92b75..e5eb2de5 100644
--- a/cobbler/commands.py
+++ b/cobbler/commands.py
@@ -17,6 +17,8 @@ from cexceptions import *
from rhpl.translate import _, N_, textdomain, utf8
import sys
+HELP_FORMAT = "%-25s%s"
+
#=============================================================
class FunctionLoader:
@@ -69,10 +71,16 @@ class FunctionLoader:
Prints out all loaded functions.
"""
- print "usage:"
- print "======"
- for name in self.functions.keys():
- print "cobbler %s --help]" % name
+ print "commands:"
+ print "========="
+
+ names = self.functions.keys()
+ names.sort()
+
+ for name in names:
+ help = self.functions[name].help_me()
+ if help != "":
+ print help
#=============================================================