From ba00c6c88e23640445cb749d8f6d04511c9adc9b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 19 Dec 2010 18:08:36 +0100 Subject: Prep for config stuff (cherry picked from commit 19d936d06d907e127bd678fa62372ac67f9cb374) --- src/sbin/bcfg2-info | 45 +++++++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 20 deletions(-) (limited to 'src/sbin/bcfg2-info') diff --git a/src/sbin/bcfg2-info b/src/sbin/bcfg2-info index f379a51bb..ba340dbef 100755 --- a/src/sbin/bcfg2-info +++ b/src/sbin/bcfg2-info @@ -133,7 +133,7 @@ class infoCore(cmd.Cmd, Bcfg2.Server.Core.Core): if command: sh.push(command) if interactive: - print("dropping to python interpreter; press ^D to resume") + print("Dropping to python interpreter; press ^D to resume") try: import IPython shell = IPython.Shell.IPShell(argv=[], user_ns=locals()) @@ -156,24 +156,25 @@ class infoCore(cmd.Cmd, Bcfg2.Server.Core.Core): def do_help(self, _): """Print out usage info.""" print 'Commands:' - print 'build - build config for hostname, writing to filename' - print 'builddir - build config for hostname, writing separate files to dirname' - print 'buildall - build configs for all clients in directory' - print 'buildfile - build config file for hostname (not written to disk)' - print 'bundles - print out group/bundle information' - print 'clients - print out client/profile information' - print 'debug - shell out to native python interpreter' - print 'event_debug - display filesystem events as they are processed' - print 'generators - list current versions of generators' - print 'groups - list groups' - print 'help - print this list of available commands' - print 'mappings - print generator mappings for optional type and name' - print 'profile - profile a single bcfg2-info command' - print 'quit - Exit the bcfg2-info command line' - print 'showentries - show abstract configuration entries for a given host' - print 'showclient - show metadata for given hosts' - print 'update - process pending file events' - print 'version - print version of this tool' + print 'build - Build config for hostname, writing to filename.' + print 'builddir - Build config for hostname, writing separate files to dirname.' + print 'buildall - Build configs for all clients in directory.' + print 'buildfile - Build config file for hostname (not written to disk).' + print 'bundles - Print out group/bundle information.' + print 'clients - Print out client/profile information.' + print 'config - Print out the information from bcf2.conf.' + print 'debug - Shell out to native python interpreter.' + print 'event_debug - Display filesystem events as they are processed.' + print 'generators - List current versions of generators.' + print 'groups - List groups.' + print 'help - Print this list of available commands.' + print 'mappings - Print generator mappings for optional type and name.' + print 'profile - Profile a single bcfg2-info command.' + print 'quit - Exit the bcfg2-info command line.' + print 'showentries - Show abstract configuration entries for a given host.' + print 'showclient - Show metadata for given hosts.' + print 'update - Process pending file events.' + print 'version - Print version of this tool.' def do_update(self, _): @@ -245,7 +246,7 @@ class infoCore(cmd.Cmd, Bcfg2.Server.Core.Core): print("Warning: No file content generated for ConfigFile %s!" % ex) pass except Exception, ex: - print("unknown error, I give up: %s" %ex) + print("Unknown error, giving up: %s" %ex) return print("Config for %s written to %s" % (client, odir)) @@ -295,6 +296,10 @@ class infoCore(cmd.Cmd, Bcfg2.Server.Core.Core): data.append((client, self.metadata.clients[client])) printTabular(data) + def do_config(self, _): + """Print out the current configuration stored in bcfg2.conf.""" + print "Here the configuration should go..." + def do_generators(self, _): """Print out generator info.""" for generator in self.generators: -- cgit v1.2.3-1-g7c22