summaryrefslogtreecommitdiff
path: root/openstackclient/object
diff options
context:
space:
mode:
Diffstat (limited to 'openstackclient/object')
-rw-r--r--openstackclient/object/client.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/openstackclient/object/client.py b/openstackclient/object/client.py
index a83a5c0a..1a5363b1 100644
--- a/openstackclient/object/client.py
+++ b/openstackclient/object/client.py
@@ -21,7 +21,9 @@ from openstackclient.common import utils
LOG = logging.getLogger(__name__)
-API_NAME = 'object-store'
+DEFAULT_OBJECT_API_VERSION = '1'
+API_VERSION_OPTION = 'os_object_api_version'
+API_NAME = 'object'
API_VERSIONS = {
'1': 'openstackclient.object.client.ObjectClientv1',
}
@@ -45,6 +47,20 @@ def make_client(instance):
return client
+def build_option_parser(parser):
+ """Hook to add global options"""
+ parser.add_argument(
+ '--os-object-api-version',
+ metavar='<object-api-version>',
+ default=utils.env(
+ 'OS_OBJECT_API_VERSION',
+ default=DEFAULT_OBJECT_API_VERSION),
+ help='Object API version, default=' +
+ DEFAULT_OBJECT_API_VERSION +
+ ' (Env: OS_OBJECT_API_VERSION)')
+ return parser
+
+
class ObjectClientv1(object):
def __init__(