cinderclient no longer honors --endpoint-type

Commit for "Enable version discovery":
ae03d2a721
breaks CLI use of --endpoint-type. This is because we were using the
default interface instead of checking to see if an endpoint_type is
passed in.

Change-Id: I412bb6b4bcb9bf10aa6118a2ed43e28cbd3ed236
Closes-Bug: 1454407
This commit is contained in:
scottda
2015-05-12 21:34:13 +00:00
parent 17bccf1a06
commit adc561a7b1

View File

@@ -694,7 +694,7 @@ class OpenStackCinderShell(object):
endpoint = keystone_adapter.get_endpoint(
service_type=service_type,
version=version,
interface='public')
interface=endpoint_type)
# Service was found, but wrong version. Lets try a different
# version, if the user did not specify one.
@@ -706,7 +706,7 @@ class OpenStackCinderShell(object):
endpoint = keystone_adapter.get_endpoint(
service_type=service_type, version=version,
interface='public')
interface=endpoint_type)
except keystoneclient_exc.EndpointNotFound as e:
# No endpoint found with that service_type, lets fall back to
@@ -720,7 +720,7 @@ class OpenStackCinderShell(object):
try:
endpoint = keystone_adapter.get_endpoint(
version=version,
service_type=service_type, interface='public')
service_type=service_type, interface=endpoint_type)
# Service was found, but wrong version. Lets try
# a different version, if the user did not specify one.
@@ -732,7 +732,7 @@ class OpenStackCinderShell(object):
endpoint = keystone_adapter.get_endpoint(
service_type=service_type, version=version,
interface='public')
interface=endpoint_type)
except keystoneclient_exc.EndpointNotFound:
raise e