diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2007-02-06 15:59:51 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2007-02-06 15:59:51 +0000 |
commit | 952c1b5d61ba2615893d250d43d14d806a17ec71 (patch) | |
tree | c5f477112c0671bfb5a717c29303d6bc6061cee3 /src | |
parent | a2e93cca6c87142ad777e4e4d46cbdd01f0f4bd9 (diff) | |
download | bcfg2-952c1b5d61ba2615893d250d43d14d806a17ec71.tar.gz bcfg2-952c1b5d61ba2615893d250d43d14d806a17ec71.tar.bz2 bcfg2-952c1b5d61ba2615893d250d43d14d806a17ec71.zip |
Fix bcfg2-admin viz for groups that are both included and directly in groups.xml
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2787 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rwxr-xr-x | src/sbin/bcfg2-admin | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sbin/bcfg2-admin b/src/sbin/bcfg2-admin index 31c67b491..090be1c2d 100755 --- a/src/sbin/bcfg2-admin +++ b/src/sbin/bcfg2-admin @@ -284,7 +284,8 @@ def do_viz(args): dotpipe = popen2.Popen4("dot -Tpng") categories = {'default':'grey83'} instances = {} - for group in groups.findall('.//Groups/Group'): + egroups = groups.findall("Group") + groups.findall('.//Groups/Group') + for group in egroups: if group.get('category', False): if not categories.has_key(group.get('category')): categories[group.get('category')] = colors.pop() @@ -315,7 +316,7 @@ def do_viz(args): for bundle in bundles: dotpipe.tochild.write('''\t"bundle-%s" [ label="%s", shape="septagon"];\n''' % (bundle, bundle)) gseen = [] - for group in groups.findall('.//Groups/Group'): + for group in egroups: color = categories[group.get('category', 'default')] if group.get('profile', 'false') == 'true': style="filled, bold" @@ -329,7 +330,7 @@ def do_viz(args): dotpipe.tochild.write('\t"group-%s" -> "bundle-%s";\n' % (group.get('name'), bundle.get('name'))) - for group in groups.findall('.//Groups/Group'): + for group in egroups: for parent in group.findall('Group'): if parent.get('name') not in gseen: dotpipe.tochild.write('\t"group-%s" [label="%s", style="filled", fillcolor="grey83"];\n' % |