mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Changelog and cleanup for #9935
This commit is contained in:
@ -5,6 +5,7 @@
|
|||||||
### Enhancements
|
### Enhancements
|
||||||
|
|
||||||
* [#6454](https://github.com/netbox-community/netbox/issues/6454) - Include contextual help when creating first objects in UI
|
* [#6454](https://github.com/netbox-community/netbox/issues/6454) - Include contextual help when creating first objects in UI
|
||||||
|
* [#9935](https://github.com/netbox-community/netbox/issues/9935) - Add 802.11ay and "other" wireless interface types
|
||||||
* [#10031](https://github.com/netbox-community/netbox/issues/10031) - Enforce `application/json` content type for REST API requests
|
* [#10031](https://github.com/netbox-community/netbox/issues/10031) - Enforce `application/json` content type for REST API requests
|
||||||
* [#10033](https://github.com/netbox-community/netbox/issues/10033) - Disable "add termination" button for point-to-point L2VPNs with two terminations
|
* [#10033](https://github.com/netbox-community/netbox/issues/10033) - Disable "add termination" button for point-to-point L2VPNs with two terminations
|
||||||
* [#10037](https://github.com/netbox-community/netbox/issues/10037) - Add link to create child interface to interface context menu
|
* [#10037](https://github.com/netbox-community/netbox/issues/10037) - Add link to create child interface to interface context menu
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
# 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'),
|
|
||||||
),
|
|
||||||
]
|
|
@ -0,0 +1,24 @@
|
|||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
import wireless.models
|
||||||
|
|
||||||
|
|
||||||
|
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=wireless.models.get_wireless_interface_types, 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=wireless.models.get_wireless_interface_types, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='dcim.interface'),
|
||||||
|
),
|
||||||
|
]
|
@ -128,20 +128,26 @@ class WirelessLAN(WirelessAuthenticationBase, NetBoxModel):
|
|||||||
return reverse('wireless:wirelesslan', args=[self.pk])
|
return reverse('wireless:wirelesslan', args=[self.pk])
|
||||||
|
|
||||||
|
|
||||||
|
def get_wireless_interface_types():
|
||||||
|
# Wrap choices in a callable to avoid generating dummy migrations
|
||||||
|
# when the choices are updated.
|
||||||
|
return {'type__in': WIRELESS_IFACE_TYPES}
|
||||||
|
|
||||||
|
|
||||||
class WirelessLink(WirelessAuthenticationBase, NetBoxModel):
|
class WirelessLink(WirelessAuthenticationBase, NetBoxModel):
|
||||||
"""
|
"""
|
||||||
A point-to-point connection between two wireless Interfaces.
|
A point-to-point connection between two wireless Interfaces.
|
||||||
"""
|
"""
|
||||||
interface_a = models.ForeignKey(
|
interface_a = models.ForeignKey(
|
||||||
to='dcim.Interface',
|
to='dcim.Interface',
|
||||||
limit_choices_to={'type__in': WIRELESS_IFACE_TYPES},
|
limit_choices_to=get_wireless_interface_types,
|
||||||
on_delete=models.PROTECT,
|
on_delete=models.PROTECT,
|
||||||
related_name='+',
|
related_name='+',
|
||||||
verbose_name="Interface A",
|
verbose_name="Interface A",
|
||||||
)
|
)
|
||||||
interface_b = models.ForeignKey(
|
interface_b = models.ForeignKey(
|
||||||
to='dcim.Interface',
|
to='dcim.Interface',
|
||||||
limit_choices_to={'type__in': WIRELESS_IFACE_TYPES},
|
limit_choices_to=get_wireless_interface_types,
|
||||||
on_delete=models.PROTECT,
|
on_delete=models.PROTECT,
|
||||||
related_name='+',
|
related_name='+',
|
||||||
verbose_name="Interface B",
|
verbose_name="Interface B",
|
||||||
|
Reference in New Issue
Block a user