mirror of
https://github.com/Telecominfraproject/wlan-cloud-opensync-controller.git
synced 2025-11-03 12:08:07 +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",
|
"radioType": "is5GHzU",
|
||||||
"channelNumber": 149,
|
"channelNumber": 149,
|
||||||
"manualChannelNumber": 149,
|
"manualChannelNumber": 149,
|
||||||
"backupChannelNumber": 154,
|
"backupChannelNumber": 157,
|
||||||
|
"manualBackupChannelNumber": 157,
|
||||||
"rxCellSizeDb": {
|
"rxCellSizeDb": {
|
||||||
"model_type": "SourceSelectionValue",
|
"model_type": "SourceSelectionValue",
|
||||||
"source": "profile",
|
"source": "profile",
|
||||||
@@ -168,6 +169,7 @@
|
|||||||
"channelNumber": 6,
|
"channelNumber": 6,
|
||||||
"manualChannelNumber": 6,
|
"manualChannelNumber": 6,
|
||||||
"backupChannelNumber": 11,
|
"backupChannelNumber": 11,
|
||||||
|
"manualBackupChannelNumber": 11,
|
||||||
"rxCellSizeDb": {
|
"rxCellSizeDb": {
|
||||||
"model_type": "SourceSelectionValue",
|
"model_type": "SourceSelectionValue",
|
||||||
"source": "profile",
|
"source": "profile",
|
||||||
@@ -277,6 +279,7 @@
|
|||||||
"channelNumber": 36,
|
"channelNumber": 36,
|
||||||
"manualChannelNumber": 36,
|
"manualChannelNumber": 36,
|
||||||
"backupChannelNumber": 44,
|
"backupChannelNumber": 44,
|
||||||
|
"manualBackupChannelNumber": 44,
|
||||||
"rxCellSizeDb": {
|
"rxCellSizeDb": {
|
||||||
"model_type": "SourceSelectionValue",
|
"model_type": "SourceSelectionValue",
|
||||||
"source": "profile",
|
"source": "profile",
|
||||||
|
|||||||
@@ -37,7 +37,8 @@
|
|||||||
"radioType": "is5GHzU",
|
"radioType": "is5GHzU",
|
||||||
"channelNumber": 149,
|
"channelNumber": 149,
|
||||||
"manualChannelNumber": 149,
|
"manualChannelNumber": 149,
|
||||||
"backupChannelNumber": 154,
|
"backupChannelNumber": 157,
|
||||||
|
"manualBackupChannelNumber": 157,
|
||||||
"rxCellSizeDb": {
|
"rxCellSizeDb": {
|
||||||
"model_type": "SourceSelectionValue",
|
"model_type": "SourceSelectionValue",
|
||||||
"source": "profile",
|
"source": "profile",
|
||||||
@@ -168,6 +169,7 @@
|
|||||||
"channelNumber": 6,
|
"channelNumber": 6,
|
||||||
"manualChannelNumber": 6,
|
"manualChannelNumber": 6,
|
||||||
"backupChannelNumber": 11,
|
"backupChannelNumber": 11,
|
||||||
|
"manualBackupChannelNumber": 11,
|
||||||
"rxCellSizeDb": {
|
"rxCellSizeDb": {
|
||||||
"model_type": "SourceSelectionValue",
|
"model_type": "SourceSelectionValue",
|
||||||
"source": "profile",
|
"source": "profile",
|
||||||
@@ -277,6 +279,7 @@
|
|||||||
"channelNumber": 36,
|
"channelNumber": 36,
|
||||||
"manualChannelNumber": 36,
|
"manualChannelNumber": 36,
|
||||||
"backupChannelNumber": 44,
|
"backupChannelNumber": 44,
|
||||||
|
"manualBackupChannelNumber": 44,
|
||||||
"rxCellSizeDb": {
|
"rxCellSizeDb": {
|
||||||
"model_type": "SourceSelectionValue",
|
"model_type": "SourceSelectionValue",
|
||||||
"source": "profile",
|
"source": "profile",
|
||||||
|
|||||||
@@ -37,7 +37,8 @@
|
|||||||
"radioType": "is5GHzU",
|
"radioType": "is5GHzU",
|
||||||
"channelNumber": 149,
|
"channelNumber": 149,
|
||||||
"manualChannelNumber": 149,
|
"manualChannelNumber": 149,
|
||||||
"backupChannelNumber": 154,
|
"backupChannelNumber": 157,
|
||||||
|
"manualBackupChannelNumber": 157,
|
||||||
"rxCellSizeDb": {
|
"rxCellSizeDb": {
|
||||||
"model_type": "SourceSelectionValue",
|
"model_type": "SourceSelectionValue",
|
||||||
"source": "profile",
|
"source": "profile",
|
||||||
@@ -168,6 +169,7 @@
|
|||||||
"channelNumber": 6,
|
"channelNumber": 6,
|
||||||
"manualChannelNumber": 6,
|
"manualChannelNumber": 6,
|
||||||
"backupChannelNumber": 11,
|
"backupChannelNumber": 11,
|
||||||
|
"manualBackupChannelNumber": 11,
|
||||||
"rxCellSizeDb": {
|
"rxCellSizeDb": {
|
||||||
"model_type": "SourceSelectionValue",
|
"model_type": "SourceSelectionValue",
|
||||||
"source": "profile",
|
"source": "profile",
|
||||||
@@ -277,6 +279,7 @@
|
|||||||
"channelNumber": 36,
|
"channelNumber": 36,
|
||||||
"manualChannelNumber": 36,
|
"manualChannelNumber": 36,
|
||||||
"backupChannelNumber": 44,
|
"backupChannelNumber": 44,
|
||||||
|
"manualBackupChannelNumber": 44,
|
||||||
"rxCellSizeDb": {
|
"rxCellSizeDb": {
|
||||||
"model_type": "SourceSelectionValue",
|
"model_type": "SourceSelectionValue",
|
||||||
"source": "profile",
|
"source": "profile",
|
||||||
|
|||||||
@@ -37,7 +37,8 @@
|
|||||||
"radioType": "is5GHzU",
|
"radioType": "is5GHzU",
|
||||||
"channelNumber": 149,
|
"channelNumber": 149,
|
||||||
"manualChannelNumber": 149,
|
"manualChannelNumber": 149,
|
||||||
"backupChannelNumber": 154,
|
"backupChannelNumber": 157,
|
||||||
|
"manualBackupChannelNumber": 157,
|
||||||
"rxCellSizeDb": {
|
"rxCellSizeDb": {
|
||||||
"model_type": "SourceSelectionValue",
|
"model_type": "SourceSelectionValue",
|
||||||
"source": "profile",
|
"source": "profile",
|
||||||
@@ -168,6 +169,7 @@
|
|||||||
"channelNumber": 6,
|
"channelNumber": 6,
|
||||||
"manualChannelNumber": 6,
|
"manualChannelNumber": 6,
|
||||||
"backupChannelNumber": 11,
|
"backupChannelNumber": 11,
|
||||||
|
"manualBackupChannelNumber": 11,
|
||||||
"rxCellSizeDb": {
|
"rxCellSizeDb": {
|
||||||
"model_type": "SourceSelectionValue",
|
"model_type": "SourceSelectionValue",
|
||||||
"source": "profile",
|
"source": "profile",
|
||||||
@@ -277,6 +279,7 @@
|
|||||||
"channelNumber": 36,
|
"channelNumber": 36,
|
||||||
"manualChannelNumber": 36,
|
"manualChannelNumber": 36,
|
||||||
"backupChannelNumber": 44,
|
"backupChannelNumber": 44,
|
||||||
|
"manualBackupChannelNumber": 44,
|
||||||
"rxCellSizeDb": {
|
"rxCellSizeDb": {
|
||||||
"model_type": "SourceSelectionValue",
|
"model_type": "SourceSelectionValue",
|
||||||
"source": "profile",
|
"source": "profile",
|
||||||
|
|||||||
@@ -68,13 +68,22 @@ public class OvsdbRrmConfig extends OvsdbDaoBase {
|
|||||||
if (elementRadioConfig == null || rfElementConfig == null) {
|
if (elementRadioConfig == null || rfElementConfig == null) {
|
||||||
continue; // don't have a radio of this kind in the map
|
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 probeResponseThresholdDb = null;
|
||||||
AutoOrManualValue clientDisconnectThresholdDb = null;
|
AutoOrManualValue clientDisconnectThresholdDb = null;
|
||||||
if (elementRadioConfig != null && rfElementConfig != null) {
|
|
||||||
|
if (elementRadioConfig.getProbeResponseThresholdDb() != null) {
|
||||||
probeResponseThresholdDb = getSourcedValue(elementRadioConfig.getProbeResponseThresholdDb().getSource(),
|
probeResponseThresholdDb = getSourcedValue(elementRadioConfig.getProbeResponseThresholdDb().getSource(),
|
||||||
rfElementConfig.getProbeResponseThresholdDb(),
|
rfElementConfig.getProbeResponseThresholdDb(),
|
||||||
elementRadioConfig.getProbeResponseThresholdDb().getValue());
|
elementRadioConfig.getProbeResponseThresholdDb().getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (elementRadioConfig.getClientDisconnectThresholdDb() != null) {
|
||||||
clientDisconnectThresholdDb = getSourcedValue(
|
clientDisconnectThresholdDb = getSourcedValue(
|
||||||
elementRadioConfig.getClientDisconnectThresholdDb().getSource(),
|
elementRadioConfig.getClientDisconnectThresholdDb().getSource(),
|
||||||
rfElementConfig.getClientDisconnectThresholdDb(),
|
rfElementConfig.getClientDisconnectThresholdDb(),
|
||||||
@@ -85,19 +94,25 @@ public class OvsdbRrmConfig extends OvsdbDaoBase {
|
|||||||
MulticastRate multicastRate = null;
|
MulticastRate multicastRate = null;
|
||||||
ManagementRate managementRate = null;
|
ManagementRate managementRate = null;
|
||||||
RadioBestApSettings bestApSettings = null;
|
RadioBestApSettings bestApSettings = null;
|
||||||
if (radioConfig != null && rfElementConfig != null) {
|
if (radioConfig != null) {
|
||||||
|
if (radioConfig.getMulticastRate() != null) {
|
||||||
multicastRate = radioConfig.getMulticastRate().getSource() == SourceType.profile
|
multicastRate = radioConfig.getMulticastRate().getSource() == SourceType.profile
|
||||||
? rfElementConfig.getMulticastRate()
|
? rfElementConfig.getMulticastRate()
|
||||||
: radioConfig.getMulticastRate().getValue();
|
: radioConfig.getMulticastRate().getValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (radioConfig.getManagementRate() != null) {
|
||||||
managementRate = radioConfig.getManagementRate().getSource() == SourceType.profile
|
managementRate = radioConfig.getManagementRate().getSource() == SourceType.profile
|
||||||
? rfElementConfig.getManagementRate()
|
? rfElementConfig.getManagementRate()
|
||||||
: radioConfig.getManagementRate().getValue();
|
: radioConfig.getManagementRate().getValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (radioConfig.getBestApSettings() != null) {
|
||||||
bestApSettings = radioConfig.getBestApSettings().getSource() == SourceType.profile
|
bestApSettings = radioConfig.getBestApSettings().getSource() == SourceType.profile
|
||||||
? rfElementConfig.getBestApSettings()
|
? rfElementConfig.getBestApSettings()
|
||||||
: radioConfig.getBestApSettings().getValue();
|
: radioConfig.getBestApSettings().getValue();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int multicastRateMbps = 0;
|
int multicastRateMbps = 0;
|
||||||
if (multicastRate != null) {
|
if (multicastRate != null) {
|
||||||
@@ -134,9 +149,8 @@ public class OvsdbRrmConfig extends OvsdbDaoBase {
|
|||||||
|
|
||||||
if (freqBand != null) {
|
if (freqBand != null) {
|
||||||
try {
|
try {
|
||||||
configureWifiRrm(ovsdbClient, freqBand, elementRadioConfig.getBackupChannelNumber(),
|
configureWifiRrm(ovsdbClient, freqBand, backupChannel, probeResponseThresholdDb,
|
||||||
probeResponseThresholdDb, clientDisconnectThresholdDb, managementRate, bestApSettings,
|
clientDisconnectThresholdDb, managementRate, bestApSettings, multicastRateMbps);
|
||||||
multicastRateMbps);
|
|
||||||
} catch (OvsdbClientException e) {
|
} catch (OvsdbClientException e) {
|
||||||
LOG.error("configureRrm failed with OvsdbClient exception.", e);
|
LOG.error("configureRrm failed with OvsdbClient exception.", e);
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
|
|||||||
Reference in New Issue
Block a user