dynamic action description

Add a new table to save the mapping
Add logic to update the table when action loading
Add logic to show the action description

Change-Id: Ia008a8715bcc666ab0fefe444ef612394c775e91
Implements: blueprint dynamic-action-description
This commit is contained in:
licanwei
2017-07-15 02:25:43 -07:00
parent 0ddfa278ef
commit a24b7f0b61
15 changed files with 771 additions and 0 deletions

View File

@@ -278,3 +278,17 @@ class Service(Base):
name = Column(String(255), nullable=False)
host = Column(String(255), nullable=False)
last_seen_up = Column(DateTime, nullable=True)
class ActionDescription(Base):
"""Represents a action description"""
__tablename__ = 'action_descriptions'
__table_args__ = (
UniqueConstraint('action_type',
name="uniq_action_description0action_type"),
table_args()
)
id = Column(Integer, primary_key=True)
action_type = Column(String(255), nullable=False)
description = Column(String(255), nullable=False)