2015-03-23 01:42:31 +01:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
|
|
from django.db import models, migrations
|
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='Announcement',
|
|
|
|
fields=[
|
|
|
|
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
|
|
|
('ip', models.GenericIPAddressField()),
|
|
|
|
('prefix', models.IntegerField()),
|
|
|
|
('ASPath', models.CharField(max_length=512)),
|
|
|
|
('nextHop', models.GenericIPAddressField()),
|
|
|
|
],
|
|
|
|
options={
|
|
|
|
},
|
|
|
|
bases=(models.Model,),
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='AS',
|
|
|
|
fields=[
|
|
|
|
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
|
|
|
('number', models.IntegerField()),
|
|
|
|
],
|
|
|
|
options={
|
|
|
|
},
|
|
|
|
bases=(models.Model,),
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='BorderRouter',
|
|
|
|
fields=[
|
|
|
|
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
|
|
|
('pingable', models.BooleanField(default=False)),
|
|
|
|
('reachable', models.BooleanField(default=False)),
|
2020-06-06 22:01:51 +02:00
|
|
|
('AS', models.ForeignKey(to='bgpdata.AS', on_delete=models.CASCADE)),
|
2015-03-23 01:42:31 +01:00
|
|
|
],
|
|
|
|
options={
|
|
|
|
},
|
|
|
|
bases=(models.Model,),
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='ConfigHost',
|
|
|
|
fields=[
|
|
|
|
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
|
|
|
('number', models.IntegerField()),
|
|
|
|
('ip', models.GenericIPAddressField()),
|
|
|
|
('checkMethod', models.CharField(max_length=4, choices=[(b'CMK', b'Check MK'), (b'PLAIN', b'Plain')])),
|
|
|
|
],
|
|
|
|
options={
|
|
|
|
},
|
|
|
|
bases=(models.Model,),
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='CrawlRun',
|
|
|
|
fields=[
|
|
|
|
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
|
|
|
('startTime', models.DateTimeField()),
|
|
|
|
('endTime', models.DateTimeField(blank=True)),
|
|
|
|
],
|
|
|
|
options={
|
|
|
|
},
|
|
|
|
bases=(models.Model,),
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='Peering',
|
|
|
|
fields=[
|
|
|
|
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
|
|
|
('origin', models.CharField(max_length=10, choices=[(b'path', b'BGP Path'), (b'direct', b'Direct Connection')])),
|
2020-06-06 22:01:51 +02:00
|
|
|
('as1', models.ForeignKey(related_name='peering1', to='bgpdata.AS', on_delete=models.CASCADE)),
|
|
|
|
('as2', models.ForeignKey(related_name='peering2', to='bgpdata.AS', on_delete=models.CASCADE)),
|
|
|
|
('router1', models.ForeignKey(related_name='peering1', default=None, to='bgpdata.BorderRouter', null=True, on_delete=models.CASCADE)),
|
|
|
|
('router2', models.ForeignKey(related_name='peering2', default=None, to='bgpdata.BorderRouter', null=True, on_delete=models.CASCADE)),
|
2015-03-23 01:42:31 +01:00
|
|
|
],
|
|
|
|
options={
|
|
|
|
},
|
|
|
|
bases=(models.Model,),
|
|
|
|
),
|
|
|
|
migrations.AddField(
|
|
|
|
model_name='as',
|
|
|
|
name='crawl',
|
2020-06-06 22:01:51 +02:00
|
|
|
field=models.ForeignKey(to='bgpdata.CrawlRun', on_delete=models.CASCADE),
|
2015-03-23 01:42:31 +01:00
|
|
|
preserve_default=True,
|
|
|
|
),
|
|
|
|
migrations.AddField(
|
|
|
|
model_name='announcement',
|
|
|
|
name='originAS',
|
2020-06-06 22:01:51 +02:00
|
|
|
field=models.ForeignKey(to='bgpdata.AS', on_delete=models.CASCADE),
|
2015-03-23 01:42:31 +01:00
|
|
|
preserve_default=True,
|
|
|
|
),
|
|
|
|
]
|