summaryrefslogtreecommitdiff
path: root/quantumclient/shell.py
diff options
context:
space:
mode:
authorDan Wendlandt <dan@nicira.com>2012-08-21 01:54:17 -0700
committerGary Kotton <gkotton@redhat.com>2012-08-22 06:14:51 -0400
commit38abece8a6a82c722b00d8ea46997aacecb463a5 (patch)
tree8e8a8ecda33fa32346dac9ccd4f55e0b74a16ae2 /quantumclient/shell.py
parentf574f77731ed3ee2123c2b8f8572c50e30810c43 (diff)
downloadpython-neutronclient-38abece8a6a82c722b00d8ea46997aacecb463a5.tar.gz
initial client + CLI support for routers + floating ips
bp quantum-client-l3-floating-ip The task also does the following: 1. Fixes alignment of the --help output 2. Ensures that a show command prints a dictionary correctly Change-Id: Ib61b3e8748a7bd476ec008ab6ce20ab852e92f58
Diffstat (limited to 'quantumclient/shell.py')
-rw-r--r--quantumclient/shell.py32
1 files changed, 31 insertions, 1 deletions
diff --git a/quantumclient/shell.py b/quantumclient/shell.py
index 952f56f..5ccc1c7 100644
--- a/quantumclient/shell.py
+++ b/quantumclient/shell.py
@@ -95,6 +95,36 @@ COMMAND_V2 = {
'quantumclient.quantum.v2_0.extension.ListExt'),
'ext-show': utils.import_class(
'quantumclient.quantum.v2_0.extension.ShowExt'),
+ 'router-list': utils.import_class(
+ 'quantumclient.quantum.v2_0.router.ListRouter'),
+ 'router-show': utils.import_class(
+ 'quantumclient.quantum.v2_0.router.ShowRouter'),
+ 'router-create': utils.import_class(
+ 'quantumclient.quantum.v2_0.router.CreateRouter'),
+ 'router-delete': utils.import_class(
+ 'quantumclient.quantum.v2_0.router.DeleteRouter'),
+ 'router-update': utils.import_class(
+ 'quantumclient.quantum.v2_0.router.UpdateRouter'),
+ 'router-interface-add': utils.import_class(
+ 'quantumclient.quantum.v2_0.router.AddInterfaceRouter'),
+ 'router-interface-delete': utils.import_class(
+ 'quantumclient.quantum.v2_0.router.RemoveInterfaceRouter'),
+ 'router-gateway-set': utils.import_class(
+ 'quantumclient.quantum.v2_0.router.SetGatewayRouter'),
+ 'router-gateway-clear': utils.import_class(
+ 'quantumclient.quantum.v2_0.router.RemoveGatewayRouter'),
+ 'floatingip-list': utils.import_class(
+ 'quantumclient.quantum.v2_0.floatingip.ListFloatingIP'),
+ 'floatingip-show': utils.import_class(
+ 'quantumclient.quantum.v2_0.floatingip.ShowFloatingIP'),
+ 'floatingip-create': utils.import_class(
+ 'quantumclient.quantum.v2_0.floatingip.CreateFloatingIP'),
+ 'floatingip-delete': utils.import_class(
+ 'quantumclient.quantum.v2_0.floatingip.DeleteFloatingIP'),
+ 'floatingip-associate': utils.import_class(
+ 'quantumclient.quantum.v2_0.floatingip.AssociateFloatingIP'),
+ 'floatingip-disassociate': utils.import_class(
+ 'quantumclient.quantum.v2_0.floatingip.DisassociateFloatingIP'),
}
COMMANDS = {'2.0': COMMAND_V2}
@@ -116,7 +146,7 @@ class HelpAction(argparse.Action):
factory = ep.load()
cmd = factory(self, None)
one_liner = cmd.get_description().split('\n')[0]
- app.stdout.write(' %-13s %s\n' % (name, one_liner))
+ app.stdout.write(' %-25s %s\n' % (name, one_liner))
sys.exit(0)