2020-08-01 16:38:38 +00:00
|
|
|
# Generated by Django 3.0.6 on 2020-08-01 16:38
|
2020-04-03 17:27:49 +00:00
|
|
|
|
|
|
|
from django.conf import settings
|
|
|
|
import django.contrib.postgres.fields.jsonb
|
|
|
|
import django.core.validators
|
|
|
|
from django.db import migrations, models
|
|
|
|
import django.db.models.deletion
|
|
|
|
import uuid
|
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
initial = True
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
2020-06-21 12:35:12 +00:00
|
|
|
('uncloud_pay', '__first__'),
|
2020-04-03 17:27:49 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='MACAdress',
|
|
|
|
fields=[
|
|
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='VPNPool',
|
|
|
|
fields=[
|
|
|
|
('extra_data', django.contrib.postgres.fields.jsonb.JSONField(blank=True, editable=False, null=True)),
|
2020-04-07 17:45:16 +00:00
|
|
|
('uuid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
|
|
|
|
('network', models.GenericIPAddressField(unique=True)),
|
2020-04-03 17:27:49 +00:00
|
|
|
('network_size', models.IntegerField(validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(128)])),
|
2020-04-07 17:45:16 +00:00
|
|
|
('subnetwork_size', models.IntegerField(validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(128)])),
|
|
|
|
('vpn_hostname', models.CharField(max_length=256)),
|
|
|
|
('wireguard_private_key', models.CharField(max_length=48)),
|
2020-04-03 17:27:49 +00:00
|
|
|
],
|
|
|
|
options={
|
|
|
|
'abstract': False,
|
|
|
|
},
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
2020-04-07 17:45:16 +00:00
|
|
|
name='VPNNetworkReservation',
|
2020-04-03 17:27:49 +00:00
|
|
|
fields=[
|
|
|
|
('extra_data', django.contrib.postgres.fields.jsonb.JSONField(blank=True, editable=False, null=True)),
|
2020-04-07 17:45:16 +00:00
|
|
|
('address', models.GenericIPAddressField(primary_key=True, serialize=False)),
|
2020-06-21 12:35:12 +00:00
|
|
|
('status', models.CharField(choices=[('used', 'used'), ('free', 'free')], default='used', max_length=256)),
|
2020-04-07 17:45:16 +00:00
|
|
|
('vpnpool', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='uncloud_net.VPNPool')),
|
2020-04-03 17:27:49 +00:00
|
|
|
],
|
|
|
|
options={
|
|
|
|
'abstract': False,
|
|
|
|
},
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='VPNNetwork',
|
|
|
|
fields=[
|
2020-06-21 12:35:12 +00:00
|
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
2020-04-03 17:27:49 +00:00
|
|
|
('extra_data', django.contrib.postgres.fields.jsonb.JSONField(blank=True, editable=False, null=True)),
|
2020-06-21 12:35:12 +00:00
|
|
|
('status', models.CharField(choices=[('PENDING', 'Pending'), ('AWAITING_PAYMENT', 'Awaiting payment'), ('BEING_CREATED', 'Being created'), ('SCHEDULED', 'Scheduled'), ('ACTIVE', 'Active'), ('MODIFYING', 'Modifying'), ('DELETED', 'Deleted'), ('DISABLED', 'Disabled'), ('UNUSABLE', 'Unusable')], default='AWAITING_PAYMENT', max_length=32)),
|
2020-04-07 17:45:16 +00:00
|
|
|
('wireguard_public_key', models.CharField(max_length=48)),
|
2020-06-21 12:35:12 +00:00
|
|
|
('network', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, to='uncloud_net.VPNNetworkReservation')),
|
2020-04-07 17:45:16 +00:00
|
|
|
('order', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, to='uncloud_pay.Order')),
|
|
|
|
('owner', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
2020-04-03 17:27:49 +00:00
|
|
|
],
|
|
|
|
options={
|
|
|
|
'abstract': False,
|
|
|
|
},
|
|
|
|
),
|
|
|
|
]
|