alarms: refactor the alarms subsystem
also include eotk alarms now
This commit is contained in:
parent
a935055083
commit
e2ce24bf3b
17 changed files with 288 additions and 152 deletions
|
@ -1,3 +1,5 @@
|
|||
from flask import current_app
|
||||
|
||||
from app.extensions import db
|
||||
from app.models import AbstractConfiguration, AbstractResource
|
||||
|
||||
|
@ -17,3 +19,7 @@ class Eotk(AbstractResource):
|
|||
region = db.Column(db.String(20), nullable=False)
|
||||
|
||||
group = db.relationship("Group", back_populates="eotks")
|
||||
|
||||
@property
|
||||
def brn(self) -> str:
|
||||
return f"brn:{current_app.config['GLOBAL_NAMESPACE']}:{self.group_id}:eotk:{self.provider}:instance/{self.region}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue