1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Merge pull request #9631 from netbox-community/8157-l2vpn

Closes: #8157 - Add L2VPN support
This commit is contained in:
Jeremy Stretch
2022-07-06 13:14:21 -04:00
committed by GitHub
37 changed files with 1545 additions and 8 deletions

View File

@@ -649,6 +649,12 @@ class Interface(ModularComponentModel, BaseInterface, LinkTermination, PathEndpo
object_id_field='interface_id',
related_query_name='+'
)
l2vpn_terminations = GenericRelation(
to='ipam.L2VPNTermination',
content_type_field='assigned_object_type',
object_id_field='assigned_object_id',
related_query_name='interface',
)
clone_fields = ['device', 'parent', 'bridge', 'lag', 'type', 'mgmt_only', 'poe_mode', 'poe_type']
@@ -823,6 +829,10 @@ class Interface(ModularComponentModel, BaseInterface, LinkTermination, PathEndpo
def link(self):
return self.cable or self.wireless_link
@property
def l2vpn_termination(self):
return self.l2vpn_terminations.first()
#
# Pass-through ports