diff options
| author | Mike Perez <thingee@gmail.com> | 2013-02-02 13:26:18 -0800 |
|---|---|---|
| committer | Mike Perez <thingee@gmail.com> | 2013-02-13 00:58:17 -0800 |
| commit | 636ec5eccda3f4caef90db3fe4e0c19df1bd348d (patch) | |
| tree | f959693e52f37b63d006d7548e442276dfc48d06 /cinderclient/shell.py | |
| parent | 20dcc85fadb84c3a9abbbdc8d5ee599402ec1488 (diff) | |
| download | python-cinderclient-636ec5eccda3f4caef90db3fe4e0c19df1bd348d.tar.gz | |
adding v2 support to cinderclient
This will allow the cinderclient to speak to the v2 rest api if it's
enabled in the cinder config. Includes additional v2 tests as well.
blueprint cinderclient-v2-support
Change-Id: I004134d9f528a6eadefdaa89eb48087bcae2691f
Diffstat (limited to 'cinderclient/shell.py')
| -rw-r--r-- | cinderclient/shell.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cinderclient/shell.py b/cinderclient/shell.py index 423db58..d6e5317 100644 --- a/cinderclient/shell.py +++ b/cinderclient/shell.py @@ -32,6 +32,7 @@ from cinderclient import exceptions as exc import cinderclient.extension from cinderclient import utils from cinderclient.v1 import shell as shell_v1 +from cinderclient.v2 import shell as shell_v2 DEFAULT_OS_VOLUME_API_VERSION = "1" DEFAULT_CINDER_ENDPOINT_TYPE = 'publicURL' @@ -162,7 +163,7 @@ class OpenStackCinderShell(object): metavar='<compute-api-ver>', default=utils.env('OS_VOLUME_API_VERSION', default=DEFAULT_OS_VOLUME_API_VERSION), - help='Accepts 1,defaults ' + help='Accepts 1 or 2,defaults ' 'to env[OS_VOLUME_API_VERSION].') parser.add_argument('--os_volume_api_version', help=argparse.SUPPRESS) @@ -223,7 +224,7 @@ class OpenStackCinderShell(object): try: actions_module = { '1.1': shell_v1, - '2': shell_v1, + '2': shell_v2, }[version] except KeyError: actions_module = shell_v1 |
