Added Strategy model

In this changeset, I add the Strategy model as well as the DB
functionalities we need to manipulate strategies.

This changeset implies a DB schema update.

Partially Implements: blueprint get-goal-from-strategy

Change-Id: I438a8788844fbc514edfe1e9e3136f46ba5a82f2
This commit is contained in:
Vincent Françoise
2016-04-29 17:44:47 +02:00
parent 3b5ef15db6
commit 192d8e262c
10 changed files with 785 additions and 4 deletions

View File

@@ -151,7 +151,7 @@ class InvalidIdentity(Invalid):
class InvalidGoal(Invalid):
msg_fmt = _("Goal %(goal)s is not defined in Watcher configuration file")
msg_fmt = _("Goal %(goal)s is invalid")
class InvalidUUID(Invalid):
@@ -174,6 +174,14 @@ class GoalAlreadyExists(Conflict):
msg_fmt = _("A goal with UUID %(uuid)s already exists")
class StrategyNotFound(ResourceNotFound):
msg_fmt = _("Strategy %(strategy)s could not be found")
class StrategyAlreadyExists(Conflict):
msg_fmt = _("A strategy with UUID %(uuid)s already exists")
class AuditTemplateNotFound(ResourceNotFound):
msg_fmt = _("AuditTemplate %(audit_template)s could not be found")