Merge "Fix create audit fail from audit_template"
This commit is contained in:
commit
4daaec6665
@ -62,8 +62,8 @@ class Audit(base.APIDictWrapper):
|
||||
self._request = request
|
||||
|
||||
@classmethod
|
||||
def create(cls, request, name, audit_template_uuid,
|
||||
audit_type, auto_trigger=False, interval=None):
|
||||
def create(cls, request, audit_template_uuid, audit_type, name=None,
|
||||
auto_trigger=False, interval=None):
|
||||
|
||||
"""Create an audit in Watcher
|
||||
|
||||
|
@ -222,7 +222,7 @@ class WatcherAPITests(test.APITestCase):
|
||||
return_value=audit)
|
||||
|
||||
ret_val = api.watcher.Audit.create(
|
||||
self.request, audit_name, audit_template_uuid, audit_type)
|
||||
self.request, audit_template_uuid, audit_type, audit_name)
|
||||
self.assertIsInstance(ret_val, dict)
|
||||
watcherclient.audit.create.assert_called_with(
|
||||
audit_template_uuid=audit_template_uuid,
|
||||
@ -242,7 +242,7 @@ class WatcherAPITests(test.APITestCase):
|
||||
return_value=audit)
|
||||
|
||||
ret_val = api.watcher.Audit.create(
|
||||
self.request, audit_name, audit_template_uuid, audit_type,
|
||||
self.request, audit_template_uuid, audit_type, audit_name,
|
||||
False, interval)
|
||||
self.assertIsInstance(ret_val, dict)
|
||||
watcherclient.audit.create.assert_called_with(
|
||||
@ -265,7 +265,7 @@ class WatcherAPITests(test.APITestCase):
|
||||
return_value=audit)
|
||||
|
||||
ret_val = api.watcher.Audit.create(
|
||||
self.request, audit_name, audit_template_uuid, audit_type, True)
|
||||
self.request, audit_template_uuid, audit_type, audit_name, True)
|
||||
self.assertIsInstance(ret_val, dict)
|
||||
watcherclient.audit.create.assert_called_with(
|
||||
audit_template_uuid=audit_template_uuid,
|
||||
|
Loading…
Reference in New Issue
Block a user