mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
* Move L2VPN and L2VPNTermination models from ipam to vpn * Move L2VPN resources from ipam to vpn * Extend migration to update content types * Misc cleanup
This commit is contained in:
@@ -9,6 +9,8 @@ __all__ = (
|
||||
'NestedIPSecPolicySerializer',
|
||||
'NestedIPSecProfileSerializer',
|
||||
'NestedIPSecProposalSerializer',
|
||||
'NestedL2VPNSerializer',
|
||||
'NestedL2VPNTerminationSerializer',
|
||||
'NestedTunnelSerializer',
|
||||
'NestedTunnelTerminationSerializer',
|
||||
)
|
||||
@@ -82,3 +84,28 @@ class NestedIPSecProfileSerializer(WritableNestedSerializer):
|
||||
class Meta:
|
||||
model = models.IPSecProfile
|
||||
fields = ('id', 'url', 'display', 'name')
|
||||
|
||||
|
||||
#
|
||||
# L2VPN
|
||||
#
|
||||
|
||||
class NestedL2VPNSerializer(WritableNestedSerializer):
|
||||
url = serializers.HyperlinkedIdentityField(view_name='vpn-api:l2vpn-detail')
|
||||
|
||||
class Meta:
|
||||
model = models.L2VPN
|
||||
fields = [
|
||||
'id', 'url', 'display', 'identifier', 'name', 'slug', 'type'
|
||||
]
|
||||
|
||||
|
||||
class NestedL2VPNTerminationSerializer(WritableNestedSerializer):
|
||||
url = serializers.HyperlinkedIdentityField(view_name='vpn-api:l2vpntermination-detail')
|
||||
l2vpn = NestedL2VPNSerializer()
|
||||
|
||||
class Meta:
|
||||
model = models.L2VPNTermination
|
||||
fields = [
|
||||
'id', 'url', 'display', 'l2vpn'
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user