Andy Bavier | 561f3e5 | 2019-03-15 10:46:05 -0700 | [diff] [blame^] | 1 | # 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-03-15 17:42 |
| 17 | from __future__ import unicode_literals |
| 18 | |
| 19 | import core.models.xosbase_header |
| 20 | from django.db import migrations, models |
| 21 | import django.db.models.deletion |
| 22 | import django.utils.timezone |
| 23 | |
| 24 | |
| 25 | class Migration(migrations.Migration): |
| 26 | |
| 27 | initial = True |
| 28 | |
| 29 | dependencies = [ |
| 30 | ('core', '0002_initial_data'), |
| 31 | ] |
| 32 | |
| 33 | operations = [ |
| 34 | migrations.CreateModel( |
| 35 | name='TtWorkflowDriverService', |
| 36 | fields=[ |
| 37 | ('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')), |
| 38 | ], |
| 39 | options={ |
| 40 | 'verbose_name': 'TtWorkflowDriver Service', |
| 41 | }, |
| 42 | bases=('core.service',), |
| 43 | ), |
| 44 | migrations.CreateModel( |
| 45 | name='TtWorkflowDriverServiceInstance', |
| 46 | fields=[ |
| 47 | ('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')), |
| 48 | ('serial_number', models.CharField(help_text=b'Serial number of ONU', max_length=254, unique=True)), |
| 49 | ('of_dpid', models.CharField(help_text=b'OLT Openflow ID', max_length=254)), |
| 50 | ('uni_port_id', models.IntegerField(help_text=b'ONU UNI port ID')), |
| 51 | ('onu_state', models.CharField(choices=[(b'AWAITING', b'Awaiting'), (b'ENABLED', b'Enabled'), (b'DISABLED', b'Disabled')], default=b'AWAITING', help_text=b'ONU administrative state', max_length=254)), |
| 52 | ('status_message', models.CharField(blank=True, default=b'', help_text=b'Status text of current state machine state', max_length=254, null=True)), |
| 53 | ('dhcp_state', models.CharField(choices=[(b'AWAITING', b'Awaiting'), (b'DHCPDISCOVER', b'DHCPDISCOVER'), (b'DHCPACK', b'DHCPACK'), (b'DHCPREQUEST', b'DHCPREQUEST')], default=b'AWAITING', max_length=254)), |
| 54 | ('ip_address', models.CharField(blank=True, help_text=b'Management IP address, learned from DHCP', max_length=20, null=True)), |
| 55 | ('mac_address', models.CharField(blank=True, help_text=b'Management MAC address, leanred from DHCP', max_length=20, null=True)), |
| 56 | ], |
| 57 | options={ |
| 58 | 'verbose_name': 'TtWorkflowDriver Service Instance', |
| 59 | }, |
| 60 | bases=('core.serviceinstance',), |
| 61 | ), |
| 62 | migrations.CreateModel( |
| 63 | name='TtWorkflowDriverWhiteListEntry', |
| 64 | fields=[ |
| 65 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
| 66 | ('created', models.DateTimeField(auto_now_add=True, help_text=b'Time this model was created')), |
| 67 | ('updated', models.DateTimeField(default=django.utils.timezone.now, help_text=b'Time this model was changed by a non-synchronizer')), |
| 68 | ('enacted', models.DateTimeField(blank=True, default=None, help_text=b'When synced, set to the timestamp of the data that was synced', null=True)), |
| 69 | ('policed', models.DateTimeField(blank=True, default=None, help_text=b'When policed, set to the timestamp of the data that was policed', null=True)), |
| 70 | ('backend_register', models.CharField(blank=True, default=b'{}', max_length=1024, null=True)), |
| 71 | ('backend_need_delete', models.BooleanField(default=False)), |
| 72 | ('backend_need_reap', models.BooleanField(default=False)), |
| 73 | ('backend_status', models.CharField(default=b'Provisioning in progress', max_length=1024)), |
| 74 | ('backend_code', models.IntegerField(default=0)), |
| 75 | ('deleted', models.BooleanField(default=False)), |
| 76 | ('write_protect', models.BooleanField(default=False)), |
| 77 | ('lazy_blocked', models.BooleanField(default=False)), |
| 78 | ('no_sync', models.BooleanField(default=False)), |
| 79 | ('no_policy', models.BooleanField(default=False)), |
| 80 | ('policy_status', models.CharField(blank=True, default=b'Policy in process', max_length=1024, null=True)), |
| 81 | ('policy_code', models.IntegerField(blank=True, default=0, null=True)), |
| 82 | ('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)), |
| 83 | ('backend_need_delete_policy', models.BooleanField(default=False, help_text=b'True if delete model_policy must be run before object can be reaped')), |
| 84 | ('xos_managed', models.BooleanField(default=True, help_text=b'True if xos is responsible for creating/deleting this object')), |
| 85 | ('backend_handle', models.CharField(blank=True, help_text=b'Handle used by the backend to track this object', max_length=1024, null=True)), |
| 86 | ('changed_by_step', models.DateTimeField(blank=True, default=None, help_text=b'Time this model was changed by a sync step', null=True)), |
| 87 | ('changed_by_policy', models.DateTimeField(blank=True, default=None, help_text=b'Time this model was changed by a model policy', null=True)), |
| 88 | ('serial_number', models.CharField(help_text=b'ONU Serial Number', max_length=254)), |
| 89 | ('pon_port_id', models.IntegerField(help_text=b'PON Port on which this ONU is expected to show up')), |
| 90 | ('device_id', models.CharField(help_text=b'OLT Device (logical device id) on which this ONU is expected to show up', max_length=54)), |
| 91 | ('owner', models.ForeignKey(help_text=b'TtWorkflowDriverService that owns this white list entry', on_delete=django.db.models.deletion.CASCADE, related_name='whitelist_entries', to='tt-workflow-driver.TtWorkflowDriverService')), |
| 92 | ], |
| 93 | options={ |
| 94 | 'verbose_name': 'ONU Whitelist', |
| 95 | }, |
| 96 | bases=(models.Model, core.models.xosbase_header.PlModelMixIn), |
| 97 | ), |
| 98 | migrations.AlterUniqueTogether( |
| 99 | name='ttworkflowdriverwhitelistentry', |
| 100 | unique_together=set([('owner', 'serial_number')]), |
| 101 | ), |
| 102 | ] |