Siobhan Tully | ce652d0 | 2013-10-08 21:52:35 -0400 | [diff] [blame] | 1 | from core.models import User,Site,Service,SingletonModel,PlCoreBase |
| 2 | import os |
| 3 | from django.db import models |
| 4 | from django.forms.models import model_to_dict |
| 5 | |
| 6 | # Create your models here. |
| 7 | |
| 8 | class RequestRouterService(SingletonModel,Service): |
| 9 | class Meta: |
| 10 | app_label = "requestrouter" |
| 11 | verbose_name = "Request Router Service" |
| 12 | |
| 13 | behindNat = models.BooleanField(default=False, help_text="Enables 'Behind NAT' mode.") |
| 14 | defaultTTL = models.PositiveIntegerField(default=30, help_text="DNS response time-to-live(TTL)") |
| 15 | defaultAction = models.CharField(max_length=30, default = "best", help_text="Review if this should be enum") |
| 16 | lastResortAction = models.CharField(max_length=30, default = "random", help_text="Review if this should be enum") |
| 17 | maxAnswers = models.PositiveIntegerField(default=3, help_text="Maximum number of answers in DNS response.") |
| 18 | |
| 19 | def __unicode__(self): return u'RequestRouterService' |
| 20 | |
| 21 | class ClientMap(models.Model): |
| 22 | site = models.OneToOneField(Site, unique=True) |
| 23 | name = models.CharField(max_length=64, help_text="Name of the Client Map") |
| 24 | description = models.TextField(null=True, blank=True,max_length=130) |
| 25 | |