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

Add bridge to InterfaceTemplate

This commit is contained in:
kkthxbye-code
2023-03-01 16:05:41 +01:00
committed by Jeremy Stretch
parent c44eb65993
commit a74ae46f86
6 changed files with 78 additions and 4 deletions

View File

@@ -475,6 +475,7 @@ class InterfaceTemplateSerializer(ValidatedModelSerializer):
default=None
)
type = ChoiceField(choices=InterfaceTypeChoices)
bridge = NestedInterfaceTemplateSerializer(required=False, allow_null=True)
poe_mode = ChoiceField(
choices=InterfacePoEModeChoices,
required=False,
@@ -489,7 +490,7 @@ class InterfaceTemplateSerializer(ValidatedModelSerializer):
class Meta:
model = InterfaceTemplate
fields = [
'id', 'url', 'display', 'device_type', 'module_type', 'name', 'label', 'type', 'enabled', 'mgmt_only', 'description',
'id', 'url', 'display', 'device_type', 'module_type', 'name', 'label', 'type', 'bridge', 'enabled', 'mgmt_only', 'description',
'poe_mode', 'poe_type', 'created', 'last_updated',
]