From fe68e3337aea74836bc5d9fbdd5dd673d900e76f Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Thu, 17 Mar 2005 21:05:57 +0000 Subject: minor cleanups 2005/03/17 10:49:10-06:00 anl.gov!desai add more commands (Logical change 1.212) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@899 ce84e21b-d406-0410-9b95-82705330c041 --- src/sbin/Bcfg2debug | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src') diff --git a/src/sbin/Bcfg2debug b/src/sbin/Bcfg2debug index 9cafea2ce..a1d163b1b 100644 --- a/src/sbin/Bcfg2debug +++ b/src/sbin/Bcfg2debug @@ -40,9 +40,11 @@ if __name__ == '__main__': print 'exit - quit' print 'generators - list current versions of generators' print 'help - print this text' + print 'mappings - print generator mappings for optional type' print 'set - 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] @@ -54,6 +56,18 @@ if __name__ == '__main__': 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': + while core.fam.fm.pending(): + while core.fam.fm.pending(): + core.fam.HandleEvent() + sleep(0.5) else: print "Unknown command %s" % cmd[0] cmd = input() -- cgit v1.2.3-1-g7c22