Merge "fix: can't get authentication with os-token and os-url"
This commit is contained in:
commit
45b4516a33
@ -898,6 +898,17 @@ class NeutronShell(app.App):
|
|||||||
cloud=self.options.os_cloud, argparse=self.options,
|
cloud=self.options.os_cloud, argparse=self.options,
|
||||||
network_api_version=self.api_version)
|
network_api_version=self.api_version)
|
||||||
verify, cert = cloud_config.get_requests_verify_args()
|
verify, cert = cloud_config.get_requests_verify_args()
|
||||||
|
|
||||||
|
# TODO(singhj): Remove dependancy on HTTPClient
|
||||||
|
# for the case of token-endpoint authentication
|
||||||
|
|
||||||
|
# When using token-endpoint authentication legacy
|
||||||
|
# HTTPClient will be used, otherwise SessionClient
|
||||||
|
# will be used.
|
||||||
|
if self.options.os_token and self.options.os_url:
|
||||||
|
auth = None
|
||||||
|
auth_session = None
|
||||||
|
else:
|
||||||
auth = cloud_config.get_auth()
|
auth = cloud_config.get_auth()
|
||||||
|
|
||||||
auth_session = session.Session(
|
auth_session = session.Session(
|
||||||
@ -911,6 +922,8 @@ class NeutronShell(app.App):
|
|||||||
retries=self.options.retries,
|
retries=self.options.retries,
|
||||||
raise_errors=False,
|
raise_errors=False,
|
||||||
session=auth_session,
|
session=auth_session,
|
||||||
|
url=self.options.os_url,
|
||||||
|
token=self.options.os_token,
|
||||||
region_name=cloud_config.get_region_name(),
|
region_name=cloud_config.get_region_name(),
|
||||||
api_version=cloud_config.get_api_version('network'),
|
api_version=cloud_config.get_api_version('network'),
|
||||||
service_type=cloud_config.get_service_type('network'),
|
service_type=cloud_config.get_service_type('network'),
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
CLI support for token-endpoint authentication.
|
||||||
|
|
||||||
|
* Allows for authentication via ``--os-token`` and ``--os-url`` options
|
||||||
|
or the ``OS_TOKEN`` and ``OS_URL`` environment variables, respectively
|
Loading…
x
Reference in New Issue
Block a user