diff --git a/glanceclient/tests/unit/v2/test_shell_v2.py b/glanceclient/tests/unit/v2/test_shell_v2.py index 8acceaec..b2a6415a 100644 --- a/glanceclient/tests/unit/v2/test_shell_v2.py +++ b/glanceclient/tests/unit/v2/test_shell_v2.py @@ -2240,10 +2240,10 @@ class ShellV2Test(testtools.TestCase): def test_image_import_glance_download(self): args = self._make_args( - {'id': 'IMG-01', 'uri': None, 'remote-region': 'REGION2', - 'remote-image-id': 'IMG-02', + {'id': 'IMG-01', 'uri': None, 'remote_region': 'REGION2', + 'remote_image_id': 'IMG-02', 'import_method': 'glance-download', - 'remote-service-interface': 'public'}) + 'remote_service_interface': 'public'}) with mock.patch.object(self.gc.images, 'image_import') as mock_import: with mock.patch.object(self.gc.images, 'get') as mocked_get: with mock.patch.object(self.gc.images, diff --git a/glanceclient/v2/shell.py b/glanceclient/v2/shell.py index 93a93776..3b5b2489 100644 --- a/glanceclient/v2/shell.py +++ b/glanceclient/v2/shell.py @@ -778,9 +778,9 @@ def do_image_import(gc, args): all_stores = getattr(args, "os_all_stores", None) allow_failure = getattr(args, "os_allow_failure", True) uri = getattr(args, "uri", None) - remote_region = getattr(args, "remote-region", None) - remote_image_id = getattr(args, "remote-image-id", None) - remote_service_interface = getattr(args, "remote-service-interface", None) + remote_region = getattr(args, "remote_region", None) + remote_image_id = getattr(args, "remote_image_id", None) + remote_service_interface = getattr(args, "remote_service_interface", None) if not getattr(args, 'from_create', False): if (args.store and (stores or all_stores)) or (stores and all_stores):