OVSDB AP Configuration: AP & SSIDs

This commit is contained in:
Mike Hansen
2020-05-19 17:21:59 -04:00
parent 43c94fc38b
commit b693c2a273
35 changed files with 5116 additions and 2904 deletions

View File

@@ -11,6 +11,8 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;
import com.telecominfraproject.wlan.equipment.models.Equipment;
import com.telecominfraproject.wlan.location.models.Location;
import com.telecominfraproject.wlan.opensync.external.integration.models.ConnectNodeInfo;
import com.telecominfraproject.wlan.opensync.external.integration.models.OpensyncAPConfig;
import com.telecominfraproject.wlan.opensync.external.integration.models.OpensyncAPInetState;
@@ -29,8 +31,17 @@ public class OpensyncExternalIntegrationSimple implements OpensyncExternalIntegr
private static final Logger LOG = LoggerFactory.getLogger(OpensyncExternalIntegrationSimple.class);
@Value("${connectus.ovsdb.configFileName:/Users/dtop/Documents/TIP_WLAN_repos/opensync_wifi_controller/opensync_ext_static/src/main/resources/config_2_ssids.json}")
private String configFileName;
@Value("${connectus.ovsdb.customerEquipmentFileName:/Users/mikehansen/git/wlan-cloud-workspace/wlan-cloud-opensync-controller/opensync-ext-static/src/main/resources/EquipmentExample.json}")
private String customerEquipmentFileName;
@Value("${connectus.ovsdb.apProfileFileName:/Users/mikehansen/git/wlan-cloud-workspace/wlan-cloud-opensync-controller/opensync-ext-static/src/main/resources/ProfileAPExample.json}")
private String apProfileFileName;
@Value("${connectus.ovsdb.ssidProfileFileName:/Users/mikehansen/git/wlan-cloud-workspace/wlan-cloud-opensync-controller/opensync-ext-static/src/main/resources/ProfileSsid.json}")
private String ssidProfileFileName;
@Value("${connectus.ovsdb.locationFileName:/Users/mikehansen/git/wlan-cloud-workspace/wlan-cloud-opensync-controller/opensync-ext-static/src/main/resources/LocationBuildingExample.json}")
private String locationFileName;
@PostConstruct
private void postCreate() {
@@ -48,13 +59,28 @@ public class OpensyncExternalIntegrationSimple implements OpensyncExternalIntegr
}
public OpensyncAPConfig getApConfig(String apId) {
LOG.info("Retrieving config for AP {} from file {}", apId, configFileName);
LOG.info("Retrieving config for AP {}", apId);
OpensyncAPConfig ret = null;
try {
ret = OpensyncAPConfig.fromFile(configFileName, OpensyncAPConfig.class);
Equipment equipment = Equipment.fromFile(customerEquipmentFileName, Equipment.class);
equipment.setInventoryId(apId);
equipment.setName(apId);
com.telecominfraproject.wlan.profile.models.Profile apProfile = com.telecominfraproject.wlan.profile.models.Profile.fromFile(apProfileFileName, com.telecominfraproject.wlan.profile.models.Profile.class);
com.telecominfraproject.wlan.profile.models.Profile ssidProfile = com.telecominfraproject.wlan.profile.models.Profile.fromFile(ssidProfileFileName, com.telecominfraproject.wlan.profile.models.Profile.class);
Location location = Location.fromFile(locationFileName, Location.class);
ret = new OpensyncAPConfig();
ret.setCustomerEquipment(equipment);
ret.setApProfile(apProfile);
ret.setSsidProfile(ssidProfile);
ret.setEquipmentLocation(location);
} catch (IOException e) {
LOG.error("Cannot read config from {}", configFileName, e);
LOG.error("Cannot read config file", e);
}
LOG.debug("Config content : {}", ret);
@@ -63,7 +89,7 @@ public class OpensyncExternalIntegrationSimple implements OpensyncExternalIntegr
}
public void processMqttMessage(String topic, Report report) {
LOG.info("Received PlumeStatsReport on topic {} for ap {}\n{}", topic, report.getNodeID(),report);
LOG.info("Received PlumeStatsReport on topic {} for ap {}\n{}", topic, report.getNodeID(), report);
}
public void processMqttMessage(String topic, FlowReport flowReport) {
@@ -106,16 +132,16 @@ public class OpensyncExternalIntegrationSimple implements OpensyncExternalIntegr
}
@Override
public void wifiVIFStateDbTableDelete(List<OpensyncAPVIFState> vifStateTables, String apId) {
// TODO Auto-generated method stub
}
@Override
public void wifiVIFStateDbTableDelete(List<OpensyncAPVIFState> vifStateTables, String apId) {
// TODO Auto-generated method stub
@Override
public void wifiAssociatedClientsDbTableDelete(String deletedClientMac, String apId) {
// TODO Auto-generated method stub
}
}
@Override
public void wifiAssociatedClientsDbTableDelete(String deletedClientMac, String apId) {
// TODO Auto-generated method stub
}
}

View File

@@ -0,0 +1,290 @@
{
"model_type" : "Equipment",
"id" : 50,
"customerId" : 2,
"profileId" : 2,
"locationId" : 8,
"equipmentType" : "AP",
"inventoryId" : "ap-50",
"name" : "AP 50",
"details" : {
"model_type" : "ApElementConfiguration",
"sampleDetailsStr" : null,
"elementConfigVersion" : "AP-V1",
"equipmentType" : "AP",
"deviceMode" : "standaloneAP",
"gettingIP" : "dhcp",
"staticIP" : null,
"staticIpMaskCidr" : null,
"staticIpGw" : null,
"gettingDNS" : "dhcp",
"staticDnsIp1" : null,
"staticDnsIp2" : null,
"peerInfoList" : [ ],
"deviceName" : "Default Device Name",
"locationData" : null,
"locallyConfiguredMgmtVlan" : 0,
"locallyConfigured" : false,
"deploymentType" : "CEILING",
"syntheticClientEnabled" : null,
"frameReportThrottleEnabled" : true,
"antennaType" : "OMNI",
"costSavingEventsEnabled" : true,
"forwardMode" : "BRIDGE",
"radioMap" : {
"is2dot4GHz" : {
"model_type" : "ElementRadioConfiguration",
"radioType" : "is2dot4GHz",
"channelNumber" : 6,
"manualChannelNumber" : 6,
"backupChannelNumber" : 11,
"autoChannelSelection" : true,
"channelBandwidth" : "is20MHz",
"bannedChannels" : [ ],
"rxCellSizeDb" : {
"model_type" : "AutoOrManualValue",
"auto" : true,
"value" : -90
},
"probeResponseThresholdDb" : {
"model_type" : "AutoOrManualValue",
"auto" : true,
"value" : -90
},
"clientDisconnectThresholdDb" : {
"model_type" : "AutoOrManualValue",
"auto" : true,
"value" : -90
},
"eirpTxPower" : {
"model_type" : "AutoOrManualValue",
"auto" : true,
"value" : 18
},
"bestApEnabled" : null,
"neighbouringListApConfig" : {
"model_type" : "NeighbouringAPListConfiguration",
"minSignal" : -85,
"maxAps" : 25
},
"minAutoCellSize" : -80,
"perimeterDetectionEnabled" : true,
"bestAPSteerType" : "both",
"deauthAttackDetection" : null,
"allowedChannelsPowerLevels" : [ ],
"activeChannel" : 6
},
"is5GHzL" : {
"model_type" : "ElementRadioConfiguration",
"radioType" : "is5GHzL",
"channelNumber" : 36,
"manualChannelNumber" : 36,
"backupChannelNumber" : 44,
"autoChannelSelection" : true,
"channelBandwidth" : "is80MHz",
"bannedChannels" : [ ],
"rxCellSizeDb" : {
"model_type" : "AutoOrManualValue",
"auto" : true,
"value" : -90
},
"probeResponseThresholdDb" : {
"model_type" : "AutoOrManualValue",
"auto" : true,
"value" : -90
},
"clientDisconnectThresholdDb" : {
"model_type" : "AutoOrManualValue",
"auto" : true,
"value" : -90
},
"eirpTxPower" : {
"model_type" : "AutoOrManualValue",
"auto" : true,
"value" : 18
},
"bestApEnabled" : null,
"neighbouringListApConfig" : {
"model_type" : "NeighbouringAPListConfiguration",
"minSignal" : -85,
"maxAps" : 25
},
"minAutoCellSize" : -80,
"perimeterDetectionEnabled" : true,
"bestAPSteerType" : "both",
"deauthAttackDetection" : null,
"allowedChannelsPowerLevels" : [ ],
"activeChannel" : 36
},
"is5GHzU" : {
"model_type" : "ElementRadioConfiguration",
"radioType" : "is5GHzU",
"channelNumber" : 108,
"manualChannelNumber" : 108,
"backupChannelNumber" : 116,
"autoChannelSelection" : true,
"channelBandwidth" : "is80MHz",
"bannedChannels" : [ ],
"rxCellSizeDb" : {
"model_type" : "AutoOrManualValue",
"auto" : true,
"value" : -90
},
"probeResponseThresholdDb" : {
"model_type" : "AutoOrManualValue",
"auto" : true,
"value" : -90
},
"clientDisconnectThresholdDb" : {
"model_type" : "AutoOrManualValue",
"auto" : true,
"value" : -90
},
"eirpTxPower" : {
"model_type" : "AutoOrManualValue",
"auto" : true,
"value" : 18
},
"bestApEnabled" : null,
"neighbouringListApConfig" : {
"model_type" : "NeighbouringAPListConfiguration",
"minSignal" : -85,
"maxAps" : 25
},
"minAutoCellSize" : -80,
"perimeterDetectionEnabled" : true,
"bestAPSteerType" : "both",
"deauthAttackDetection" : null,
"allowedChannelsPowerLevels" : [ ],
"activeChannel" : 108
}
},
"advancedRadioMap" : {
"is2dot4GHz" : {
"model_type" : "RadioConfiguration",
"radioType" : "is2dot4GHz",
"radioAdminState" : "enabled",
"fragmentationThresholdBytes" : 2346,
"rtsCtsThreshold" : 65535,
"autoChannelSelection" : "disabled",
"radioMode" : "modeN",
"mimoMode" : "twoByTwo",
"wmmState" : "enabled",
"uapsdState" : "enabled",
"maxNumClients" : 100,
"stationIsolation" : "disabled",
"multicastRate" : "auto",
"managementRate" : "auto",
"activeScanSettings" : {
"model_type" : "ActiveScanSettings",
"enabled" : true,
"scanFrequencySeconds" : 10,
"scanDurationMillis" : 65
},
"channelHopSettings" : {
"model_type" : "ChannelHopSettings",
"noiseFloorThresholdInDB" : -75,
"noiseFloorThresholdTimeInSeconds" : 180,
"nonWifiThresholdInPercentage" : 50,
"nonWifiThresholdTimeInSeconds" : 180,
"obssHopMode" : "NON_WIFI"
},
"bestApSettings" : {
"model_type" : "RadioBestApSettings",
"mlComputed" : true,
"dropInSnrPercentage" : 20,
"minLoadFactor" : 50
},
"forceScanDuringVoice" : "disabled",
"legacyBSSRate" : "enabled",
"beaconInterval" : 100,
"deauthAttackDetection" : null
},
"is5GHzU" : {
"model_type" : "RadioConfiguration",
"radioType" : "is5GHzU",
"radioAdminState" : "enabled",
"fragmentationThresholdBytes" : 2346,
"rtsCtsThreshold" : 65535,
"autoChannelSelection" : "disabled",
"radioMode" : "modeAC",
"mimoMode" : "twoByTwo",
"wmmState" : "enabled",
"uapsdState" : "enabled",
"maxNumClients" : 100,
"stationIsolation" : "disabled",
"multicastRate" : "auto",
"managementRate" : "auto",
"activeScanSettings" : {
"model_type" : "ActiveScanSettings",
"enabled" : true,
"scanFrequencySeconds" : 10,
"scanDurationMillis" : 65
},
"channelHopSettings" : {
"model_type" : "ChannelHopSettings",
"noiseFloorThresholdInDB" : -75,
"noiseFloorThresholdTimeInSeconds" : 180,
"nonWifiThresholdInPercentage" : 50,
"nonWifiThresholdTimeInSeconds" : 180,
"obssHopMode" : "NON_WIFI"
},
"bestApSettings" : {
"model_type" : "RadioBestApSettings",
"mlComputed" : true,
"dropInSnrPercentage" : 30,
"minLoadFactor" : 40
},
"forceScanDuringVoice" : "disabled",
"legacyBSSRate" : "enabled",
"beaconInterval" : 100,
"deauthAttackDetection" : null
},
"is5GHzL" : {
"model_type" : "RadioConfiguration",
"radioType" : "is5GHzL",
"radioAdminState" : "enabled",
"fragmentationThresholdBytes" : 2346,
"rtsCtsThreshold" : 65535,
"autoChannelSelection" : "disabled",
"radioMode" : "modeAC",
"mimoMode" : "twoByTwo",
"wmmState" : "enabled",
"uapsdState" : "enabled",
"maxNumClients" : 100,
"stationIsolation" : "disabled",
"multicastRate" : "auto",
"managementRate" : "auto",
"activeScanSettings" : {
"model_type" : "ActiveScanSettings",
"enabled" : true,
"scanFrequencySeconds" : 10,
"scanDurationMillis" : 65
},
"channelHopSettings" : {
"model_type" : "ChannelHopSettings",
"noiseFloorThresholdInDB" : -75,
"noiseFloorThresholdTimeInSeconds" : 180,
"nonWifiThresholdInPercentage" : 50,
"nonWifiThresholdTimeInSeconds" : 180,
"obssHopMode" : "NON_WIFI"
},
"bestApSettings" : {
"model_type" : "RadioBestApSettings",
"mlComputed" : true,
"dropInSnrPercentage" : 30,
"minLoadFactor" : 40
},
"forceScanDuringVoice" : "disabled",
"legacyBSSRate" : "enabled",
"beaconInterval" : 100,
"deauthAttackDetection" : null
}
}
},
"latitude" : null,
"longitude" : null,
"serial" : "serial-ap-50",
"createdTimestamp" : 1589915837067,
"lastModifiedTimestamp" : 1589915837067
}

View File

@@ -0,0 +1,67 @@
{
"model_type" : "Location",
"id" : 7,
"parentId" : 2,
"locationType" : "BUILDING",
"customerId" : 2,
"name" : "Building 2",
"details" : {
"model_type" : "LocationDetails",
"countryCode" : "usa",
"maintenanceWindow" : null,
"rrmEnabled" : true,
"dailyRebalancingDetails" : {
"SUNDAY" : {
"model_type" : "LocationActivityDetails",
"busyTime" : "13:30",
"quietTime" : "3:30",
"timezone" : "US/Eastern",
"lastBusySnapshot" : 0
},
"MONDAY" : {
"model_type" : "LocationActivityDetails",
"busyTime" : "13:30",
"quietTime" : "3:30",
"timezone" : "US/Eastern",
"lastBusySnapshot" : 0
},
"TUESDAY" : {
"model_type" : "LocationActivityDetails",
"busyTime" : "13:30",
"quietTime" : "3:30",
"timezone" : "US/Eastern",
"lastBusySnapshot" : 0
},
"WEDNESDAY" : {
"model_type" : "LocationActivityDetails",
"busyTime" : "13:30",
"quietTime" : "3:30",
"timezone" : "US/Eastern",
"lastBusySnapshot" : 0
},
"THURSDAY" : {
"model_type" : "LocationActivityDetails",
"busyTime" : "13:30",
"quietTime" : "3:30",
"timezone" : "US/Eastern",
"lastBusySnapshot" : 0
},
"FRIDAY" : {
"model_type" : "LocationActivityDetails",
"busyTime" : "13:30",
"quietTime" : "3:30",
"timezone" : "US/Eastern",
"lastBusySnapshot" : 0
},
"SATURDAY" : {
"model_type" : "LocationActivityDetails",
"busyTime" : "13:30",
"quietTime" : "3:30",
"timezone" : "US/Eastern",
"lastBusySnapshot" : 0
}
}
},
"createdTimestamp" : 1589567347442,
"lastModifiedTimestamp" : 1589567347442
}

View File

@@ -0,0 +1,67 @@
{
"model_type" : "Location",
"id" : 2,
"parentId" : 0,
"locationType" : "SITE",
"customerId" : 2,
"name" : "Menlo Park",
"details" : {
"model_type" : "LocationDetails",
"countryCode" : "usa",
"maintenanceWindow" : null,
"rrmEnabled" : true,
"dailyRebalancingDetails" : {
"SUNDAY" : {
"model_type" : "LocationActivityDetails",
"busyTime" : "13:30",
"quietTime" : "3:30",
"timezone" : "US/Eastern",
"lastBusySnapshot" : 0
},
"MONDAY" : {
"model_type" : "LocationActivityDetails",
"busyTime" : "13:30",
"quietTime" : "3:30",
"timezone" : "US/Eastern",
"lastBusySnapshot" : 0
},
"TUESDAY" : {
"model_type" : "LocationActivityDetails",
"busyTime" : "13:30",
"quietTime" : "3:30",
"timezone" : "US/Eastern",
"lastBusySnapshot" : 0
},
"WEDNESDAY" : {
"model_type" : "LocationActivityDetails",
"busyTime" : "13:30",
"quietTime" : "3:30",
"timezone" : "US/Eastern",
"lastBusySnapshot" : 0
},
"THURSDAY" : {
"model_type" : "LocationActivityDetails",
"busyTime" : "13:30",
"quietTime" : "3:30",
"timezone" : "US/Eastern",
"lastBusySnapshot" : 0
},
"FRIDAY" : {
"model_type" : "LocationActivityDetails",
"busyTime" : "13:30",
"quietTime" : "3:30",
"timezone" : "US/Eastern",
"lastBusySnapshot" : 0
},
"SATURDAY" : {
"model_type" : "LocationActivityDetails",
"busyTime" : "13:30",
"quietTime" : "3:30",
"timezone" : "US/Eastern",
"lastBusySnapshot" : 0
}
}
},
"createdTimestamp" : 1589567474314,
"lastModifiedTimestamp" : 1589567474314
}

View File

@@ -0,0 +1,50 @@
{
"model_type" : "Profile",
"id" : 2,
"customerId" : 2,
"profileType" : "equipment_ap",
"name" : "ApProfile",
"details" : {
"model_type" : "ApNetworkConfiguration",
"sampleDetailsStr" : null,
"networkConfigVersion" : "AP-1",
"equipmentType" : "AP",
"vlanNative" : true,
"vlan" : 0,
"ntpServer" : {
"model_type" : "AutoOrManualString",
"auto" : true,
"value" : "pool.ntp.org"
},
"syslogRelay" : null,
"rtlsSettings" : null,
"syntheticClientEnabled" : true,
"ledControlEnabled" : true,
"equipmentDiscovery" : false,
"radioMap" : {
"is5GHz" : {
"model_type" : "RadioProfileConfiguration",
"bestApEnabled" : true,
"bestAPSteerType" : "both"
},
"is2dot4GHz" : {
"model_type" : "RadioProfileConfiguration",
"bestApEnabled" : true,
"bestAPSteerType" : "both"
},
"is5GHzU" : {
"model_type" : "RadioProfileConfiguration",
"bestApEnabled" : true,
"bestAPSteerType" : "both"
},
"is5GHzL" : {
"model_type" : "RadioProfileConfiguration",
"bestApEnabled" : true,
"bestAPSteerType" : "both"
}
}
},
"createdTimestamp" : 1589567037365,
"lastModifiedTimestamp" : 1589567037365,
"childProfileIds" : [ 1 ]
}

View File

@@ -0,0 +1,58 @@
{
"model_type" : "Profile",
"id" : 1,
"customerId" : 2,
"profileType" : "ssid",
"name" : "Connectus-local",
"details" : {
"model_type" : "SsidConfiguration",
"sampleDetailsStr" : null,
"ssid" : "Connectus-local",
"appliedRadios" : [ "is5GHzL", "is5GHzU", "is2dot4GHz" ],
"ssidAdminState" : "enabled",
"secureMode" : "wpa2PSK",
"vlanId" : 1,
"keyStr" : "12345678",
"broadcastSsid" : "enabled",
"keyRefresh" : 0,
"noLocalSubnets" : false,
"radiusServiceName" : null,
"captivePortalId" : null,
"bandwidthLimitDown" : 0,
"bandwidthLimitUp" : 0,
"videoTrafficOnly" : false,
"radioBasedConfigs" : {
"is5GHz" : {
"model_type" : "RadioBasedSsidConfiguration",
"enable80211r" : null,
"enable80211k" : null,
"enable80211v" : null
},
"is2dot4GHz" : {
"model_type" : "RadioBasedSsidConfiguration",
"enable80211r" : null,
"enable80211k" : null,
"enable80211v" : null
},
"is5GHzU" : {
"model_type" : "RadioBasedSsidConfiguration",
"enable80211r" : null,
"enable80211k" : null,
"enable80211v" : null
},
"is5GHzL" : {
"model_type" : "RadioBasedSsidConfiguration",
"enable80211r" : null,
"enable80211k" : null,
"enable80211v" : null
}
},
"bonjourGatewayProfileId" : null,
"enable80211w" : null,
"wepConfig" : null,
"forwardMode" : null
},
"createdTimestamp" : 1589567130432,
"lastModifiedTimestamp" : 1589567130432,
"childProfileIds" : [ ]
}

View File

@@ -3,7 +3,7 @@
"radioConfig" : {
"model_type" : "OpensyncAPRadioConfig",
"country" : "CA",
"radioChannel24G" : 1,
"radioChannel24G" : 6,
"radioChannel5LG" : 44,
"radioChannel5HG" : 108
},