Merge "Fix ironic client ironic_url deprecation warning"

This commit is contained in:
Zuul 2018-10-30 07:31:08 +00:00 committed by Gerrit Code Review
commit 1827f2b7b2
5 changed files with 9 additions and 9 deletions

View File

@ -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

View File

@ -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

View File

@ -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')

View File

@ -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.

View File

@ -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