|
|
@@ -16,6 +16,30 @@ class Migration(migrations.Migration):
|
|
|
]
|
|
|
|
|
|
operations = [
|
|
|
+ # IKE
|
|
|
+ migrations.CreateModel(
|
|
|
+ name='IKEProposal',
|
|
|
+ fields=[
|
|
|
+ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
|
|
|
+ ('created', models.DateTimeField(auto_now_add=True, null=True)),
|
|
|
+ ('last_updated', models.DateTimeField(auto_now=True, null=True)),
|
|
|
+ ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
|
|
|
+ ('description', models.CharField(blank=True, max_length=200)),
|
|
|
+ ('comments', models.TextField(blank=True)),
|
|
|
+ ('name', models.CharField(max_length=100, unique=True)),
|
|
|
+ ('authentication_method', models.CharField()),
|
|
|
+ ('encryption_algorithm', models.CharField()),
|
|
|
+ ('authentication_algorithm', models.CharField()),
|
|
|
+ ('group', models.PositiveSmallIntegerField()),
|
|
|
+ ('sa_lifetime', models.PositiveIntegerField(blank=True, null=True)),
|
|
|
+ ('tags', taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag')),
|
|
|
+ ],
|
|
|
+ options={
|
|
|
+ 'verbose_name': 'IKE proposal',
|
|
|
+ 'verbose_name_plural': 'IKE proposals',
|
|
|
+ 'ordering': ('name',),
|
|
|
+ },
|
|
|
+ ),
|
|
|
migrations.CreateModel(
|
|
|
name='IKEPolicy',
|
|
|
fields=[
|
|
|
@@ -36,6 +60,40 @@ class Migration(migrations.Migration):
|
|
|
'ordering': ('name',),
|
|
|
},
|
|
|
),
|
|
|
+ migrations.AddField(
|
|
|
+ model_name='ikepolicy',
|
|
|
+ name='proposals',
|
|
|
+ field=models.ManyToManyField(related_name='ike_policies', to='vpn.ikeproposal'),
|
|
|
+ ),
|
|
|
+ migrations.AddField(
|
|
|
+ model_name='ikepolicy',
|
|
|
+ name='tags',
|
|
|
+ field=taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag'),
|
|
|
+ ),
|
|
|
+
|
|
|
+ # IPSec
|
|
|
+ migrations.CreateModel(
|
|
|
+ name='IPSecProposal',
|
|
|
+ fields=[
|
|
|
+ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
|
|
|
+ ('created', models.DateTimeField(auto_now_add=True, null=True)),
|
|
|
+ ('last_updated', models.DateTimeField(auto_now=True, null=True)),
|
|
|
+ ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
|
|
|
+ ('description', models.CharField(blank=True, max_length=200)),
|
|
|
+ ('comments', models.TextField(blank=True)),
|
|
|
+ ('name', models.CharField(max_length=100, unique=True)),
|
|
|
+ ('encryption_algorithm', models.CharField()),
|
|
|
+ ('authentication_algorithm', models.CharField()),
|
|
|
+ ('sa_lifetime_seconds', models.PositiveIntegerField(blank=True, null=True)),
|
|
|
+ ('sa_lifetime_data', models.PositiveIntegerField(blank=True, null=True)),
|
|
|
+ ('tags', taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag')),
|
|
|
+ ],
|
|
|
+ options={
|
|
|
+ 'verbose_name': 'IPSec proposal',
|
|
|
+ 'verbose_name_plural': 'IPSec proposals',
|
|
|
+ 'ordering': ('name',),
|
|
|
+ },
|
|
|
+ ),
|
|
|
migrations.CreateModel(
|
|
|
name='IPSecPolicy',
|
|
|
fields=[
|
|
|
@@ -54,6 +112,16 @@ class Migration(migrations.Migration):
|
|
|
'ordering': ('name',),
|
|
|
},
|
|
|
),
|
|
|
+ migrations.AddField(
|
|
|
+ model_name='ipsecpolicy',
|
|
|
+ name='proposals',
|
|
|
+ field=models.ManyToManyField(related_name='ipsec_policies', to='vpn.ipsecproposal'),
|
|
|
+ ),
|
|
|
+ migrations.AddField(
|
|
|
+ model_name='ipsecpolicy',
|
|
|
+ name='tags',
|
|
|
+ field=taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag'),
|
|
|
+ ),
|
|
|
migrations.CreateModel(
|
|
|
name='IPSecProfile',
|
|
|
fields=[
|
|
|
@@ -75,6 +143,30 @@ class Migration(migrations.Migration):
|
|
|
'ordering': ('name',),
|
|
|
},
|
|
|
),
|
|
|
+
|
|
|
+ # Tunnels
|
|
|
+ migrations.CreateModel(
|
|
|
+ name='TunnelGroup',
|
|
|
+ fields=[
|
|
|
+ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
|
|
|
+ ('created', models.DateTimeField(auto_now_add=True, null=True)),
|
|
|
+ ('last_updated', models.DateTimeField(auto_now=True, null=True)),
|
|
|
+ ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
|
|
|
+ ('name', models.CharField(max_length=100, unique=True)),
|
|
|
+ ('slug', models.SlugField(max_length=100, unique=True)),
|
|
|
+ ('description', models.CharField(blank=True, max_length=200)),
|
|
|
+ ],
|
|
|
+ options={
|
|
|
+ 'verbose_name': 'tunnel group',
|
|
|
+ 'verbose_name_plural': 'tunnel groups',
|
|
|
+ 'ordering': ('name',),
|
|
|
+ },
|
|
|
+ ),
|
|
|
+ migrations.AddField(
|
|
|
+ model_name='tunnelgroup',
|
|
|
+ name='tags',
|
|
|
+ field=taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag'),
|
|
|
+ ),
|
|
|
migrations.CreateModel(
|
|
|
name='Tunnel',
|
|
|
fields=[
|
|
|
@@ -86,6 +178,7 @@ class Migration(migrations.Migration):
|
|
|
('comments', models.TextField(blank=True)),
|
|
|
('name', models.CharField(max_length=100, unique=True)),
|
|
|
('status', models.CharField(default='active', max_length=50)),
|
|
|
+ ('group', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='tunnels', to='vpn.tunnelgroup')),
|
|
|
('encapsulation', models.CharField(max_length=50)),
|
|
|
('tunnel_id', models.PositiveBigIntegerField(blank=True, null=True)),
|
|
|
('ipsec_profile', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='tunnels', to='vpn.ipsecprofile')),
|
|
|
@@ -98,6 +191,14 @@ class Migration(migrations.Migration):
|
|
|
'ordering': ('name',),
|
|
|
},
|
|
|
),
|
|
|
+ migrations.AddConstraint(
|
|
|
+ model_name='tunnel',
|
|
|
+ constraint=models.UniqueConstraint(fields=('group', 'name'), name='vpn_tunnel_group_name'),
|
|
|
+ ),
|
|
|
+ migrations.AddConstraint(
|
|
|
+ model_name='tunnel',
|
|
|
+ constraint=models.UniqueConstraint(condition=models.Q(('group__isnull', True)), fields=('name',), name='vpn_tunnel_name'),
|
|
|
+ ),
|
|
|
migrations.CreateModel(
|
|
|
name='TunnelTermination',
|
|
|
fields=[
|
|
|
@@ -118,71 +219,6 @@ class Migration(migrations.Migration):
|
|
|
'ordering': ('tunnel', 'role', 'pk'),
|
|
|
},
|
|
|
),
|
|
|
- migrations.CreateModel(
|
|
|
- name='IPSecProposal',
|
|
|
- fields=[
|
|
|
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
|
|
|
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
|
|
|
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
|
|
|
- ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
|
|
|
- ('description', models.CharField(blank=True, max_length=200)),
|
|
|
- ('comments', models.TextField(blank=True)),
|
|
|
- ('name', models.CharField(max_length=100, unique=True)),
|
|
|
- ('encryption_algorithm', models.CharField()),
|
|
|
- ('authentication_algorithm', models.CharField()),
|
|
|
- ('sa_lifetime_seconds', models.PositiveIntegerField(blank=True, null=True)),
|
|
|
- ('sa_lifetime_data', models.PositiveIntegerField(blank=True, null=True)),
|
|
|
- ('tags', taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag')),
|
|
|
- ],
|
|
|
- options={
|
|
|
- 'verbose_name': 'IPSec proposal',
|
|
|
- 'verbose_name_plural': 'IPSec proposals',
|
|
|
- 'ordering': ('name',),
|
|
|
- },
|
|
|
- ),
|
|
|
- migrations.AddField(
|
|
|
- model_name='ipsecpolicy',
|
|
|
- name='proposals',
|
|
|
- field=models.ManyToManyField(related_name='ipsec_policies', to='vpn.ipsecproposal'),
|
|
|
- ),
|
|
|
- migrations.AddField(
|
|
|
- model_name='ipsecpolicy',
|
|
|
- name='tags',
|
|
|
- field=taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag'),
|
|
|
- ),
|
|
|
- migrations.CreateModel(
|
|
|
- name='IKEProposal',
|
|
|
- fields=[
|
|
|
- ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
|
|
|
- ('created', models.DateTimeField(auto_now_add=True, null=True)),
|
|
|
- ('last_updated', models.DateTimeField(auto_now=True, null=True)),
|
|
|
- ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
|
|
|
- ('description', models.CharField(blank=True, max_length=200)),
|
|
|
- ('comments', models.TextField(blank=True)),
|
|
|
- ('name', models.CharField(max_length=100, unique=True)),
|
|
|
- ('authentication_method', models.CharField()),
|
|
|
- ('encryption_algorithm', models.CharField()),
|
|
|
- ('authentication_algorithm', models.CharField()),
|
|
|
- ('group', models.PositiveSmallIntegerField()),
|
|
|
- ('sa_lifetime', models.PositiveIntegerField(blank=True, null=True)),
|
|
|
- ('tags', taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag')),
|
|
|
- ],
|
|
|
- options={
|
|
|
- 'verbose_name': 'IKE proposal',
|
|
|
- 'verbose_name_plural': 'IKE proposals',
|
|
|
- 'ordering': ('name',),
|
|
|
- },
|
|
|
- ),
|
|
|
- migrations.AddField(
|
|
|
- model_name='ikepolicy',
|
|
|
- name='proposals',
|
|
|
- field=models.ManyToManyField(related_name='ike_policies', to='vpn.ikeproposal'),
|
|
|
- ),
|
|
|
- migrations.AddField(
|
|
|
- model_name='ikepolicy',
|
|
|
- name='tags',
|
|
|
- field=taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag'),
|
|
|
- ),
|
|
|
migrations.AddConstraint(
|
|
|
model_name='tunneltermination',
|
|
|
constraint=models.UniqueConstraint(fields=('termination_type', 'termination_id'), name='vpn_tunneltermination_termination', violation_error_message='An object may be terminated to only one tunnel at a time.'),
|