Test for HA license before allowing cluster job start

This commit is contained in:
Matthew Jones
2016-10-20 16:50:25 -04:00
parent 4d792bef9d
commit 3d8eb48986
3 changed files with 20 additions and 1 deletions

View File

@@ -36,6 +36,10 @@ class InstanceManager(models.Manager):
return node[0]
raise RuntimeError("No instance found with the current cluster host id")
def active_count(self):
"""Return count of active Tower nodes for licensing."""
return self.all().count()
def my_role(self):
# NOTE: TODO: Likely to repurpose this once standalone ramparts are a thing
return "tower"