do_image_import: always pass remote_* to gc.images.image_import
In do_image_import, gc.images.image_import may be called from two
different places, depending on the command used ("glance image-import"
or "glance image-create-via-import"). Make sure we always pass the
remote_* arguments to gc.images.import.
Change-Id: I76c6ea00523d93bad900776866de6ba22bc516b4
Partial-Bug: #2012442
This commit is contained in:
@@ -2279,7 +2279,9 @@ class ShellV2Test(testtools.TestCase):
|
||||
test_shell.do_image_import(self.gc, args)
|
||||
mock_import.assert_called_once_with(
|
||||
'IMG-02', 'glance-direct', None, stores=None,
|
||||
all_stores=None, allow_failure=True, backend=None)
|
||||
all_stores=None, allow_failure=True,
|
||||
remote_region=None, remote_image_id=None,
|
||||
remote_service_interface=None, backend=None)
|
||||
mocked_utils_print_image.assert_not_called()
|
||||
|
||||
@mock.patch('glanceclient.common.utils.print_image')
|
||||
|
||||
Reference in New Issue
Block a user