interval param should be set to None by default
Change-Id: Ie864187bae3ee5abc7802861dbd3c85eabb55904 Closes-bug: #1602613
This commit is contained in:
parent
ba108ed37e
commit
a270d72038
@ -65,7 +65,7 @@ class Audit(base.APIDictWrapper):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def create(cls, request, audit_template_uuid,
|
def create(cls, request, audit_template_uuid,
|
||||||
audit_type, deadline, interval):
|
audit_type, deadline, interval=None):
|
||||||
|
|
||||||
"""Create an audit in Watcher
|
"""Create an audit in Watcher
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ class Audit(base.APIDictWrapper):
|
|||||||
:param deadline: audit deadline:
|
:param deadline: audit deadline:
|
||||||
:type deadline: string
|
:type deadline: string
|
||||||
|
|
||||||
:param interval: Audit interval
|
:param interval: Audit interval (default: None)
|
||||||
:type interval: int
|
:type interval: int
|
||||||
|
|
||||||
:return: the created Audit object
|
:return: the created Audit object
|
||||||
|
@ -212,7 +212,6 @@ class WatcherAPITests(test.APITestCase):
|
|||||||
|
|
||||||
deadline = self.api_audits.first()['deadline']
|
deadline = self.api_audits.first()['deadline']
|
||||||
audit_type = self.api_audits.first()['audit_type']
|
audit_type = self.api_audits.first()['audit_type']
|
||||||
interval = audit['interval']
|
|
||||||
audit_template_uuid = audit_template_id
|
audit_template_uuid = audit_template_id
|
||||||
|
|
||||||
watcherclient = self.stub_watcherclient()
|
watcherclient = self.stub_watcherclient()
|
||||||
@ -224,7 +223,7 @@ class WatcherAPITests(test.APITestCase):
|
|||||||
self.mox.ReplayAll()
|
self.mox.ReplayAll()
|
||||||
|
|
||||||
ret_val = api.watcher.Audit.create(
|
ret_val = api.watcher.Audit.create(
|
||||||
self.request, audit_template_uuid, audit_type, deadline, interval)
|
self.request, audit_template_uuid, audit_type, deadline)
|
||||||
self.assertIsInstance(ret_val, dict)
|
self.assertIsInstance(ret_val, dict)
|
||||||
|
|
||||||
def test_audit_create_with_interval(self):
|
def test_audit_create_with_interval(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user