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

#9935 add new wireless choices for interfaces (#10116)

* #9935 add new wireless choices for interfaces

* #9935 add new wireless interfaces to constants

* #9935 oops - remove login.html changes
This commit is contained in:
Arthur Hanson
2022-08-24 13:36:38 -07:00
committed by GitHub
parent bfbf97aec9
commit eb2bf3469e
3 changed files with 32 additions and 0 deletions

View File

@ -790,7 +790,9 @@ class InterfaceTypeChoices(ChoiceSet):
TYPE_80211AC = 'ieee802.11ac'
TYPE_80211AD = 'ieee802.11ad'
TYPE_80211AX = 'ieee802.11ax'
TYPE_80211AY = 'ieee802.11ay'
TYPE_802151 = 'ieee802.15.1'
TYPE_OTHER_WIRELESS = 'other-wireless'
# Cellular
TYPE_GSM = 'gsm'
@ -918,7 +920,9 @@ class InterfaceTypeChoices(ChoiceSet):
(TYPE_80211AC, 'IEEE 802.11ac'),
(TYPE_80211AD, 'IEEE 802.11ad'),
(TYPE_80211AX, 'IEEE 802.11ax'),
(TYPE_80211AY, 'IEEE 802.11ay'),
(TYPE_802151, 'IEEE 802.15.1 (Bluetooth)'),
(TYPE_OTHER_WIRELESS, 'Other (Wireless)'),
)
),
(

View File

@ -45,6 +45,9 @@ WIRELESS_IFACE_TYPES = [
InterfaceTypeChoices.TYPE_80211AC,
InterfaceTypeChoices.TYPE_80211AD,
InterfaceTypeChoices.TYPE_80211AX,
InterfaceTypeChoices.TYPE_80211AY,
InterfaceTypeChoices.TYPE_802151,
InterfaceTypeChoices.TYPE_OTHER_WIRELESS,
]
NONCONNECTABLE_IFACE_TYPES = VIRTUAL_IFACE_TYPES + WIRELESS_IFACE_TYPES

View File

@ -0,0 +1,25 @@
# Generated by Django 4.0.7 on 2022-08-24 17:18
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('dcim', '0161_cabling_cleanup'),
('wireless', '0004_wireless_tenancy'),
]
operations = [
migrations.AlterField(
model_name='wirelesslink',
name='interface_a',
field=models.ForeignKey(limit_choices_to={'type__in': ['ieee802.11a', 'ieee802.11g', 'ieee802.11n', 'ieee802.11ac', 'ieee802.11ad', 'ieee802.11ax', 'ieee802.11ay', 'ieee802.15.1', 'other-wireless']}, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='dcim.interface'),
),
migrations.AlterField(
model_name='wirelesslink',
name='interface_b',
field=models.ForeignKey(limit_choices_to={'type__in': ['ieee802.11a', 'ieee802.11g', 'ieee802.11n', 'ieee802.11ac', 'ieee802.11ad', 'ieee802.11ax', 'ieee802.11ay', 'ieee802.15.1', 'other-wireless']}, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='dcim.interface'),
),
]