summaryrefslogtreecommitdiffstats
path: root/tools/groups-to-dot.py
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2006-06-15 17:54:07 +0000
committerNarayan Desai <desai@mcs.anl.gov>2006-06-15 17:54:07 +0000
commit89c8665a53d2e6e0f2d6f5e08d00973358cf6a58 (patch)
tree4c717f8ccf64a6dab3a7204fb704664a590cb325 /tools/groups-to-dot.py
parent7f82554ed1a1780798f3c958e147f01bd8a60493 (diff)
downloadbcfg2-89c8665a53d2e6e0f2d6f5e08d00973358cf6a58.tar.gz
bcfg2-89c8665a53d2e6e0f2d6f5e08d00973358cf6a58.tar.bz2
bcfg2-89c8665a53d2e6e0f2d6f5e08d00973358cf6a58.zip
Add -r flag to produce dot output
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1885 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'tools/groups-to-dot.py')
-rwxr-xr-xtools/groups-to-dot.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/groups-to-dot.py b/tools/groups-to-dot.py
index fa384c294..ffb1018e6 100755
--- a/tools/groups-to-dot.py
+++ b/tools/groups-to-dot.py
@@ -10,11 +10,14 @@ colors = ['steelblue1', 'chartreuse', 'gold', 'magenta', 'indianred1', 'limegree
if __name__ == '__main__':
if len(sys.argv) < 2:
- print "Usage groups-to-dot.py [-b] [-h] -o <outputfile> <metadatadir>"
+ print "Usage groups-to-dot.py [-r] [-b] [-h] -o <outputfile> <metadatadir>"
raise SystemExit, 1
groups = lxml.etree.parse(sys.argv[-1] + '/groups.xml').getroot()
clients = lxml.etree.parse(sys.argv[-1] + '/clients.xml').getroot()
- dotpipe = popen2.Popen4("dot -Tpng")
+ if '-r' in sys.argv:
+ dotpipe = popen2.Popen4("dd 2>/dev/null")
+ else:
+ dotpipe = popen2.Popen4("dot -Tpng")
categories = {'default':'grey83'}
instances = {}
for group in groups.findall('Group'):