summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ironic/conf/conductor.py11
-rw-r--r--ironic/drivers/modules/deploy_utils.py4
-rw-r--r--ironic/tests/unit/common/test_pxe_utils.py4
-rw-r--r--ironic/tests/unit/drivers/modules/test_deploy_utils.py17
-rw-r--r--ironic/tests/unit/drivers/modules/test_ipxe.py1
-rw-r--r--ironic/tests/unit/drivers/modules/test_pxe.py1
-rw-r--r--releasenotes/notes/del-api-url-eb2ea29aa63a2cb5.yaml6
7 files changed, 8 insertions, 36 deletions
diff --git a/ironic/conf/conductor.py b/ironic/conf/conductor.py
index da98678a6..1843f74cc 100644
--- a/ironic/conf/conductor.py
+++ b/ironic/conf/conductor.py
@@ -30,17 +30,6 @@ opts = [
cfg.IntOpt('heartbeat_interval',
default=10,
help=_('Seconds between conductor heart beats.')),
- cfg.URIOpt('api_url',
- schemes=('http', 'https'),
- deprecated_for_removal=True,
- deprecated_reason=_("Use [service_catalog]endpoint_override "
- "option instead if required to use "
- "a specific ironic api address, "
- "for example in noauth mode."),
- help=_('URL of Ironic API service. If not set ironic can '
- 'get the current value from the keystone service '
- 'catalog. If set, the value must start with either '
- 'http:// or https://.')),
cfg.IntOpt('heartbeat_timeout',
default=60,
# We're using timedelta which can overflow if somebody sets this
diff --git a/ironic/drivers/modules/deploy_utils.py b/ironic/drivers/modules/deploy_utils.py
index cb0af75c8..6bc73c0cb 100644
--- a/ironic/drivers/modules/deploy_utils.py
+++ b/ironic/drivers/modules/deploy_utils.py
@@ -92,10 +92,6 @@ def get_ironic_api_url():
CONF.set_override('auth_type', 'none', group='service_catalog')
adapter_opts['auth'] = keystone.get_auth('service_catalog')
- # TODO(pas-ha) remove in Rocky
- # NOTE(pas-ha) if both set, the new options win
- if CONF.conductor.api_url and not CONF.service_catalog.endpoint_override:
- adapter_opts['endpoint_override'] = CONF.conductor.api_url
try:
ironic_api = keystone.get_endpoint('service_catalog', **adapter_opts)
except (exception.KeystoneFailure,
diff --git a/ironic/tests/unit/common/test_pxe_utils.py b/ironic/tests/unit/common/test_pxe_utils.py
index 6950bfe8a..5dd660b22 100644
--- a/ironic/tests/unit/common/test_pxe_utils.py
+++ b/ironic/tests/unit/common/test_pxe_utils.py
@@ -1155,8 +1155,6 @@ class PXEBuildConfigOptionsTestCase(db_base.DbTestCase):
ramdisk_params=None):
self.config(debug=debug)
self.config(pxe_append_params='test_param', group='pxe')
- # NOTE: right '/' should be removed from url string
- self.config(api_url='http://192.168.122.184:6385', group='conductor')
driver_internal_info = self.node.driver_internal_info
driver_internal_info['is_whole_disk_image'] = whle_dsk_img
@@ -1415,8 +1413,6 @@ class iPXEBuildConfigOptionsTestCase(db_base.DbTestCase):
mode='deploy'):
self.config(debug=debug)
self.config(pxe_append_params='test_param', group='pxe')
- # NOTE: right '/' should be removed from url string
- self.config(api_url='http://192.168.122.184:6385', group='conductor')
self.config(ipxe_timeout=ipxe_timeout, group='pxe')
root_dir = CONF.deploy.http_root
diff --git a/ironic/tests/unit/drivers/modules/test_deploy_utils.py b/ironic/tests/unit/drivers/modules/test_deploy_utils.py
index a39b33a35..9594b8d87 100644
--- a/ironic/tests/unit/drivers/modules/test_deploy_utils.py
+++ b/ironic/tests/unit/drivers/modules/test_deploy_utils.py
@@ -773,16 +773,6 @@ class OtherFunctionTestCase(db_base.DbTestCase):
@mock.patch('ironic.common.keystone.get_auth')
@mock.patch.object(utils, '_get_ironic_session')
- def test_get_ironic_api_url_from_config(self, mock_ks, mock_auth):
- mock_sess = mock.Mock()
- mock_ks.return_value = mock_sess
- fake_api_url = 'http://foo/'
- self.config(api_url=fake_api_url, group='conductor')
- # also checking for stripped trailing slash
- self.assertEqual(fake_api_url[:-1], utils.get_ironic_api_url())
-
- @mock.patch('ironic.common.keystone.get_auth')
- @mock.patch.object(utils, '_get_ironic_session')
@mock.patch('ironic.common.keystone.get_adapter')
def test_get_ironic_api_url_from_keystone(self, mock_ka, mock_ks,
mock_auth):
@@ -791,7 +781,6 @@ class OtherFunctionTestCase(db_base.DbTestCase):
fake_api_url = 'http://foo/'
mock_ka.return_value.get_endpoint.return_value = fake_api_url
# NOTE(pas-ha) endpoint_override is None by default
- self.config(api_url=None, group='conductor')
url = utils.get_ironic_api_url()
# also checking for stripped trailing slash
self.assertEqual(fake_api_url[:-1], url)
@@ -807,7 +796,6 @@ class OtherFunctionTestCase(db_base.DbTestCase):
mock_ks.return_value = mock_sess
mock_ka.return_value.get_endpoint.side_effect = (
exception.KeystoneFailure())
- self.config(api_url=None, group='conductor')
self.assertRaises(exception.InvalidParameterValue,
utils.get_ironic_api_url)
@@ -818,7 +806,6 @@ class OtherFunctionTestCase(db_base.DbTestCase):
mock_sess = mock.Mock()
mock_ks.return_value = mock_sess
mock_ka.return_value.get_endpoint.return_value = None
- self.config(api_url=None, group='conductor')
self.assertRaises(exception.InvalidParameterValue,
utils.get_ironic_api_url)
@@ -1192,13 +1179,13 @@ class AgentMethodsTestCase(db_base.DbTestCase):
self._test_tear_down_inband_cleaning(cleaning_error=True)
def test_build_agent_options_conf(self):
- self.config(api_url='https://api-url', group='conductor')
+ self.config(endpoint_override='https://api-url',
+ group='service_catalog')
options = utils.build_agent_options(self.node)
self.assertEqual('https://api-url', options['ipa-api-url'])
@mock.patch.object(utils, '_get_ironic_session')
def test_build_agent_options_keystone(self, session_mock):
- self.config(api_url=None, group='conductor')
sess = mock.Mock()
sess.get_endpoint.return_value = 'https://api-url'
session_mock.return_value = sess
diff --git a/ironic/tests/unit/drivers/modules/test_ipxe.py b/ironic/tests/unit/drivers/modules/test_ipxe.py
index cbec1bb0d..2e07c7804 100644
--- a/ironic/tests/unit/drivers/modules/test_ipxe.py
+++ b/ironic/tests/unit/drivers/modules/test_ipxe.py
@@ -83,7 +83,6 @@ class iPXEBootTestCase(db_base.DbTestCase):
driver_internal_info=self.driver_internal_info)
self.port = obj_utils.create_test_port(self.context,
node_id=self.node.id)
- self.config(group='conductor', api_url='http://127.0.0.1:1234/')
def test_get_properties(self):
expected = pxe_base.COMMON_PROPERTIES
diff --git a/ironic/tests/unit/drivers/modules/test_pxe.py b/ironic/tests/unit/drivers/modules/test_pxe.py
index ed4fa2b63..5a5542be8 100644
--- a/ironic/tests/unit/drivers/modules/test_pxe.py
+++ b/ironic/tests/unit/drivers/modules/test_pxe.py
@@ -85,7 +85,6 @@ class PXEBootTestCase(db_base.DbTestCase):
driver_internal_info=self.driver_internal_info)
self.port = obj_utils.create_test_port(self.context,
node_id=self.node.id)
- self.config(group='conductor', api_url='http://127.0.0.1:1234/')
self.config(my_ipv6='2001:db8::1')
def test_get_properties(self):
diff --git a/releasenotes/notes/del-api-url-eb2ea29aa63a2cb5.yaml b/releasenotes/notes/del-api-url-eb2ea29aa63a2cb5.yaml
new file mode 100644
index 000000000..517d012ec
--- /dev/null
+++ b/releasenotes/notes/del-api-url-eb2ea29aa63a2cb5.yaml
@@ -0,0 +1,6 @@
+---
+upgrade:
+ - |
+ The ``[conductor]api_url`` was deprecated and removed, use
+ ``[service_catalog]endpoint_override`` instead if required to use
+ a specific ironic api url.