From cdd5ccaa21e524a2e5893277ac1c867c9de759f4 Mon Sep 17 00:00:00 2001 From: stephb9959 Date: Wed, 8 Sep 2021 18:51:27 -0700 Subject: [PATCH] Adding tree import. --- config-samples/ExpressWiFi.json | 103 +++++++++++++++ .../all-in-oneSSID-basic_bridge.json | 93 +++++++++++++ config-samples/all-in-oneSSID-basic_nat.json | 95 +++++++++++++ config-samples/basic-mesh.json | 125 ++++++++++++++++++ config-samples/basic-metrics_nat-SSID.json | 121 +++++++++++++++++ .../dual-ssid-auto-ch-txpwr_bridge.json | 107 +++++++++++++++ config-samples/dual-ssid-auto-ch_bridge.json | 105 +++++++++++++++ config-samples/dual-ssid-basic_bridge.json | 105 +++++++++++++++ config-samples/dual-ssid-basic_nat.json | 108 +++++++++++++++ .../dual-ssid-rate-limit_bridge.json | 113 ++++++++++++++++ config-samples/wds-ap-bridge.json | 99 ++++++++++++++ config-samples/wds-sta-bridge.json | 94 +++++++++++++ src/APConfig.cpp | 2 - test_scripts/curl/cli | 26 +++- 14 files changed, 1287 insertions(+), 9 deletions(-) create mode 100644 config-samples/ExpressWiFi.json create mode 100644 config-samples/all-in-oneSSID-basic_bridge.json create mode 100644 config-samples/all-in-oneSSID-basic_nat.json create mode 100644 config-samples/basic-mesh.json create mode 100644 config-samples/basic-metrics_nat-SSID.json create mode 100644 config-samples/dual-ssid-auto-ch-txpwr_bridge.json create mode 100644 config-samples/dual-ssid-auto-ch_bridge.json create mode 100644 config-samples/dual-ssid-basic_bridge.json create mode 100644 config-samples/dual-ssid-basic_nat.json create mode 100644 config-samples/dual-ssid-rate-limit_bridge.json create mode 100644 config-samples/wds-ap-bridge.json create mode 100644 config-samples/wds-sta-bridge.json diff --git a/config-samples/ExpressWiFi.json b/config-samples/ExpressWiFi.json new file mode 100644 index 0000000..9b365e9 --- /dev/null +++ b/config-samples/ExpressWiFi.json @@ -0,0 +1,103 @@ +{ + "uuid": 2, + "radios": [ + { + "band": "5G", + "channel": "auto", + "channel-mode": "HE", + "channel-width": 80, + "country": "CA" + }, + { + "band": "2G", + "channel": "auto", + "channel-mode": "HE", + "channel-width": 20, + "country": "CA" + } + ], + + "interfaces": [ + { + "name": "WAN", + "role": "upstream", + "services": [ "lldp" ], + "ethernet": [ + { + "select-ports": [ + "WAN*" + ] + } + ], + "ipv4": { + "addressing": "dynamic" + } + }, + { + "name": "LAN", + "role": "downstream", + "services": [ "ssh", "lldp", "open-flow"], + "ethernet": [ + { + "select-ports": [ + "LAN*" + ] + } + ], + "ipv4": { + "addressing": "static", + "subnet": "192.168.1.1/24", + "dhcp": { + "lease-first": 10, + "lease-count": 100, + "lease-time": "6h" + } + }, + "ssids": [ + { + "name": "ExpressWiFi", + "wifi-bands": [ + "5G", "2G" + ], + "bss-mode": "ap" + } + ] + } + ], + "metrics": { + "statistics": { + "interval": 120, + "types": [ "ssids", "lldp", "clients" ] + }, + "health": { + "interval": 120 + }, + "wifi-frames": { + "filters": [ "probe", + "auth", + "assoc", + "disassoc", + "deauth", + "local-deauth", + "inactive-deauth", + "key-mismatch", + "beacon-report", + "radar-detected"] + }, + "dhcp-snooping": { + "filters": [ "ack", "discover", "offer", "request", "solicit", "reply", "renew" ] + } + }, + "services": { + "lldp": { + "describe": "uCentral", + "location": "universe" + }, + "ssh": { + "port": 22 + }, + "open-flow": { + "controller": "18.130.73.35" + } + } +} diff --git a/config-samples/all-in-oneSSID-basic_bridge.json b/config-samples/all-in-oneSSID-basic_bridge.json new file mode 100644 index 0000000..f5f2bf3 --- /dev/null +++ b/config-samples/all-in-oneSSID-basic_bridge.json @@ -0,0 +1,93 @@ +{ + "uuid": 2, + "radios": [ + { + "band": "5G", + "channel": 52, + "channel-mode": "HE", + "channel-width": 80, + "country": "CA" + }, + { + "band": "2G", + "channel": 11, + "channel-mode": "HE", + "channel-width": 20, + "country": "CA" + } + ], + + "interfaces": [ + { + "name": "WAN", + "role": "upstream", + "services": [ "lldp" ], + "ethernet": [ + { + "select-ports": [ + "WAN*" + ] + } + ], + "ipv4": { + "addressing": "dynamic" + }, + "ssids": [ + { + "name": "OpenWifi", + "wifi-bands": [ + "2G", "5G" + ], + "bss-mode": "ap", + "encryption": { + "proto": "psk2", + "key": "OpenWifi", + "ieee80211w": "optional" + } + } + ] + }, + { + "name": "LAN", + "role": "downstream", + "services": [ "ssh", "lldp" ], + "ethernet": [ + { + "select-ports": [ + "LAN*" + ] + } + ], + "ipv4": { + "addressing": "static", + "subnet": "192.168.1.1/24", + "dhcp": { + "lease-first": 10, + "lease-count": 100, + "lease-time": "6h" + } + } + } + ], + "metrics": { + "statistics": { + "interval": 120, + "types": [ "ssids", "lldp", "clients" ] + }, + "health": { + "interval": 120 + }, + "wifi-frames": { + "filters": [ "probe", "auth" ] + } + }, + "services": { + "lldp": { + "describe": "uCentral", + "location": "universe" + }, + "ssh": { + "port": 22 + } + } +} diff --git a/config-samples/all-in-oneSSID-basic_nat.json b/config-samples/all-in-oneSSID-basic_nat.json new file mode 100644 index 0000000..25c6b64 --- /dev/null +++ b/config-samples/all-in-oneSSID-basic_nat.json @@ -0,0 +1,95 @@ +{ + "uuid": 2, + "radios": [ + { + "band": "5G", + "channel": 52, + "channel-mode": "HE", + "channel-width": 80, + "country": "CA" + }, + { + "band": "2G", + "channel": 11, + "channel-mode": "HE", + "channel-width": 20, + "country": "CA" + } + ], + + "interfaces": [ + { + "name": "WAN", + "role": "upstream", + "services": [ "lldp" ], + "ethernet": [ + { + "select-ports": [ + "WAN*" + ] + } + ], + "ipv4": { + "addressing": "dynamic" + } + }, + { + "name": "LAN", + "role": "downstream", + "services": [ "ssh", "lldp" ], + "ethernet": [ + { + "select-ports": [ + "LAN*" + ] + } + ], + "ipv4": { + "addressing": "static", + "subnet": "192.168.1.1/24", + "dhcp": { + "lease-first": 10, + "lease-count": 100, + "lease-time": "6h" + } + }, + "ssids": [ + { + "name": "OpenWifi", + "role": "downstream", + "wifi-bands": [ + "2G", "5G" + ], + "bss-mode": "ap", + "encryption": { + "proto": "psk2", + "key": "OpenWifi", + "ieee80211w": "optional" + } + } + ] + + } + ], + "metrics": { + "statistics": { + "interval": 120, + "types": [ "ssids", "lldp", "clients" ] + }, + "health": { + "interval": 120 + }, + "wifi-frames": { + "filters": [ "probe", "auth" ] + } + }, + "services": { + "lldp": { + "describe": "uCentral", + "location": "universe" + }, + "ssh": { + "port": 22 + } + } +} diff --git a/config-samples/basic-mesh.json b/config-samples/basic-mesh.json new file mode 100644 index 0000000..9eea209 --- /dev/null +++ b/config-samples/basic-mesh.json @@ -0,0 +1,125 @@ +{ + "uuid": 2, + "radios": [ + { + "band": "5G", + "channel": 149, + "channel-mode": "VHT", + "channel-width": 80, + "country": "CA" + }, + { + "band": "2G", + "channel": "auto", + "channel-mode": "HE", + "channel-width": 20, + "country": "CA" + } + ], + + "interfaces": [ + { + "name": "WAN", + "role": "upstream", + "tunnel": { + "proto": "mesh" + }, + "services": [ "lldp" ], + "ethernet": [ + { + "select-ports": [ + "WAN*" + ] + } + ], + "ipv4": { + "addressing": "dynamic" + }, + "ssids": [ + { + "name": "mesh_transit", + "wifi-bands": [ + "5G" + ], + "bss-mode": "mesh", + "encryption": { + "proto": "psk2", + "key": "tipmesh", + "ieee80211w": "optional" + } + }, + { + "name": "DualBandSSID_Test", + "wifi-bands": [ + "2G", "5G" + ], + "bss-mode": "ap", + "encryption": { + "proto": "psk2", + "key": "thisisapassword", + "ieee80211w": "optional" + }, + "roaming": { + "message-exchange": "ds", + "generate-psk": true + }, + "services": [ "wifi-steering"] + } + ] + }, + { + "name": "LAN", + "role": "downstream", + "services": [ "ssh", "lldp" ], + "ethernet": [ + { + "select-ports": [ + "LAN*" + ] + } + ], + "ipv4": { + "addressing": "static", + "subnet": "192.168.1.1/24", + "dhcp": { + "lease-first": 10, + "lease-count": 100, + "lease-time": "6h" + } + } + } + ], + "metrics": { + "statistics": { + "interval": 120, + "types": [ "ssids", "lldp", "clients" ] + }, + "health": { + "interval": 120 + }, + "wifi-frames": { + "filters": [ "probe", "auth" ] + }, + "dhcp-snooping": { + "filters": [ "ack", "discover", "offer", "request", "solicit", "reply", "renew" ] + } + }, + "services": { + "wifi-steering": { + "mode": "local", + "network": "upstream", + "assoc-steering": true, + "required-snr": -75, + "required-probe-snr": -70, + "required-roam-snr": -85, + "load-kick-threshold": 90 + }, + "lldp": { + "describe": "TIP OpenWiFi", + "location": "QA Lab" + }, + "ssh": { + "port": 22 + } + } +} diff --git a/config-samples/basic-metrics_nat-SSID.json b/config-samples/basic-metrics_nat-SSID.json new file mode 100644 index 0000000..0743792 --- /dev/null +++ b/config-samples/basic-metrics_nat-SSID.json @@ -0,0 +1,121 @@ +{ + "uuid": 2, + "radios": [ + { + "band": "5G", + "channel": "auto", + "channel-mode": "VHT", + "channel-width": 80, + "country": "CA" + }, + { + "band": "2G", + "channel": "auto", + "channel-mode": "HE", + "channel-width": 20, + "country": "CA" + } + ], + + "interfaces": [ + { + "name": "WAN", + "role": "upstream", + "services": [ "lldp", "dhcp-snooping" ], + "ethernet": [ + { + "select-ports": [ + "WAN*" + ] + } + ], + "ipv4": { + "addressing": "dynamic" + } + }, + { + "name": "LAN", + "role": "downstream", + "services": [ "ssh", "lldp", "dhcp-snooping" ], + "ethernet": [ + { + "select-ports": [ + "LAN*" + ] + } + ], + "ipv4": { + "addressing": "static", + "subnet": "192.168.1.1/24", + "dhcp": { + "lease-first": 10, + "lease-count": 100, + "lease-time": "6h" + } + }, + "ssids": [ + { + "name": "OpenWifi_2GHz", + "role": "downstream", + "services": [ "wifi-frames"], + "wifi-bands": [ + "2G" + ], + "bss-mode": "ap", + "encryption": { + "proto": "psk2", + "key": "OpenWifi", + "ieee80211w": "optional" + } + }, + { + "name": "OpenWifi_5GHz", + "role": "downstream", + "services": [ "wifi-frames"], + "wifi-bands": [ + "5G" + ], + "bss-mode": "ap", + "encryption": { + "proto": "psk2", + "key": "OpenWifi", + "ieee80211w": "optional" + } + } + ] + } + ], + "metrics": { + "statistics": { + "interval": 60, + "types": [ "ssids", "lldp", "clients" ] + }, + "health": { + "interval": 120 + }, + "wifi-frames": { + "filters": [ "probe", + "auth", + "assoc", + "disassoc", + "deauth", + "local-deauth", + "inactive-deauth", + "key-mismatch", + "beacon-report", + "radar-detected"] + }, + "dhcp-snooping": { + "filters": [ "ack", "discover", "offer", "request", "solicit", "reply", "renew" ] + } + }, + "services": { + "lldp": { + "describe": "TIP OpenWiFi", + "location": "QA" + }, + "ssh": { + "port": 22 + } + } +} diff --git a/config-samples/dual-ssid-auto-ch-txpwr_bridge.json b/config-samples/dual-ssid-auto-ch-txpwr_bridge.json new file mode 100644 index 0000000..1eb2979 --- /dev/null +++ b/config-samples/dual-ssid-auto-ch-txpwr_bridge.json @@ -0,0 +1,107 @@ +{ + "uuid": 2, + "radios": [ + { + "band": "5G", + "channel": "auto", + "channel-mode": "HE", + "channel-width": 80, + "tx-power" : 30, + "country": "CA" + }, + { + "band": "2G", + "channel": "auto", + "channel-mode": "HE", + "channel-width": 20, + "tx-power" : 30, + "country": "CA" + } + ], + + "interfaces": [ + { + "name": "WAN", + "role": "upstream", + "services": [ "lldp" ], + "ethernet": [ + { + "select-ports": [ + "WAN*" + ] + } + ], + "ipv4": { + "addressing": "dynamic" + }, + "ssids": [ + { + "name": "OpenWifi_2GHz", + "wifi-bands": [ + "2G" + ], + "bss-mode": "ap", + "encryption": { + "proto": "psk2", + "key": "OpenWifi", + "ieee80211w": "optional" + } + }, + { + "name": "OpenWifi_5GHz", + "wifi-bands": [ + "5G" + ], + "bss-mode": "ap", + "encryption": { + "proto": "psk2", + "key": "OpenWifi", + "ieee80211w": "optional" + } + } + ] + }, + { + "name": "LAN", + "role": "downstream", + "services": [ "ssh", "lldp" ], + "ethernet": [ + { + "select-ports": [ + "LAN*" + ] + } + ], + "ipv4": { + "addressing": "static", + "subnet": "192.168.1.1/24", + "dhcp": { + "lease-first": 10, + "lease-count": 100, + "lease-time": "6h" + } + } + } + ], + "metrics": { + "statistics": { + "interval": 120, + "types": [ "ssids", "lldp", "clients" ] + }, + "health": { + "interval": 120 + }, + "wifi-frames": { + "filters": [ "probe", "auth" ] + } + }, + "services": { + "lldp": { + "describe": "uCentral", + "location": "universe" + }, + "ssh": { + "port": 22 + } + } +} diff --git a/config-samples/dual-ssid-auto-ch_bridge.json b/config-samples/dual-ssid-auto-ch_bridge.json new file mode 100644 index 0000000..9ea58fa --- /dev/null +++ b/config-samples/dual-ssid-auto-ch_bridge.json @@ -0,0 +1,105 @@ +{ + "uuid": 2, + "radios": [ + { + "band": "5G", + "channel": "auto", + "channel-mode": "HE", + "channel-width": 80, + "country": "CA" + }, + { + "band": "2G", + "channel": "auto", + "channel-mode": "HE", + "channel-width": 20, + "country": "CA" + } + ], + + "interfaces": [ + { + "name": "WAN", + "role": "upstream", + "services": [ "lldp" ], + "ethernet": [ + { + "select-ports": [ + "WAN*" + ] + } + ], + "ipv4": { + "addressing": "dynamic" + }, + "ssids": [ + { + "name": "OpenWifi_2GHz", + "wifi-bands": [ + "2G" + ], + "bss-mode": "ap", + "encryption": { + "proto": "psk2", + "key": "OpenWifi", + "ieee80211w": "optional" + } + }, + { + "name": "OpenWifi_5GHz", + "wifi-bands": [ + "5G" + ], + "bss-mode": "ap", + "encryption": { + "proto": "psk2", + "key": "OpenWifi", + "ieee80211w": "optional" + } + } + ] + }, + { + "name": "LAN", + "role": "downstream", + "services": [ "ssh", "lldp" ], + "ethernet": [ + { + "select-ports": [ + "LAN*" + ] + } + ], + "ipv4": { + "addressing": "static", + "subnet": "192.168.1.1/24", + "dhcp": { + "lease-first": 10, + "lease-count": 100, + "lease-time": "6h" + } + } + } + ], + "metrics": { + "statistics": { + "interval": 120, + "types": [ "ssids", "lldp", "clients" ] + }, + "health": { + "interval": 120 + }, + "wifi-frames": { + "filters": [ "probe", "auth" ] + } + }, + "services": { + "lldp": { + "describe": "uCentral", + "location": "universe" + }, + "ssh": { + "port": 22 + } + } +} diff --git a/config-samples/dual-ssid-basic_bridge.json b/config-samples/dual-ssid-basic_bridge.json new file mode 100644 index 0000000..3b37b52 --- /dev/null +++ b/config-samples/dual-ssid-basic_bridge.json @@ -0,0 +1,105 @@ +{ + "uuid": 2, + "radios": [ + { + "band": "5G", + "channel": 149, + "channel-mode": "HE", + "channel-width": 80, + "country": "CA" + }, + { + "band": "2G", + "channel": 11, + "channel-mode": "HE", + "channel-width": 20, + "country": "CA" + } + ], + + "interfaces": [ + { + "name": "WAN", + "role": "upstream", + "services": [ "lldp" ], + "ethernet": [ + { + "select-ports": [ + "WAN*" + ] + } + ], + "ipv4": { + "addressing": "dynamic" + }, + "ssids": [ + { + "name": "OpenWifi_2GHz", + "wifi-bands": [ + "2G" + ], + "bss-mode": "ap", + "encryption": { + "proto": "psk2", + "key": "OpenWifi", + "ieee80211w": "optional" + } + }, + { + "name": "OpenWifi_5GHz", + "wifi-bands": [ + "5G" + ], + "bss-mode": "ap", + "encryption": { + "proto": "psk2", + "key": "OpenWifi", + "ieee80211w": "optional" + } + } + ] + }, + { + "name": "LAN", + "role": "downstream", + "services": [ "ssh", "lldp" ], + "ethernet": [ + { + "select-ports": [ + "LAN*" + ] + } + ], + "ipv4": { + "addressing": "static", + "subnet": "192.168.1.1/24", + "dhcp": { + "lease-first": 10, + "lease-count": 100, + "lease-time": "6h" + } + } + } + ], + "metrics": { + "statistics": { + "interval": 120, + "types": [ "ssids", "lldp", "clients" ] + }, + "health": { + "interval": 120 + }, + "wifi-frames": { + "filters": [ "probe", "auth" ] + } + }, + "services": { + "lldp": { + "describe": "uCentral", + "location": "universe" + }, + "ssh": { + "port": 22 + } + } +} diff --git a/config-samples/dual-ssid-basic_nat.json b/config-samples/dual-ssid-basic_nat.json new file mode 100644 index 0000000..4c29c40 --- /dev/null +++ b/config-samples/dual-ssid-basic_nat.json @@ -0,0 +1,108 @@ +{ + "uuid": 2, + "radios": [ + { + "band": "5G", + "channel": 52, + "channel-mode": "HE", + "channel-width": 80, + "country": "CA" + }, + { + "band": "2G", + "channel": 11, + "channel-mode": "HE", + "channel-width": 20, + "country": "CA" + } + ], + + "interfaces": [ + { + "name": "WAN", + "role": "upstream", + "services": [ "lldp" ], + "ethernet": [ + { + "select-ports": [ + "WAN*" + ] + } + ], + "ipv4": { + "addressing": "dynamic" + } + }, + { + "name": "LAN", + "role": "downstream", + "services": [ "ssh", "lldp" ], + "ethernet": [ + { + "select-ports": [ + "LAN*" + ] + } + ], + "ipv4": { + "addressing": "static", + "subnet": "192.168.1.1/24", + "dhcp": { + "lease-first": 10, + "lease-count": 100, + "lease-time": "6h" + } + }, + "ssids": [ + { + "name": "OpenWifi_2GHz", + "role": "downstream", + "wifi-bands": [ + "2G" + ], + "bss-mode": "ap", + "encryption": { + "proto": "psk2", + "key": "OpenWifi", + "ieee80211w": "optional" + } + }, + { + "name": "OpenWifi_5GHz", + "role": "downstream", + "wifi-bands": [ + "5G" + ], + "bss-mode": "ap", + "encryption": { + "proto": "psk2", + "key": "OpenWifi", + "ieee80211w": "optional" + } + } + ] + + } + ], + "metrics": { + "statistics": { + "interval": 120, + "types": [ "ssids", "lldp", "clients" ] + }, + "health": { + "interval": 120 + }, + "wifi-frames": { + "filters": [ "probe", "auth" ] + } + }, + "services": { + "lldp": { + "describe": "uCentral", + "location": "universe" + }, + "ssh": { + "port": 22 + } + } +} diff --git a/config-samples/dual-ssid-rate-limit_bridge.json b/config-samples/dual-ssid-rate-limit_bridge.json new file mode 100644 index 0000000..ef5d1ff --- /dev/null +++ b/config-samples/dual-ssid-rate-limit_bridge.json @@ -0,0 +1,113 @@ +{ + "uuid": 2, + "radios": [ + { + "band": "5G", + "channel": 149, + "channel-mode": "HE", + "channel-width": 80, + "country": "CA" + }, + { + "band": "2G", + "channel": 11, + "channel-mode": "HE", + "channel-width": 20, + "country": "CA" + } + ], + + "interfaces": [ + { + "name": "WAN", + "role": "upstream", + "services": [ "lldp" ], + "ethernet": [ + { + "select-ports": [ + "WAN*" + ] + } + ], + "ipv4": { + "addressing": "dynamic" + }, + "ssids": [ + { + "name": "OpenWifi_2GHz", + "wifi-bands": [ + "2G" + ], + "bss-mode": "ap", + "encryption": { + "proto": "psk2", + "key": "OpenWifi", + "ieee80211w": "optional" + }, + "rate-limit": { + "ingress-rate": 50, + "egress-rate": 50 + } + }, + { + "name": "OpenWifi_5GHz", + "wifi-bands": [ + "5G" + ], + "bss-mode": "ap", + "encryption": { + "proto": "psk2", + "key": "OpenWifi", + "ieee80211w": "optional" + }, + "rate-limit": { + "ingress-rate": 50, + "egress-rate": 50 + } + } + ] + }, + { + "name": "LAN", + "role": "downstream", + "services": [ "ssh", "lldp" ], + "ethernet": [ + { + "select-ports": [ + "LAN*" + ] + } + ], + "ipv4": { + "addressing": "static", + "subnet": "192.168.1.1/24", + "dhcp": { + "lease-first": 10, + "lease-count": 100, + "lease-time": "6h" + } + } + } + ], + "metrics": { + "statistics": { + "interval": 120, + "types": [ "ssids", "lldp", "clients" ] + }, + "health": { + "interval": 120 + }, + "wifi-frames": { + "filters": [ "probe", "auth" ] + } + }, + "services": { + "lldp": { + "describe": "uCentral", + "location": "universe" + }, + "ssh": { + "port": 22 + } + } +} diff --git a/config-samples/wds-ap-bridge.json b/config-samples/wds-ap-bridge.json new file mode 100644 index 0000000..52ddbef --- /dev/null +++ b/config-samples/wds-ap-bridge.json @@ -0,0 +1,99 @@ +{ + "uuid": 2, + "radios": [ + { + "band": "5G", + "channel": 132, + "channel-mode": "HE", + "channel-width": 80, + "tx-power" : 30, + "country": "CA" + }, + { + "band": "2G", + "channel": "auto", + "channel-mode": "HE", + "channel-width": 20, + "tx-power" : 30, + "country": "CA" + } + ], + + "interfaces": [ + { + "name": "WAN", + "role": "upstream", + "services": [ "lldp" ], + "ethernet": [ + { + "select-ports": [ + "WAN*" + ] + } + ], + "ipv4": { + "addressing": "dynamic" + } + }, + { + "name": "LAN", + "role": "downstream", + "services": [ "ssh", "lldp" ], + "ethernet": [ + { + "select-ports": [ + "LAN*" + ] + } + ], + "ssids": [ + { + "name": "OpenWifi_WDS_AP", + "wifi-bands": [ + "5G" + ], + "bss-mode": "wds-ap", + "encryption": { + "proto": "psk2", + "key": "OpenWifi", + "ieee80211w": "optional" + }, + "roaming": { + "message-exchange": "ds", + "generate-psk": true + } + } + ], + "ipv4": { + "addressing": "static", + "subnet": "192.168.10.1/24", + "dhcp": { + "lease-first": 10, + "lease-count": 100, + "lease-time": "6h" + } + } + } + ], + "metrics": { + "statistics": { + "interval": 120, + "types": [ "ssids", "lldp", "clients" ] + }, + "health": { + "interval": 120 + }, + "wifi-frames": { + "filters": [ "probe", "auth" ] + } + }, + "services": { + "lldp": { + "describe": "uCentral", + "location": "universe" + }, + "ssh": { + "port": 22 + } + } +} diff --git a/config-samples/wds-sta-bridge.json b/config-samples/wds-sta-bridge.json new file mode 100644 index 0000000..76be96a --- /dev/null +++ b/config-samples/wds-sta-bridge.json @@ -0,0 +1,94 @@ +{ + "uuid": 2, + "radios": [ + { + "band": "5G", + "channel": 132, + "channel-mode": "HE", + "channel-width": 80, + "tx-power" : 30, + "country": "CA" + }, + { + "band": "2G", + "channel": "auto", + "channel-mode": "HE", + "channel-width": 20, + "tx-power" : 30, + "country": "CA" + } + ], + + "interfaces": [ + { + "name": "WAN", + "role": "upstream", + "services": [ "lldp" ], + "ethernet": [ + { + "select-ports": [ + "WAN*" + ] + } + ], + "ipv4": { + "addressing": "dynamic" + } + }, + { + "name": "LAN", + "role": "downstream", + "services": [ "ssh", "lldp" ], + "ethernet": [ + { + "select-ports": [ + "LAN*" + ] + } + ], + "ssids": [ + { + "name": "OpenWifi_WDS_AP", + "wifi-bands": [ + "5G" + ], + "bss-mode": "wds-sta", + "encryption": { + "proto": "psk2", + "key": "OpenWifi", + "ieee80211w": "optional" + }, + "roaming": { + "message-exchange": "ds", + "generate-psk": true + } + } + ], + "ipv4": { + "addressing": "static", + "subnet": "192.168.1.1/24" + } + } + ], + "metrics": { + "statistics": { + "interval": 120, + "types": [ "ssids", "lldp", "clients" ] + }, + "health": { + "interval": 120 + }, + "wifi-frames": { + "filters": [ "probe", "auth" ] + } + }, + "services": { + "lldp": { + "describe": "uCentral", + "location": "universe" + }, + "ssh": { + "port": 22 + } + } +} diff --git a/src/APConfig.cpp b/src/APConfig.cpp index f46544f..97ab4c3 100644 --- a/src/APConfig.cpp +++ b/src/APConfig.cpp @@ -36,8 +36,6 @@ namespace OpenWifi { return false; } - - static void ShowJSON(const char *S, const Poco::JSON::Object::Ptr &Obj) { std::stringstream O; Poco::JSON::Stringifier::stringify(Obj,O); diff --git a/test_scripts/curl/cli b/test_scripts/curl/cli index 74558b3..5e951b6 100755 --- a/test_scripts/curl/cli +++ b/test_scripts/curl/cli @@ -299,13 +299,24 @@ addconfig() { addconfigtx() { payload="{ \"name\" : \"$1\", \"deviceTypes\" : [\"*\"], \"configuration\" : [ { \"name\" : \"radios TX\" , \"weight\" : 0, \"configuration\" : { \"radios\": [{ \"band\": \"2G\", \"tx-power\": 45 } ] } }] }" - curl ${FLAGS} -X POST "https://${OWPROV}/api/v1/configurations/1" \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer ${token}" \ - -H "accept: application/json" \ - -d "$payload" > ${result_file} - echo ${payload} - jq < ${result_file} + curl ${FLAGS} -X POST "https://${OWPROV}/api/v1/configurations/1" \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer ${token}" \ + -H "accept: application/json" \ + -d "$payload" > ${result_file} + echo ${payload} + jq < ${result_file} +} + +addconfigmetrics() { + payload="{ \"name\" : \"$1\", \"deviceTypes\" : [\"*\"], \"configuration\" : [ { \"name\" : \"metrics gen\" , \"weight\" : 0, \"configuration\" : { \"metrics\": { \"statistics\": { \"interval\": 120, \"types\": [ \"ssids\", \"lldp\", \"clients\" ] } } } }] }" + curl ${FLAGS} -X POST "https://${OWPROV}/api/v1/configurations/1" \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer ${token}" \ + -H "accept: application/json" \ + -d "$payload" > ${result_file} + echo ${payload} + jq < ${result_file} } getconfig() { @@ -391,6 +402,7 @@ case "$1" in "assigntagvenue") login; assigntagvenue "$2" "$3"; logout;; "setentityconfig") login; setentityconfig "$2" "$3"; logout;; "adddeviceconfig") login; adddeviceconfig "$2" "$3"; logout;; + "addconfigmetrics") login; addconfigmetrics "$2" ; logout;; *) help ;; esac