Add WirelessLink model

This commit is contained in:
jeremystretch
2021-10-13 09:46:17 -04:00
parent 8a94779059
commit 594709d1fb
21 changed files with 458 additions and 58 deletions

View File

@@ -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')