Add Client.archived flag, ignore archived for "disabled probes" check

this lets us keep old client config around without deleting it, but it should
not interfere with other logic etc.
This commit is contained in:
Lance Edgar 2018-09-28 12:21:21 -05:00
parent 018a9dcb08
commit 152ea26c02
3 changed files with 48 additions and 2 deletions

View file

@ -63,6 +63,14 @@ class Client(Base):
enabled = sa.Column(sa.Boolean(), nullable=False, default=False)
online = sa.Column(sa.Boolean(), nullable=False, default=False)
archived = sa.Column(sa.Boolean(), nullable=False, default=False, doc="""
Flag indicating this client is "archived". This typically means that the
client itself no longer exists etc. but that the configuration for it
should be retained, e.g. to be used as a reference later etc. Note that
"archiving" a client is different from "disabling" it; the latter being
more temporary.
""")
def __str__(self):
return '{} ({})'.format(self.config_key, self.hostname)