Remove 'glance-download' from default import methods

As 'glance-download' requires federated deployments it should
not be enabled by default.

Added line explaining it being available for such deployments
in the config help text.

Change-Id: Icc792e23aad9e7a9a788e6b5826bc5aae54ae978
This commit is contained in:
Erno Kuvaja 2022-08-26 12:16:06 +01:00
parent 623fd75d39
commit c342c0e944
2 changed files with 7 additions and 6 deletions

View File

@ -572,11 +572,12 @@ Related options:
item_type=cfg.types.String(quotes=True),
bounds=True,
default=['glance-direct', 'web-download',
'copy-image', 'glance-download'],
'copy-image'],
help=_("""
List of enabled Image Import Methods
'glance-direct', 'copy-image' and 'web-download' are enabled by default.
'glance-download' is available, but requires federated deployments.
Related options:
* [DEFAULT]/node_staging_uri""")),

View File

@ -33,12 +33,12 @@ class TestInfoControllers(test_utils.BaseTestCase):
self.assertEqual([], output['import-methods']['value'])
def test_get_import_info(self):
# TODO(rosmaita): change this when import methods are
# listed in the config file
import_methods = ['glance-direct', 'web-download',
'copy-image', 'glance-download']
"""Testing defaults, not all possible values"""
default_import_methods = ['glance-direct', 'web-download',
'copy-image']
req = unit_test_utils.get_fake_request()
output = self.controller.get_image_import(req)
self.assertIn('import-methods', output)
self.assertEqual(import_methods, output['import-methods']['value'])
self.assertEqual(default_import_methods,
output['import-methods']['value'])