diff options
| author | Roxana Gherle <roxana.gherle@hp.com> | 2015-05-22 16:22:35 -0700 |
|---|---|---|
| committer | Roxana Gherle <roxana.gherle@hp.com> | 2015-07-02 10:10:46 -0700 |
| commit | 5521e4c504c6a3a06f17a9e4f80444743aa293c7 (patch) | |
| tree | a07d4db3dae479087997bf60c3f1a434afdcdd8a /openstackclient/volume | |
| parent | 7e067c6f4f2dddfd9ea4b4a3df90959a7d8f2f0f (diff) | |
| download | python-openstackclient-5521e4c504c6a3a06f17a9e4f80444743aa293c7.tar.gz | |
Add --os-endpoint-type cli optional argument
User should be able to specify the endpoint type through
a CLI optional argument/ENV variable setting. We will name this new
optional argument: --os-endpoint-type (Env: OS_ENDPOINT_TYPE) and
based on the value given, the service API will use that specific
endpoint type. Possible values: public, admin, internal.
DocImpact
Closes-Bug: #1454392
Change-Id: Ife3d4e46b44c0ddcd712b1130e27e362545a9a29
Diffstat (limited to 'openstackclient/volume')
| -rw-r--r-- | openstackclient/volume/client.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/openstackclient/volume/client.py b/openstackclient/volume/client.py index 1038c407..965c42ec 100644 --- a/openstackclient/volume/client.py +++ b/openstackclient/volume/client.py @@ -53,11 +53,16 @@ def make_client(instance): extensions = [extension.Extension('list_extensions', list_extensions)] + # Remember endpoint_type only if it is set + kwargs = utils.build_kwargs_dict('endpoint_type', + instance._endpoint_type) + client = volume_client( session=instance.session, extensions=extensions, http_log_debug=http_log_debug, region_name=instance._region_name, + **kwargs ) return client |
