Scott Baker | 4bf4514 | 2014-09-15 16:05:39 -0700 | [diff] [blame] | 1 | # -*- coding: utf-8 -*- |
| 2 | from __future__ import unicode_literals |
| 3 | |
| 4 | from django.db import models, migrations |
| 5 | import datetime |
Scott Baker | cab9042 | 2014-09-16 12:17:07 -0700 | [diff] [blame] | 6 | import django.utils.timezone |
Scott Baker | 4bf4514 | 2014-09-15 16:05:39 -0700 | [diff] [blame] | 7 | |
| 8 | class Migration(migrations.Migration): |
| 9 | |
| 10 | dependencies = [ |
| 11 | ('core', '0002_omf_friendly_default_false'), |
| 12 | ] |
| 13 | |
| 14 | operations = [ |
| 15 | migrations.CreateModel( |
| 16 | name='RequestRouterService', |
| 17 | fields=[ |
| 18 | ('service_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='core.Service')), |
| 19 | ('behindNat', models.BooleanField(default=False, help_text=b"Enables 'Behind NAT' mode.")), |
| 20 | ('defaultTTL', models.PositiveIntegerField(default=30, help_text=b'DNS response time-to-live(TTL)')), |
| 21 | ('defaultAction', models.CharField(default=b'best', help_text=b'Review if this should be enum', max_length=30)), |
| 22 | ('lastResortAction', models.CharField(default=b'random', help_text=b'Review if this should be enum', max_length=30)), |
| 23 | ('maxAnswers', models.PositiveIntegerField(default=3, help_text=b'Maximum number of answers in DNS response.')), |
| 24 | ], |
| 25 | options={ |
| 26 | 'verbose_name': 'Request Router Service', |
| 27 | }, |
| 28 | bases=('core.service', models.Model), |
| 29 | ), |
| 30 | migrations.CreateModel( |
| 31 | name='ServiceMap', |
| 32 | fields=[ |
| 33 | ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), |
Scott Baker | cab9042 | 2014-09-16 12:17:07 -0700 | [diff] [blame] | 34 | ('created', models.DateTimeField(default=django.utils.timezone.now, auto_now_add=True)), |
| 35 | ('updated', models.DateTimeField(default=django.utils.timezone.now, auto_now=True)), |
Scott Baker | 4bf4514 | 2014-09-15 16:05:39 -0700 | [diff] [blame] | 36 | ('enacted', models.DateTimeField(default=None, null=True)), |
| 37 | ('backend_status', models.CharField(default=b'Provisioning in progress', max_length=140)), |
| 38 | ('deleted', models.BooleanField(default=False)), |
| 39 | ('name', models.SlugField(help_text=b'name of this service map', unique=True)), |
| 40 | ('prefix', models.CharField(help_text=b'FQDN of the region of URI space managed by RR on behalf of this service', max_length=256)), |
| 41 | ('siteMap', models.FileField(help_text=b'maps client requests to service instances', upload_to=b'maps/', blank=True)), |
| 42 | ('accessMap', models.FileField(help_text=b'specifies which client requests are allowed', upload_to=b'maps/', blank=True)), |
| 43 | ('owner', models.ForeignKey(help_text=b'service which owns this map', to='core.Service')), |
| 44 | ('slice', models.ForeignKey(help_text=b'slice that implements this service', to='core.Slice')), |
| 45 | ], |
| 46 | options={ |
| 47 | }, |
| 48 | bases=(models.Model,), |
| 49 | ), |
| 50 | ] |