blob: 8d52791541f01b938c8a2175bcb54eb7fda1dee2 [file] [log] [blame]
Matteo Scandolo076c2fd2019-02-20 17:32:54 -08001# Copyright 2017-present Open Networking Foundation
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15# -*- coding: utf-8 -*-
16# Generated by Django 1.11.11 on 2019-02-21 01:31
17from __future__ import unicode_literals
18
19import core.models.xosbase_header
20from django.conf import settings
21import django.core.validators
22from django.db import migrations, models
23import django.db.models.deletion
24import django.utils.timezone
25
26
27class Migration(migrations.Migration):
28
29 initial = True
30
31 dependencies = [
32 migrations.swappable_dependency(settings.AUTH_USER_MODEL),
33 ('core', '0002_initial_data'),
34 ]
35
36 operations = [
37 migrations.CreateModel(
38 name='RCORDIpAddress_decl',
39 fields=[
40 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
41 ('created', models.DateTimeField(auto_now_add=True, help_text=b'Time this model was created')),
42 ('updated', models.DateTimeField(default=django.utils.timezone.now, help_text=b'Time this model was changed by a non-synchronizer')),
43 ('enacted', models.DateTimeField(blank=True, default=None, help_text=b'When synced, set to the timestamp of the data that was synced', null=True)),
44 ('policed', models.DateTimeField(blank=True, default=None, help_text=b'When policed, set to the timestamp of the data that was policed', null=True)),
45 ('backend_register', models.CharField(blank=True, default=b'{}', max_length=1024, null=True)),
46 ('backend_need_delete', models.BooleanField(default=False)),
47 ('backend_need_reap', models.BooleanField(default=False)),
48 ('backend_status', models.CharField(default=b'Provisioning in progress', max_length=1024, null=True)),
49 ('backend_code', models.IntegerField(default=0)),
50 ('deleted', models.BooleanField(default=False)),
51 ('write_protect', models.BooleanField(default=False)),
52 ('lazy_blocked', models.BooleanField(default=False)),
53 ('no_sync', models.BooleanField(default=False)),
54 ('no_policy', models.BooleanField(default=False)),
55 ('policy_status', models.CharField(blank=True, default=b'Policy in process', max_length=1024, null=True)),
56 ('policy_code', models.IntegerField(blank=True, default=0, null=True)),
57 ('leaf_model_name', models.CharField(help_text=b'The most specialized model in this chain of inheritance, often defined by a service developer', max_length=1024)),
58 ('backend_need_delete_policy', models.BooleanField(default=False, help_text=b'True if delete model_policy must be run before object can be reaped')),
59 ('xos_managed', models.BooleanField(default=True, help_text=b'True if xos is responsible for creating/deleting this object')),
60 ('backend_handle', models.CharField(blank=True, help_text=b'Handle used by the backend to track this object', max_length=1024, null=True)),
61 ('changed_by_step', models.DateTimeField(blank=True, default=None, help_text=b'Time this model was changed by a sync step', null=True)),
62 ('changed_by_policy', models.DateTimeField(blank=True, default=None, help_text=b'Time this model was changed by a model policy', null=True)),
63 ('ip', models.CharField(help_text=b'The unique IP address (either IPv4 or IPv6 / netmask)', max_length=52)),
64 ('description', models.CharField(blank=True, help_text=b'A short description of the IP address', max_length=254, null=True)),
65 ],
66 options={
67 'verbose_name': 'IP address',
68 },
69 bases=(models.Model, core.models.xosbase_header.PlModelMixIn),
70 ),
71 migrations.CreateModel(
72 name='RCORDService_decl',
73 fields=[
74 ('service_decl_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='core.Service_decl')),
75 ('access', models.CharField(choices=[(b'voltha', b'VOLTHA'), (b'unknown', b'Unknown')], default=b'voltha', help_text=b'Name of service that is managing the Access Network', max_length=30)),
76 ],
77 options={
78 'verbose_name': 'RCORD Service',
79 },
80 bases=('core.service',),
81 ),
82 migrations.CreateModel(
83 name='RCORDSubscriber_decl',
84 fields=[
85 ('serviceinstance_decl_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='core.ServiceInstance_decl')),
86 ('status', core.models.xosbase_header.StrippedCharField(blank=True, choices=[(b'enabled', b'Enabled'), (b'disabled', b'Disabled'), (b'pre-provisioned', b'Pre Provisioned'), (b'awaiting-auth', b'Awaiting Authentication'), (b'auth-failed', b'Authentication Failed')], default=b'enabled', help_text=b'Status of subscriber provisioning and authentication', max_length=30, null=True)),
87 ('c_tag', models.IntegerField(blank=True, help_text=b"Customer VLAN Tag, one half of the double-tag that identifies this subscriber's traffic", null=True, validators=[django.core.validators.MaxValueValidator(4096), django.core.validators.MinValueValidator(0)])),
88 ('s_tag', models.IntegerField(blank=True, help_text=b"Service VLAN Tag, one half of the double-tag that identifies this subscriber's traffic", null=True, validators=[django.core.validators.MaxValueValidator(4096), django.core.validators.MinValueValidator(0)])),
89 ('onu_device', models.TextField(help_text=b'ONUDevice serial number')),
90 ('mac_address', models.TextField(blank=True, help_text=b'Subscriber MAC Address', null=True)),
91 ('nas_port_id', models.TextField(blank=True, help_text=b'NAS Port ID used in Radius to identify physical interface used to authenticate subscriber', null=True)),
92 ('circuit_id', models.TextField(blank=True, help_text=b'Option 82 Circuit ID for DHCP relay agent', null=True)),
93 ('remote_id', models.TextField(blank=True, help_text=b'Option 82 Remote ID for DHCP relay agent', null=True)),
94 ('creator', models.ForeignKey(blank=True, help_text=b'User who created this RCORDSubscriber object', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='created_rcord_subscribers', to=settings.AUTH_USER_MODEL)),
95 ],
96 options={
97 'verbose_name': 'RCORD Subscriber',
98 },
99 bases=('core.serviceinstance',),
100 ),
101 migrations.AddField(
102 model_name='rcordipaddress_decl',
103 name='subscriber',
104 field=models.ForeignKey(help_text=b'The subscriber the IP address belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='ips', to='rcord.RCORDSubscriber_decl'),
105 ),
106 migrations.CreateModel(
107 name='RCORDIpAddress',
108 fields=[
109 ],
110 options={
111 'proxy': True,
112 'indexes': [],
113 },
114 bases=('rcord.rcordipaddress_decl',),
115 ),
116 migrations.CreateModel(
117 name='RCORDService',
118 fields=[
119 ],
120 options={
121 'proxy': True,
122 'indexes': [],
123 },
124 bases=('rcord.rcordservice_decl',),
125 ),
126 migrations.CreateModel(
127 name='RCORDSubscriber',
128 fields=[
129 ],
130 options={
131 'proxy': True,
132 'indexes': [],
133 },
134 bases=('rcord.rcordsubscriber_decl',),
135 ),
136 migrations.AlterUniqueTogether(
137 name='rcordipaddress_decl',
138 unique_together=set([('subscriber', 'ip')]),
139 ),
140 ]