feat: initial api implementation
This commit is contained in:
parent
a482d5bba8
commit
ae905c6d80
4 changed files with 239 additions and 9 deletions
|
@ -33,6 +33,15 @@ class Group(AbstractConfiguration):
|
|||
resource_id=str(self.id)
|
||||
)
|
||||
|
||||
def to_dict(self):
|
||||
active_origins = [o for o in self.origins if o.destroyed is None]
|
||||
return {
|
||||
"Id": self.id,
|
||||
"GroupName": self.group_name,
|
||||
"Description": self.description,
|
||||
"ActiveOriginCount": len(active_origins),
|
||||
}
|
||||
|
||||
|
||||
class Pool(AbstractConfiguration):
|
||||
pool_name = db.Column(db.String(80), unique=True, nullable=False)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue