Add strategy_id & goal_id fields in audit template
In this changeset, I updated the 'goal_id' field into the AuditTemplate to now become a mandatory foreign key towards the Goal model. I also added the 'strategy_id' field into the AuditTemplate model to be an optional foreign key onto the Strategy model. This changeset also includes an update of the /audit_template Watcher API endpoint to reflect the previous changes. As this changeset changes the API, this should be merged alongside the related changeset from python-watcherclient. Partially Implements: blueprint get-goal-from-strategy Change-Id: Ic0573d036d1bbd7820f8eb963e47912d6b3ed1a9
This commit is contained in:
@@ -152,7 +152,8 @@ class AuditTemplate(Base):
|
||||
name = Column(String(63), nullable=True)
|
||||
description = Column(String(255), nullable=True)
|
||||
host_aggregate = Column(Integer, nullable=True)
|
||||
goal = Column(String(63), nullable=True)
|
||||
goal_id = Column(Integer, ForeignKey('goals.id'), nullable=False)
|
||||
strategy_id = Column(Integer, ForeignKey('strategies.id'), nullable=True)
|
||||
extra = Column(JSONEncodedDict)
|
||||
version = Column(String(15), nullable=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user