Tony Mack | fea4997 | 2014-12-25 19:17:54 -0500 | [diff] [blame] | 1 | # -*- coding: utf-8 -*- |
| 2 | from __future__ import unicode_literals |
| 3 | |
| 4 | from django.db import models, migrations |
| 5 | import django.utils.timezone |
| 6 | |
| 7 | |
| 8 | class Migration(migrations.Migration): |
| 9 | |
| 10 | dependencies = [ |
| 11 | ('core', '0001_initial'), |
| 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)), |
| 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)), |
| 36 | ('enacted', models.DateTimeField(default=None, null=True, blank=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 | ] |