dnmapper/bgpdata/migrations/0001_initial.py

98 lines
3.8 KiB
Python

# -*- 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)),
('AS', models.ForeignKey(to='bgpdata.AS', on_delete=models.CASCADE)),
],
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')])),
('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)),
],
options={
},
bases=(models.Model,),
),
migrations.AddField(
model_name='as',
name='crawl',
field=models.ForeignKey(to='bgpdata.CrawlRun', on_delete=models.CASCADE),
preserve_default=True,
),
migrations.AddField(
model_name='announcement',
name='originAS',
field=models.ForeignKey(to='bgpdata.AS', on_delete=models.CASCADE),
preserve_default=True,
),
]