Refactored check for invalid goal

When creating a new audit template, the verification of its goal
existence was previously done in watcher/objects/audit_template.py.
This check was moved to api/controllers/v1/audit_template.py, rather
than in the DAO class.

Change-Id: I6efb0657f64c46a56914a946ec78013b9e47331b
Closes-Bug: #1536191
This commit is contained in:
Larry Rensing
2016-02-15 09:52:59 -06:00
parent 083b170083
commit 920bd502ec
4 changed files with 45 additions and 10 deletions

View File

@@ -137,7 +137,7 @@ class TestAuditTemplate(base.BaseInfraOptimTest):
new_name = 'my at new name %s' % uuid.uuid4()
new_description = 'my new at description'
new_host_aggregate = 10
new_goal = 'A NEW GOAL'
new_goal = 'BASIC_CONSOLIDATION'
new_extra = {'key1': 'new-value1', 'key2': 'new-value2'}
patch = [{'path': '/name',