diff --git a/watcherclient/tests/v1/test_audit_shell.py b/watcherclient/tests/v1/test_audit_shell.py index 83965b4..cc6e1db 100644 --- a/watcherclient/tests/v1/test_audit_shell.py +++ b/watcherclient/tests/v1/test_audit_shell.py @@ -388,7 +388,7 @@ class AuditShellTest(base.CommandTestCase): self.m_audit_mgr.create.assert_called_once_with( goal='fc087747-61be-4aad-8126-b701731ae836', audit_type='ONESHOT', - parameters=['para1=10', 'para2=20']) + parameters={'para1': 10, 'para2': 20}) def test_do_audit_create_with_type_continuous(self): audit = resource.Audit(mock.Mock(), AUDIT_1) diff --git a/watcherclient/v1/audit_shell.py b/watcherclient/v1/audit_shell.py index ac3de56..1d37b20 100644 --- a/watcherclient/v1/audit_shell.py +++ b/watcherclient/v1/audit_shell.py @@ -184,6 +184,7 @@ class CreateAudit(command.ShowOne): fields = dict((k, v) for (k, v) in vars(parsed_args).items() if k in field_list and v is not None) + fields = common_utils.args_array_to_dict(fields, 'parameters') if fields.get('goal'): if not uuidutils.is_uuid_like(fields['goal']):