diff --git a/ironicclient/tests/unit/v1/test_create_resources_shell.py b/ironicclient/tests/unit/v1/test_create_resources_shell.py index 2fb6bea39..24a5b9fa8 100644 --- a/ironicclient/tests/unit/v1/test_create_resources_shell.py +++ b/ironicclient/tests/unit/v1/test_create_resources_shell.py @@ -26,6 +26,6 @@ class TestCreateResourcesShell(utils.BaseTestCase): def test_create_shell(self, mock_create_resources): args = mock.MagicMock() files = ['file1', 'file2', 'file3'] - args.resource_files = [files] + args.resource_files = files create_resources_shell.do_create(self.client, args) mock_create_resources.assert_called_once_with(self.client, files) diff --git a/ironicclient/v1/create_resources_shell.py b/ironicclient/v1/create_resources_shell.py index 9f0f435bc..cd46aa77b 100644 --- a/ironicclient/v1/create_resources_shell.py +++ b/ironicclient/v1/create_resources_shell.py @@ -25,4 +25,4 @@ def do_create(cc, args): create all the resources; those that could not be created are skipped (with a corresponding error message). """ - create_resources.create_resources(cc, args.resource_files[0]) + create_resources.create_resources(cc, args.resource_files) diff --git a/releasenotes/notes/ironic-create-files-fix-c31e40e566ff86b8.yaml b/releasenotes/notes/ironic-create-files-fix-c31e40e566ff86b8.yaml new file mode 100644 index 000000000..416febba8 --- /dev/null +++ b/releasenotes/notes/ironic-create-files-fix-c31e40e566ff86b8.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - Fixes 'ironic create ' command so that it handles the + file argument(s) correctly.