mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-21 21:02:23 -06:00
Add WirelessLink model
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
from dcim.models import Interface
|
||||
from extras.forms import CustomFieldModelCSVForm
|
||||
from ipam.models import VLAN
|
||||
from utilities.forms import CSVModelChoiceField
|
||||
from wireless.models import WirelessLAN
|
||||
from wireless.models import *
|
||||
|
||||
__all__ = (
|
||||
'WirelessLANCSVForm',
|
||||
'WirelessLinkCSVForm',
|
||||
)
|
||||
|
||||
|
||||
@@ -18,3 +20,16 @@ class WirelessLANCSVForm(CustomFieldModelCSVForm):
|
||||
class Meta:
|
||||
model = WirelessLAN
|
||||
fields = ('ssid', 'description', 'vlan')
|
||||
|
||||
|
||||
class WirelessLinkCSVForm(CustomFieldModelCSVForm):
|
||||
interface_a = CSVModelChoiceField(
|
||||
queryset=Interface.objects.all()
|
||||
)
|
||||
interface_b = CSVModelChoiceField(
|
||||
queryset=Interface.objects.all()
|
||||
)
|
||||
|
||||
class Meta:
|
||||
model = WirelessLink
|
||||
fields = ('interface_a', 'interface_b', 'ssid', 'description')
|
||||
|
||||
Reference in New Issue
Block a user