Fix ironic client ironic_url deprecation warning
In preparation for stein, use 'endpoint' instead of 'ironic_url'
when calling get_client in order to remove the following warning:
WARNING ironicclient.client The argument "ironic_url" passed to
get_client is deprecated and will be removed in Stein release,
please use "endpoint" instead.
For reference:
In the python-ironicclient code, in the ironicclient/client.py#L24
TODO(vdrok): remove in Stein
[...]
('ironic_url',): 'endpoint',
Introduced in commit:
58c39b7a80
Change-Id: I1b3ce1955622c40b780c0b15ec7e09be3e8ace72
This commit is contained in:
parent
d7e76f8cad
commit
35f49f4035
@ -128,7 +128,7 @@ python-cinderclient==3.3.0
|
||||
python-dateutil==2.5.3
|
||||
python-editor==1.0.3
|
||||
python-glanceclient==2.8.0
|
||||
python-ironicclient==2.3.0
|
||||
python-ironicclient==2.4.0
|
||||
python-keystoneclient==3.15.0
|
||||
python-mimeparse==1.6.0
|
||||
python-neutronclient==6.7.0
|
||||
|
@ -56,7 +56,7 @@ def _get_ironic_client():
|
||||
'os_service_type': 'baremetal',
|
||||
'os_endpoint_type': 'public',
|
||||
'insecure': 'true',
|
||||
'ironic_url': CONF.ironic.api_endpoint}
|
||||
'endpoint': CONF.ironic.api_endpoint}
|
||||
# NOTE(mriedem): The 1 api_version arg here is the only valid value for
|
||||
# the client, but it's not even used so it doesn't really matter. The
|
||||
# ironic client wrapper in the virt driver actually uses a hard-coded
|
||||
|
@ -77,7 +77,7 @@ class IronicClientWrapperTestCase(test.NoDBTestCase):
|
||||
ironicclient = client_wrapper.IronicClientWrapper()
|
||||
# dummy call to have _get_client() called
|
||||
ironicclient.call("node.list")
|
||||
# With no api_endpoint in the conf, ironic_url is retrieved from
|
||||
# With no api_endpoint in the conf, endpoint is retrieved from
|
||||
# nova.utils.get_ksa_adapter().get_endpoint()
|
||||
self.get_ksa_adapter.assert_called_once_with(
|
||||
'baremetal', ksa_auth=self.get_auth_plugin.return_value,
|
||||
@ -87,7 +87,7 @@ class IronicClientWrapperTestCase(test.NoDBTestCase):
|
||||
'max_retries': CONF.ironic.api_max_retries,
|
||||
'retry_interval': CONF.ironic.api_retry_interval,
|
||||
'os_ironic_api_version': ['1.38', '1.37'],
|
||||
'ironic_url':
|
||||
'endpoint':
|
||||
self.get_ksa_adapter.return_value.get_endpoint.return_value}
|
||||
mock_ir_cli.assert_called_once_with(1, **expected)
|
||||
|
||||
@ -102,7 +102,7 @@ class IronicClientWrapperTestCase(test.NoDBTestCase):
|
||||
ironicclient = client_wrapper.IronicClientWrapper()
|
||||
# dummy call to have _get_client() called
|
||||
ironicclient.call("node.list")
|
||||
# With no api_endpoint in the conf, ironic_url is retrieved from
|
||||
# With no api_endpoint in the conf, endpoint is retrieved from
|
||||
# nova.utils.get_endpoint_data
|
||||
self.get_ksa_adapter.assert_called_once_with(
|
||||
'baremetal', ksa_auth=self.get_auth_plugin.return_value,
|
||||
@ -113,7 +113,7 @@ class IronicClientWrapperTestCase(test.NoDBTestCase):
|
||||
'max_retries': CONF.ironic.api_max_retries,
|
||||
'retry_interval': CONF.ironic.api_retry_interval,
|
||||
'os_ironic_api_version': ['1.38', '1.37'],
|
||||
'ironic_url': None}
|
||||
'endpoint': None}
|
||||
mock_ir_cli.assert_called_once_with(1, **expected)
|
||||
|
||||
@mock.patch.object(keystoneauth1.session, 'Session')
|
||||
@ -131,7 +131,7 @@ class IronicClientWrapperTestCase(test.NoDBTestCase):
|
||||
'max_retries': CONF.ironic.api_max_retries,
|
||||
'retry_interval': CONF.ironic.api_retry_interval,
|
||||
'os_ironic_api_version': ['1.38', '1.37'],
|
||||
'ironic_url': endpoint}
|
||||
'endpoint': endpoint}
|
||||
mock_ir_cli.assert_called_once_with(1, **expected)
|
||||
|
||||
@mock.patch.object(client_wrapper.IronicClientWrapper, '_multi_getattr')
|
||||
|
@ -122,7 +122,7 @@ class IronicClientWrapper(object):
|
||||
|
||||
try:
|
||||
cli = ironic.client.get_client(IRONIC_API_VERSION[0],
|
||||
ironic_url=ironic_url,
|
||||
endpoint=ironic_url,
|
||||
session=sess, **kwargs)
|
||||
# Cache the client so we don't have to reconstruct and
|
||||
# reauthenticate it every time we need it.
|
||||
|
@ -11,7 +11,7 @@ mox3>=0.20.0 # Apache-2.0
|
||||
psycopg2>=2.6.2 # LGPL/ZPL
|
||||
PyMySQL>=0.7.6 # MIT License
|
||||
python-barbicanclient>=4.5.2 # Apache-2.0
|
||||
python-ironicclient>=2.3.0 # Apache-2.0
|
||||
python-ironicclient>=2.4.0 # Apache-2.0
|
||||
requests-mock>=1.2.0 # Apache-2.0
|
||||
oslotest>=3.2.0 # Apache-2.0
|
||||
stestr>=1.0.0 # Apache-2.0
|
||||
|
Loading…
Reference in New Issue
Block a user