1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 15:21:13 +03:00

Instance model (for HA)

This commit is contained in:
Luke Sneeringer 2014-09-26 14:08:19 -05:00
parent b740faeccd
commit 072ab2118f
3 changed files with 20 additions and 1 deletions

View File

@ -476,4 +476,4 @@ class Migration(SchemaMigration):
}
}
complete_apps = ['main']
complete_apps = ['main']

View File

@ -14,6 +14,7 @@ from awx.main.models.inventory import *
from awx.main.models.jobs import *
from awx.main.models.schedules import *
from awx.main.models.activity_stream import *
from awx.main.models.ha import *
# Monkeypatch Django serializer to ignore django-taggit fields (which break
# the dumpdata command; see https://github.com/alex/django-taggit/issues/155).

18
awx/main/models/ha.py Normal file
View File

@ -0,0 +1,18 @@
# Copyright (c) 2014 Ansible, Inc.
# All Rights Reserved.
from django.db import models
class Instance(models.Model):
"""A model representing an Ansible Tower instance, primary or secondary,
running against this database.
"""
uuid = models.CharField(max_length=40)
primary = models.BooleanField(default=False)
created = models.DateTimeField(auto_now_add=True)
modified = models.DateTimeField(auto_now=True)
class Meta:
app_label = 'main'