From 4abcdad195413bfdb4bae24a2925deaf08372778 Mon Sep 17 00:00:00 2001 From: Sol Jerome Date: Sat, 18 Aug 2012 13:24:25 -0500 Subject: 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 --- src/sbin/bcfg2-info | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'src/sbin/bcfg2-info') 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): -- cgit v1.2.3-1-g7c22