CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-nautobot

Source of truth and network automation platform for network infrastructure management.

Pending
Overview
Eval results
Files

wireless.mddocs/

Wireless Management

Wireless infrastructure management including radio profiles, wireless networks, supported data rates, and device group assignments. Provides comprehensive modeling of wireless access point configurations and network broadcasting capabilities.

Capabilities

Supported Data Rate Management

Define data rates supported by wireless access point radios.

class SupportedDataRate:
    """
    Data rate that can be used by an access point radio.
    
    Attributes:
        standard (str): Wireless standard (802.11a/b/g/n/ac/ax/be)
        rate (int): Data rate in Kbps
        mcs_index (int, optional): Modulation and Coding Scheme index
    """

Radio Profile Management

Configuration profiles for wireless access point radios.

class RadioProfile:
    """
    Collection of settings that can be applied to an access point radio.
    
    Attributes:
        name (str): Profile name (unique)
        frequency (str): Frequency band (2.4GHz/5GHz/6GHz)
        tx_power_min (int): Minimum transmit power
        tx_power_max (int): Maximum transmit power
        rx_power_min (int): Minimum receive power
        channel_width (list): Supported channel widths (20/40/80/160 MHz)
        allowed_channel_list (list): List of allowed channel numbers
        regulatory_domain (str): Country/region regulatory domain
        supported_data_rates (ManyToManyField): Associated data rates
    """

Wireless Network Management

Wireless networks that can be broadcast by access points.

class WirelessNetwork:
    """
    Wireless network that can be broadcast by an access point.
    
    Attributes:
        name (str): Network name (unique)
        description (str): Optional description
        ssid (str): Service Set Identifier
        mode (str): Network mode (Central/Fabric/Standalone/Local/Mesh/Bridge)
        enabled (bool): Whether network is enabled
        authentication (str): Authentication type (Open/WPA2/WPA3 variants)
        hidden (bool): Whether SSID is hidden
        secrets_group (ForeignKey, optional): Authentication secrets
        tenant (ForeignKey, optional): Tenant ownership
    """

Device Group Assignments

Assignment models linking wireless configurations to device groups.

class ControllerManagedDeviceGroupWirelessNetworkAssignment:
    """
    Assigns a WirelessNetwork to a ControllerManagedDeviceGroup.
    
    Attributes:
        controller_managed_device_group (ForeignKey): Target device group
        wireless_network (ForeignKey): Assigned wireless network
        vlan (ForeignKey, optional): Associated VLAN
    """

class ControllerManagedDeviceGroupRadioProfileAssignment:
    """
    Assigns a RadioProfile to a ControllerManagedDeviceGroup.
    
    Attributes:
        controller_managed_device_group (ForeignKey): Target device group
        radio_profile (ForeignKey): Assigned radio profile
    """

Choice Constants

Predefined choices for wireless configuration options.

class RadioProfileChannelWidthChoices:
    """Channel width options for radio profiles."""
    WIDTH_20MHZ = 20
    WIDTH_40MHZ = 40
    WIDTH_80MHZ = 80
    WIDTH_160MHZ = 160

class RadioProfileFrequencyChoices:
    """Frequency band options for radio profiles."""
    FREQUENCY_2_4G = "2.4GHz"
    FREQUENCY_5G = "5GHz"
    FREQUENCY_6G = "6GHz"

class SupportedDataRateStandardChoices:
    """Wireless standard options for data rates."""
    A = "802.11a"
    B = "802.11b"
    G = "802.11g"
    N = "802.11n"
    AC = "802.11ac"
    AX = "802.11ax"
    BE = "802.11be"

class WirelessNetworkModeChoices:
    """Network mode options for wireless networks."""
    CENTRAL = "Central"
    FABRIC = "Fabric"
    STANDALONE = "Standalone (Autonomous)"
    LOCAL = "Local (Flex)"
    MESH = "Mesh"
    BRIDGE = "Bridge"

class WirelessNetworkAuthenticationChoices:
    """Authentication options for wireless networks."""
    OPEN = "Open"
    WPA2_PERSONAL = "WPA2 Personal"
    WPA2_ENTERPRISE = "WPA2 Enterprise"
    ENHANCED_OPEN = "Enhanced Open"
    WPA3_PERSONAL = "WPA3 Personal"
    WPA3_SAE = "WPA3 SAE"
    WPA3_ENTERPRISE = "WPA3 Enterprise"
    WPA3_ENTERPRISE_192_BIT = "WPA3 Enterprise 192Bit"

class RadioProfileRegulatoryDomainChoices:
    """Country/region regulatory domain options for radio profiles."""
    US = "US"
    EU = "EU"
    JP = "JP"
    # ... extensive list of country codes available

API Serializers

REST API serializers for wireless resources.

class SupportedDataRateSerializer:
    """Serializer for SupportedDataRate with tagging support."""

class RadioProfileSerializer:
    """Serializer for RadioProfile with JSON array field handling."""

class WirelessNetworkSerializer:
    """Serializer for WirelessNetwork with tagging support."""

class ControllerManagedDeviceGroupWirelessNetworkAssignmentSerializer:
    """Serializer for wireless network assignments."""

class ControllerManagedDeviceGroupRadioProfileAssignmentSerializer:
    """Serializer for radio profile assignments."""

API ViewSets

REST API viewsets for wireless resource management.

class SupportedDataRateViewSet:
    """ViewSet for SupportedDataRate CRUD operations with filtering."""

class RadioProfileViewSet:
    """ViewSet for RadioProfile CRUD operations with filtering."""

class WirelessNetworkViewSet:
    """ViewSet for WirelessNetwork CRUD operations with filtering."""

class ControllerManagedDeviceGroupWirelessNetworkAssignmentViewSet:
    """ViewSet for wireless network assignment operations."""

class ControllerManagedDeviceGroupRadioProfileAssignmentViewSet:
    """ViewSet for radio profile assignment operations."""

Usage Examples

Creating Supported Data Rates

from nautobot.wireless.models import SupportedDataRate
from nautobot.wireless.choices import SupportedDataRateStandardChoices

# Create 802.11ax data rates
data_rates = [
    SupportedDataRate.objects.create(
        standard=SupportedDataRateStandardChoices.AX,
        rate=150000,  # 150 Mbps
        mcs_index=7
    ),
    SupportedDataRate.objects.create(
        standard=SupportedDataRateStandardChoices.AX,
        rate=300000,  # 300 Mbps
        mcs_index=9
    ),
    SupportedDataRate.objects.create(
        standard=SupportedDataRateStandardChoices.AX,
        rate=600000,  # 600 Mbps
        mcs_index=11
    )
]

Creating Radio Profiles

from nautobot.wireless.models import RadioProfile
from nautobot.wireless.choices import (
    RadioProfileFrequencyChoices,
    RadioProfileChannelWidthChoices,
    RadioProfileRegulatoryDomainChoices
)

# Create a high-performance 5GHz radio profile
radio_profile = RadioProfile.objects.create(
    name="High Performance 5GHz",
    frequency=RadioProfileFrequencyChoices.FREQUENCY_5G,
    tx_power_min=5,
    tx_power_max=25,
    rx_power_min=-85,
    channel_width=[
        RadioProfileChannelWidthChoices.WIDTH_40MHZ,
        RadioProfileChannelWidthChoices.WIDTH_80MHZ,
        RadioProfileChannelWidthChoices.WIDTH_160MHZ
    ],
    allowed_channel_list=[36, 40, 44, 48, 52, 56, 60, 64],
    regulatory_domain=RadioProfileRegulatoryDomainChoices.US
)

# Associate supported data rates
radio_profile.supported_data_rates.set(data_rates)

Creating Wireless Networks

from nautobot.wireless.models import WirelessNetwork
from nautobot.wireless.choices import (
    WirelessNetworkModeChoices,
    WirelessNetworkAuthenticationChoices
)
from nautobot.extras.models import SecretsGroup
from nautobot.tenancy.models import Tenant

# Create a corporate wireless network
secrets_group = SecretsGroup.objects.create(name="WiFi Secrets")
tenant = Tenant.objects.create(name="Corporate")

corporate_wifi = WirelessNetwork.objects.create(
    name="Corporate WiFi",
    description="Primary corporate wireless network",
    ssid="CORP-WIFI",
    mode=WirelessNetworkModeChoices.CENTRAL,
    authentication=WirelessNetworkAuthenticationChoices.WPA3_ENTERPRISE,
    enabled=True,
    hidden=False,
    secrets_group=secrets_group,
    tenant=tenant
)

# Create a guest network
guest_wifi = WirelessNetwork.objects.create(
    name="Guest WiFi",
    description="Guest access wireless network",
    ssid="GUEST-WIFI",
    mode=WirelessNetworkModeChoices.CENTRAL,
    authentication=WirelessNetworkAuthenticationChoices.WPA2_PERSONAL,
    enabled=True,
    hidden=False,
    tenant=tenant
)

Device Group Assignments

from nautobot.wireless.models import (
    ControllerManagedDeviceGroupWirelessNetworkAssignment,
    ControllerManagedDeviceGroupRadioProfileAssignment
)
from nautobot.dcim.models import ControllerManagedDeviceGroup
from nautobot.ipam.models import VLAN

# Assume we have a device group and VLAN
device_group = ControllerManagedDeviceGroup.objects.get(name="Building-A APs")
corporate_vlan = VLAN.objects.get(name="Corporate")
guest_vlan = VLAN.objects.get(name="Guest")

# Assign wireless networks to device group
corporate_assignment = ControllerManagedDeviceGroupWirelessNetworkAssignment.objects.create(
    controller_managed_device_group=device_group,
    wireless_network=corporate_wifi,
    vlan=corporate_vlan
)

guest_assignment = ControllerManagedDeviceGroupWirelessNetworkAssignment.objects.create(
    controller_managed_device_group=device_group,
    wireless_network=guest_wifi,
    vlan=guest_vlan
)

# Assign radio profile to device group
radio_assignment = ControllerManagedDeviceGroupRadioProfileAssignment.objects.create(
    controller_managed_device_group=device_group,
    radio_profile=radio_profile
)

Multi-frequency Radio Configuration

# Create 2.4GHz radio profile for compatibility
radio_profile_24g = RadioProfile.objects.create(
    name="Standard 2.4GHz",
    frequency=RadioProfileFrequencyChoices.FREQUENCY_2_4G,
    tx_power_min=5,
    tx_power_max=20,
    rx_power_min=-80,
    channel_width=[
        RadioProfileChannelWidthChoices.WIDTH_20MHZ,
        RadioProfileChannelWidthChoices.WIDTH_40MHZ
    ],
    allowed_channel_list=[1, 6, 11],  # Non-overlapping channels
    regulatory_domain=RadioProfileRegulatoryDomainChoices.US
)

# Create 802.11g/n data rates for 2.4GHz
data_rate_24g = SupportedDataRate.objects.create(
    standard=SupportedDataRateStandardChoices.N,
    rate=72200,  # 72.2 Mbps
    mcs_index=7
)

radio_profile_24g.supported_data_rates.add(data_rate_24g)

# Assign both radio profiles to the same device group
radio_assignment_24g = ControllerManagedDeviceGroupRadioProfileAssignment.objects.create(
    controller_managed_device_group=device_group,
    radio_profile=radio_profile_24g
)

API Usage

from nautobot.wireless.api.serializers import (
    RadioProfileSerializer,
    WirelessNetworkSerializer
)

# Serialize radio profile data
radio_serializer = RadioProfileSerializer(radio_profile)
radio_data = radio_serializer.data

# Query wireless networks via API
networks = WirelessNetwork.objects.filter(enabled=True)
network_serializer = WirelessNetworkSerializer(networks, many=True)
network_data = network_serializer.data

Filtering and Search

from nautobot.wireless.filters import RadioProfileFilterSet, WirelessNetworkFilterSet

# Filter radio profiles by frequency
profiles_5g = RadioProfile.objects.filter(
    frequency=RadioProfileFrequencyChoices.FREQUENCY_5G
)

# Filter by channel width capabilities
profiles_160mhz = RadioProfile.objects.filter(
    channel_width__contains=[RadioProfileChannelWidthChoices.WIDTH_160MHZ]
)

# Search wireless networks
enterprise_networks = WirelessNetwork.objects.filter(
    authentication__icontains="enterprise"
)

# Filter by mode
central_networks = WirelessNetwork.objects.filter(
    mode=WirelessNetworkModeChoices.CENTRAL
)

API Endpoints

The wireless module exposes the following REST API endpoints:

  • /api/wireless/supported-data-rates/ - Data rate management
  • /api/wireless/radio-profiles/ - Radio profile management
  • /api/wireless/wireless-networks/ - Wireless network management
  • /api/wireless/controller-managed-device-group-radio-profile-assignments/ - Radio profile assignments
  • /api/wireless/controller-managed-device-group-wireless-network-assignments/ - Wireless network assignments

Error Handling

Common validation patterns for wireless resources:

from django.core.exceptions import ValidationError
from nautobot.wireless.models import RadioProfile

try:
    # Invalid channel width configuration
    profile = RadioProfile.objects.create(
        name="Invalid Profile",
        frequency=RadioProfileFrequencyChoices.FREQUENCY_2_4G,
        channel_width=[RadioProfileChannelWidthChoices.WIDTH_160MHZ],  # Not valid for 2.4GHz
        tx_power_min=10,
        tx_power_max=5,  # Min > Max
        regulatory_domain=RadioProfileRegulatoryDomainChoices.US
    )
except ValidationError as e:
    print(f"Validation error: {e}")

try:
    # Duplicate assignment
    from nautobot.wireless.models import ControllerManagedDeviceGroupRadioProfileAssignment
    
    # This would fail if the assignment already exists
    duplicate_assignment = ControllerManagedDeviceGroupRadioProfileAssignment.objects.create(
        controller_managed_device_group=device_group,
        radio_profile=radio_profile
    )
except ValidationError as e:
    print(f"Duplicate assignment error: {e}")

Advanced Configuration Examples

Creating a Complete Wireless Infrastructure

# Create comprehensive wireless infrastructure for a building
from nautobot.wireless.models import *
from nautobot.dcim.models import ControllerManagedDeviceGroup

# Create device groups for different floors
floors = ['Floor-1', 'Floor-2', 'Floor-3']
device_groups = []

for floor in floors:
    group = ControllerManagedDeviceGroup.objects.create(
        name=f"{floor} Access Points",
        description=f"Access points on {floor}"
    )
    device_groups.append(group)
    
    # Assign radio profiles (both 2.4GHz and 5GHz)
    ControllerManagedDeviceGroupRadioProfileAssignment.objects.create(
        controller_managed_device_group=group,
        radio_profile=radio_profile_24g
    )
    
    ControllerManagedDeviceGroupRadioProfileAssignment.objects.create(
        controller_managed_device_group=group,
        radio_profile=radio_profile
    )
    
    # Assign wireless networks
    ControllerManagedDeviceGroupWirelessNetworkAssignment.objects.create(
        controller_managed_device_group=group,
        wireless_network=corporate_wifi,
        vlan=corporate_vlan
    )
    
    ControllerManagedDeviceGroupWirelessNetworkAssignment.objects.create(
        controller_managed_device_group=group,
        wireless_network=guest_wifi,
        vlan=guest_vlan
    )

Install with Tessl CLI

npx tessl i tessl/pypi-nautobot@2.4.1

docs

circuits.md

cloud.md

core-framework.md

dcim.md

extensibility.md

index.md

ipam.md

tenancy-users.md

virtualization-cloud.md

wireless.md

tile.json