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

Introduce the wireless app and SSID model

This commit is contained in:
jeremystretch
2021-10-12 12:27:12 -04:00
parent 8e1535f7ec
commit 8b80b0c3df
28 changed files with 470 additions and 0 deletions

40
netbox/wireless/models.py Normal file
View File

@ -0,0 +1,40 @@
from django.db import models
from extras.utils import extras_features
from netbox.models import PrimaryModel
from utilities.querysets import RestrictedQuerySet
__all__ = (
'SSID',
)
@extras_features('custom_fields', 'custom_links', 'export_templates', 'tags', 'webhooks')
class SSID(PrimaryModel):
"""
A service set identifier belonging to a wireless network.
"""
name = models.CharField(
max_length=32
)
vlan = models.ForeignKey(
to='ipam.VLAN',
on_delete=models.PROTECT,
blank=True,
null=True,
verbose_name='VLAN'
)
description = models.CharField(
max_length=200,
blank=True
)
objects = RestrictedQuerySet.as_manager()
class Meta:
ordering = ('name', 'pk')
verbose_name = 'SSID'
verbose_name_plural = 'SSIDs'
def __str__(self):
return self.name