From 6b3b835e80d38c7853ef5fa81c9175fb170bdedb Mon Sep 17 00:00:00 2001 From: ralphlee3 <70043694+ralphlee3@users.noreply.github.com> Date: Fri, 9 Oct 2020 21:57:19 -0400 Subject: [PATCH] WIFI-792: RF Implementation (#11) * Removing RF parameters from ApElementConfig, refactoring to RF profile --- .../OpensyncExternalIntegrationCloud.java | 54 +++++++++-- ...ternalIntegrationMqttMessageProcessor.java | 7 +- .../OpensyncExternalIntegrationCloudTest.java | 50 ++++++++++- .../app/opensync/EquipmentExample.json | 90 ------------------- .../app/opensync/ProfileRf.json | 12 ++- .../docker/app/opensync/EquipmentExample.json | 90 ------------------- .../main/docker/app/opensync/ProfileRf.json | 12 ++- .../app/opensync/EquipmentExample.json | 90 ------------------- .../resources/app/opensync/ProfileRf.json | 12 ++- .../wlan/opensync/ovsdb/dao/OvsdbDao.java | 14 +-- 10 files changed, 124 insertions(+), 307 deletions(-) diff --git a/opensync-ext-cloud/src/main/java/com/telecominfraproject/wlan/opensync/external/integration/OpensyncExternalIntegrationCloud.java b/opensync-ext-cloud/src/main/java/com/telecominfraproject/wlan/opensync/external/integration/OpensyncExternalIntegrationCloud.java index 40f17c4..ac08c1f 100644 --- a/opensync-ext-cloud/src/main/java/com/telecominfraproject/wlan/opensync/external/integration/OpensyncExternalIntegrationCloud.java +++ b/opensync-ext-cloud/src/main/java/com/telecominfraproject/wlan/opensync/external/integration/OpensyncExternalIntegrationCloud.java @@ -7,7 +7,6 @@ import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Optional; import java.util.Set; import java.util.stream.Collectors; @@ -78,6 +77,7 @@ import com.telecominfraproject.wlan.profile.models.ProfileType; import com.telecominfraproject.wlan.profile.network.models.ApNetworkConfiguration; import com.telecominfraproject.wlan.profile.network.models.RadioProfileConfiguration; import com.telecominfraproject.wlan.profile.rf.models.RfConfiguration; +import com.telecominfraproject.wlan.profile.rf.models.RfElementConfiguration; import com.telecominfraproject.wlan.profile.ssid.models.SsidConfiguration; import com.telecominfraproject.wlan.profile.ssid.models.SsidConfiguration.SecureMode; import com.telecominfraproject.wlan.routing.RoutingServiceInterface; @@ -251,11 +251,9 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra } if (!radioType.equals(RadioType.UNSUPPORTED)) { advancedRadioConfiguration = RadioConfiguration.createWithDefaults(radioType); - advancedRadioConfiguration.setAutoChannelSelection(StateSetting.disabled); advancedRadioMap.put(radioType, advancedRadioConfiguration); radioConfiguration = ElementRadioConfiguration.createWithDefaults(radioType); - radioConfiguration.setAutoChannelSelection(false); radioMap.put(radioType, radioConfiguration); } } @@ -287,6 +285,36 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra // one: Profile apProfile = createDefaultApProfile(ce, connectNodeInfo); profileId = apProfile.getId(); + + // Initialize equipment from RF Profile + ProfileContainer profileContainer = new ProfileContainer( + profileServiceInterface.getProfileWithChildren(profileId)); + RfConfiguration rfConfig = (RfConfiguration) profileContainer.getChildOfTypeOrNull(profileId, ProfileType.rf) + .getDetails(); + ApElementConfiguration config = (ApElementConfiguration) ce.getDetails(); + Map baseRadioMap = config.getRadioMap(); + Map advRadioMap = config.getAdvancedRadioMap(); + for (RadioType rType : config.getRadioMap().keySet()) { + ElementRadioConfiguration elementRadioConfig = baseRadioMap.get(rType); + RfElementConfiguration rfElementConfig = rfConfig.getRfConfig(rType); + + elementRadioConfig.setClientDisconnectThresholdDb(rfElementConfig.getClientDisconnectThresholdDb()); + elementRadioConfig.setEirpTxPower(rfElementConfig.getEirpTxPower()); + elementRadioConfig.setPerimeterDetectionEnabled(rfElementConfig.getPerimeterDetectionEnabled()); + elementRadioConfig.setProbeResponseThresholdDb(rfElementConfig.getProbeResponseThresholdDb()); + elementRadioConfig.setRxCellSizeDb(rfElementConfig.getRxCellSizeDb()); + } + for (RadioType rType : config.getAdvancedRadioMap().keySet()) { + RadioConfiguration radioConfig = advRadioMap.get(rType); + RfElementConfiguration rfElementConfig = rfConfig.getRfConfig(rType); + + radioConfig.setBestApSettings(rfElementConfig.getBestApSettings()); + radioConfig.setManagementRate(rfElementConfig.getManagementRate()); + } + config.setAdvancedRadioMap(advRadioMap); + config.setRadioMap(baseRadioMap); + + ce.setDetails(config); } ce.setProfileId(profileId); @@ -903,7 +931,12 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra return; // we don't have the required info to get the // radio type yet } - + ApElementConfiguration apElementConfig = (ApElementConfiguration) apNode.getDetails(); + + ProfileContainer profileContainer = new ProfileContainer( + profileServiceInterface.getProfileWithChildren(apNode.getProfileId())); + RfConfiguration rfConfig = (RfConfiguration) profileContainer.getChildOfTypeOrNull(apNode.getProfileId(), ProfileType.rf) + .getDetails(); for (OpensyncAPVIFState vifState : vifStateTables) { @@ -935,11 +968,14 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra vifState.getAssociatedClients()); RadioType radioType = null; - Optional radioConfiguration = ((ApElementConfiguration) apNode.getDetails()) - .getRadioMap().values().stream().filter(t -> (t.getActiveChannel() == channel)).findFirst(); - - if (radioConfiguration.isPresent()) { - radioType = radioConfiguration.get().getRadioType(); + Map rfElementMap = rfConfig.getRfConfigMap(); + Map elementRadioMap = apElementConfig.getRadioMap(); + for (RadioType rType : elementRadioMap.keySet()) { + boolean autoChannelSelection = rfElementMap.get(rType).getAutoChannelSelection(); + if (elementRadioMap.get(rType).getActiveChannel(autoChannelSelection) == channel) { + radioType = rType; + break; + } } updateActiveBssids(customerId, equipmentId, apId, ssid, radioType, bssid, numClients); diff --git a/opensync-ext-cloud/src/main/java/com/telecominfraproject/wlan/opensync/external/integration/OpensyncExternalIntegrationMqttMessageProcessor.java b/opensync-ext-cloud/src/main/java/com/telecominfraproject/wlan/opensync/external/integration/OpensyncExternalIntegrationMqttMessageProcessor.java index 105ccc3..189153b 100644 --- a/opensync-ext-cloud/src/main/java/com/telecominfraproject/wlan/opensync/external/integration/OpensyncExternalIntegrationMqttMessageProcessor.java +++ b/opensync-ext-cloud/src/main/java/com/telecominfraproject/wlan/opensync/external/integration/OpensyncExternalIntegrationMqttMessageProcessor.java @@ -46,6 +46,7 @@ import com.telecominfraproject.wlan.profile.ProfileServiceInterface; import com.telecominfraproject.wlan.profile.models.Profile; import com.telecominfraproject.wlan.profile.models.ProfileContainer; import com.telecominfraproject.wlan.profile.models.ProfileType; +import com.telecominfraproject.wlan.profile.rf.models.RfConfiguration; import com.telecominfraproject.wlan.profile.ssid.models.RadioBasedSsidConfiguration; import com.telecominfraproject.wlan.profile.ssid.models.SsidConfiguration; import com.telecominfraproject.wlan.profile.ssid.models.SsidConfiguration.SecureMode; @@ -2256,7 +2257,8 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { ProfileContainer profileContainer = new ProfileContainer( profileServiceInterface.getProfileWithChildren(profileId)); - profileContainer.getChildOfTypeOrNull(profileId, ProfileType.rf).getDetails(); + RfConfiguration rfConfig = (RfConfiguration) profileContainer.getChildOfTypeOrNull(profileId, ProfileType.rf) + .getDetails(); for (Survey survey : report.getSurveyList()) { @@ -2278,8 +2280,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { continue; } - ChannelBandwidth channelBandwidth = ((ApElementConfiguration) equipmentServiceInterface.get(equipmentId) - .getDetails()).getRadioMap().get(radioType).getChannelBandwidth(); + ChannelBandwidth channelBandwidth = rfConfig.getRfConfig(radioType).getChannelBandwidth(); Map> sampleByChannelMap = new HashMap<>(); diff --git a/opensync-ext-cloud/src/test/java/com/telecominfraproject/wlan/opensync/external/integration/OpensyncExternalIntegrationCloudTest.java b/opensync-ext-cloud/src/test/java/com/telecominfraproject/wlan/opensync/external/integration/OpensyncExternalIntegrationCloudTest.java index 9eb7446..82430f7 100644 --- a/opensync-ext-cloud/src/test/java/com/telecominfraproject/wlan/opensync/external/integration/OpensyncExternalIntegrationCloudTest.java +++ b/opensync-ext-cloud/src/test/java/com/telecominfraproject/wlan/opensync/external/integration/OpensyncExternalIntegrationCloudTest.java @@ -6,8 +6,10 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import java.util.ArrayList; import java.util.HashMap; +import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.UUID; import org.junit.After; @@ -66,7 +68,9 @@ import com.telecominfraproject.wlan.opensync.external.integration.models.Opensyn import com.telecominfraproject.wlan.opensync.external.integration.models.OpensyncAPVIFState; import com.telecominfraproject.wlan.profile.ProfileServiceInterface; import com.telecominfraproject.wlan.profile.models.Profile; +import com.telecominfraproject.wlan.profile.models.ProfileType; import com.telecominfraproject.wlan.profile.network.models.ApNetworkConfiguration; +import com.telecominfraproject.wlan.profile.rf.models.RfConfiguration; import com.telecominfraproject.wlan.profile.ssid.models.SsidConfiguration; import com.telecominfraproject.wlan.routing.RoutingServiceInterface; import com.telecominfraproject.wlan.status.StatusServiceInterface; @@ -272,18 +276,37 @@ public class OpensyncExternalIntegrationCloudTest { customer.setDetails(customerDetails); Mockito.when(customerServiceInterface.getOrNull(ArgumentMatchers.anyInt())).thenReturn(customer); + + Profile rfProfile = new Profile(); + rfProfile.setId(1); + rfProfile.setName("testRfProfile"); + rfProfile.setDetails(RfConfiguration.createWithDefaults()); + rfProfile.setProfileType(ProfileType.rf); Profile apProfile = new Profile(); apProfile.setDetails(ApNetworkConfiguration.createWithDefaults()); + apProfile.setName("testApProfile"); + apProfile.setProfileType(ProfileType.equipment_ap); Profile ssidProfile = new Profile(); + ssidProfile.setId(2); ssidProfile.setDetails(SsidConfiguration.createWithDefaults()); - - apProfile.setChildProfileIds(ImmutableSet.of(ssidProfile.getId())); + + Set childProfileIds = new HashSet<>(); + childProfileIds.add(rfProfile.getId()); + childProfileIds.add(ssidProfile.getId()); + apProfile.setChildProfileIds(childProfileIds); Mockito.when(profileServiceInterface.create(ArgumentMatchers.any(Profile.class))).thenReturn(apProfile) - .thenReturn(ssidProfile); + .thenReturn(ssidProfile).thenReturn(rfProfile); Mockito.when(profileServiceInterface.update(ArgumentMatchers.any(Profile.class))).thenReturn(apProfile); + + List profileList = new ArrayList<>(); + profileList.add(apProfile); + profileList.add(rfProfile); + profileList.add(ssidProfile); + + Mockito.when(profileServiceInterface.getProfileWithChildren(ArgumentMatchers.anyLong())).thenReturn(profileList); Equipment equipment = new Equipment(); equipment.setCustomerId(2); @@ -586,11 +609,32 @@ public class OpensyncExternalIntegrationCloudTest { equipment.setCustomerId(1); equipment.setEquipmentType(EquipmentType.AP); equipment.setInventoryId(apId); + equipment.setProfileId(1); equipment.setDetails(ApElementConfiguration.createWithDefaults()); Mockito.when(equipmentServiceInterface.getByInventoryIdOrNull(apId)).thenReturn(equipment); Mockito.when(equipmentServiceInterface.get(equipment.getId())).thenReturn(equipment); Mockito.when(equipmentServiceInterface.update(equipment)).thenReturn(equipment); + + Profile rfProfile = new Profile(); + rfProfile.setName("testRfProfile"); + rfProfile.setId(2); + rfProfile.setDetails(RfConfiguration.createWithDefaults()); + rfProfile.setProfileType(ProfileType.rf); + Set childProfileIds = new HashSet<>(); + childProfileIds.add(rfProfile.getId()); + + Profile apProfile = new Profile(); + apProfile.setName("testApProfile"); + apProfile.setId(1); + apProfile.setProfileType(ProfileType.equipment_ap); + apProfile.setChildProfileIds(childProfileIds); + + List profileList = new ArrayList<>(); + profileList.add(apProfile); + profileList.add(rfProfile); + + Mockito.when(profileServiceInterface.getProfileWithChildren(ArgumentMatchers.anyLong())).thenReturn(profileList); Mockito.when(ovsdbSessionMapInterface.getSession(apId)).thenReturn(session); diff --git a/opensync-gateway-static-docker/src/main/docker-opensync-gateway-and-mqtt/app/opensync/EquipmentExample.json b/opensync-gateway-static-docker/src/main/docker-opensync-gateway-and-mqtt/app/opensync/EquipmentExample.json index 5eb69c5..b132acc 100644 --- a/opensync-gateway-static-docker/src/main/docker-opensync-gateway-and-mqtt/app/opensync/EquipmentExample.json +++ b/opensync-gateway-static-docker/src/main/docker-opensync-gateway-and-mqtt/app/opensync/EquipmentExample.json @@ -38,8 +38,6 @@ "channelNumber": 6, "manualChannelNumber": 6, "backupChannelNumber": 11, - "autoChannelSelection": false, - "channelBandwidth": "is20MHz", "bannedChannels": [], "allowedChannels": [], "rxCellSizeDb": { @@ -62,13 +60,6 @@ "auto": false, "value": 32 }, - "bestApEnabled": null, - "neighbouringListApConfig": { - "model_type": "NeighbouringAPListConfiguration", - "minSignal": -85, - "maxAps": 25 - }, - "minAutoCellSize": -80, "perimeterDetectionEnabled": true, "bestAPSteerType": "both", "deauthAttackDetection": null, @@ -81,8 +72,6 @@ "channelNumber": 149, "manualChannelNumber": 149, "backupChannelNumber": 154, - "autoChannelSelection": false, - "channelBandwidth": "is80MHz", "bannedChannels": [], "allowedChannels": [], "rxCellSizeDb": { @@ -105,13 +94,6 @@ "auto": false, "value": 32 }, - "bestApEnabled": null, - "neighbouringListApConfig": { - "model_type": "NeighbouringAPListConfiguration", - "minSignal": -85, - "maxAps": 25 - }, - "minAutoCellSize": -80, "perimeterDetectionEnabled": true, "bestAPSteerType": "both", "deauthAttackDetection": null, @@ -124,8 +106,6 @@ "channelNumber": 36, "manualChannelNumber": 36, "backupChannelNumber": 44, - "autoChannelSelection": false, - "channelBandwidth": "is80MHz", "bannedChannels": [], "allowedChannels": [], "rxCellSizeDb": { @@ -148,13 +128,6 @@ "auto": false, "value": 32 }, - "bestApEnabled": null, - "neighbouringListApConfig": { - "model_type": "NeighbouringAPListConfiguration", - "minSignal": -85, - "maxAps": 25 - }, - "minAutoCellSize": -80, "perimeterDetectionEnabled": true, "bestAPSteerType": "both", "deauthAttackDetection": null, @@ -168,39 +141,18 @@ "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": { @@ -208,39 +160,18 @@ "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": { @@ -248,39 +179,18 @@ "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 } } diff --git a/opensync-gateway-static-docker/src/main/docker-opensync-gateway-and-mqtt/app/opensync/ProfileRf.json b/opensync-gateway-static-docker/src/main/docker-opensync-gateway-and-mqtt/app/opensync/ProfileRf.json index d76c61e..57df36a 100644 --- a/opensync-gateway-static-docker/src/main/docker-opensync-gateway-and-mqtt/app/opensync/ProfileRf.json +++ b/opensync-gateway-static-docker/src/main/docker-opensync-gateway-and-mqtt/app/opensync/ProfileRf.json @@ -65,7 +65,8 @@ "mlComputed": true, "dropInSnrPercentage": 30, "minLoadFactor": 40 - } + }, + "minAutoCellSize": -80 }, "is2dot4GHz": { "model_type": "RfElementConfiguration", @@ -125,7 +126,8 @@ "mlComputed": true, "dropInSnrPercentage": 20, "minLoadFactor": 50 - } + }, + "minAutoCellSize": -80 }, "is5GHzU": { "model_type": "RfElementConfiguration", @@ -185,7 +187,8 @@ "mlComputed": true, "dropInSnrPercentage": 30, "minLoadFactor": 40 - } + }, + "minAutoCellSize": -80 }, "is5GHzL": { "model_type": "RfElementConfiguration", @@ -245,7 +248,8 @@ "mlComputed": true, "dropInSnrPercentage": 30, "minLoadFactor": 40 - } + }, + "minAutoCellSize": -80 } }, "profileType": "rf" diff --git a/opensync-gateway-static-docker/src/main/docker/app/opensync/EquipmentExample.json b/opensync-gateway-static-docker/src/main/docker/app/opensync/EquipmentExample.json index 5eb69c5..b132acc 100644 --- a/opensync-gateway-static-docker/src/main/docker/app/opensync/EquipmentExample.json +++ b/opensync-gateway-static-docker/src/main/docker/app/opensync/EquipmentExample.json @@ -38,8 +38,6 @@ "channelNumber": 6, "manualChannelNumber": 6, "backupChannelNumber": 11, - "autoChannelSelection": false, - "channelBandwidth": "is20MHz", "bannedChannels": [], "allowedChannels": [], "rxCellSizeDb": { @@ -62,13 +60,6 @@ "auto": false, "value": 32 }, - "bestApEnabled": null, - "neighbouringListApConfig": { - "model_type": "NeighbouringAPListConfiguration", - "minSignal": -85, - "maxAps": 25 - }, - "minAutoCellSize": -80, "perimeterDetectionEnabled": true, "bestAPSteerType": "both", "deauthAttackDetection": null, @@ -81,8 +72,6 @@ "channelNumber": 149, "manualChannelNumber": 149, "backupChannelNumber": 154, - "autoChannelSelection": false, - "channelBandwidth": "is80MHz", "bannedChannels": [], "allowedChannels": [], "rxCellSizeDb": { @@ -105,13 +94,6 @@ "auto": false, "value": 32 }, - "bestApEnabled": null, - "neighbouringListApConfig": { - "model_type": "NeighbouringAPListConfiguration", - "minSignal": -85, - "maxAps": 25 - }, - "minAutoCellSize": -80, "perimeterDetectionEnabled": true, "bestAPSteerType": "both", "deauthAttackDetection": null, @@ -124,8 +106,6 @@ "channelNumber": 36, "manualChannelNumber": 36, "backupChannelNumber": 44, - "autoChannelSelection": false, - "channelBandwidth": "is80MHz", "bannedChannels": [], "allowedChannels": [], "rxCellSizeDb": { @@ -148,13 +128,6 @@ "auto": false, "value": 32 }, - "bestApEnabled": null, - "neighbouringListApConfig": { - "model_type": "NeighbouringAPListConfiguration", - "minSignal": -85, - "maxAps": 25 - }, - "minAutoCellSize": -80, "perimeterDetectionEnabled": true, "bestAPSteerType": "both", "deauthAttackDetection": null, @@ -168,39 +141,18 @@ "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": { @@ -208,39 +160,18 @@ "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": { @@ -248,39 +179,18 @@ "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 } } diff --git a/opensync-gateway-static-docker/src/main/docker/app/opensync/ProfileRf.json b/opensync-gateway-static-docker/src/main/docker/app/opensync/ProfileRf.json index d76c61e..57df36a 100644 --- a/opensync-gateway-static-docker/src/main/docker/app/opensync/ProfileRf.json +++ b/opensync-gateway-static-docker/src/main/docker/app/opensync/ProfileRf.json @@ -65,7 +65,8 @@ "mlComputed": true, "dropInSnrPercentage": 30, "minLoadFactor": 40 - } + }, + "minAutoCellSize": -80 }, "is2dot4GHz": { "model_type": "RfElementConfiguration", @@ -125,7 +126,8 @@ "mlComputed": true, "dropInSnrPercentage": 20, "minLoadFactor": 50 - } + }, + "minAutoCellSize": -80 }, "is5GHzU": { "model_type": "RfElementConfiguration", @@ -185,7 +187,8 @@ "mlComputed": true, "dropInSnrPercentage": 30, "minLoadFactor": 40 - } + }, + "minAutoCellSize": -80 }, "is5GHzL": { "model_type": "RfElementConfiguration", @@ -245,7 +248,8 @@ "mlComputed": true, "dropInSnrPercentage": 30, "minLoadFactor": 40 - } + }, + "minAutoCellSize": -80 } }, "profileType": "rf" diff --git a/opensync-gateway-static-process/src/main/resources/app/opensync/EquipmentExample.json b/opensync-gateway-static-process/src/main/resources/app/opensync/EquipmentExample.json index 5eb69c5..b132acc 100644 --- a/opensync-gateway-static-process/src/main/resources/app/opensync/EquipmentExample.json +++ b/opensync-gateway-static-process/src/main/resources/app/opensync/EquipmentExample.json @@ -38,8 +38,6 @@ "channelNumber": 6, "manualChannelNumber": 6, "backupChannelNumber": 11, - "autoChannelSelection": false, - "channelBandwidth": "is20MHz", "bannedChannels": [], "allowedChannels": [], "rxCellSizeDb": { @@ -62,13 +60,6 @@ "auto": false, "value": 32 }, - "bestApEnabled": null, - "neighbouringListApConfig": { - "model_type": "NeighbouringAPListConfiguration", - "minSignal": -85, - "maxAps": 25 - }, - "minAutoCellSize": -80, "perimeterDetectionEnabled": true, "bestAPSteerType": "both", "deauthAttackDetection": null, @@ -81,8 +72,6 @@ "channelNumber": 149, "manualChannelNumber": 149, "backupChannelNumber": 154, - "autoChannelSelection": false, - "channelBandwidth": "is80MHz", "bannedChannels": [], "allowedChannels": [], "rxCellSizeDb": { @@ -105,13 +94,6 @@ "auto": false, "value": 32 }, - "bestApEnabled": null, - "neighbouringListApConfig": { - "model_type": "NeighbouringAPListConfiguration", - "minSignal": -85, - "maxAps": 25 - }, - "minAutoCellSize": -80, "perimeterDetectionEnabled": true, "bestAPSteerType": "both", "deauthAttackDetection": null, @@ -124,8 +106,6 @@ "channelNumber": 36, "manualChannelNumber": 36, "backupChannelNumber": 44, - "autoChannelSelection": false, - "channelBandwidth": "is80MHz", "bannedChannels": [], "allowedChannels": [], "rxCellSizeDb": { @@ -148,13 +128,6 @@ "auto": false, "value": 32 }, - "bestApEnabled": null, - "neighbouringListApConfig": { - "model_type": "NeighbouringAPListConfiguration", - "minSignal": -85, - "maxAps": 25 - }, - "minAutoCellSize": -80, "perimeterDetectionEnabled": true, "bestAPSteerType": "both", "deauthAttackDetection": null, @@ -168,39 +141,18 @@ "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": { @@ -208,39 +160,18 @@ "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": { @@ -248,39 +179,18 @@ "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 } } diff --git a/opensync-gateway-static-process/src/main/resources/app/opensync/ProfileRf.json b/opensync-gateway-static-process/src/main/resources/app/opensync/ProfileRf.json index d76c61e..57df36a 100644 --- a/opensync-gateway-static-process/src/main/resources/app/opensync/ProfileRf.json +++ b/opensync-gateway-static-process/src/main/resources/app/opensync/ProfileRf.json @@ -65,7 +65,8 @@ "mlComputed": true, "dropInSnrPercentage": 30, "minLoadFactor": 40 - } + }, + "minAutoCellSize": -80 }, "is2dot4GHz": { "model_type": "RfElementConfiguration", @@ -125,7 +126,8 @@ "mlComputed": true, "dropInSnrPercentage": 20, "minLoadFactor": 50 - } + }, + "minAutoCellSize": -80 }, "is5GHzU": { "model_type": "RfElementConfiguration", @@ -185,7 +187,8 @@ "mlComputed": true, "dropInSnrPercentage": 30, "minLoadFactor": 40 - } + }, + "minAutoCellSize": -80 }, "is5GHzL": { "model_type": "RfElementConfiguration", @@ -245,7 +248,8 @@ "mlComputed": true, "dropInSnrPercentage": 30, "minLoadFactor": 40 - } + }, + "minAutoCellSize": -80 } }, "profileType": "rf" diff --git a/opensync-gateway/src/main/java/com/telecominfraproject/wlan/opensync/ovsdb/dao/OvsdbDao.java b/opensync-gateway/src/main/java/com/telecominfraproject/wlan/opensync/ovsdb/dao/OvsdbDao.java index 7a17838..dd81399 100644 --- a/opensync-gateway/src/main/java/com/telecominfraproject/wlan/opensync/ovsdb/dao/OvsdbDao.java +++ b/opensync-gateway/src/main/java/com/telecominfraproject/wlan/opensync/ovsdb/dao/OvsdbDao.java @@ -1903,9 +1903,7 @@ public class OvsdbDao { ElementRadioConfiguration elementRadioConfig = apElementConfiguration.getRadioMap().get(radioType); RfElementConfiguration rfElementConfig = rfConfig.getRfConfig(radioType); int channel = elementRadioConfig.getChannelNumber(); - ChannelBandwidth bandwidth = elementRadioConfig.getChannelBandwidth(); - // ChannelBandwidth bandwidth = - // rfElementConfig.getChannelBandwidth(); + ChannelBandwidth bandwidth = rfElementConfig.getChannelBandwidth(); String ht_mode = null; switch (bandwidth) { case is20MHz: @@ -1926,11 +1924,10 @@ public class OvsdbDao { default: ht_mode = null; } - elementRadioConfig.getAutoChannelSelection(); + rfElementConfig.getAutoChannelSelection(); RadioConfiguration radioConfig = apElementConfiguration.getAdvancedRadioMap().get(radioType); - int beaconInterval = radioConfig.getBeaconInterval(); - // int beaconInterval = rfElementConfig.getBeaconInterval(); + int beaconInterval = rfElementConfig.getBeaconInterval(); boolean enabled = radioConfig.getRadioAdminState().equals(StateSetting.enabled); int txPower = 0; @@ -2966,8 +2963,7 @@ public class OvsdbDao { } RfElementConfiguration rfElementConfig = rfConfig.getRfConfig(radioType); int dtimPeriod = radioConfiguration.getDtimPeriod(); - int rtsCtsThreshold = radioConfiguration.getRtsCtsThreshold(); - // int rtsCtsThreshold = rfElementConfig.getRtsCtsThreshold(); + int rtsCtsThreshold = rfElementConfig.getRtsCtsThreshold(); int fragThresholdBytes = radioConfiguration.getFragmentationThresholdBytes(); RadioMode radioMode = radioConfiguration.getRadioMode(); String minHwMode = "11n"; // min_hw_mode is 11ac, wifi 5, we can @@ -4840,7 +4836,6 @@ public class OvsdbDao { } } - public void processNewChannelsRequest(OvsdbClient ovsdbClient, Map channelMap) { LOG.info("OvsdbDao::processNewChannelsRequest {}", channelMap); @@ -4882,5 +4877,4 @@ public class OvsdbDao { } - }