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

View File

@@ -72,21 +72,19 @@ public class OvsdbRrmConfig extends OvsdbDaoBase {
boolean autoChannelSelection = rfElementConfig.getAutoChannelSelection(); boolean autoChannelSelection = rfElementConfig.getAutoChannelSelection();
int backupChannel = elementRadioConfig.getActiveBackupChannel(autoChannelSelection); int backupChannel = elementRadioConfig.getActiveBackupChannel(autoChannelSelection);
LOG.debug("configureWifiRadios autoChannelSelection {} activeBackupChannel {}",
autoChannelSelection, backupChannel);
AutoOrManualValue probeResponseThresholdDb = null; boolean autoCellSizeSelection = rfElementConfig.getAutoCellSizeSelection();
AutoOrManualValue clientDisconnectThresholdDb = null; Integer probeResponseThresholdDb = null;
Integer clientDisconnectThresholdDb = null;
if (elementRadioConfig.getProbeResponseThresholdDb() != null) { if (elementRadioConfig.getProbeResponseThresholdDb() != null) {
probeResponseThresholdDb = getSourcedValue(elementRadioConfig.getProbeResponseThresholdDb().getSource(), probeResponseThresholdDb = getSourcedValue(autoCellSizeSelection,
rfElementConfig.getProbeResponseThresholdDb(), rfElementConfig.getProbeResponseThresholdDb(),
elementRadioConfig.getProbeResponseThresholdDb().getValue()); elementRadioConfig.getProbeResponseThresholdDb().getValue());
} }
if (elementRadioConfig.getClientDisconnectThresholdDb() != null) { if (elementRadioConfig.getClientDisconnectThresholdDb() != null) {
clientDisconnectThresholdDb = getSourcedValue( clientDisconnectThresholdDb = getSourcedValue(autoCellSizeSelection,
elementRadioConfig.getClientDisconnectThresholdDb().getSource(),
rfElementConfig.getClientDisconnectThresholdDb(), rfElementConfig.getClientDisconnectThresholdDb(),
elementRadioConfig.getClientDisconnectThresholdDb().getValue()); elementRadioConfig.getClientDisconnectThresholdDb().getValue());
} }
@@ -97,15 +95,13 @@ public class OvsdbRrmConfig extends OvsdbDaoBase {
RadioBestApSettings bestApSettings = null; RadioBestApSettings bestApSettings = null;
if (radioConfig != null) { if (radioConfig != null) {
if (radioConfig.getMulticastRate() != null) { if (radioConfig.getMulticastRate() != null) {
multicastRate = radioConfig.getMulticastRate().getSource() == SourceType.profile multicastRate = autoCellSizeSelection ?
? rfElementConfig.getMulticastRate() radioConfig.getMulticastRate().getValue() : rfElementConfig.getMulticastRate();
: radioConfig.getMulticastRate().getValue();
} }
if (radioConfig.getManagementRate() != null) { if (radioConfig.getManagementRate() != null) {
managementRate = radioConfig.getManagementRate().getSource() == SourceType.profile managementRate = autoCellSizeSelection ?
? rfElementConfig.getManagementRate() radioConfig.getManagementRate().getValue() : rfElementConfig.getManagementRate();
: radioConfig.getManagementRate().getValue();
} }
if (radioConfig.getBestApSettings() != null) { if (radioConfig.getBestApSettings() != null) {
@@ -136,7 +132,7 @@ public class OvsdbRrmConfig extends OvsdbDaoBase {
} }
void configureWifiRrm(OvsdbClient ovsdbClient, String freqBand, int backupChannel, void configureWifiRrm(OvsdbClient ovsdbClient, String freqBand, int backupChannel,
AutoOrManualValue probeResponseThreshold, AutoOrManualValue clientDisconnectThreshold, Integer probeResponseThreshold, Integer clientDisconnectThreshold,
ManagementRate managementRate, RadioBestApSettings bestApSettings, MulticastRate multicastRate) ManagementRate managementRate, RadioBestApSettings bestApSettings, MulticastRate multicastRate)
throws OvsdbClientException, TimeoutException, ExecutionException, InterruptedException { throws OvsdbClientException, TimeoutException, ExecutionException, InterruptedException {
@@ -149,19 +145,19 @@ public class OvsdbRrmConfig extends OvsdbDaoBase {
if (multicastRate == null || multicastRate == MulticastRate.auto) { if (multicastRate == null || multicastRate == MulticastRate.auto) {
updateColumns.put("mcast_rate", new Atom<>(0)); updateColumns.put("mcast_rate", new Atom<>(0));
} else { } 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()); updateColumns.put("probe_resp_threshold", new com.vmware.ovsdb.protocol.operation.notation.Set());
} else { } 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()); updateColumns.put("client_disconnect_threshold", new com.vmware.ovsdb.protocol.operation.notation.Set());
} else { } 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) { if (managementRate == null || managementRate == ManagementRate.auto) {
@@ -216,6 +212,16 @@ public class OvsdbRrmConfig extends OvsdbDaoBase {
} }
return AutoOrManualValue.createManualInstance(equipmentValue); 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, void processNewChannelsRequest(OvsdbClient ovsdbClient, Map<RadioType, Integer> backupChannelMap,
Map<RadioType, Integer> primaryChannelMap) { Map<RadioType, Integer> primaryChannelMap) {
@@ -307,7 +313,7 @@ public class OvsdbRrmConfig extends OvsdbDaoBase {
Map<String, Value> updateRadioColumns = new HashMap<>(); Map<String, Value> updateRadioColumns = new HashMap<>();
Integer txPower = cellSizeAttributes.getEirpTxPowerDb(); Integer txPower = cellSizeAttributes.getEirpTxPowerDb();
if (txPower > 0) { if (txPower != null && txPower > 0) {
updateRadioColumns.put("tx_power", new Atom<>(txPower)); updateRadioColumns.put("tx_power", new Atom<>(txPower));
} else { } else {
updateRadioColumns.put("tx_power", new com.vmware.ovsdb.protocol.operation.notation.Set()); updateRadioColumns.put("tx_power", new com.vmware.ovsdb.protocol.operation.notation.Set());