blob: 4350030cd553ff9f52a5649b8033604b0277a24f [file] [log] [blame]
Siobhan Tullyce652d02013-10-08 21:52:35 -04001from core.models import User,Site,Service,SingletonModel,PlCoreBase
2import os
3from django.db import models
4from django.forms.models import model_to_dict
5
6# Create your models here.
7
8class 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
21class 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)
Siobhan Tullycf04fb62014-01-11 11:25:57 -050025
26 def __unicode__(self): return self.name
Siobhan Tullyce652d02013-10-08 21:52:35 -040027