summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2009-07-18 19:22:08 +0000
committerNarayan Desai <desai@mcs.anl.gov>2009-07-18 19:22:08 +0000
commita38b64f764bd3c77eaa95fce55c2e9065763d33f (patch)
treee1ca49ed8ddb10dde7e4f9a353c9b35f24896f23
parent9591d232a51411b207d6b88061147a6ce1670411 (diff)
downloadbcfg2-a38b64f764bd3c77eaa95fce55c2e9065763d33f.tar.gz
bcfg2-a38b64f764bd3c77eaa95fce55c2e9065763d33f.tar.bz2
bcfg2-a38b64f764bd3c77eaa95fce55c2e9065763d33f.zip
bcfg2-info: implement more showclient command that displays connector data
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5359 ce84e21b-d406-0410-9b95-82705330c041
-rwxr-xr-xsrc/sbin/bcfg2-info38
1 files changed, 10 insertions, 28 deletions
diff --git a/src/sbin/bcfg2-info b/src/sbin/bcfg2-info
index 7844fae59..57939177b 100755
--- a/src/sbin/bcfg2-info
+++ b/src/sbin/bcfg2-info
@@ -206,10 +206,6 @@ Usage: [quit|exit]"""
data.append((group, prof, cat, ','.join(gdata)))
printTabular(data)
- def complete_showclient(self, text, line, begidx, endidx):
- return [entry for entry in self.metadata.clients \
- if entry.startswith(text)]
-
def do_showclient(self, args):
''' print host metadata'''
data = [('Client', 'Profile', "Groups", "Bundles")]
@@ -222,30 +218,16 @@ Usage: [quit|exit]"""
except:
print("Client %s not defined" % client)
continue
-
- numbundles = len(client_meta.bundles)
- numgroups = len(client_meta.groups)
- num = max((numbundles, numgroups))
- blist = list(client_meta.bundles)
- glist = list(client_meta.groups)
- for i in range(0, num):
- if i == 0:
- c = client_meta.hostname
- p = client_meta.profile
- else:
- c = ""
- p = ""
- if i < numbundles:
- b = blist[i]
- else:
- b = ""
- if i < numgroups:
- g = glist[i]
- else:
- g = ""
- data.append((c, p, g, b))
- if len(data) > 1:
- printTabular(data)
+ print "Hostname:\t", client_meta.hostname
+ print "Profile:\t", client_meta.profile
+ print "Groups:\t\t", ",".join(client_meta.groups)
+ print "Bundles:\t", ",".join(client_meta.bundles)
+ if client_meta.connectors:
+ print "Connector data"
+ print "=" * 80
+ for conn in client_meta.connectors:
+ print "%s:\t" % (conn), getattr(client_meta, conn)
+ print "=" * 80
def do_mappings(self, args):
'''print out mapping info'''