Przeglądaj źródła

#6346: Add 'bridge' interface type

jeremystretch 4 lat temu
rodzic
commit
61d2158f76

+ 1 - 1
docs/release-notes/version-3.1.md

@@ -45,7 +45,7 @@ Multiple conditions may be nested using AND/OR logic as well. For more informati
 
 #### Interface Bridging ([#6346](https://github.com/netbox-community/netbox/issues/6346))
 
-A `bridge` field has been added to the interface model for devices and virtual machines. This can be set to reference another interface on the same parent device/VM to indicate a direct layer two bridging adjacency.
+A `bridge` field has been added to the interface model for devices and virtual machines. This can be set to reference another interface on the same parent device/VM to indicate a direct layer two bridging adjacency. Additionally, "bridge" has been added as an interface type. (However, interfaces of any type may be designated as bridged.)
 
 Multiple interfaces can be bridged to a single virtual interface to effect a bridge group. Alternatively, two physical interfaces can be bridged to one another, to effect an internal cross-connect.
 

+ 2 - 0
netbox/dcim/choices.py

@@ -720,6 +720,7 @@ class InterfaceTypeChoices(ChoiceSet):
 
     # Virtual
     TYPE_VIRTUAL = 'virtual'
+    TYPE_BRIDGE = 'bridge'
     TYPE_LAG = 'lag'
 
     # Ethernet
@@ -820,6 +821,7 @@ class InterfaceTypeChoices(ChoiceSet):
             'Virtual interfaces',
             (
                 (TYPE_VIRTUAL, 'Virtual'),
+                (TYPE_BRIDGE, 'Bridge'),
                 (TYPE_LAG, 'Link Aggregation Group (LAG)'),
             ),
         ),

+ 1 - 0
netbox/dcim/constants.py

@@ -34,6 +34,7 @@ INTERFACE_MTU_MAX = 65536
 VIRTUAL_IFACE_TYPES = [
     InterfaceTypeChoices.TYPE_VIRTUAL,
     InterfaceTypeChoices.TYPE_LAG,
+    InterfaceTypeChoices.TYPE_BRIDGE,
 ]
 
 WIRELESS_IFACE_TYPES = [