Compare commits

...

2 Commits

Author SHA1 Message Date
Lynn Shi
ee1350fbe9 WIFI-2096 Add Portal support for cell size management, update comments 2021-05-06 11:08:40 -04:00
Lynn Shi
b7a3564153 WIFI-2096 Add Portal support for cell size management 2021-05-05 16:25:57 -04:00
2 changed files with 36 additions and 25 deletions

View File

@@ -2,7 +2,6 @@ package com.telecominfraproject.wlan.opensync.ovsdb.dao;
import com.telecominfraproject.wlan.core.model.equipment.ChannelBandwidth;
import com.telecominfraproject.wlan.core.model.equipment.RadioType;
import com.telecominfraproject.wlan.core.model.equipment.SourceType;
import com.telecominfraproject.wlan.equipment.models.*;
import com.telecominfraproject.wlan.opensync.external.integration.models.OpensyncAPConfig;
import com.telecominfraproject.wlan.opensync.ovsdb.dao.models.WifiRadioConfigInfo;
@@ -44,6 +43,9 @@ public class OvsdbRadioConfig extends OvsdbDaoBase {
Map<String, String> hwConfig = new HashMap<>();
ElementRadioConfiguration elementRadioConfig = apElementConfiguration.getRadioMap().get(radioType);
RfElementConfiguration rfElementConfig = rfConfig.getRfConfig(radioType);
if (elementRadioConfig == null || rfElementConfig == null) {
continue;
}
boolean autoChannelSelection = rfElementConfig.getAutoChannelSelection();
int channel = elementRadioConfig.getActiveChannel(autoChannelSelection);
LOG.debug("configureWifiRadios autoChannelSelection {} activeChannel {} getChannelNumber {} ",
@@ -53,11 +55,14 @@ public class OvsdbRadioConfig extends OvsdbDaoBase {
RadioConfiguration radioConfig = apElementConfiguration.getAdvancedRadioMap().get(radioType);
int beaconInterval = rfElementConfig.getBeaconInterval();
boolean enabled = radioConfig.getRadioAdminState().equals(StateSetting.enabled);
int txPower;
if (elementRadioConfig.getEirpTxPower().getSource() == SourceType.profile) {
txPower = rfElementConfig.getEirpTxPower();
boolean autoCellSizeSelection = rfElementConfig.getAutoCellSizeSelection();
int txPower = 0;
if (autoCellSizeSelection) {
if (elementRadioConfig.getEirpTxPower() != null) {
txPower = elementRadioConfig.getEirpTxPower().getValue();
}
} else {
txPower = elementRadioConfig.getEirpTxPower().getValue();
txPower = rfElementConfig.getEirpTxPower();
}
String hwMode = getHwMode(rfElementConfig);
String freqBand = getHwConfigAndFreq(radioType, hwConfig);

View File

@@ -72,21 +72,19 @@ public class OvsdbRrmConfig extends OvsdbDaoBase {
boolean autoChannelSelection = rfElementConfig.getAutoChannelSelection();
int backupChannel = elementRadioConfig.getActiveBackupChannel(autoChannelSelection);
LOG.debug("configureWifiRadios autoChannelSelection {} activeBackupChannel {}",
autoChannelSelection, backupChannel);
AutoOrManualValue probeResponseThresholdDb = null;
AutoOrManualValue clientDisconnectThresholdDb = null;
boolean autoCellSizeSelection = rfElementConfig.getAutoCellSizeSelection();
Integer probeResponseThresholdDb = null;
Integer clientDisconnectThresholdDb = null;
if (elementRadioConfig.getProbeResponseThresholdDb() != null) {
probeResponseThresholdDb = getSourcedValue(elementRadioConfig.getProbeResponseThresholdDb().getSource(),
probeResponseThresholdDb = getSourcedValue(autoCellSizeSelection,
rfElementConfig.getProbeResponseThresholdDb(),
elementRadioConfig.getProbeResponseThresholdDb().getValue());
}
if (elementRadioConfig.getClientDisconnectThresholdDb() != null) {
clientDisconnectThresholdDb = getSourcedValue(
elementRadioConfig.getClientDisconnectThresholdDb().getSource(),
clientDisconnectThresholdDb = getSourcedValue(autoCellSizeSelection,
rfElementConfig.getClientDisconnectThresholdDb(),
elementRadioConfig.getClientDisconnectThresholdDb().getValue());
}
@@ -97,15 +95,13 @@ public class OvsdbRrmConfig extends OvsdbDaoBase {
RadioBestApSettings bestApSettings = null;
if (radioConfig != null) {
if (radioConfig.getMulticastRate() != null) {
multicastRate = radioConfig.getMulticastRate().getSource() == SourceType.profile
? rfElementConfig.getMulticastRate()
: radioConfig.getMulticastRate().getValue();
multicastRate = autoCellSizeSelection ?
radioConfig.getMulticastRate().getValue() : rfElementConfig.getMulticastRate();
}
if (radioConfig.getManagementRate() != null) {
managementRate = radioConfig.getManagementRate().getSource() == SourceType.profile
? rfElementConfig.getManagementRate()
: radioConfig.getManagementRate().getValue();
managementRate = autoCellSizeSelection ?
radioConfig.getManagementRate().getValue() : rfElementConfig.getManagementRate();
}
if (radioConfig.getBestApSettings() != null) {
@@ -136,7 +132,7 @@ public class OvsdbRrmConfig extends OvsdbDaoBase {
}
void configureWifiRrm(OvsdbClient ovsdbClient, String freqBand, int backupChannel,
AutoOrManualValue probeResponseThreshold, AutoOrManualValue clientDisconnectThreshold,
Integer probeResponseThreshold, Integer clientDisconnectThreshold,
ManagementRate managementRate, RadioBestApSettings bestApSettings, MulticastRate multicastRate)
throws OvsdbClientException, TimeoutException, ExecutionException, InterruptedException {
@@ -149,19 +145,19 @@ public class OvsdbRrmConfig extends OvsdbDaoBase {
if (multicastRate == null || multicastRate == MulticastRate.auto) {
updateColumns.put("mcast_rate", new Atom<>(0));
} else {
updateColumns.put("mcast_rate", new Atom<>(managementRate.getId()));
updateColumns.put("mcast_rate", new Atom<>(multicastRate.getId()));
}
if (probeResponseThreshold == null || probeResponseThreshold.isAuto()) {
if (probeResponseThreshold == null) {
updateColumns.put("probe_resp_threshold", new com.vmware.ovsdb.protocol.operation.notation.Set());
} else {
updateColumns.put("probe_resp_threshold", new Atom<>(probeResponseThreshold.getValue()));
updateColumns.put("probe_resp_threshold", new Atom<>(probeResponseThreshold.intValue()));
}
if (clientDisconnectThreshold == null || clientDisconnectThreshold.isAuto()) {
if (clientDisconnectThreshold == null) {
updateColumns.put("client_disconnect_threshold", new com.vmware.ovsdb.protocol.operation.notation.Set());
} else {
updateColumns.put("client_disconnect_threshold", new Atom<>(clientDisconnectThreshold.getValue()));
updateColumns.put("client_disconnect_threshold", new Atom<>(clientDisconnectThreshold.intValue()));
}
if (managementRate == null || managementRate == ManagementRate.auto) {
@@ -216,6 +212,16 @@ public class OvsdbRrmConfig extends OvsdbDaoBase {
}
return AutoOrManualValue.createManualInstance(equipmentValue);
}
//For cell size related attributes, the “manual" mode is not supported any more,
//user can create a new RF profile with desired values to achieve it
int getSourcedValue(boolean autoCellSizeSelection, int profileValue, int equipmentValue) {
if (autoCellSizeSelection) {
return equipmentValue;
} else {
return profileValue;
}
}
void processNewChannelsRequest(OvsdbClient ovsdbClient, Map<RadioType, Integer> backupChannelMap,
Map<RadioType, Integer> primaryChannelMap) {
@@ -307,7 +313,7 @@ public class OvsdbRrmConfig extends OvsdbDaoBase {
Map<String, Value> updateRadioColumns = new HashMap<>();
Integer txPower = cellSizeAttributes.getEirpTxPowerDb();
if (txPower > 0) {
if (txPower != null && txPower > 0) {
updateRadioColumns.put("tx_power", new Atom<>(txPower));
} else {
updateRadioColumns.put("tx_power", new com.vmware.ovsdb.protocol.operation.notation.Set());