mirror of
https://github.com/Telecominfraproject/wlan-cloud-opensync-controller.git
synced 2025-11-02 03:28:00 +00:00
WIFI-1552 Address auto/manual changes to backup channel number (#26)
* WIFI-1552 Address auto/manual changes to backup channel number * WIFI-1552 remove the redundant code * WIFI-1552 update based on review comments * WIFI-1552 add NPE check Co-authored-by: Lynn Shi <lynn.shi@netexperience.com>
This commit is contained in:
@@ -37,7 +37,8 @@
|
||||
"radioType": "is5GHzU",
|
||||
"channelNumber": 149,
|
||||
"manualChannelNumber": 149,
|
||||
"backupChannelNumber": 154,
|
||||
"backupChannelNumber": 157,
|
||||
"manualBackupChannelNumber": 157,
|
||||
"rxCellSizeDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "profile",
|
||||
@@ -168,6 +169,7 @@
|
||||
"channelNumber": 6,
|
||||
"manualChannelNumber": 6,
|
||||
"backupChannelNumber": 11,
|
||||
"manualBackupChannelNumber": 11,
|
||||
"rxCellSizeDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "profile",
|
||||
@@ -277,6 +279,7 @@
|
||||
"channelNumber": 36,
|
||||
"manualChannelNumber": 36,
|
||||
"backupChannelNumber": 44,
|
||||
"manualBackupChannelNumber": 44,
|
||||
"rxCellSizeDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "profile",
|
||||
|
||||
@@ -37,7 +37,8 @@
|
||||
"radioType": "is5GHzU",
|
||||
"channelNumber": 149,
|
||||
"manualChannelNumber": 149,
|
||||
"backupChannelNumber": 154,
|
||||
"backupChannelNumber": 157,
|
||||
"manualBackupChannelNumber": 157,
|
||||
"rxCellSizeDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "profile",
|
||||
@@ -168,6 +169,7 @@
|
||||
"channelNumber": 6,
|
||||
"manualChannelNumber": 6,
|
||||
"backupChannelNumber": 11,
|
||||
"manualBackupChannelNumber": 11,
|
||||
"rxCellSizeDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "profile",
|
||||
@@ -277,6 +279,7 @@
|
||||
"channelNumber": 36,
|
||||
"manualChannelNumber": 36,
|
||||
"backupChannelNumber": 44,
|
||||
"manualBackupChannelNumber": 44,
|
||||
"rxCellSizeDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "profile",
|
||||
|
||||
@@ -37,7 +37,8 @@
|
||||
"radioType": "is5GHzU",
|
||||
"channelNumber": 149,
|
||||
"manualChannelNumber": 149,
|
||||
"backupChannelNumber": 154,
|
||||
"backupChannelNumber": 157,
|
||||
"manualBackupChannelNumber": 157,
|
||||
"rxCellSizeDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "profile",
|
||||
@@ -168,6 +169,7 @@
|
||||
"channelNumber": 6,
|
||||
"manualChannelNumber": 6,
|
||||
"backupChannelNumber": 11,
|
||||
"manualBackupChannelNumber": 11,
|
||||
"rxCellSizeDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "profile",
|
||||
@@ -277,6 +279,7 @@
|
||||
"channelNumber": 36,
|
||||
"manualChannelNumber": 36,
|
||||
"backupChannelNumber": 44,
|
||||
"manualBackupChannelNumber": 44,
|
||||
"rxCellSizeDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "profile",
|
||||
|
||||
@@ -37,7 +37,8 @@
|
||||
"radioType": "is5GHzU",
|
||||
"channelNumber": 149,
|
||||
"manualChannelNumber": 149,
|
||||
"backupChannelNumber": 154,
|
||||
"backupChannelNumber": 157,
|
||||
"manualBackupChannelNumber": 157,
|
||||
"rxCellSizeDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "profile",
|
||||
@@ -168,6 +169,7 @@
|
||||
"channelNumber": 6,
|
||||
"manualChannelNumber": 6,
|
||||
"backupChannelNumber": 11,
|
||||
"manualBackupChannelNumber": 11,
|
||||
"rxCellSizeDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "profile",
|
||||
@@ -277,6 +279,7 @@
|
||||
"channelNumber": 36,
|
||||
"manualChannelNumber": 36,
|
||||
"backupChannelNumber": 44,
|
||||
"manualBackupChannelNumber": 44,
|
||||
"rxCellSizeDb": {
|
||||
"model_type": "SourceSelectionValue",
|
||||
"source": "profile",
|
||||
|
||||
@@ -68,13 +68,22 @@ public class OvsdbRrmConfig extends OvsdbDaoBase {
|
||||
if (elementRadioConfig == null || rfElementConfig == null) {
|
||||
continue; // don't have a radio of this kind in the map
|
||||
}
|
||||
|
||||
boolean autoChannelSelection = rfElementConfig.getAutoChannelSelection();
|
||||
int backupChannel = elementRadioConfig.getActiveBackupChannel(autoChannelSelection);
|
||||
LOG.debug("configureWifiRadios autoChannelSelection {} activeBackupChannel {}",
|
||||
autoChannelSelection, backupChannel);
|
||||
|
||||
AutoOrManualValue probeResponseThresholdDb = null;
|
||||
AutoOrManualValue clientDisconnectThresholdDb = null;
|
||||
if (elementRadioConfig != null && rfElementConfig != null) {
|
||||
|
||||
if (elementRadioConfig.getProbeResponseThresholdDb() != null) {
|
||||
probeResponseThresholdDb = getSourcedValue(elementRadioConfig.getProbeResponseThresholdDb().getSource(),
|
||||
rfElementConfig.getProbeResponseThresholdDb(),
|
||||
elementRadioConfig.getProbeResponseThresholdDb().getValue());
|
||||
}
|
||||
|
||||
if (elementRadioConfig.getClientDisconnectThresholdDb() != null) {
|
||||
clientDisconnectThresholdDb = getSourcedValue(
|
||||
elementRadioConfig.getClientDisconnectThresholdDb().getSource(),
|
||||
rfElementConfig.getClientDisconnectThresholdDb(),
|
||||
@@ -85,19 +94,25 @@ public class OvsdbRrmConfig extends OvsdbDaoBase {
|
||||
MulticastRate multicastRate = null;
|
||||
ManagementRate managementRate = null;
|
||||
RadioBestApSettings bestApSettings = null;
|
||||
if (radioConfig != null && rfElementConfig != null) {
|
||||
if (radioConfig != null) {
|
||||
if (radioConfig.getMulticastRate() != null) {
|
||||
multicastRate = radioConfig.getMulticastRate().getSource() == SourceType.profile
|
||||
? rfElementConfig.getMulticastRate()
|
||||
: radioConfig.getMulticastRate().getValue();
|
||||
}
|
||||
|
||||
if (radioConfig.getManagementRate() != null) {
|
||||
managementRate = radioConfig.getManagementRate().getSource() == SourceType.profile
|
||||
? rfElementConfig.getManagementRate()
|
||||
: radioConfig.getManagementRate().getValue();
|
||||
}
|
||||
|
||||
if (radioConfig.getBestApSettings() != null) {
|
||||
bestApSettings = radioConfig.getBestApSettings().getSource() == SourceType.profile
|
||||
? rfElementConfig.getBestApSettings()
|
||||
: radioConfig.getBestApSettings().getValue();
|
||||
}
|
||||
}
|
||||
|
||||
int multicastRateMbps = 0;
|
||||
if (multicastRate != null) {
|
||||
@@ -134,9 +149,8 @@ public class OvsdbRrmConfig extends OvsdbDaoBase {
|
||||
|
||||
if (freqBand != null) {
|
||||
try {
|
||||
configureWifiRrm(ovsdbClient, freqBand, elementRadioConfig.getBackupChannelNumber(),
|
||||
probeResponseThresholdDb, clientDisconnectThresholdDb, managementRate, bestApSettings,
|
||||
multicastRateMbps);
|
||||
configureWifiRrm(ovsdbClient, freqBand, backupChannel, probeResponseThresholdDb,
|
||||
clientDisconnectThresholdDb, managementRate, bestApSettings, multicastRateMbps);
|
||||
} catch (OvsdbClientException e) {
|
||||
LOG.error("configureRrm failed with OvsdbClient exception.", e);
|
||||
throw new RuntimeException(e);
|
||||
|
||||
Reference in New Issue
Block a user