'ironic create' handles file args
This fixes the 'ironic create' command so that it handles the file argument(s) correctly. Change-Id: I74d42740b10ed2000c3b9f52dfa2e71dcca5e779 Closes-Bug: #1621565
This commit is contained in:
parent
910989a9ea
commit
96554a998a
@ -26,6 +26,6 @@ class TestCreateResourcesShell(utils.BaseTestCase):
|
|||||||
def test_create_shell(self, mock_create_resources):
|
def test_create_shell(self, mock_create_resources):
|
||||||
args = mock.MagicMock()
|
args = mock.MagicMock()
|
||||||
files = ['file1', 'file2', 'file3']
|
files = ['file1', 'file2', 'file3']
|
||||||
args.resource_files = [files]
|
args.resource_files = files
|
||||||
create_resources_shell.do_create(self.client, args)
|
create_resources_shell.do_create(self.client, args)
|
||||||
mock_create_resources.assert_called_once_with(self.client, files)
|
mock_create_resources.assert_called_once_with(self.client, files)
|
||||||
|
@ -25,4 +25,4 @@ def do_create(cc, args):
|
|||||||
create all the resources; those that could not be created are skipped
|
create all the resources; those that could not be created are skipped
|
||||||
(with a corresponding error message).
|
(with a corresponding error message).
|
||||||
"""
|
"""
|
||||||
create_resources.create_resources(cc, args.resource_files[0])
|
create_resources.create_resources(cc, args.resource_files)
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- Fixes 'ironic create <file>' command so that it handles the
|
||||||
|
file argument(s) correctly.
|
Loading…
Reference in New Issue
Block a user