Merge "add nova-manage bash completion script"

This commit is contained in:
Jenkins
2012-06-20 19:52:46 +00:00
committed by Gerrit Code Review
2 changed files with 13 additions and 0 deletions

View File

@@ -58,6 +58,7 @@ Devdeep Singh <devdeep.singh@citrix.com>
Devendra Modium <dmodium@isi.edu>
Devin Carlen <devin.carlen@gmail.com>
Dina Belova <dbelova@mirantis.com>
Dominik Heidler <dheidler@suse.de>
Don Dugger <donald.d.dugger@intel.com>
Donal Lafferty <donal.lafferty@citrix.com>
Dong-In David Kang <dkang@isi.edu>

View File

@@ -1692,6 +1692,18 @@ def main():
print "\t%s" % k
sys.exit(2)
category = argv.pop(0)
if category == "bash-completion":
if len(argv) < 1:
print " ".join([k for (k, v) in CATEGORIES])
else:
query_category = argv.pop(0)
matches = lazy_match(query_category, CATEGORIES)
# instantiate the command group object
category, fn = matches[0]
command_object = fn()
actions = methods_of(command_object)
print " ".join([k for (k, v) in actions])
sys.exit(0)
matches = lazy_match(category, CATEGORIES)
# instantiate the command group object
category, fn = matches[0]