From 1a2c9e3bba979e2c5c917245a0c68796a2a64135 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Fri, 12 Apr 2019 13:42:56 -0400 Subject: [PATCH 1/4] Rename form_factor to type on dcim.Interface --- netbox/dcim/api/serializers.py | 8 +- netbox/dcim/api/views.py | 4 +- netbox/dcim/constants.py | 254 +++---- netbox/dcim/filters.py | 18 +- netbox/dcim/fixtures/dcim.json | 628 +++++++++--------- netbox/dcim/forms.py | 36 +- netbox/dcim/managers.py | 2 +- .../0073_interface_form_factor_to_type.py | 23 + netbox/dcim/models.py | 48 +- netbox/dcim/tables.py | 4 +- netbox/dcim/tests/test_api.py | 22 +- netbox/dcim/tests/test_models.py | 2 +- netbox/dcim/tests/test_views.py | 14 +- .../templates/dcim/device_lldp_neighbors.html | 2 +- .../templates/dcim/inc/cable_trace_end.html | 2 +- netbox/templates/dcim/inc/interface.html | 4 +- netbox/templates/dcim/interface.html | 6 +- netbox/templates/dcim/interface_edit.html | 2 +- netbox/virtualization/api/serializers.py | 6 +- netbox/virtualization/forms.py | 22 +- netbox/virtualization/tests/test_api.py | 8 +- 21 files changed, 569 insertions(+), 546 deletions(-) create mode 100644 netbox/dcim/migrations/0073_interface_form_factor_to_type.py diff --git a/netbox/dcim/api/serializers.py b/netbox/dcim/api/serializers.py index c31dc5c09..fe0ea9da8 100644 --- a/netbox/dcim/api/serializers.py +++ b/netbox/dcim/api/serializers.py @@ -231,11 +231,11 @@ class PowerOutletTemplateSerializer(ValidatedModelSerializer): class InterfaceTemplateSerializer(ValidatedModelSerializer): device_type = NestedDeviceTypeSerializer() - form_factor = ChoiceField(choices=IFACE_FF_CHOICES, required=False) + type = ChoiceField(choices=IFACE_TYPE_CHOICES, required=False) class Meta: model = InterfaceTemplate - fields = ['id', 'device_type', 'name', 'form_factor', 'mgmt_only'] + fields = ['id', 'device_type', 'name', 'type', 'mgmt_only'] class RearPortTemplateSerializer(ValidatedModelSerializer): @@ -418,7 +418,7 @@ class PowerPortSerializer(TaggitSerializer, ConnectedEndpointSerializer): class InterfaceSerializer(TaggitSerializer, ConnectedEndpointSerializer): device = NestedDeviceSerializer() - form_factor = ChoiceField(choices=IFACE_FF_CHOICES, required=False) + type = ChoiceField(choices=IFACE_TYPE_CHOICES, required=False) lag = NestedInterfaceSerializer(required=False, allow_null=True) mode = ChoiceField(choices=IFACE_MODE_CHOICES, required=False, allow_null=True) untagged_vlan = NestedVLANSerializer(required=False, allow_null=True) @@ -434,7 +434,7 @@ class InterfaceSerializer(TaggitSerializer, ConnectedEndpointSerializer): class Meta: model = Interface fields = [ - 'id', 'device', 'name', 'form_factor', 'enabled', 'lag', 'mtu', 'mac_address', 'mgmt_only', 'description', + 'id', 'device', 'name', 'type', 'enabled', 'lag', 'mtu', 'mac_address', 'mgmt_only', 'description', 'connected_endpoint_type', 'connected_endpoint', 'connection_status', 'cable', 'mode', 'untagged_vlan', 'tagged_vlans', 'tags', 'count_ipaddresses', ] diff --git a/netbox/dcim/api/views.py b/netbox/dcim/api/views.py index 88d604505..f37c4d452 100644 --- a/netbox/dcim/api/views.py +++ b/netbox/dcim/api/views.py @@ -42,8 +42,8 @@ class DCIMFieldChoicesViewSet(FieldChoicesViewSet): (DeviceType, ['subdevice_role']), (FrontPort, ['type']), (FrontPortTemplate, ['type']), - (Interface, ['form_factor', 'mode']), - (InterfaceTemplate, ['form_factor']), + (Interface, ['type', 'mode']), + (InterfaceTemplate, ['type']), (PowerOutlet, ['feed_leg']), (PowerOutletTemplate, ['feed_leg']), (PowerPort, ['connection_status']), diff --git a/netbox/dcim/constants.py b/netbox/dcim/constants.py index 6c135254c..9f07abf18 100644 --- a/netbox/dcim/constants.py +++ b/netbox/dcim/constants.py @@ -66,200 +66,200 @@ IFACE_ORDERING_CHOICES = [ [IFACE_ORDERING_NAME, 'Name (alphabetically)'] ] -# Interface form factors +# Interface types # Virtual -IFACE_FF_VIRTUAL = 0 -IFACE_FF_LAG = 200 +IFACE_TYPE_VIRTUAL = 0 +IFACE_TYPE_LAG = 200 # Ethernet -IFACE_FF_100ME_FIXED = 800 -IFACE_FF_1GE_FIXED = 1000 -IFACE_FF_1GE_GBIC = 1050 -IFACE_FF_1GE_SFP = 1100 -IFACE_FF_10GE_FIXED = 1150 -IFACE_FF_10GE_CX4 = 1170 -IFACE_FF_10GE_SFP_PLUS = 1200 -IFACE_FF_10GE_XFP = 1300 -IFACE_FF_10GE_XENPAK = 1310 -IFACE_FF_10GE_X2 = 1320 -IFACE_FF_25GE_SFP28 = 1350 -IFACE_FF_40GE_QSFP_PLUS = 1400 -IFACE_FF_50GE_QSFP28 = 1420 -IFACE_FF_100GE_CFP = 1500 -IFACE_FF_100GE_CFP2 = 1510 -IFACE_FF_100GE_CFP4 = 1520 -IFACE_FF_100GE_CPAK = 1550 -IFACE_FF_100GE_QSFP28 = 1600 -IFACE_FF_200GE_CFP2 = 1650 -IFACE_FF_200GE_QSFP56 = 1700 -IFACE_FF_400GE_QSFP_DD = 1750 +IFACE_TYPE_100ME_FIXED = 800 +IFACE_TYPE_1GE_FIXED = 1000 +IFACE_TYPE_1GE_GBIC = 1050 +IFACE_TYPE_1GE_SFP = 1100 +IFACE_TYPE_10GE_FIXED = 1150 +IFACE_TYPE_10GE_CX4 = 1170 +IFACE_TYPE_10GE_SFP_PLUS = 1200 +IFACE_TYPE_10GE_XFP = 1300 +IFACE_TYPE_10GE_XENPAK = 1310 +IFACE_TYPE_10GE_X2 = 1320 +IFACE_TYPE_25GE_SFP28 = 1350 +IFACE_TYPE_40GE_QSFP_PLUS = 1400 +IFACE_TYPE_50GE_QSFP28 = 1420 +IFACE_TYPE_100GE_CFP = 1500 +IFACE_TYPE_100GE_CFP2 = 1510 +IFACE_TYPE_100GE_CFP4 = 1520 +IFACE_TYPE_100GE_CPAK = 1550 +IFACE_TYPE_100GE_QSFP28 = 1600 +IFACE_TYPE_200GE_CFP2 = 1650 +IFACE_TYPE_200GE_QSFP56 = 1700 +IFACE_TYPE_400GE_QSFP_DD = 1750 # Wireless -IFACE_FF_80211A = 2600 -IFACE_FF_80211G = 2610 -IFACE_FF_80211N = 2620 -IFACE_FF_80211AC = 2630 -IFACE_FF_80211AD = 2640 +IFACE_TYPE_80211A = 2600 +IFACE_TYPE_80211G = 2610 +IFACE_TYPE_80211N = 2620 +IFACE_TYPE_80211AC = 2630 +IFACE_TYPE_80211AD = 2640 # Cellular -IFACE_FF_GSM = 2810 -IFACE_FF_CDMA = 2820 -IFACE_FF_LTE = 2830 +IFACE_TYPE_GSM = 2810 +IFACE_TYPE_CDMA = 2820 +IFACE_TYPE_LTE = 2830 # SONET -IFACE_FF_SONET_OC3 = 6100 -IFACE_FF_SONET_OC12 = 6200 -IFACE_FF_SONET_OC48 = 6300 -IFACE_FF_SONET_OC192 = 6400 -IFACE_FF_SONET_OC768 = 6500 -IFACE_FF_SONET_OC1920 = 6600 -IFACE_FF_SONET_OC3840 = 6700 +IFACE_TYPE_SONET_OC3 = 6100 +IFACE_TYPE_SONET_OC12 = 6200 +IFACE_TYPE_SONET_OC48 = 6300 +IFACE_TYPE_SONET_OC192 = 6400 +IFACE_TYPE_SONET_OC768 = 6500 +IFACE_TYPE_SONET_OC1920 = 6600 +IFACE_TYPE_SONET_OC3840 = 6700 # Fibrechannel -IFACE_FF_1GFC_SFP = 3010 -IFACE_FF_2GFC_SFP = 3020 -IFACE_FF_4GFC_SFP = 3040 -IFACE_FF_8GFC_SFP_PLUS = 3080 -IFACE_FF_16GFC_SFP_PLUS = 3160 -IFACE_FF_32GFC_SFP28 = 3320 -IFACE_FF_128GFC_QSFP28 = 3400 +IFACE_TYPE_1GFC_SFP = 3010 +IFACE_TYPE_2GFC_SFP = 3020 +IFACE_TYPE_4GFC_SFP = 3040 +IFACE_TYPE_8GFC_SFP_PLUS = 3080 +IFACE_TYPE_16GFC_SFP_PLUS = 3160 +IFACE_TYPE_32GFC_SFP28 = 3320 +IFACE_TYPE_128GFC_QSFP28 = 3400 # Serial -IFACE_FF_T1 = 4000 -IFACE_FF_E1 = 4010 -IFACE_FF_T3 = 4040 -IFACE_FF_E3 = 4050 +IFACE_TYPE_T1 = 4000 +IFACE_TYPE_E1 = 4010 +IFACE_TYPE_T3 = 4040 +IFACE_TYPE_E3 = 4050 # Stacking -IFACE_FF_STACKWISE = 5000 -IFACE_FF_STACKWISE_PLUS = 5050 -IFACE_FF_FLEXSTACK = 5100 -IFACE_FF_FLEXSTACK_PLUS = 5150 -IFACE_FF_JUNIPER_VCP = 5200 -IFACE_FF_SUMMITSTACK = 5300 -IFACE_FF_SUMMITSTACK128 = 5310 -IFACE_FF_SUMMITSTACK256 = 5320 -IFACE_FF_SUMMITSTACK512 = 5330 +IFACE_TYPE_STACKWISE = 5000 +IFACE_TYPE_STACKWISE_PLUS = 5050 +IFACE_TYPE_FLEXSTACK = 5100 +IFACE_TYPE_FLEXSTACK_PLUS = 5150 +IFACE_TYPE_JUNIPER_VCP = 5200 +IFACE_TYPE_SUMMITSTACK = 5300 +IFACE_TYPE_SUMMITSTACK128 = 5310 +IFACE_TYPE_SUMMITSTACK256 = 5320 +IFACE_TYPE_SUMMITSTACK512 = 5330 # Other -IFACE_FF_OTHER = 32767 +IFACE_TYPE_OTHER = 32767 -IFACE_FF_CHOICES = [ +IFACE_TYPE_CHOICES = [ [ 'Virtual interfaces', [ - [IFACE_FF_VIRTUAL, 'Virtual'], - [IFACE_FF_LAG, 'Link Aggregation Group (LAG)'], + [IFACE_TYPE_VIRTUAL, 'Virtual'], + [IFACE_TYPE_LAG, 'Link Aggregation Group (LAG)'], ], ], [ 'Ethernet (fixed)', [ - [IFACE_FF_100ME_FIXED, '100BASE-TX (10/100ME)'], - [IFACE_FF_1GE_FIXED, '1000BASE-T (1GE)'], - [IFACE_FF_10GE_FIXED, '10GBASE-T (10GE)'], - [IFACE_FF_10GE_CX4, '10GBASE-CX4 (10GE)'], + [IFACE_TYPE_100ME_FIXED, '100BASE-TX (10/100ME)'], + [IFACE_TYPE_1GE_FIXED, '1000BASE-T (1GE)'], + [IFACE_TYPE_10GE_FIXED, '10GBASE-T (10GE)'], + [IFACE_TYPE_10GE_CX4, '10GBASE-CX4 (10GE)'], ] ], [ 'Ethernet (modular)', [ - [IFACE_FF_1GE_GBIC, 'GBIC (1GE)'], - [IFACE_FF_1GE_SFP, 'SFP (1GE)'], - [IFACE_FF_10GE_SFP_PLUS, 'SFP+ (10GE)'], - [IFACE_FF_10GE_XFP, 'XFP (10GE)'], - [IFACE_FF_10GE_XENPAK, 'XENPAK (10GE)'], - [IFACE_FF_10GE_X2, 'X2 (10GE)'], - [IFACE_FF_25GE_SFP28, 'SFP28 (25GE)'], - [IFACE_FF_40GE_QSFP_PLUS, 'QSFP+ (40GE)'], - [IFACE_FF_50GE_QSFP28, 'QSFP28 (50GE)'], - [IFACE_FF_100GE_CFP, 'CFP (100GE)'], - [IFACE_FF_100GE_CFP2, 'CFP2 (100GE)'], - [IFACE_FF_200GE_CFP2, 'CFP2 (200GE)'], - [IFACE_FF_100GE_CFP4, 'CFP4 (100GE)'], - [IFACE_FF_100GE_CPAK, 'Cisco CPAK (100GE)'], - [IFACE_FF_100GE_QSFP28, 'QSFP28 (100GE)'], - [IFACE_FF_200GE_QSFP56, 'QSFP56 (200GE)'], - [IFACE_FF_400GE_QSFP_DD, 'QSFP-DD (400GE)'], + [IFACE_TYPE_1GE_GBIC, 'GBIC (1GE)'], + [IFACE_TYPE_1GE_SFP, 'SFP (1GE)'], + [IFACE_TYPE_10GE_SFP_PLUS, 'SFP+ (10GE)'], + [IFACE_TYPE_10GE_XFP, 'XFP (10GE)'], + [IFACE_TYPE_10GE_XENPAK, 'XENPAK (10GE)'], + [IFACE_TYPE_10GE_X2, 'X2 (10GE)'], + [IFACE_TYPE_25GE_SFP28, 'SFP28 (25GE)'], + [IFACE_TYPE_40GE_QSFP_PLUS, 'QSFP+ (40GE)'], + [IFACE_TYPE_50GE_QSFP28, 'QSFP28 (50GE)'], + [IFACE_TYPE_100GE_CFP, 'CFP (100GE)'], + [IFACE_TYPE_100GE_CFP2, 'CFP2 (100GE)'], + [IFACE_TYPE_200GE_CFP2, 'CFP2 (200GE)'], + [IFACE_TYPE_100GE_CFP4, 'CFP4 (100GE)'], + [IFACE_TYPE_100GE_CPAK, 'Cisco CPAK (100GE)'], + [IFACE_TYPE_100GE_QSFP28, 'QSFP28 (100GE)'], + [IFACE_TYPE_200GE_QSFP56, 'QSFP56 (200GE)'], + [IFACE_TYPE_400GE_QSFP_DD, 'QSFP-DD (400GE)'], ] ], [ 'Wireless', [ - [IFACE_FF_80211A, 'IEEE 802.11a'], - [IFACE_FF_80211G, 'IEEE 802.11b/g'], - [IFACE_FF_80211N, 'IEEE 802.11n'], - [IFACE_FF_80211AC, 'IEEE 802.11ac'], - [IFACE_FF_80211AD, 'IEEE 802.11ad'], + [IFACE_TYPE_80211A, 'IEEE 802.11a'], + [IFACE_TYPE_80211G, 'IEEE 802.11b/g'], + [IFACE_TYPE_80211N, 'IEEE 802.11n'], + [IFACE_TYPE_80211AC, 'IEEE 802.11ac'], + [IFACE_TYPE_80211AD, 'IEEE 802.11ad'], ] ], [ 'Cellular', [ - [IFACE_FF_GSM, 'GSM'], - [IFACE_FF_CDMA, 'CDMA'], - [IFACE_FF_LTE, 'LTE'], + [IFACE_TYPE_GSM, 'GSM'], + [IFACE_TYPE_CDMA, 'CDMA'], + [IFACE_TYPE_LTE, 'LTE'], ] ], [ 'SONET', [ - [IFACE_FF_SONET_OC3, 'OC-3/STM-1'], - [IFACE_FF_SONET_OC12, 'OC-12/STM-4'], - [IFACE_FF_SONET_OC48, 'OC-48/STM-16'], - [IFACE_FF_SONET_OC192, 'OC-192/STM-64'], - [IFACE_FF_SONET_OC768, 'OC-768/STM-256'], - [IFACE_FF_SONET_OC1920, 'OC-1920/STM-640'], - [IFACE_FF_SONET_OC3840, 'OC-3840/STM-1234'], + [IFACE_TYPE_SONET_OC3, 'OC-3/STM-1'], + [IFACE_TYPE_SONET_OC12, 'OC-12/STM-4'], + [IFACE_TYPE_SONET_OC48, 'OC-48/STM-16'], + [IFACE_TYPE_SONET_OC192, 'OC-192/STM-64'], + [IFACE_TYPE_SONET_OC768, 'OC-768/STM-256'], + [IFACE_TYPE_SONET_OC1920, 'OC-1920/STM-640'], + [IFACE_TYPE_SONET_OC3840, 'OC-3840/STM-1234'], ] ], [ 'FibreChannel', [ - [IFACE_FF_1GFC_SFP, 'SFP (1GFC)'], - [IFACE_FF_2GFC_SFP, 'SFP (2GFC)'], - [IFACE_FF_4GFC_SFP, 'SFP (4GFC)'], - [IFACE_FF_8GFC_SFP_PLUS, 'SFP+ (8GFC)'], - [IFACE_FF_16GFC_SFP_PLUS, 'SFP+ (16GFC)'], - [IFACE_FF_32GFC_SFP28, 'SFP28 (32GFC)'], - [IFACE_FF_128GFC_QSFP28, 'QSFP28 (128GFC)'], + [IFACE_TYPE_1GFC_SFP, 'SFP (1GFC)'], + [IFACE_TYPE_2GFC_SFP, 'SFP (2GFC)'], + [IFACE_TYPE_4GFC_SFP, 'SFP (4GFC)'], + [IFACE_TYPE_8GFC_SFP_PLUS, 'SFP+ (8GFC)'], + [IFACE_TYPE_16GFC_SFP_PLUS, 'SFP+ (16GFC)'], + [IFACE_TYPE_32GFC_SFP28, 'SFP28 (32GFC)'], + [IFACE_TYPE_128GFC_QSFP28, 'QSFP28 (128GFC)'], ] ], [ 'Serial', [ - [IFACE_FF_T1, 'T1 (1.544 Mbps)'], - [IFACE_FF_E1, 'E1 (2.048 Mbps)'], - [IFACE_FF_T3, 'T3 (45 Mbps)'], - [IFACE_FF_E3, 'E3 (34 Mbps)'], + [IFACE_TYPE_T1, 'T1 (1.544 Mbps)'], + [IFACE_TYPE_E1, 'E1 (2.048 Mbps)'], + [IFACE_TYPE_T3, 'T3 (45 Mbps)'], + [IFACE_TYPE_E3, 'E3 (34 Mbps)'], ] ], [ 'Stacking', [ - [IFACE_FF_STACKWISE, 'Cisco StackWise'], - [IFACE_FF_STACKWISE_PLUS, 'Cisco StackWise Plus'], - [IFACE_FF_FLEXSTACK, 'Cisco FlexStack'], - [IFACE_FF_FLEXSTACK_PLUS, 'Cisco FlexStack Plus'], - [IFACE_FF_JUNIPER_VCP, 'Juniper VCP'], - [IFACE_FF_SUMMITSTACK, 'Extreme SummitStack'], - [IFACE_FF_SUMMITSTACK128, 'Extreme SummitStack-128'], - [IFACE_FF_SUMMITSTACK256, 'Extreme SummitStack-256'], - [IFACE_FF_SUMMITSTACK512, 'Extreme SummitStack-512'], + [IFACE_TYPE_STACKWISE, 'Cisco StackWise'], + [IFACE_TYPE_STACKWISE_PLUS, 'Cisco StackWise Plus'], + [IFACE_TYPE_FLEXSTACK, 'Cisco FlexStack'], + [IFACE_TYPE_FLEXSTACK_PLUS, 'Cisco FlexStack Plus'], + [IFACE_TYPE_JUNIPER_VCP, 'Juniper VCP'], + [IFACE_TYPE_SUMMITSTACK, 'Extreme SummitStack'], + [IFACE_TYPE_SUMMITSTACK128, 'Extreme SummitStack-128'], + [IFACE_TYPE_SUMMITSTACK256, 'Extreme SummitStack-256'], + [IFACE_TYPE_SUMMITSTACK512, 'Extreme SummitStack-512'], ] ], [ 'Other', [ - [IFACE_FF_OTHER, 'Other'], + [IFACE_TYPE_OTHER, 'Other'], ] ], ] VIRTUAL_IFACE_TYPES = [ - IFACE_FF_VIRTUAL, - IFACE_FF_LAG, + IFACE_TYPE_VIRTUAL, + IFACE_TYPE_LAG, ] WIRELESS_IFACE_TYPES = [ - IFACE_FF_80211A, - IFACE_FF_80211G, - IFACE_FF_80211N, - IFACE_FF_80211AC, - IFACE_FF_80211AD, + IFACE_TYPE_80211A, + IFACE_TYPE_80211G, + IFACE_TYPE_80211N, + IFACE_TYPE_80211AC, + IFACE_TYPE_80211AD, ] NONCONNECTABLE_IFACE_TYPES = VIRTUAL_IFACE_TYPES + WIRELESS_IFACE_TYPES diff --git a/netbox/dcim/filters.py b/netbox/dcim/filters.py index ea535f4f2..c1fc76191 100644 --- a/netbox/dcim/filters.py +++ b/netbox/dcim/filters.py @@ -400,7 +400,7 @@ class InterfaceTemplateFilter(DeviceTypeComponentFilterSet): class Meta: model = InterfaceTemplate - fields = ['name', 'form_factor', 'mgmt_only'] + fields = ['name', 'type', 'mgmt_only'] class FrontPortTemplateFilter(DeviceTypeComponentFilterSet): @@ -753,7 +753,8 @@ class InterfaceFilter(django_filters.FilterSet): lookup_expr='isnull', exclude=True ) - type = django_filters.CharFilter( + class_ = django_filters.CharFilter( + field_name='class', method='filter_type', label='Interface type', ) @@ -775,14 +776,14 @@ class InterfaceFilter(django_filters.FilterSet): method='filter_vlan', label='Assigned VID' ) - form_factor = django_filters.MultipleChoiceFilter( - choices=IFACE_FF_CHOICES, + type = django_filters.MultipleChoiceFilter( + choices=IFACE_TYPE_CHOICES, null_value=None ) class Meta: model = Interface - fields = ['name', 'connection_status', 'form_factor', 'enabled', 'mtu', 'mgmt_only', 'description'] + fields = ['name', 'connection_status', 'type', 'enabled', 'mtu', 'mgmt_only', 'description'] def search(self, queryset, name, value): if not value.strip(): @@ -821,10 +822,9 @@ class InterfaceFilter(django_filters.FilterSet): def filter_type(self, queryset, name, value): value = value.strip().lower() return { - 'physical': queryset.exclude(form_factor__in=NONCONNECTABLE_IFACE_TYPES), - 'virtual': queryset.filter(form_factor__in=VIRTUAL_IFACE_TYPES), - 'wireless': queryset.filter(form_factor__in=WIRELESS_IFACE_TYPES), - 'lag': queryset.filter(form_factor=IFACE_FF_LAG), + 'physical': queryset.exclude(type__in=NONCONNECTABLE_IFACE_TYPES), + 'virtual': queryset.filter(type__in=VIRTUAL_IFACE_TYPES), + 'wireless': queryset.filter(type__in=WIRELESS_IFACE_TYPES), }.get(value, queryset.none()) def _mac_address(self, queryset, name, value): diff --git a/netbox/dcim/fixtures/dcim.json b/netbox/dcim/fixtures/dcim.json index cdcc860e8..ece19a83c 100644 --- a/netbox/dcim/fixtures/dcim.json +++ b/netbox/dcim/fixtures/dcim.json @@ -902,7 +902,7 @@ "fields": { "device_type": 1, "name": "fxp0 (RE0)", - "form_factor": 1000, + "type": 1000, "mgmt_only": true } }, @@ -912,7 +912,7 @@ "fields": { "device_type": 1, "name": "fxp0 (RE1)", - "form_factor": 800, + "type": 800, "mgmt_only": true } }, @@ -922,7 +922,7 @@ "fields": { "device_type": 1, "name": "lo0", - "form_factor": 0, + "type": 0, "mgmt_only": false } }, @@ -932,7 +932,7 @@ "fields": { "device_type": 2, "name": "fxp0 (RE0)", - "form_factor": 1000, + "type": 1000, "mgmt_only": true } }, @@ -942,7 +942,7 @@ "fields": { "device_type": 2, "name": "fxp0 (RE1)", - "form_factor": 1000, + "type": 1000, "mgmt_only": true } }, @@ -952,7 +952,7 @@ "fields": { "device_type": 2, "name": "lo0", - "form_factor": 0, + "type": 0, "mgmt_only": false } }, @@ -962,7 +962,7 @@ "fields": { "device_type": 3, "name": "em0", - "form_factor": 800, + "type": 800, "mgmt_only": true } }, @@ -972,7 +972,7 @@ "fields": { "device_type": 3, "name": "et-0/0/0", - "form_factor": 1400, + "type": 1400, "mgmt_only": false } }, @@ -982,7 +982,7 @@ "fields": { "device_type": 3, "name": "et-0/0/1", - "form_factor": 1400, + "type": 1400, "mgmt_only": false } }, @@ -992,7 +992,7 @@ "fields": { "device_type": 3, "name": "et-0/0/2", - "form_factor": 1400, + "type": 1400, "mgmt_only": false } }, @@ -1002,7 +1002,7 @@ "fields": { "device_type": 3, "name": "et-0/0/3", - "form_factor": 1400, + "type": 1400, "mgmt_only": false } }, @@ -1012,7 +1012,7 @@ "fields": { "device_type": 3, "name": "et-0/0/4", - "form_factor": 1400, + "type": 1400, "mgmt_only": false } }, @@ -1022,7 +1022,7 @@ "fields": { "device_type": 3, "name": "et-0/0/5", - "form_factor": 1400, + "type": 1400, "mgmt_only": false } }, @@ -1032,7 +1032,7 @@ "fields": { "device_type": 3, "name": "et-0/0/6", - "form_factor": 1400, + "type": 1400, "mgmt_only": false } }, @@ -1042,7 +1042,7 @@ "fields": { "device_type": 3, "name": "et-0/0/7", - "form_factor": 1400, + "type": 1400, "mgmt_only": false } }, @@ -1052,7 +1052,7 @@ "fields": { "device_type": 3, "name": "et-0/0/8", - "form_factor": 1400, + "type": 1400, "mgmt_only": false } }, @@ -1062,7 +1062,7 @@ "fields": { "device_type": 3, "name": "et-0/0/9", - "form_factor": 1400, + "type": 1400, "mgmt_only": false } }, @@ -1072,7 +1072,7 @@ "fields": { "device_type": 3, "name": "et-0/0/10", - "form_factor": 1400, + "type": 1400, "mgmt_only": false } }, @@ -1082,7 +1082,7 @@ "fields": { "device_type": 3, "name": "et-0/0/11", - "form_factor": 1400, + "type": 1400, "mgmt_only": false } }, @@ -1092,7 +1092,7 @@ "fields": { "device_type": 3, "name": "et-0/0/12", - "form_factor": 1400, + "type": 1400, "mgmt_only": false } }, @@ -1102,7 +1102,7 @@ "fields": { "device_type": 3, "name": "et-0/0/13", - "form_factor": 1400, + "type": 1400, "mgmt_only": false } }, @@ -1112,7 +1112,7 @@ "fields": { "device_type": 3, "name": "et-0/0/14", - "form_factor": 1400, + "type": 1400, "mgmt_only": false } }, @@ -1122,7 +1122,7 @@ "fields": { "device_type": 3, "name": "et-0/0/15", - "form_factor": 1400, + "type": 1400, "mgmt_only": false } }, @@ -1132,7 +1132,7 @@ "fields": { "device_type": 3, "name": "et-0/0/16", - "form_factor": 1400, + "type": 1400, "mgmt_only": false } }, @@ -1142,7 +1142,7 @@ "fields": { "device_type": 3, "name": "et-0/0/17", - "form_factor": 1400, + "type": 1400, "mgmt_only": false } }, @@ -1152,7 +1152,7 @@ "fields": { "device_type": 3, "name": "et-0/0/18", - "form_factor": 1400, + "type": 1400, "mgmt_only": false } }, @@ -1162,7 +1162,7 @@ "fields": { "device_type": 3, "name": "et-0/0/19", - "form_factor": 1400, + "type": 1400, "mgmt_only": false } }, @@ -1172,7 +1172,7 @@ "fields": { "device_type": 3, "name": "et-0/0/20", - "form_factor": 1400, + "type": 1400, "mgmt_only": false } }, @@ -1182,7 +1182,7 @@ "fields": { "device_type": 3, "name": "et-0/0/21", - "form_factor": 1400, + "type": 1400, "mgmt_only": false } }, @@ -1192,7 +1192,7 @@ "fields": { "device_type": 3, "name": "et-0/0/22", - "form_factor": 1400, + "type": 1400, "mgmt_only": false } }, @@ -1202,7 +1202,7 @@ "fields": { "device_type": 3, "name": "et-0/1/0", - "form_factor": 1400, + "type": 1400, "mgmt_only": false } }, @@ -1212,7 +1212,7 @@ "fields": { "device_type": 3, "name": "et-0/1/1", - "form_factor": 1400, + "type": 1400, "mgmt_only": false } }, @@ -1222,7 +1222,7 @@ "fields": { "device_type": 3, "name": "et-0/1/2", - "form_factor": 1400, + "type": 1400, "mgmt_only": false } }, @@ -1232,7 +1232,7 @@ "fields": { "device_type": 3, "name": "et-0/1/3", - "form_factor": 1400, + "type": 1400, "mgmt_only": false } }, @@ -1242,7 +1242,7 @@ "fields": { "device_type": 3, "name": "et-0/2/0", - "form_factor": 1400, + "type": 1400, "mgmt_only": false } }, @@ -1252,7 +1252,7 @@ "fields": { "device_type": 3, "name": "et-0/2/1", - "form_factor": 1400, + "type": 1400, "mgmt_only": false } }, @@ -1262,7 +1262,7 @@ "fields": { "device_type": 3, "name": "et-0/2/2", - "form_factor": 1400, + "type": 1400, "mgmt_only": false } }, @@ -1272,7 +1272,7 @@ "fields": { "device_type": 3, "name": "et-0/2/3", - "form_factor": 1400, + "type": 1400, "mgmt_only": false } }, @@ -1282,7 +1282,7 @@ "fields": { "device_type": 4, "name": "em0", - "form_factor": 1000, + "type": 1000, "mgmt_only": true } }, @@ -1292,7 +1292,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/0", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1302,7 +1302,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/1", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1312,7 +1312,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/2", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1322,7 +1322,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/3", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1332,7 +1332,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/4", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1342,7 +1342,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/5", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1352,7 +1352,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/6", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1362,7 +1362,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/7", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1372,7 +1372,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/8", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1382,7 +1382,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/9", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1392,7 +1392,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/10", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1402,7 +1402,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/11", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1412,7 +1412,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/12", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1422,7 +1422,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/13", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1432,7 +1432,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/14", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1442,7 +1442,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/15", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1452,7 +1452,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/16", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1462,7 +1462,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/17", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1472,7 +1472,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/18", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1482,7 +1482,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/19", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1492,7 +1492,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/20", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1502,7 +1502,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/21", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1512,7 +1512,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/22", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1522,7 +1522,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/23", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1532,7 +1532,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/24", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1542,7 +1542,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/25", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1552,7 +1552,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/26", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1562,7 +1562,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/27", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1572,7 +1572,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/28", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1582,7 +1582,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/29", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1592,7 +1592,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/30", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1602,7 +1602,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/31", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1612,7 +1612,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/32", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1622,7 +1622,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/33", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1632,7 +1632,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/34", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1642,7 +1642,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/35", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1652,7 +1652,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/36", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1662,7 +1662,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/37", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1672,7 +1672,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/38", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1682,7 +1682,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/39", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1692,7 +1692,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/40", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1702,7 +1702,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/41", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1712,7 +1712,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/42", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1722,7 +1722,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/43", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1732,7 +1732,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/44", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1742,7 +1742,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/45", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1752,7 +1752,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/46", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1762,7 +1762,7 @@ "fields": { "device_type": 4, "name": "xe-0/0/47", - "form_factor": 1200, + "type": 1200, "mgmt_only": false } }, @@ -1772,7 +1772,7 @@ "fields": { "device_type": 4, "name": "et-0/0/48", - "form_factor": 1400, + "type": 1400, "mgmt_only": false } }, @@ -1782,7 +1782,7 @@ "fields": { "device_type": 4, "name": "et-0/0/49", - "form_factor": 1400, + "type": 1400, "mgmt_only": false } }, @@ -1792,7 +1792,7 @@ "fields": { "device_type": 4, "name": "et-0/0/50", - "form_factor": 1400, + "type": 1400, "mgmt_only": false } }, @@ -1802,7 +1802,7 @@ "fields": { "device_type": 4, "name": "et-0/0/51", - "form_factor": 1400, + "type": 1400, "mgmt_only": false } }, @@ -1812,7 +1812,7 @@ "fields": { "device_type": 5, "name": "eth0", - "form_factor": 1000, + "type": 1000, "mgmt_only": true } }, @@ -1822,7 +1822,7 @@ "fields": { "device_type": 6, "name": "Net", - "form_factor": 800, + "type": 800, "mgmt_only": true } }, @@ -3301,7 +3301,7 @@ "fields": { "device": 1, "name": "fxp0 (RE0)", - "form_factor": 1000, + "type": 1000, "mgmt_only": true, "description": "" } @@ -3312,7 +3312,7 @@ "fields": { "device": 1, "name": "fxp0 (RE1)", - "form_factor": 800, + "type": 800, "mgmt_only": true, "description": "" } @@ -3323,7 +3323,7 @@ "fields": { "device": 1, "name": "lo0", - "form_factor": 0, + "type": 0, "mgmt_only": false, "description": "" } @@ -3334,7 +3334,7 @@ "fields": { "device": 1, "name": "xe-0/0/0", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "TEST" } @@ -3345,7 +3345,7 @@ "fields": { "device": 1, "name": "xe-0/0/1", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -3356,7 +3356,7 @@ "fields": { "device": 1, "name": "xe-0/0/2", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -3367,7 +3367,7 @@ "fields": { "device": 1, "name": "xe-0/0/3", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -3378,7 +3378,7 @@ "fields": { "device": 1, "name": "xe-0/0/4", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -3389,7 +3389,7 @@ "fields": { "device": 1, "name": "xe-0/0/5", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -3400,7 +3400,7 @@ "fields": { "device": 2, "name": "fxp0 (RE0)", - "form_factor": 1000, + "type": 1000, "mgmt_only": true, "description": "" } @@ -3411,7 +3411,7 @@ "fields": { "device": 2, "name": "fxp0 (RE1)", - "form_factor": 1000, + "type": 1000, "mgmt_only": true, "description": "" } @@ -3422,7 +3422,7 @@ "fields": { "device": 2, "name": "lo0", - "form_factor": 0, + "type": 0, "mgmt_only": false, "description": "" } @@ -3434,7 +3434,7 @@ "device": 3, "name": "em0", "mac_address": "00-00-00-AA-BB-CC", - "form_factor": 800, + "type": 800, "mgmt_only": true, "description": "" } @@ -3445,7 +3445,7 @@ "fields": { "device": 3, "name": "et-0/0/0", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -3456,7 +3456,7 @@ "fields": { "device": 3, "name": "et-0/0/1", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -3467,7 +3467,7 @@ "fields": { "device": 3, "name": "et-0/0/10", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -3478,7 +3478,7 @@ "fields": { "device": 3, "name": "et-0/0/11", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -3489,7 +3489,7 @@ "fields": { "device": 3, "name": "et-0/0/12", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -3500,7 +3500,7 @@ "fields": { "device": 3, "name": "et-0/0/13", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -3511,7 +3511,7 @@ "fields": { "device": 3, "name": "et-0/0/14", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -3522,7 +3522,7 @@ "fields": { "device": 3, "name": "et-0/0/15", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -3533,7 +3533,7 @@ "fields": { "device": 3, "name": "et-0/0/16", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -3544,7 +3544,7 @@ "fields": { "device": 3, "name": "et-0/0/17", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -3555,7 +3555,7 @@ "fields": { "device": 3, "name": "et-0/0/18", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -3566,7 +3566,7 @@ "fields": { "device": 3, "name": "et-0/0/19", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -3577,7 +3577,7 @@ "fields": { "device": 3, "name": "et-0/0/2", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -3588,7 +3588,7 @@ "fields": { "device": 3, "name": "et-0/0/20", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -3599,7 +3599,7 @@ "fields": { "device": 3, "name": "et-0/0/21", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -3610,7 +3610,7 @@ "fields": { "device": 3, "name": "et-0/0/22", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -3621,7 +3621,7 @@ "fields": { "device": 3, "name": "et-0/0/3", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -3632,7 +3632,7 @@ "fields": { "device": 3, "name": "et-0/0/4", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -3643,7 +3643,7 @@ "fields": { "device": 3, "name": "et-0/0/5", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -3654,7 +3654,7 @@ "fields": { "device": 3, "name": "et-0/0/6", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -3665,7 +3665,7 @@ "fields": { "device": 3, "name": "et-0/0/7", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -3676,7 +3676,7 @@ "fields": { "device": 3, "name": "et-0/0/8", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -3687,7 +3687,7 @@ "fields": { "device": 3, "name": "et-0/0/9", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -3698,7 +3698,7 @@ "fields": { "device": 3, "name": "et-0/1/0", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -3709,7 +3709,7 @@ "fields": { "device": 3, "name": "et-0/1/1", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -3720,7 +3720,7 @@ "fields": { "device": 3, "name": "et-0/1/2", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -3731,7 +3731,7 @@ "fields": { "device": 3, "name": "et-0/1/3", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -3742,7 +3742,7 @@ "fields": { "device": 3, "name": "et-0/2/0", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -3753,7 +3753,7 @@ "fields": { "device": 3, "name": "et-0/2/1", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -3764,7 +3764,7 @@ "fields": { "device": 3, "name": "et-0/2/2", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -3775,7 +3775,7 @@ "fields": { "device": 3, "name": "et-0/2/3", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -3786,7 +3786,7 @@ "fields": { "device": 4, "name": "em0", - "form_factor": 1000, + "type": 1000, "mac_address": "ff-ee-dd-33-22-11", "mgmt_only": true, "description": "" @@ -3798,7 +3798,7 @@ "fields": { "device": 4, "name": "et-0/0/48", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -3809,7 +3809,7 @@ "fields": { "device": 4, "name": "et-0/0/49", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -3820,7 +3820,7 @@ "fields": { "device": 4, "name": "et-0/0/50", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -3831,7 +3831,7 @@ "fields": { "device": 4, "name": "et-0/0/51", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -3842,7 +3842,7 @@ "fields": { "device": 4, "name": "xe-0/0/0", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -3853,7 +3853,7 @@ "fields": { "device": 4, "name": "xe-0/0/1", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -3864,7 +3864,7 @@ "fields": { "device": 4, "name": "xe-0/0/10", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -3875,7 +3875,7 @@ "fields": { "device": 4, "name": "xe-0/0/11", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -3886,7 +3886,7 @@ "fields": { "device": 4, "name": "xe-0/0/12", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -3897,7 +3897,7 @@ "fields": { "device": 4, "name": "xe-0/0/13", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -3908,7 +3908,7 @@ "fields": { "device": 4, "name": "xe-0/0/14", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -3919,7 +3919,7 @@ "fields": { "device": 4, "name": "xe-0/0/15", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -3930,7 +3930,7 @@ "fields": { "device": 4, "name": "xe-0/0/16", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -3941,7 +3941,7 @@ "fields": { "device": 4, "name": "xe-0/0/17", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -3952,7 +3952,7 @@ "fields": { "device": 4, "name": "xe-0/0/18", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -3963,7 +3963,7 @@ "fields": { "device": 4, "name": "xe-0/0/19", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -3974,7 +3974,7 @@ "fields": { "device": 4, "name": "xe-0/0/2", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -3985,7 +3985,7 @@ "fields": { "device": 4, "name": "xe-0/0/20", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -3996,7 +3996,7 @@ "fields": { "device": 4, "name": "xe-0/0/21", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4007,7 +4007,7 @@ "fields": { "device": 4, "name": "xe-0/0/22", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4018,7 +4018,7 @@ "fields": { "device": 4, "name": "xe-0/0/23", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4029,7 +4029,7 @@ "fields": { "device": 4, "name": "xe-0/0/24", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4040,7 +4040,7 @@ "fields": { "device": 4, "name": "xe-0/0/25", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4051,7 +4051,7 @@ "fields": { "device": 4, "name": "xe-0/0/26", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4062,7 +4062,7 @@ "fields": { "device": 4, "name": "xe-0/0/27", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4073,7 +4073,7 @@ "fields": { "device": 4, "name": "xe-0/0/28", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4084,7 +4084,7 @@ "fields": { "device": 4, "name": "xe-0/0/29", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4095,7 +4095,7 @@ "fields": { "device": 4, "name": "xe-0/0/3", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4106,7 +4106,7 @@ "fields": { "device": 4, "name": "xe-0/0/30", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4117,7 +4117,7 @@ "fields": { "device": 4, "name": "xe-0/0/31", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4128,7 +4128,7 @@ "fields": { "device": 4, "name": "xe-0/0/32", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4139,7 +4139,7 @@ "fields": { "device": 4, "name": "xe-0/0/33", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4150,7 +4150,7 @@ "fields": { "device": 4, "name": "xe-0/0/34", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4161,7 +4161,7 @@ "fields": { "device": 4, "name": "xe-0/0/35", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4172,7 +4172,7 @@ "fields": { "device": 4, "name": "xe-0/0/36", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4183,7 +4183,7 @@ "fields": { "device": 4, "name": "xe-0/0/37", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4194,7 +4194,7 @@ "fields": { "device": 4, "name": "xe-0/0/38", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4205,7 +4205,7 @@ "fields": { "device": 4, "name": "xe-0/0/39", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4216,7 +4216,7 @@ "fields": { "device": 4, "name": "xe-0/0/4", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4227,7 +4227,7 @@ "fields": { "device": 4, "name": "xe-0/0/40", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4238,7 +4238,7 @@ "fields": { "device": 4, "name": "xe-0/0/41", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4249,7 +4249,7 @@ "fields": { "device": 4, "name": "xe-0/0/42", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4260,7 +4260,7 @@ "fields": { "device": 4, "name": "xe-0/0/43", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4271,7 +4271,7 @@ "fields": { "device": 4, "name": "xe-0/0/44", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4282,7 +4282,7 @@ "fields": { "device": 4, "name": "xe-0/0/45", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4293,7 +4293,7 @@ "fields": { "device": 4, "name": "xe-0/0/46", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4304,7 +4304,7 @@ "fields": { "device": 4, "name": "xe-0/0/47", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4315,7 +4315,7 @@ "fields": { "device": 4, "name": "xe-0/0/5", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4326,7 +4326,7 @@ "fields": { "device": 4, "name": "xe-0/0/6", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4337,7 +4337,7 @@ "fields": { "device": 4, "name": "xe-0/0/7", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4348,7 +4348,7 @@ "fields": { "device": 4, "name": "xe-0/0/8", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4359,7 +4359,7 @@ "fields": { "device": 4, "name": "xe-0/0/9", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4370,7 +4370,7 @@ "fields": { "device": 5, "name": "em0", - "form_factor": 1000, + "type": 1000, "mgmt_only": true, "description": "" } @@ -4381,7 +4381,7 @@ "fields": { "device": 5, "name": "et-0/0/48", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -4392,7 +4392,7 @@ "fields": { "device": 5, "name": "et-0/0/49", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -4403,7 +4403,7 @@ "fields": { "device": 5, "name": "et-0/0/50", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -4414,7 +4414,7 @@ "fields": { "device": 5, "name": "et-0/0/51", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -4425,7 +4425,7 @@ "fields": { "device": 5, "name": "xe-0/0/0", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4436,7 +4436,7 @@ "fields": { "device": 5, "name": "xe-0/0/1", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4447,7 +4447,7 @@ "fields": { "device": 5, "name": "xe-0/0/10", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4458,7 +4458,7 @@ "fields": { "device": 5, "name": "xe-0/0/11", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4469,7 +4469,7 @@ "fields": { "device": 5, "name": "xe-0/0/12", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4480,7 +4480,7 @@ "fields": { "device": 5, "name": "xe-0/0/13", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4491,7 +4491,7 @@ "fields": { "device": 5, "name": "xe-0/0/14", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4502,7 +4502,7 @@ "fields": { "device": 5, "name": "xe-0/0/15", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4513,7 +4513,7 @@ "fields": { "device": 5, "name": "xe-0/0/16", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4524,7 +4524,7 @@ "fields": { "device": 5, "name": "xe-0/0/17", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4535,7 +4535,7 @@ "fields": { "device": 5, "name": "xe-0/0/18", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4546,7 +4546,7 @@ "fields": { "device": 5, "name": "xe-0/0/19", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4557,7 +4557,7 @@ "fields": { "device": 5, "name": "xe-0/0/2", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4568,7 +4568,7 @@ "fields": { "device": 5, "name": "xe-0/0/20", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4579,7 +4579,7 @@ "fields": { "device": 5, "name": "xe-0/0/21", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4590,7 +4590,7 @@ "fields": { "device": 5, "name": "xe-0/0/22", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4601,7 +4601,7 @@ "fields": { "device": 5, "name": "xe-0/0/23", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4612,7 +4612,7 @@ "fields": { "device": 5, "name": "xe-0/0/24", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4623,7 +4623,7 @@ "fields": { "device": 5, "name": "xe-0/0/25", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4634,7 +4634,7 @@ "fields": { "device": 5, "name": "xe-0/0/26", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4645,7 +4645,7 @@ "fields": { "device": 5, "name": "xe-0/0/27", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4656,7 +4656,7 @@ "fields": { "device": 5, "name": "xe-0/0/28", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4667,7 +4667,7 @@ "fields": { "device": 5, "name": "xe-0/0/29", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4678,7 +4678,7 @@ "fields": { "device": 5, "name": "xe-0/0/3", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4689,7 +4689,7 @@ "fields": { "device": 5, "name": "xe-0/0/30", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4700,7 +4700,7 @@ "fields": { "device": 5, "name": "xe-0/0/31", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4711,7 +4711,7 @@ "fields": { "device": 5, "name": "xe-0/0/32", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4722,7 +4722,7 @@ "fields": { "device": 5, "name": "xe-0/0/33", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4733,7 +4733,7 @@ "fields": { "device": 5, "name": "xe-0/0/34", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4744,7 +4744,7 @@ "fields": { "device": 5, "name": "xe-0/0/35", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4755,7 +4755,7 @@ "fields": { "device": 5, "name": "xe-0/0/36", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4766,7 +4766,7 @@ "fields": { "device": 5, "name": "xe-0/0/37", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4777,7 +4777,7 @@ "fields": { "device": 5, "name": "xe-0/0/38", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4788,7 +4788,7 @@ "fields": { "device": 5, "name": "xe-0/0/39", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4799,7 +4799,7 @@ "fields": { "device": 5, "name": "xe-0/0/4", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4810,7 +4810,7 @@ "fields": { "device": 5, "name": "xe-0/0/40", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4821,7 +4821,7 @@ "fields": { "device": 5, "name": "xe-0/0/41", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4832,7 +4832,7 @@ "fields": { "device": 5, "name": "xe-0/0/42", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4843,7 +4843,7 @@ "fields": { "device": 5, "name": "xe-0/0/43", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4854,7 +4854,7 @@ "fields": { "device": 5, "name": "xe-0/0/44", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4865,7 +4865,7 @@ "fields": { "device": 5, "name": "xe-0/0/45", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4876,7 +4876,7 @@ "fields": { "device": 5, "name": "xe-0/0/46", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4887,7 +4887,7 @@ "fields": { "device": 5, "name": "xe-0/0/47", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4898,7 +4898,7 @@ "fields": { "device": 5, "name": "xe-0/0/5", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4909,7 +4909,7 @@ "fields": { "device": 5, "name": "xe-0/0/6", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4920,7 +4920,7 @@ "fields": { "device": 5, "name": "xe-0/0/7", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4931,7 +4931,7 @@ "fields": { "device": 5, "name": "xe-0/0/8", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4942,7 +4942,7 @@ "fields": { "device": 5, "name": "xe-0/0/9", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -4953,7 +4953,7 @@ "fields": { "device": 6, "name": "em0", - "form_factor": 800, + "type": 800, "mgmt_only": true, "description": "" } @@ -4964,7 +4964,7 @@ "fields": { "device": 6, "name": "et-0/0/0", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -4975,7 +4975,7 @@ "fields": { "device": 6, "name": "et-0/0/1", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -4986,7 +4986,7 @@ "fields": { "device": 6, "name": "et-0/0/10", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -4997,7 +4997,7 @@ "fields": { "device": 6, "name": "et-0/0/11", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5008,7 +5008,7 @@ "fields": { "device": 6, "name": "et-0/0/12", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5019,7 +5019,7 @@ "fields": { "device": 6, "name": "et-0/0/13", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5030,7 +5030,7 @@ "fields": { "device": 6, "name": "et-0/0/14", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5041,7 +5041,7 @@ "fields": { "device": 6, "name": "et-0/0/15", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5052,7 +5052,7 @@ "fields": { "device": 6, "name": "et-0/0/16", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5063,7 +5063,7 @@ "fields": { "device": 6, "name": "et-0/0/17", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5074,7 +5074,7 @@ "fields": { "device": 6, "name": "et-0/0/18", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5085,7 +5085,7 @@ "fields": { "device": 6, "name": "et-0/0/19", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5096,7 +5096,7 @@ "fields": { "device": 6, "name": "et-0/0/2", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5107,7 +5107,7 @@ "fields": { "device": 6, "name": "et-0/0/20", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5118,7 +5118,7 @@ "fields": { "device": 6, "name": "et-0/0/21", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5129,7 +5129,7 @@ "fields": { "device": 6, "name": "et-0/0/22", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5140,7 +5140,7 @@ "fields": { "device": 6, "name": "et-0/0/3", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5151,7 +5151,7 @@ "fields": { "device": 6, "name": "et-0/0/4", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5162,7 +5162,7 @@ "fields": { "device": 6, "name": "et-0/0/5", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5173,7 +5173,7 @@ "fields": { "device": 6, "name": "et-0/0/6", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5184,7 +5184,7 @@ "fields": { "device": 6, "name": "et-0/0/7", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5195,7 +5195,7 @@ "fields": { "device": 6, "name": "et-0/0/8", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5206,7 +5206,7 @@ "fields": { "device": 6, "name": "et-0/0/9", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5217,7 +5217,7 @@ "fields": { "device": 6, "name": "et-0/1/0", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5228,7 +5228,7 @@ "fields": { "device": 6, "name": "et-0/1/1", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5239,7 +5239,7 @@ "fields": { "device": 6, "name": "et-0/1/2", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5250,7 +5250,7 @@ "fields": { "device": 6, "name": "et-0/1/3", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5261,7 +5261,7 @@ "fields": { "device": 6, "name": "et-0/2/0", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5272,7 +5272,7 @@ "fields": { "device": 6, "name": "et-0/2/1", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5283,7 +5283,7 @@ "fields": { "device": 6, "name": "et-0/2/2", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5294,7 +5294,7 @@ "fields": { "device": 6, "name": "et-0/2/3", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5305,7 +5305,7 @@ "fields": { "device": 7, "name": "fxp0 (RE0)", - "form_factor": 1000, + "type": 1000, "mgmt_only": true, "description": "" } @@ -5316,7 +5316,7 @@ "fields": { "device": 7, "name": "fxp0 (RE1)", - "form_factor": 800, + "type": 800, "mgmt_only": true, "description": "" } @@ -5327,7 +5327,7 @@ "fields": { "device": 7, "name": "lo0", - "form_factor": 0, + "type": 0, "mgmt_only": false, "description": "" } @@ -5338,7 +5338,7 @@ "fields": { "device": 8, "name": "fxp0 (RE0)", - "form_factor": 1000, + "type": 1000, "mgmt_only": true, "description": "" } @@ -5349,7 +5349,7 @@ "fields": { "device": 8, "name": "fxp0 (RE1)", - "form_factor": 1000, + "type": 1000, "mgmt_only": true, "description": "" } @@ -5360,7 +5360,7 @@ "fields": { "device": 8, "name": "lo0", - "form_factor": 0, + "type": 0, "mgmt_only": false, "description": "" } @@ -5371,7 +5371,7 @@ "fields": { "device": 2, "name": "et-0/0/0", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5382,7 +5382,7 @@ "fields": { "device": 2, "name": "et-0/0/1", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5393,7 +5393,7 @@ "fields": { "device": 2, "name": "et-0/0/2", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5404,7 +5404,7 @@ "fields": { "device": 2, "name": "et-0/1/0", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5415,7 +5415,7 @@ "fields": { "device": 2, "name": "et-0/1/1", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5426,7 +5426,7 @@ "fields": { "device": 2, "name": "et-0/1/2", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5437,7 +5437,7 @@ "fields": { "device": 8, "name": "et-0/0/0", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5448,7 +5448,7 @@ "fields": { "device": 8, "name": "et-0/0/1", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5459,7 +5459,7 @@ "fields": { "device": 8, "name": "et-0/0/2", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5470,7 +5470,7 @@ "fields": { "device": 8, "name": "et-0/1/0", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5481,7 +5481,7 @@ "fields": { "device": 8, "name": "et-0/1/1", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5492,7 +5492,7 @@ "fields": { "device": 8, "name": "et-0/1/2", - "form_factor": 1400, + "type": 1400, "mgmt_only": false, "description": "" } @@ -5503,7 +5503,7 @@ "fields": { "device": 2, "name": "xe-0/0/0", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -5514,7 +5514,7 @@ "fields": { "device": 2, "name": "xe-0/0/1", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -5525,7 +5525,7 @@ "fields": { "device": 2, "name": "xe-0/0/2", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -5536,7 +5536,7 @@ "fields": { "device": 2, "name": "xe-0/0/3", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -5547,7 +5547,7 @@ "fields": { "device": 2, "name": "xe-0/0/4", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -5558,7 +5558,7 @@ "fields": { "device": 2, "name": "xe-0/0/5", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -5569,7 +5569,7 @@ "fields": { "device": 8, "name": "xe-0/0/0", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -5580,7 +5580,7 @@ "fields": { "device": 8, "name": "xe-0/0/1", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -5591,7 +5591,7 @@ "fields": { "device": 8, "name": "xe-0/0/2", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -5602,7 +5602,7 @@ "fields": { "device": 8, "name": "xe-0/0/3", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -5613,7 +5613,7 @@ "fields": { "device": 8, "name": "xe-0/0/4", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -5624,7 +5624,7 @@ "fields": { "device": 8, "name": "xe-0/0/5", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -5635,7 +5635,7 @@ "fields": { "device": 7, "name": "xe-0/0/0", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -5646,7 +5646,7 @@ "fields": { "device": 7, "name": "xe-0/0/1", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -5657,7 +5657,7 @@ "fields": { "device": 7, "name": "xe-0/0/2", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -5668,7 +5668,7 @@ "fields": { "device": 7, "name": "xe-0/0/3", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -5679,7 +5679,7 @@ "fields": { "device": 7, "name": "xe-0/0/4", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -5690,7 +5690,7 @@ "fields": { "device": 7, "name": "xe-0/0/5", - "form_factor": 1200, + "type": 1200, "mgmt_only": false, "description": "" } @@ -5701,7 +5701,7 @@ "fields": { "device": 9, "name": "eth0", - "form_factor": 1000, + "type": 1000, "mac_address": "44-55-66-77-88-99", "mgmt_only": true, "description": "" @@ -5713,7 +5713,7 @@ "fields": { "device": 11, "name": "Net", - "form_factor": 800, + "type": 800, "mgmt_only": true, "description": "" } @@ -5724,7 +5724,7 @@ "fields": { "device": 12, "name": "Net", - "form_factor": 800, + "type": 800, "mgmt_only": true, "description": "" } diff --git a/netbox/dcim/forms.py b/netbox/dcim/forms.py index ba639a646..0c74a4fc3 100644 --- a/netbox/dcim/forms.py +++ b/netbox/dcim/forms.py @@ -1012,11 +1012,11 @@ class InterfaceTemplateForm(BootstrapMixin, forms.ModelForm): class Meta: model = InterfaceTemplate fields = [ - 'device_type', 'name', 'form_factor', 'mgmt_only', + 'device_type', 'name', 'type', 'mgmt_only', ] widgets = { 'device_type': forms.HiddenInput(), - 'form_factor': StaticSelect2(), + 'type': StaticSelect2(), } @@ -1024,8 +1024,8 @@ class InterfaceTemplateCreateForm(ComponentForm): name_pattern = ExpandableNameField( label='Name' ) - form_factor = forms.ChoiceField( - choices=IFACE_FF_CHOICES, + type = forms.ChoiceField( + choices=IFACE_TYPE_CHOICES, widget=StaticSelect2() ) mgmt_only = forms.BooleanField( @@ -1039,8 +1039,8 @@ class InterfaceTemplateBulkEditForm(BootstrapMixin, BulkEditForm): queryset=InterfaceTemplate.objects.all(), widget=forms.MultipleHiddenInput() ) - form_factor = forms.ChoiceField( - choices=add_blank_choice(IFACE_FF_CHOICES), + type = forms.ChoiceField( + choices=add_blank_choice(IFACE_TYPE_CHOICES), required=False, widget=StaticSelect2() ) @@ -1830,8 +1830,8 @@ class DeviceBulkAddComponentForm(BootstrapMixin, forms.Form): class DeviceBulkAddInterfaceForm(DeviceBulkAddComponentForm): - form_factor = forms.ChoiceField( - choices=IFACE_FF_CHOICES, + type = forms.ChoiceField( + choices=IFACE_TYPE_CHOICES, widget=StaticSelect2() ) enabled = forms.BooleanField( @@ -2070,12 +2070,12 @@ class InterfaceForm(BootstrapMixin, forms.ModelForm): class Meta: model = Interface fields = [ - 'device', 'name', 'form_factor', 'enabled', 'lag', 'mac_address', 'mtu', 'mgmt_only', 'description', + 'device', 'name', 'type', 'enabled', 'lag', 'mac_address', 'mtu', 'mgmt_only', 'description', 'mode', 'untagged_vlan', 'tagged_vlans', 'tags', ] widgets = { 'device': forms.HiddenInput(), - 'form_factor': StaticSelect2(), + 'type': StaticSelect2(), 'lag': StaticSelect2(), 'mode': StaticSelect2(), } @@ -2093,12 +2093,12 @@ class InterfaceForm(BootstrapMixin, forms.ModelForm): if self.is_bound: device = Device.objects.get(pk=self.data['device']) self.fields['lag'].queryset = Interface.objects.filter( - device__in=[device, device.get_vc_master()], form_factor=IFACE_FF_LAG + device__in=[device, device.get_vc_master()], type=IFACE_TYPE_LAG ) else: device = self.instance.device self.fields['lag'].queryset = Interface.objects.filter( - device__in=[self.instance.device, self.instance.device.get_vc_master()], form_factor=IFACE_FF_LAG + device__in=[self.instance.device, self.instance.device.get_vc_master()], type=IFACE_TYPE_LAG ) def clean(self): @@ -2210,8 +2210,8 @@ class InterfaceCreateForm(ComponentForm, forms.Form): name_pattern = ExpandableNameField( label='Name' ) - form_factor = forms.ChoiceField( - choices=IFACE_FF_CHOICES, + type = forms.ChoiceField( + choices=IFACE_TYPE_CHOICES, widget=StaticSelect2(), ) enabled = forms.BooleanField( @@ -2262,7 +2262,7 @@ class InterfaceCreateForm(ComponentForm, forms.Form): # Limit LAG choices to interfaces belonging to this device (or its VC master) if self.parent is not None: self.fields['lag'].queryset = Interface.objects.filter( - device__in=[self.parent, self.parent.get_vc_master()], form_factor=IFACE_FF_LAG + device__in=[self.parent, self.parent.get_vc_master()], type=IFACE_TYPE_LAG ) else: self.fields['lag'].queryset = Interface.objects.none() @@ -2273,8 +2273,8 @@ class InterfaceBulkEditForm(BootstrapMixin, AddRemoveTagsForm, BulkEditForm): queryset=Interface.objects.all(), widget=forms.MultipleHiddenInput() ) - form_factor = forms.ChoiceField( - choices=add_blank_choice(IFACE_FF_CHOICES), + type = forms.ChoiceField( + choices=add_blank_choice(IFACE_TYPE_CHOICES), required=False, widget=StaticSelect2() ) @@ -2326,7 +2326,7 @@ class InterfaceBulkEditForm(BootstrapMixin, AddRemoveTagsForm, BulkEditForm): if device is not None: self.fields['lag'].queryset = Interface.objects.filter( device__in=[device, device.get_vc_master()], - form_factor=IFACE_FF_LAG + type=IFACE_TYPE_LAG ) else: self.fields['lag'].choices = [] diff --git a/netbox/dcim/managers.py b/netbox/dcim/managers.py index 9e4e5fca2..8b1000529 100644 --- a/netbox/dcim/managers.py +++ b/netbox/dcim/managers.py @@ -37,7 +37,7 @@ class InterfaceQuerySet(QuerySet): Return only physical interfaces which are capable of being connected to other interfaces (i.e. not virtual or wireless). """ - return self.exclude(form_factor__in=NONCONNECTABLE_IFACE_TYPES) + return self.exclude(type__in=NONCONNECTABLE_IFACE_TYPES) class InterfaceManager(Manager): diff --git a/netbox/dcim/migrations/0073_interface_form_factor_to_type.py b/netbox/dcim/migrations/0073_interface_form_factor_to_type.py new file mode 100644 index 000000000..38016ea00 --- /dev/null +++ b/netbox/dcim/migrations/0073_interface_form_factor_to_type.py @@ -0,0 +1,23 @@ +# Generated by Django 2.1.7 on 2019-04-12 17:27 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('dcim', '0072_powerfeeds'), + ] + + operations = [ + migrations.RenameField( + model_name='interface', + old_name='form_factor', + new_name='type', + ), + migrations.RenameField( + model_name='interfacetemplate', + old_name='form_factor', + new_name='type', + ), + ] diff --git a/netbox/dcim/models.py b/netbox/dcim/models.py index 020d30618..0fd060115 100644 --- a/netbox/dcim/models.py +++ b/netbox/dcim/models.py @@ -1132,9 +1132,9 @@ class InterfaceTemplate(ComponentTemplateModel): name = models.CharField( max_length=64 ) - form_factor = models.PositiveSmallIntegerField( - choices=IFACE_FF_CHOICES, - default=IFACE_FF_10GE_SFP_PLUS + type = models.PositiveSmallIntegerField( + choices=IFACE_TYPE_CHOICES, + default=IFACE_TYPE_10GE_SFP_PLUS ) mgmt_only = models.BooleanField( default=False, @@ -1647,7 +1647,7 @@ class Device(ChangeLoggedModel, ConfigContextModel, CustomFieldModel): self.device_type.poweroutlet_templates.all()] ) Interface.objects.bulk_create( - [Interface(device=self, name=template.name, form_factor=template.form_factor, + [Interface(device=self, name=template.name, type=template.type, mgmt_only=template.mgmt_only) for template in self.device_type.interface_templates.all()] ) RearPort.objects.bulk_create([ @@ -2092,9 +2092,9 @@ class Interface(CableTermination, ComponentModel): blank=True, verbose_name='Parent LAG' ) - form_factor = models.PositiveSmallIntegerField( - choices=IFACE_FF_CHOICES, - default=IFACE_FF_10GE_SFP_PLUS + type = models.PositiveSmallIntegerField( + choices=IFACE_TYPE_CHOICES, + default=IFACE_TYPE_10GE_SFP_PLUS ) enabled = models.BooleanField( default=True @@ -2139,7 +2139,7 @@ class Interface(CableTermination, ComponentModel): tags = TaggableManager(through=TaggedItem) csv_headers = [ - 'device', 'virtual_machine', 'name', 'lag', 'form_factor', 'enabled', 'mac_address', 'mtu', 'mgmt_only', + 'device', 'virtual_machine', 'name', 'lag', 'type', 'enabled', 'mac_address', 'mtu', 'mgmt_only', 'description', 'mode', ] @@ -2159,7 +2159,7 @@ class Interface(CableTermination, ComponentModel): self.virtual_machine.name if self.virtual_machine else None, self.name, self.lag.name if self.lag else None, - self.get_form_factor_display(), + self.get_type_display(), self.enabled, self.mac_address, self.mtu, @@ -2177,18 +2177,18 @@ class Interface(CableTermination, ComponentModel): raise ValidationError("An interface must belong to either a device or a virtual machine.") # VM interfaces must be virtual - if self.virtual_machine and self.form_factor is not IFACE_FF_VIRTUAL: + if self.virtual_machine and self.type is not IFACE_TYPE_VIRTUAL: raise ValidationError({ - 'form_factor': "Virtual machines can only have virtual interfaces." + 'type': "Virtual machines can only have virtual interfaces." }) # Virtual interfaces cannot be connected - if self.form_factor in NONCONNECTABLE_IFACE_TYPES and ( + if self.type in NONCONNECTABLE_IFACE_TYPES and ( self.cable or getattr(self, 'circuit_termination', False) ): raise ValidationError({ - 'form_factor': "Virtual and wireless interfaces cannot be connected to another interface or circuit. " - "Disconnect the interface or choose a suitable form factor." + 'type': "Virtual and wireless interfaces cannot be connected to another interface or circuit. " + "Disconnect the interface or choose a suitable type." }) # An interface's LAG must belong to the same device (or VC master) @@ -2200,15 +2200,15 @@ class Interface(CableTermination, ComponentModel): }) # A virtual interface cannot have a parent LAG - if self.form_factor in NONCONNECTABLE_IFACE_TYPES and self.lag is not None: + if self.type in NONCONNECTABLE_IFACE_TYPES and self.lag is not None: raise ValidationError({ - 'lag': "{} interfaces cannot have a parent LAG interface.".format(self.get_form_factor_display()) + 'lag': "{} interfaces cannot have a parent LAG interface.".format(self.get_type_display()) }) # Only a LAG can have LAG members - if self.form_factor != IFACE_FF_LAG and self.member_interfaces.exists(): + if self.type != IFACE_TYPE_LAG and self.member_interfaces.exists(): raise ValidationError({ - 'form_factor': "Cannot change interface form factor; it has LAG members ({}).".format( + 'type': "Cannot change interface type; it has LAG members ({}).".format( ", ".join([iface.name for iface in self.member_interfaces.all()]) ) }) @@ -2284,19 +2284,19 @@ class Interface(CableTermination, ComponentModel): @property def is_connectable(self): - return self.form_factor not in NONCONNECTABLE_IFACE_TYPES + return self.type not in NONCONNECTABLE_IFACE_TYPES @property def is_virtual(self): - return self.form_factor in VIRTUAL_IFACE_TYPES + return self.type in VIRTUAL_IFACE_TYPES @property def is_wireless(self): - return self.form_factor in WIRELESS_IFACE_TYPES + return self.type in WIRELESS_IFACE_TYPES @property def is_lag(self): - return self.form_factor == IFACE_FF_LAG + return self.type == IFACE_TYPE_LAG @property def count_ipaddresses(self): @@ -2740,11 +2740,11 @@ class Cable(ChangeLoggedModel): if ( ( isinstance(endpoint_a, Interface) and - endpoint_a.form_factor == IFACE_FF_VIRTUAL + endpoint_a.type == IFACE_TYPE_VIRTUAL ) or ( isinstance(endpoint_b, Interface) and - endpoint_b.form_factor == IFACE_FF_VIRTUAL + endpoint_b.type == IFACE_TYPE_VIRTUAL ) ): raise ValidationError("Cannot connect to a virtual interface") diff --git a/netbox/dcim/tables.py b/netbox/dcim/tables.py index 785166bb4..03f77fc4a 100644 --- a/netbox/dcim/tables.py +++ b/netbox/dcim/tables.py @@ -415,7 +415,7 @@ class InterfaceTemplateTable(BaseTable): class Meta(BaseTable.Meta): model = InterfaceTemplate - fields = ('pk', 'name', 'mgmt_only', 'form_factor') + fields = ('pk', 'name', 'mgmt_only', 'type') empty_text = "None" @@ -593,7 +593,7 @@ class InterfaceTable(BaseTable): class Meta(BaseTable.Meta): model = Interface - fields = ('name', 'form_factor', 'lag', 'enabled', 'mgmt_only', 'description') + fields = ('name', 'type', 'lag', 'enabled', 'mgmt_only', 'description') class FrontPortTable(BaseTable): diff --git a/netbox/dcim/tests/test_api.py b/netbox/dcim/tests/test_api.py index f572047b5..ea06c2ae6 100644 --- a/netbox/dcim/tests/test_api.py +++ b/netbox/dcim/tests/test_api.py @@ -2553,7 +2553,7 @@ class InterfaceTest(APITestCase): def test_update_interface(self): lag_interface = Interface.objects.create( - device=self.device, name='Test LAG Interface', form_factor=IFACE_FF_LAG + device=self.device, name='Test LAG Interface', type=IFACE_TYPE_LAG ) data = { @@ -2841,7 +2841,7 @@ class CableTest(APITestCase): ) for device in [self.device1, self.device2]: for i in range(0, 10): - Interface(device=device, form_factor=IFACE_FF_1GE_FIXED, name='eth{}'.format(i)).save() + Interface(device=device, type=IFACE_TYPE_1GE_FIXED, name='eth{}'.format(i)).save() self.cable1 = Cable( termination_a=self.device1.interfaces.get(name='eth0'), @@ -3410,23 +3410,23 @@ class VirtualChassisTest(APITestCase): device_type=device_type, device_role=device_role, name='StackSwitch9', site=site ) for i in range(0, 13): - Interface.objects.create(device=self.device1, name='1/{}'.format(i), form_factor=IFACE_FF_1GE_FIXED) + Interface.objects.create(device=self.device1, name='1/{}'.format(i), type=IFACE_TYPE_1GE_FIXED) for i in range(0, 13): - Interface.objects.create(device=self.device2, name='2/{}'.format(i), form_factor=IFACE_FF_1GE_FIXED) + Interface.objects.create(device=self.device2, name='2/{}'.format(i), type=IFACE_TYPE_1GE_FIXED) for i in range(0, 13): - Interface.objects.create(device=self.device3, name='3/{}'.format(i), form_factor=IFACE_FF_1GE_FIXED) + Interface.objects.create(device=self.device3, name='3/{}'.format(i), type=IFACE_TYPE_1GE_FIXED) for i in range(0, 13): - Interface.objects.create(device=self.device4, name='1/{}'.format(i), form_factor=IFACE_FF_1GE_FIXED) + Interface.objects.create(device=self.device4, name='1/{}'.format(i), type=IFACE_TYPE_1GE_FIXED) for i in range(0, 13): - Interface.objects.create(device=self.device5, name='2/{}'.format(i), form_factor=IFACE_FF_1GE_FIXED) + Interface.objects.create(device=self.device5, name='2/{}'.format(i), type=IFACE_TYPE_1GE_FIXED) for i in range(0, 13): - Interface.objects.create(device=self.device6, name='3/{}'.format(i), form_factor=IFACE_FF_1GE_FIXED) + Interface.objects.create(device=self.device6, name='3/{}'.format(i), type=IFACE_TYPE_1GE_FIXED) for i in range(0, 13): - Interface.objects.create(device=self.device7, name='1/{}'.format(i), form_factor=IFACE_FF_1GE_FIXED) + Interface.objects.create(device=self.device7, name='1/{}'.format(i), type=IFACE_TYPE_1GE_FIXED) for i in range(0, 13): - Interface.objects.create(device=self.device8, name='2/{}'.format(i), form_factor=IFACE_FF_1GE_FIXED) + Interface.objects.create(device=self.device8, name='2/{}'.format(i), type=IFACE_TYPE_1GE_FIXED) for i in range(0, 13): - Interface.objects.create(device=self.device9, name='3/{}'.format(i), form_factor=IFACE_FF_1GE_FIXED) + Interface.objects.create(device=self.device9, name='3/{}'.format(i), type=IFACE_TYPE_1GE_FIXED) # Create two VirtualChassis with three members each self.vc1 = VirtualChassis.objects.create(master=self.device1, domain='test-domain-1') diff --git a/netbox/dcim/tests/test_models.py b/netbox/dcim/tests/test_models.py index 757af61f4..e0af86b20 100644 --- a/netbox/dcim/tests/test_models.py +++ b/netbox/dcim/tests/test_models.py @@ -249,7 +249,7 @@ class CableTestCase(TestCase): """ A cable connection cannot include a virtual interface """ - virtual_interface = Interface(device=self.device1, name="V1", form_factor=0) + virtual_interface = Interface(device=self.device1, name="V1", type=0) cable = Cable(termination_a=self.interface2, termination_b=virtual_interface) with self.assertRaises(ValidationError): cable.clean() diff --git a/netbox/dcim/tests/test_views.py b/netbox/dcim/tests/test_views.py index 088806597..6e34b8ae9 100644 --- a/netbox/dcim/tests/test_views.py +++ b/netbox/dcim/tests/test_views.py @@ -3,7 +3,7 @@ import urllib.parse from django.test import Client, TestCase from django.urls import reverse -from dcim.constants import CABLE_TYPE_CAT6, IFACE_FF_1GE_FIXED +from dcim.constants import CABLE_TYPE_CAT6, IFACE_TYPE_1GE_FIXED from dcim.models import ( Cable, Device, DeviceRole, DeviceType, Interface, InventoryItem, Manufacturer, Platform, Rack, RackGroup, RackReservation, RackRole, Site, Region, VirtualChassis, @@ -370,17 +370,17 @@ class CableTestCase(TestCase): device2 = Device(name='Device 2', site=site, device_type=devicetype, device_role=devicerole) device2.save() - iface1 = Interface(device=device1, name='Interface 1', form_factor=IFACE_FF_1GE_FIXED) + iface1 = Interface(device=device1, name='Interface 1', type=IFACE_TYPE_1GE_FIXED) iface1.save() - iface2 = Interface(device=device1, name='Interface 2', form_factor=IFACE_FF_1GE_FIXED) + iface2 = Interface(device=device1, name='Interface 2', type=IFACE_TYPE_1GE_FIXED) iface2.save() - iface3 = Interface(device=device1, name='Interface 3', form_factor=IFACE_FF_1GE_FIXED) + iface3 = Interface(device=device1, name='Interface 3', type=IFACE_TYPE_1GE_FIXED) iface3.save() - iface4 = Interface(device=device2, name='Interface 1', form_factor=IFACE_FF_1GE_FIXED) + iface4 = Interface(device=device2, name='Interface 1', type=IFACE_TYPE_1GE_FIXED) iface4.save() - iface5 = Interface(device=device2, name='Interface 2', form_factor=IFACE_FF_1GE_FIXED) + iface5 = Interface(device=device2, name='Interface 2', type=IFACE_TYPE_1GE_FIXED) iface5.save() - iface6 = Interface(device=device2, name='Interface 3', form_factor=IFACE_FF_1GE_FIXED) + iface6 = Interface(device=device2, name='Interface 3', type=IFACE_TYPE_1GE_FIXED) iface6.save() Cable(termination_a=iface1, termination_b=iface4, type=CABLE_TYPE_CAT6).save() diff --git a/netbox/templates/dcim/device_lldp_neighbors.html b/netbox/templates/dcim/device_lldp_neighbors.html index d2bba9562..4764fffa2 100644 --- a/netbox/templates/dcim/device_lldp_neighbors.html +++ b/netbox/templates/dcim/device_lldp_neighbors.html @@ -27,7 +27,7 @@ {{ iface.connected_endpoint.device }} - {{ iface.connected_endpoint }} + {{ iface.connected_endpoint }} {% elif iface.connected_endpoint.circuit %} {% with circuit=iface.connected_endpoint.circuit %} diff --git a/netbox/templates/dcim/inc/cable_trace_end.html b/netbox/templates/dcim/inc/cable_trace_end.html index c4c41e4ba..4eab4d1d7 100644 --- a/netbox/templates/dcim/inc/cable_trace_end.html +++ b/netbox/templates/dcim/inc/cable_trace_end.html @@ -20,7 +20,7 @@ {% with model=end|model_name %} {{ model|bettertitle }} {{ end }}
{% if model == 'interface' %} - {{ end.get_form_factor_display }} + {{ end.get_type_display }} {% elif model == 'front port' or model == 'rear port' %} {{ end.get_type_display }} {% endif %} diff --git a/netbox/templates/dcim/inc/interface.html b/netbox/templates/dcim/inc/interface.html index 4aa4e377d..fec69c875 100644 --- a/netbox/templates/dcim/inc/interface.html +++ b/netbox/templates/dcim/inc/interface.html @@ -10,7 +10,7 @@ {# Icon and name #} - + {{ iface }} @@ -81,7 +81,7 @@ - + {{ iface.connected_endpoint }} diff --git a/netbox/templates/dcim/interface.html b/netbox/templates/dcim/interface.html index 8d12535c0..4e7cc6306 100644 --- a/netbox/templates/dcim/interface.html +++ b/netbox/templates/dcim/interface.html @@ -60,7 +60,7 @@ Type - {{ interface.get_form_factor_display }} + {{ interface.get_type_display }} Enabled @@ -125,7 +125,7 @@ Type - {{ connected_interface.get_form_factor_display }} + {{ connected_interface.get_type_display }} Enabled @@ -227,7 +227,7 @@ {{ member }} - {{ member.get_form_factor_display }} + {{ member.get_type_display }} {% empty %} diff --git a/netbox/templates/dcim/interface_edit.html b/netbox/templates/dcim/interface_edit.html index 6acdf39e3..fedb1b61a 100644 --- a/netbox/templates/dcim/interface_edit.html +++ b/netbox/templates/dcim/interface_edit.html @@ -6,7 +6,7 @@
Interface
{% render_field form.name %} - {% render_field form.form_factor %} + {% render_field form.type %} {% render_field form.enabled %} {% render_field form.lag %} {% render_field form.mac_address %} diff --git a/netbox/virtualization/api/serializers.py b/netbox/virtualization/api/serializers.py index 86953cadc..23ab67741 100644 --- a/netbox/virtualization/api/serializers.py +++ b/netbox/virtualization/api/serializers.py @@ -3,7 +3,7 @@ from rest_framework import serializers from taggit_serializer.serializers import TaggitSerializer, TagListSerializerField from dcim.api.nested_serializers import NestedDeviceRoleSerializer, NestedPlatformSerializer, NestedSiteSerializer -from dcim.constants import IFACE_FF_CHOICES, IFACE_FF_VIRTUAL, IFACE_MODE_CHOICES +from dcim.constants import IFACE_TYPE_CHOICES, IFACE_TYPE_VIRTUAL, IFACE_MODE_CHOICES from dcim.models import Interface from extras.api.customfields import CustomFieldModelSerializer from ipam.api.nested_serializers import NestedIPAddressSerializer, NestedVLANSerializer @@ -92,7 +92,7 @@ class VirtualMachineWithConfigContextSerializer(VirtualMachineSerializer): class InterfaceSerializer(TaggitSerializer, ValidatedModelSerializer): virtual_machine = NestedVirtualMachineSerializer() - form_factor = ChoiceField(choices=IFACE_FF_CHOICES, default=IFACE_FF_VIRTUAL, required=False) + type = ChoiceField(choices=IFACE_TYPE_CHOICES, default=IFACE_TYPE_VIRTUAL, required=False) mode = ChoiceField(choices=IFACE_MODE_CHOICES, required=False, allow_null=True) untagged_vlan = NestedVLANSerializer(required=False, allow_null=True) tagged_vlans = SerializedPKRelatedField( @@ -106,6 +106,6 @@ class InterfaceSerializer(TaggitSerializer, ValidatedModelSerializer): class Meta: model = Interface fields = [ - 'id', 'virtual_machine', 'name', 'form_factor', 'enabled', 'mtu', 'mac_address', 'description', 'mode', + 'id', 'virtual_machine', 'name', 'type', 'enabled', 'mtu', 'mac_address', 'description', 'mode', 'untagged_vlan', 'tagged_vlans', 'tags', ] diff --git a/netbox/virtualization/forms.py b/netbox/virtualization/forms.py index 1e5f42160..710c41ffb 100644 --- a/netbox/virtualization/forms.py +++ b/netbox/virtualization/forms.py @@ -2,7 +2,7 @@ from django import forms from django.core.exceptions import ValidationError from taggit.forms import TagField -from dcim.constants import IFACE_FF_VIRTUAL, IFACE_MODE_ACCESS, IFACE_MODE_TAGGED_ALL +from dcim.constants import IFACE_TYPE_VIRTUAL, IFACE_MODE_ACCESS, IFACE_MODE_TAGGED_ALL from dcim.forms import INTERFACE_MODE_HELP_TEXT from dcim.models import Device, DeviceRole, Interface, Platform, Rack, Region, Site from extras.forms import AddRemoveTagsForm, CustomFieldBulkEditForm, CustomFieldForm, CustomFieldFilterForm @@ -18,8 +18,8 @@ from utilities.forms import ( from .constants import VM_STATUS_CHOICES from .models import Cluster, ClusterGroup, ClusterType, VirtualMachine -VIFACE_FF_CHOICES = ( - (IFACE_FF_VIRTUAL, 'Virtual'), +VIFACE_TYPE_CHOICES = ( + (IFACE_TYPE_VIRTUAL, 'Virtual'), ) @@ -625,12 +625,12 @@ class InterfaceForm(BootstrapMixin, forms.ModelForm): class Meta: model = Interface fields = [ - 'virtual_machine', 'name', 'form_factor', 'enabled', 'mac_address', 'mtu', 'description', 'mode', 'tags', + 'virtual_machine', 'name', 'type', 'enabled', 'mac_address', 'mtu', 'description', 'mode', 'tags', 'untagged_vlan', 'tagged_vlans', ] widgets = { 'virtual_machine': forms.HiddenInput(), - 'form_factor': forms.HiddenInput(), + 'type': forms.HiddenInput(), 'mode': StaticSelect2() } labels = { @@ -661,9 +661,9 @@ class InterfaceCreateForm(ComponentForm): name_pattern = ExpandableNameField( label='Name' ) - form_factor = forms.ChoiceField( - choices=VIFACE_FF_CHOICES, - initial=IFACE_FF_VIRTUAL, + type = forms.ChoiceField( + choices=VIFACE_TYPE_CHOICES, + initial=IFACE_TYPE_VIRTUAL, widget=forms.HiddenInput() ) enabled = forms.BooleanField( @@ -737,9 +737,9 @@ class VirtualMachineBulkAddComponentForm(BootstrapMixin, forms.Form): class VirtualMachineBulkAddInterfaceForm(VirtualMachineBulkAddComponentForm): - form_factor = forms.ChoiceField( - choices=VIFACE_FF_CHOICES, - initial=IFACE_FF_VIRTUAL, + type = forms.ChoiceField( + choices=VIFACE_TYPE_CHOICES, + initial=IFACE_TYPE_VIRTUAL, widget=forms.HiddenInput() ) enabled = forms.BooleanField( diff --git a/netbox/virtualization/tests/test_api.py b/netbox/virtualization/tests/test_api.py index eef304c2f..49ae849a2 100644 --- a/netbox/virtualization/tests/test_api.py +++ b/netbox/virtualization/tests/test_api.py @@ -2,7 +2,7 @@ from django.urls import reverse from netaddr import IPNetwork from rest_framework import status -from dcim.constants import IFACE_FF_VIRTUAL, IFACE_MODE_TAGGED +from dcim.constants import IFACE_TYPE_VIRTUAL, IFACE_MODE_TAGGED from dcim.models import Interface from ipam.models import IPAddress, VLAN from utilities.testing import APITestCase @@ -489,17 +489,17 @@ class InterfaceTest(APITestCase): self.interface1 = Interface.objects.create( virtual_machine=self.virtualmachine, name='Test Interface 1', - form_factor=IFACE_FF_VIRTUAL + type=IFACE_TYPE_VIRTUAL ) self.interface2 = Interface.objects.create( virtual_machine=self.virtualmachine, name='Test Interface 2', - form_factor=IFACE_FF_VIRTUAL + type=IFACE_TYPE_VIRTUAL ) self.interface3 = Interface.objects.create( virtual_machine=self.virtualmachine, name='Test Interface 3', - form_factor=IFACE_FF_VIRTUAL + type=IFACE_TYPE_VIRTUAL ) self.vlan1 = VLAN.objects.create(name="Test VLAN 1", vid=1) From 778d56ac1209b7ed953cd336cf91c356c45e9f22 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Fri, 12 Apr 2019 13:46:37 -0400 Subject: [PATCH 2/4] Update 'form_factor' in docs --- docs/core-functionality/devices.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core-functionality/devices.md b/docs/core-functionality/devices.md index 176a70676..51486f7c1 100644 --- a/docs/core-functionality/devices.md +++ b/docs/core-functionality/devices.md @@ -81,7 +81,7 @@ Power ports connect only to power outlets. Power connections can be marked as ei Interfaces connect to one another in a symmetric manner: If interface A connects to interface B, interface B therefore connects to interface A. Each type of connection can be classified as either *planned* or *connected*. -Each interface is a assigned a form factor denoting its physical properties. Two special form factors exist: the "virtual" form factor can be used to designate logical interfaces (such as SVIs), and the "LAG" form factor can be used to desinate link aggregation groups to which physical interfaces can be assigned. +Each interface is a assigned a type denoting its physical properties. Two special types exist: the "virtual" type can be used to designate logical interfaces (such as SVIs), and the "LAG" type can be used to desinate link aggregation groups to which physical interfaces can be assigned. Each interface can also be enabled or disabled, and optionally designated as management-only (for out-of-band management). Fields are also provided to store an interface's MTU and MAC address. From 4acd84223718733fb65961658f979654c91d295b Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Fri, 12 Apr 2019 13:57:33 -0400 Subject: [PATCH 3/4] Maintain backward-compatibile support for Interface.form_factor until v2.7 --- netbox/dcim/api/serializers.py | 12 ++++++++---- netbox/dcim/models.py | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 4 deletions(-) diff --git a/netbox/dcim/api/serializers.py b/netbox/dcim/api/serializers.py index fe0ea9da8..ab1be0b01 100644 --- a/netbox/dcim/api/serializers.py +++ b/netbox/dcim/api/serializers.py @@ -232,10 +232,12 @@ class PowerOutletTemplateSerializer(ValidatedModelSerializer): class InterfaceTemplateSerializer(ValidatedModelSerializer): device_type = NestedDeviceTypeSerializer() type = ChoiceField(choices=IFACE_TYPE_CHOICES, required=False) + # TODO: Remove in v2.7 (backward-compatibility for form_factor) + form_factor = ChoiceField(choices=IFACE_TYPE_CHOICES, required=False) class Meta: model = InterfaceTemplate - fields = ['id', 'device_type', 'name', 'type', 'mgmt_only'] + fields = ['id', 'device_type', 'name', 'type', 'form_factor', 'mgmt_only'] class RearPortTemplateSerializer(ValidatedModelSerializer): @@ -419,6 +421,8 @@ class PowerPortSerializer(TaggitSerializer, ConnectedEndpointSerializer): class InterfaceSerializer(TaggitSerializer, ConnectedEndpointSerializer): device = NestedDeviceSerializer() type = ChoiceField(choices=IFACE_TYPE_CHOICES, required=False) + # TODO: Remove in v2.7 (backward-compatibility for form_factor) + form_factor = ChoiceField(choices=IFACE_TYPE_CHOICES, required=False) lag = NestedInterfaceSerializer(required=False, allow_null=True) mode = ChoiceField(choices=IFACE_MODE_CHOICES, required=False, allow_null=True) untagged_vlan = NestedVLANSerializer(required=False, allow_null=True) @@ -434,9 +438,9 @@ class InterfaceSerializer(TaggitSerializer, ConnectedEndpointSerializer): class Meta: model = Interface fields = [ - 'id', 'device', 'name', 'type', 'enabled', 'lag', 'mtu', 'mac_address', 'mgmt_only', 'description', - 'connected_endpoint_type', 'connected_endpoint', 'connection_status', 'cable', 'mode', 'untagged_vlan', - 'tagged_vlans', 'tags', 'count_ipaddresses', + 'id', 'device', 'name', 'type', 'form_factor', 'enabled', 'lag', 'mtu', 'mac_address', 'mgmt_only', + 'description', 'connected_endpoint_type', 'connected_endpoint', 'connection_status', 'cable', 'mode', + 'untagged_vlan', 'tagged_vlans', 'tags', 'count_ipaddresses', ] # TODO: This validation should be handled by Interface.clean() diff --git a/netbox/dcim/models.py b/netbox/dcim/models.py index 0fd060115..d1eb0d98d 100644 --- a/netbox/dcim/models.py +++ b/netbox/dcim/models.py @@ -1150,6 +1150,22 @@ class InterfaceTemplate(ComponentTemplateModel): def __str__(self): return self.name + # TODO: Remove in v2.7 + @property + def form_factor(self): + """ + Backward-compatibility for form_factor + """ + return self.type + + # TODO: Remove in v2.7 + @form_factor.setter + def form_factor(self, value): + """ + Backward-compatibility for form_factor + """ + self.type = value + class FrontPortTemplate(ComponentTemplateModel): """ @@ -2254,6 +2270,22 @@ class Interface(CableTermination, ComponentModel): object_data=serialize_object(self) ).save() + # TODO: Remove in v2.7 + @property + def form_factor(self): + """ + Backward-compatibility for form_factor + """ + return self.type + + # TODO: Remove in v2.7 + @form_factor.setter + def form_factor(self, value): + """ + Backward-compatibility for form_factor + """ + self.type = value + @property def connected_endpoint(self): if self._connected_interface: From 533520ec1f30e11352aa4de8d0e3d37887984ae4 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Fri, 12 Apr 2019 14:09:03 -0400 Subject: [PATCH 4/4] Rename Interface type (classification) filter to kind --- CHANGELOG.md | 6 ++++++ netbox/dcim/filters.py | 9 ++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 19fd2535a..5cc743f4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,8 +56,14 @@ to now use "Extras | Tag." * [#2324](https://github.com/digitalocean/netbox/issues/2324) - Add `color` option for tags * [#2643](https://github.com/digitalocean/netbox/issues/2643) - Add `description` field to console/power components and device bays * [#2791](https://github.com/digitalocean/netbox/issues/2791) - Add a `comment` field for tags +* [#2920](https://github.com/digitalocean/netbox/issues/2920) - Rename Interface `form_factor` to `type` * [#2926](https://github.com/digitalocean/netbox/issues/2926) - Add changelog to the Tag model +## API Changes + +* dcim.Interface: `form_factor` has been renamed to `type`. Backward-compatibile support for `form_factor` will be maintained until NetBox v2.7. +* dcim.Interface: The `type` filter has been renamed to `kind`. + ## Bug Fixes * [#2968](https://github.com/digitalocean/netbox/issues/2968) - Correct API documentation for SerializerMethodFields diff --git a/netbox/dcim/filters.py b/netbox/dcim/filters.py index c1fc76191..eb7636c94 100644 --- a/netbox/dcim/filters.py +++ b/netbox/dcim/filters.py @@ -753,10 +753,9 @@ class InterfaceFilter(django_filters.FilterSet): lookup_expr='isnull', exclude=True ) - class_ = django_filters.CharFilter( - field_name='class', - method='filter_type', - label='Interface type', + kind = django_filters.CharFilter( + method='filter_kind', + label='Kind of interface', ) lag_id = django_filters.ModelMultipleChoiceFilter( field_name='lag', @@ -819,7 +818,7 @@ class InterfaceFilter(django_filters.FilterSet): Q(tagged_vlans__vid=value) ) - def filter_type(self, queryset, name, value): + def filter_kind(self, queryset, name, value): value = value.strip().lower() return { 'physical': queryset.exclude(type__in=NONCONNECTABLE_IFACE_TYPES),