From 2ba501377b8516fb361196a26edc0c922a2b34ba Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Mon, 2 Jul 2007 19:06:30 +0000 Subject: add completion for bcfg2-info:showclient git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3406 ce84e21b-d406-0410-9b95-82705330c041 --- src/sbin/bcfg2-info | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sbin/bcfg2-info b/src/sbin/bcfg2-info index 12f7f381f..0bb315f7c 100755 --- a/src/sbin/bcfg2-info +++ b/src/sbin/bcfg2-info @@ -176,6 +176,10 @@ 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")] @@ -243,7 +247,6 @@ if __name__ == '__main__': else: cfile = '/etc/bcfg2.conf' - #bcore = Bcfg2.Server.Core.Core({}, cfile) loop = infoCore(cfile) while loop.cont: try: -- cgit v1.2.3-1-g7c22