Merge "fix nits related to image server bauth"

This commit is contained in:
Zuul 2023-12-01 21:13:12 +00:00 committed by Gerrit Code Review
commit 68863aa452
4 changed files with 10 additions and 9 deletions

View File

@ -33,7 +33,7 @@ the services.
Hardware Burn-in <hardware-burn-in>
Vendor Passthru <vendor-passthru>
Servicing <servicing>
Basic Auth Support For User-image Servers <user-image-basic-auth>
Authentication Support for Instance Images <user-image-basic-auth>
Drivers, Hardware Types and Hardware Interfaces
-----------------------------------------------

View File

@ -26,13 +26,15 @@ string. The variables belong to the ``deploy`` configuration group and could be
configured via the global Ironic configuration file.
The authentication strategy configuration affects the download process
for ``disk`` images, ``live ISO`` images and the ``deploy`` images.
for images downloaded by the conductor or the ironic-python-agent.
Example
-------
Example of activating the ``http-basic`` strategy via
``/etc/ironic/ironic.conf``::
``/etc/ironic/ironic.conf``:
.. code-block:: ini
[deploy]
...
@ -45,8 +47,8 @@ Known limitations
-----------------
This implementation of the authentication strategy for user image handling is
implemented via the global Ironic configuration process thus it doesn't
provide node specific customization options.
implemented via the global Ironic configuration thus it doesn't provide node
specific customization options.
When ``image_server_auth_strategy`` is set to any valid value all image
sources will be treated with the same authentication strategy and Ironic will

View File

@ -508,8 +508,7 @@ class AgentDeploy(CustomAgentDeploy):
'stream_raw_images': CONF.agent.stream_raw_images,
}
if (CONF.deploy.image_server_auth_strategy != 'noauth'
and CONF.deploy.image_server_auth_strategy is not None):
if (CONF.deploy.image_server_auth_strategy != 'noauth'):
image_info['image_server_auth_strategy'] = \
CONF.deploy.image_server_auth_strategy
image_info['image_server_user'] = CONF.deploy.image_server_user

View File

@ -1259,7 +1259,7 @@ class TestAgentDeploy(CommonTestsMixin, db_base.DbTestCase):
'no_proxy': '.eggs.com'}
)
def test_wirte_image_basic_auth_success(self):
def test_write_image_basic_auth_success(self):
cfg.CONF.set_override('image_server_auth_strategy',
'http_basic',
'deploy')
@ -1277,7 +1277,7 @@ class TestAgentDeploy(CommonTestsMixin, db_base.DbTestCase):
}
)
def test_wirte_image_basic_auth_success_blocked(self):
def test_write_image_basic_auth_success_blocked(self):
cfg.CONF.set_override('image_server_user',
'SpongeBob',
'deploy')