Implement goal_id, strategy_id and host_aggregate into Audit api

Modifying the api controller for audit objects to allow
creation of audit objects by specifying either an
audit_template uuid/id and/or a goal_id.

strategy_id is optional.

Partially Implements: blueprint persistent-audit-parameters
Change-Id: I7b3eae4d0752a11208f5f92ee13ab1018d8521ad
This commit is contained in:
Michael Gugino
2016-06-15 15:13:15 -04:00
parent 0769e53f93
commit 52ffc2c8e2
15 changed files with 296 additions and 379 deletions

View File

@@ -59,15 +59,9 @@ class TestStrategyContext(base.DbTestCase):
uuid=utils.generate_uuid(),
name="dummy")
audit_template = obj_utils.create_test_audit_template(
self.context,
uuid=utils.generate_uuid(),
strategy_id=strategy.id,
name="my_template")
audit = obj_utils.create_test_audit(
self.context,
audit_template_id=audit_template.id,
strategy_id=strategy.id,
uuid=utils.generate_uuid(),
)
@@ -92,15 +86,9 @@ class TestStrategyContext(base.DbTestCase):
uuid=utils.generate_uuid(),
name=expected_strategy)
audit_template = obj_utils.create_test_audit_template(
self.context,
uuid=utils.generate_uuid(),
strategy_id=strategy.id,
name="my_template")
audit = obj_utils.create_test_audit(
self.context,
audit_template_id=audit_template.id,
strategy_id=strategy.id,
uuid=utils.generate_uuid(),
)