summaryrefslogtreecommitdiff
path: root/openstackclient/shell.py
diff options
context:
space:
mode:
authorSteve Martinelli <stevemar@ca.ibm.com>2013-02-01 01:12:05 -0600
committerSteve Martinelli <stevemar@ca.ibm.com>2013-02-08 10:22:01 -0600
commit7072b4f802ff5567f0781f89f360c5be43a7977e (patch)
treef765982727c38dc0905abf3fde668724b255a6ff /openstackclient/shell.py
parentf432131fe7228e05d2873e93f97b7281c756eb01 (diff)
downloadpython-openstackclient-7072b4f802ff5567f0781f89f360c5be43a7977e.tar.gz
Add Cinder API V1 Support
made the changes suggested by dtroyer added client modified setup.py entry points updated pip required added support for create/delete/list volume types openstack list type openstack create type typeName openstack delete type typeNameOrId Change-Id: I43655de151582e37f14dc9550151a66db7a009ab
Diffstat (limited to 'openstackclient/shell.py')
-rw-r--r--openstackclient/shell.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/openstackclient/shell.py b/openstackclient/shell.py
index 2654d658..ffa0245a 100644
--- a/openstackclient/shell.py
+++ b/openstackclient/shell.py
@@ -36,6 +36,7 @@ KEYRING_SERVICE = 'openstack'
DEFAULT_COMPUTE_API_VERSION = '2'
DEFAULT_IDENTITY_API_VERSION = '2.0'
DEFAULT_IMAGE_API_VERSION = '1.0'
+DEFAULT_VOLUME_API_VERSION = '1'
def env(*vars, **kwargs):
@@ -161,6 +162,15 @@ class OpenStackShell(App):
DEFAULT_IMAGE_API_VERSION +
' (Env: OS_IMAGE_API_VERSION)')
parser.add_argument(
+ '--os-volume-api-version',
+ metavar='<volume-api-version>',
+ default=env(
+ 'OS_VOLUME_API_VERSION',
+ default=DEFAULT_VOLUME_API_VERSION),
+ help='Volume API version, default=' +
+ DEFAULT_VOLUME_API_VERSION +
+ ' (Env: OS_VOLUME_API_VERSION)')
+ parser.add_argument(
'--os-token',
metavar='<token>',
default=env('OS_TOKEN'),
@@ -293,6 +303,7 @@ class OpenStackShell(App):
'compute': self.options.os_compute_api_version,
'identity': self.options.os_identity_api_version,
'image': self.options.os_image_api_version,
+ 'volume': self.options.os_volume_api_version,
}
# Add the API version-specific commands