Skip to content

Commit c342c0e

Browse files
author
Erno Kuvaja
committed
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
1 parent 623fd75 commit c342c0e

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

glance/common/config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,11 +572,12 @@
572572
item_type=cfg.types.String(quotes=True),
573573
bounds=True,
574574
default=['glance-direct', 'web-download',
575-
'copy-image', 'glance-download'],
575+
'copy-image'],
576576
help=_("""
577577
List of enabled Image Import Methods
578578
579579
'glance-direct', 'copy-image' and 'web-download' are enabled by default.
580+
'glance-download' is available, but requires federated deployments.
580581
581582
Related options:
582583
* [DEFAULT]/node_staging_uri""")),

glance/tests/unit/v2/test_discovery_image_import.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ def test_get_import_info_with_empty_method_list(self):
3333
self.assertEqual([], output['import-methods']['value'])
3434

3535
def test_get_import_info(self):
36-
# TODO(rosmaita): change this when import methods are
37-
# listed in the config file
38-
import_methods = ['glance-direct', 'web-download',
39-
'copy-image', 'glance-download']
36+
"""Testing defaults, not all possible values"""
37+
default_import_methods = ['glance-direct', 'web-download',
38+
'copy-image']
4039

4140
req = unit_test_utils.get_fake_request()
4241
output = self.controller.get_image_import(req)
4342
self.assertIn('import-methods', output)
44-
self.assertEqual(import_methods, output['import-methods']['value'])
43+
self.assertEqual(default_import_methods,
44+
output['import-methods']['value'])

0 commit comments

Comments
 (0)