diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2006-01-23 22:35:40 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2006-01-23 22:35:40 +0000 |
commit | edca0b698637c3fd0a70af7e4752a46afca938d3 (patch) | |
tree | 658fad717833200ccb4e3725c811ccce7c10fc8d /src/sbin/Bcfg2debug | |
parent | 8ca8a153dfc6bd81ede9f5cff1ee3f111ae053ee (diff) | |
download | bcfg2-edca0b698637c3fd0a70af7e4752a46afca938d3.tar.gz bcfg2-edca0b698637c3fd0a70af7e4752a46afca938d3.tar.bz2 bcfg2-edca0b698637c3fd0a70af7e4752a46afca938d3.zip |
last step of repo switches
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1716 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/sbin/Bcfg2debug')
-rw-r--r-- | src/sbin/Bcfg2debug | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/src/sbin/Bcfg2debug b/src/sbin/Bcfg2debug deleted file mode 100644 index 95508a5b4..000000000 --- a/src/sbin/Bcfg2debug +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/env python -'''This tool loads the Bcfg2 core into an interactive debugger''' -__revision__ = '$Revision$' - - -from sys import argv -from time import sleep -from Bcfg2.Server.Core import Core, CoreInitError - -def get_input(): - '''read commands from stdin''' - try: - return raw_input('> ').split(" ") - except: - return [''] - -if __name__ == '__main__': - settings = {} - if '-c' in argv: - cfile = argv[-1] - else: - cfile = '/etc/bcfg2.conf' - try: - core = Core({}, cfile) - except CoreInitError, msg: - print "Core load failed because %s" % msg - raise SystemExit, 1 - for i in range(25): - core.fam.Service() - sleep(0.5) - cmd = get_input() - while cmd != ['']: - if cmd[0] in ['exit', 'quit']: - raise SystemExit, 0 - elif cmd[0] == 'generators': - for generator in core.generators: - print generator.__version__ - elif cmd[0] == 'help': - print 'Commands:' - print 'exit - quit' - print 'generators - list current versions of generators' - print 'help - print this text' - print 'mappings <type*> - print generator mappings for optional type' - print 'set <variable> <value> - set variable for later use' - print 'settings - display all settings' - print 'shell - shell out to native python interpreter' - print 'update - process pending fam events' - print 'version - print version of this tool' - elif cmd[0] == 'set': - settings[cmd[1]] = cmd[2] - elif cmd[0] == 'settings': - for (key, value) in settings.iteritems(): - print "%s --> %s" % (key, value) - elif cmd[0] == 'shell': - cmd = [''] - continue - elif cmd[0] == 'version': - print 'Bcfg2debug v. %s' % __revision__ - elif cmd[0] == 'mappings': - # dump all mappings unless type specified - for generator in core.generators: - print "Generator -> ", generator.__name__ - for key, value in generator.__provides__.iteritems(): - for instance in generator.__provides__[key].keys(): - print " ", key, instance - elif cmd[0] == 'update': - core.fam.Service() - else: - print "Unknown command %s" % cmd[0] - cmd = get_input() |