summaryrefslogtreecommitdiffstats
path: root/src/sbin
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2005-03-17 21:05:57 +0000
committerNarayan Desai <desai@mcs.anl.gov>2005-03-17 21:05:57 +0000
commitfe68e3337aea74836bc5d9fbdd5dd673d900e76f (patch)
treebeffd8c778f487b2f07960c82279d7cbe535c7ce /src/sbin
parent61d50580010a89a3ee4759f4f133dc07c8a269e8 (diff)
downloadbcfg2-fe68e3337aea74836bc5d9fbdd5dd673d900e76f.tar.gz
bcfg2-fe68e3337aea74836bc5d9fbdd5dd673d900e76f.tar.bz2
bcfg2-fe68e3337aea74836bc5d9fbdd5dd673d900e76f.zip
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
Diffstat (limited to 'src/sbin')
-rw-r--r--src/sbin/Bcfg2debug14
1 files changed, 14 insertions, 0 deletions
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 <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]
@@ -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()