Stop using deprecated OS_URL

It is being removed from OSC in https://review.opendev.org/#/c/677795/.
Apparently, setting OS_AUTH_TYPE=none works now.

Change-Id: Ib910a50c8ad01abc0a6058c400a7eb875d3b6b77
This commit is contained in:
Dmitry Tantsur
2019-08-28 15:46:22 +02:00
parent 302857e617
commit 6df83e0bc5
4 changed files with 10 additions and 10 deletions

View File

@@ -327,8 +327,10 @@ def _identify_shade_auth():
"""Return shade credentials""" """Return shade credentials"""
if os.environ.get('OS_CLOUD'): if os.environ.get('OS_CLOUD'):
return {} return {}
endpoint = os.getenv('OS_URL', endpoint = os.getenv(
os.getenv('IRONIC_URL', "http://localhost:6385/")) 'OS_ENDPOINT',
os.getenv(
'OS_URL', os.getenv('IRONIC_URL', "http://localhost:6385/")))
options = dict( options = dict(
auth_type="None", auth_type="None",
auth=dict(endpoint=endpoint,) auth=dict(endpoint=endpoint,)

View File

@@ -37,10 +37,8 @@ Environment variables
The following two environment variables can be set: The following two environment variables can be set:
- ``OS_URL`` - A URL to the ironic API, such as http://localhost:6385/ - ``OS_AUTH_TYPE`` - set to ``none`` to bypass authentication.
- ``OS_TOKEN`` - Any value except empty space, such as 'fake-token', - ``OS_ENDPOINT`` - A URL to the ironic API, such as http://localhost:6385/
is required to cause the client library to send requests directly to the
API
For convenience, an environment file called ``env-vars`` is provided that For convenience, an environment file called ``env-vars`` is provided that
contains default values for these variables and can be sourced to allow the CLI contains default values for these variables and can be sourced to allow the CLI

View File

@@ -1,2 +1,2 @@
export OS_URL=http://localhost:6385/ export OS_ENDPOINT=http://localhost:6385/
export OS_TOKEN='fake-token' export OS_AUTH_TYPE=none

View File

@@ -18,6 +18,6 @@ case "$1" in
*) echo -e "\nERROR unsupported or unspecified profile: $1\nMust be one of {{ clouds | default({}) | dictsort | map(attribute='0') | join(',') }}";; *) echo -e "\nERROR unsupported or unspecified profile: $1\nMust be one of {{ clouds | default({}) | dictsort | map(attribute='0') | join(',') }}";;
esac esac
{% else %} {% else %}
export OS_TOKEN='fake-token' export OS_AUTH_TYPE=none
export OS_URL={{ ironic_api_url }} export OS_ENDPOINT={{ ironic_api_url }}
{% endif %} {% endif %}