mirror of
https://github.com/ansible/awx.git
synced 2026-02-23 22:16:00 -03:30
Instance model (for HA)
This commit is contained in:
@@ -14,6 +14,7 @@ from awx.main.models.inventory import *
|
|||||||
from awx.main.models.jobs import *
|
from awx.main.models.jobs import *
|
||||||
from awx.main.models.schedules import *
|
from awx.main.models.schedules import *
|
||||||
from awx.main.models.activity_stream import *
|
from awx.main.models.activity_stream import *
|
||||||
|
from awx.main.models.ha import *
|
||||||
|
|
||||||
# Monkeypatch Django serializer to ignore django-taggit fields (which break
|
# Monkeypatch Django serializer to ignore django-taggit fields (which break
|
||||||
# the dumpdata command; see https://github.com/alex/django-taggit/issues/155).
|
# the dumpdata command; see https://github.com/alex/django-taggit/issues/155).
|
||||||
|
|||||||
18
awx/main/models/ha.py
Normal file
18
awx/main/models/ha.py
Normal 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'
|
||||||
|
|
||||||
Reference in New Issue
Block a user