Matteo Scandolo | 6fceffe | 2019-06-26 17:21:03 -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-14 22:35 |
| 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 | def forwards(apps, schema_editor): |
| 28 | # Set reasonable values for the default bandwidth profile |
| 29 | bp = apps.get_model('rcord', 'BandwidthProfile') |
| 30 | default = bp.objects.get(name="Default") |
| 31 | default.cbs = 30 |
| 32 | default.ebs = 30 |
| 33 | default.eir = 400 |
| 34 | default.air = 100000 |
| 35 | default.cir = 600 |
| 36 | default.save() |
| 37 | |
| 38 | dependencies = [ |
| 39 | ('rcord', '0011_mandatory_tech_profile_id'), |
| 40 | ] |
| 41 | |
| 42 | operations = [ |
| 43 | migrations.RunPython(forwards), |
| 44 | ] |