diff options
author | Sol Jerome <sol.jerome@gmail.com> | 2012-08-18 13:24:25 -0500 |
---|---|---|
committer | Sol Jerome <sol.jerome@gmail.com> | 2012-08-18 13:24:25 -0500 |
commit | 4abcdad195413bfdb4bae24a2925deaf08372778 (patch) | |
tree | 5fa14fb5986e69e33cdb9daca81fb69d85df30f3 /src/sbin/bcfg2-info | |
parent | 6f939d6a80ca36bc4c061d28a8f4abc216ffb9cb (diff) | |
download | bcfg2-4abcdad195413bfdb4bae24a2925deaf08372778.tar.gz bcfg2-4abcdad195413bfdb4bae24a2925deaf08372778.tar.bz2 bcfg2-4abcdad195413bfdb4bae24a2925deaf08372778.zip |
bcfg2-info: Fix 'groups' command
There used to be an additional "Contains" column but I was unable to
determine what it was used for (and it doesn't work).
Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
Diffstat (limited to 'src/sbin/bcfg2-info')
-rwxr-xr-x | src/sbin/bcfg2-info | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/sbin/bcfg2-info b/src/sbin/bcfg2-info index 289e51589..77a9a4bcd 100755 --- a/src/sbin/bcfg2-info +++ b/src/sbin/bcfg2-info @@ -502,22 +502,18 @@ class infoCore(cmd.Cmd, Bcfg2.Server.Core.BaseCore): def do_groups(self, _): """Print out group info.""" - data = [("Groups", "Profile", "Category", "Contains")] + # FIXME: Contains doesn't work. Not sure what it was used for + #data = [("Groups", "Profile", "Category", "Contains")] + data = [("Groups", "Profile", "Category")] grouplist = list(self.metadata.groups.keys()) grouplist.sort() for group in grouplist: - if group in self.metadata.profiles: + if self.metadata.groups[group].is_profile: prof = 'yes' else: prof = 'no' - if group in self.metadata.categories: - cat = self.metadata.categories[group] - else: - cat = '' - gdata = [grp for grp in self.metadata.groups[group][1]] - if group in gdata: - gdata.remove(group) - data.append((group, prof, cat, ','.join(gdata))) + cat = self.metadata.groups[group].category + data.append((group, prof, cat)) printTabular(data) def do_showclient(self, args): |