Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #14706: Relax one-to-one mapping of tunnel termination to IP address #14711

Merged
merged 1 commit into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generated by Django 4.2.8 on 2024-01-05 19:31

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
('ipam', '0069_gfk_indexes'),
('vpn', '0002_move_l2vpn'),
]

operations = [
migrations.AlterField(
model_name='tunneltermination',
name='outside_ip',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='tunnel_terminations', to='ipam.ipaddress'),
),
]
4 changes: 2 additions & 2 deletions netbox/vpn/models/tunnels.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@ class TunnelTermination(CustomFieldsMixin, CustomLinksMixin, TagsMixin, ChangeLo
ct_field='termination_type',
fk_field='termination_id'
)
outside_ip = models.OneToOneField(
outside_ip = models.ForeignKey(
to='ipam.IPAddress',
on_delete=models.PROTECT,
related_name='tunnel_termination',
related_name='tunnel_terminations',
blank=True,
null=True
)
Expand Down