Make --all-stores behave the same as in glanceclient.
In order for python-openstackclient to support image imports to mutliple stores at the same time an update is needed to the --all-stores argument used by the client whereby the argument is explicitly set to contain a boolean value. This change makes the argument do what it's supposed to and do it in a way consistent with the API contract exposed by Glance. Amend tests to support the change in type of the --all-stores option. Change-Id: If5a72ca3ca68656555b5eb478e104d43f419c77e Closes-Bug: 2138903 Signed-off-by: Piotr Sipika <psipika@bloomberg.net> Co-authored-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
committed by
Stephen Finucane
parent
911e643f2c
commit
0803fd2112
@@ -1719,6 +1719,7 @@ class ImportImage(command.ShowOne):
|
||||
)
|
||||
stores_group.add_argument(
|
||||
'--all-stores',
|
||||
action='store_true',
|
||||
help=_(
|
||||
"Make image available to all stores "
|
||||
"(either '--store' or '--all-stores' required with the "
|
||||
|
||||
@@ -2085,7 +2085,7 @@ class TestImageImport(TestImage):
|
||||
remote_image_id=None,
|
||||
remote_service_interface=None,
|
||||
stores=None,
|
||||
all_stores=None,
|
||||
all_stores=False,
|
||||
all_stores_must_succeed=False,
|
||||
)
|
||||
|
||||
@@ -2115,7 +2115,7 @@ class TestImageImport(TestImage):
|
||||
remote_image_id=None,
|
||||
remote_service_interface=None,
|
||||
stores=None,
|
||||
all_stores=None,
|
||||
all_stores=False,
|
||||
all_stores_must_succeed=False,
|
||||
)
|
||||
|
||||
@@ -2253,7 +2253,7 @@ class TestImageImport(TestImage):
|
||||
remote_image_id=None,
|
||||
remote_service_interface=None,
|
||||
stores=['fast'],
|
||||
all_stores=None,
|
||||
all_stores=False,
|
||||
all_stores_must_succeed=False,
|
||||
)
|
||||
|
||||
@@ -2285,7 +2285,7 @@ class TestImageImport(TestImage):
|
||||
remote_image_id=None,
|
||||
remote_service_interface=None,
|
||||
stores=['fast'],
|
||||
all_stores=None,
|
||||
all_stores=False,
|
||||
all_stores_must_succeed=True,
|
||||
)
|
||||
|
||||
@@ -2320,7 +2320,7 @@ class TestImageImport(TestImage):
|
||||
remote_image_id='remote-image-id',
|
||||
remote_service_interface='private',
|
||||
stores=None,
|
||||
all_stores=None,
|
||||
all_stores=False,
|
||||
all_stores_must_succeed=False,
|
||||
)
|
||||
|
||||
|
||||
5
releasenotes/notes/bug-2138903-f75c7348f22db195.yaml
Normal file
5
releasenotes/notes/bug-2138903-f75c7348f22db195.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
The ``--all-stores`` of the ``image import`` command is now correctly
|
||||
treated as a boolean flag.
|
||||
Reference in New Issue
Block a user