mirror of
https://github.com/ansible/awx.git
synced 2026-03-10 22:19:28 -02:30
Add Instance.role property.
This commit is contained in:
@@ -16,3 +16,9 @@ class Instance(models.Model):
|
|||||||
class Meta:
|
class Meta:
|
||||||
app_label = 'main'
|
app_label = 'main'
|
||||||
|
|
||||||
|
@property
|
||||||
|
def role(self):
|
||||||
|
"""Return the role of this instance, as a string."""
|
||||||
|
if self.primary:
|
||||||
|
return 'primary'
|
||||||
|
return 'secondary'
|
||||||
|
|||||||
Reference in New Issue
Block a user