Skip to content

Fix usage of mac address patterns in schema.py to allow using variables #238

@lpalgarvio

Description

@lpalgarvio

Hello,
Everytime i try to add a variable to BSSID field on a WiFi interface configured as station,
It breaks the JSON configuration after/during saving.

ie,

        {
            "wireless": {
                "network": [
                    "lan"
                ],
                "mode": "station",
                "radio": "radio1",
                "ssid": "{{wireless_wlan0sta_ssid}}",
                "bssid": "00:11:22:33:44:55",
                "wds": true,
                "encryption": {
                    "protocol": "wpa2_personal",
                    "key": "{{wireless_wlan0sta_key}}",
                    "cipher": "ccmp",
                    "ieee80211w": "1"
                }
            },
            "type": "wireless",
            "name": "radio1sta",
            "network": "wlan1sta"
        },

becomes

        {
            "type": "ethernet",
            "name": "radio1sta",
            "network": "wlan1sta",
            "wireless": {
                "network": [
                    "lan"
                ],
                "mode": "station",
                "radio": "radio1",
                "ssid": "{{wireless_wlan1sta_ssid}}",
                "bssid": "{{wireless_wlan1sta_bsid}}",
                "wds": true,
                "encryption": {
                    "protocol": "wpa2_personal",
                    "key": "{{wireless_wlan1sta_key}}",
                    "cipher": "ccmp",
                    "ieee80211w": "1"
                }
            }
        }

I haven't looked at the code but i can try make a PR sometime later if i find the issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions