mirror of
https://github.com/Telecominfraproject/wlan-cloud-opensync-controller.git
synced 2025-11-28 08:13:56 +00:00
WIFI-1096: Configure multicast and beacon rate in Wifi_RRM_Config
This commit is contained in:
@@ -34,6 +34,7 @@ import com.telecominfraproject.wlan.core.model.json.BaseJsonModel;
|
|||||||
import com.telecominfraproject.wlan.equipment.models.ApElementConfiguration;
|
import com.telecominfraproject.wlan.equipment.models.ApElementConfiguration;
|
||||||
import com.telecominfraproject.wlan.equipment.models.ElementRadioConfiguration;
|
import com.telecominfraproject.wlan.equipment.models.ElementRadioConfiguration;
|
||||||
import com.telecominfraproject.wlan.equipment.models.ManagementRate;
|
import com.telecominfraproject.wlan.equipment.models.ManagementRate;
|
||||||
|
import com.telecominfraproject.wlan.equipment.models.MulticastRate;
|
||||||
import com.telecominfraproject.wlan.equipment.models.NetworkForwardMode;
|
import com.telecominfraproject.wlan.equipment.models.NetworkForwardMode;
|
||||||
import com.telecominfraproject.wlan.equipment.models.RadioConfiguration;
|
import com.telecominfraproject.wlan.equipment.models.RadioConfiguration;
|
||||||
import com.telecominfraproject.wlan.equipment.models.RadioMode;
|
import com.telecominfraproject.wlan.equipment.models.RadioMode;
|
||||||
@@ -4919,13 +4920,9 @@ public class OvsdbDao {
|
|||||||
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
|
||||||
}
|
}
|
||||||
AutoOrManualValue rxCellSizeDb = null;
|
|
||||||
AutoOrManualValue probeResponseThresholdDb = null;
|
AutoOrManualValue probeResponseThresholdDb = null;
|
||||||
AutoOrManualValue clientDisconnectThresholdDb = null;
|
AutoOrManualValue clientDisconnectThresholdDb = null;
|
||||||
if (elementRadioConfig != null && rfElementConfig != null) {
|
if (elementRadioConfig != null && rfElementConfig != null) {
|
||||||
rxCellSizeDb = getSourcedValue(elementRadioConfig.getRxCellSizeDb().getSource(),
|
|
||||||
rfElementConfig.getRxCellSizeDb(), elementRadioConfig.getRxCellSizeDb().getValue());
|
|
||||||
|
|
||||||
probeResponseThresholdDb = getSourcedValue(elementRadioConfig.getProbeResponseThresholdDb().getSource(),
|
probeResponseThresholdDb = getSourcedValue(elementRadioConfig.getProbeResponseThresholdDb().getSource(),
|
||||||
rfElementConfig.getProbeResponseThresholdDb(),
|
rfElementConfig.getProbeResponseThresholdDb(),
|
||||||
elementRadioConfig.getProbeResponseThresholdDb().getValue());
|
elementRadioConfig.getProbeResponseThresholdDb().getValue());
|
||||||
@@ -4937,9 +4934,14 @@ public class OvsdbDao {
|
|||||||
}
|
}
|
||||||
|
|
||||||
RadioConfiguration radioConfig = apElementConfig.getAdvancedRadioMap().get(radioType);
|
RadioConfiguration radioConfig = apElementConfig.getAdvancedRadioMap().get(radioType);
|
||||||
|
MulticastRate multicastRate = null;
|
||||||
ManagementRate managementRate = null;
|
ManagementRate managementRate = null;
|
||||||
RadioBestApSettings bestApSettings = null;
|
RadioBestApSettings bestApSettings = null;
|
||||||
if (radioConfig != null && rfElementConfig != null) {
|
if (radioConfig != null && rfElementConfig != null) {
|
||||||
|
multicastRate = radioConfig.getMulticastRate().getSource() == SourceType.profile
|
||||||
|
? rfElementConfig.getMulticastRate()
|
||||||
|
: radioConfig.getMulticastRate().getValue();
|
||||||
|
|
||||||
managementRate = radioConfig.getManagementRate().getSource() == SourceType.profile
|
managementRate = radioConfig.getManagementRate().getSource() == SourceType.profile
|
||||||
? rfElementConfig.getManagementRate()
|
? rfElementConfig.getManagementRate()
|
||||||
: radioConfig.getManagementRate().getValue();
|
: radioConfig.getManagementRate().getValue();
|
||||||
@@ -4949,10 +4951,44 @@ public class OvsdbDao {
|
|||||||
: radioConfig.getBestApSettings().getValue();
|
: radioConfig.getBestApSettings().getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int multicastRateMbps = 0;
|
||||||
|
switch (multicastRate) {
|
||||||
|
case rate6mbps:
|
||||||
|
multicastRateMbps = 6;
|
||||||
|
break;
|
||||||
|
case rate9mbps:
|
||||||
|
multicastRateMbps = 9;
|
||||||
|
break;
|
||||||
|
case rate12mbps:
|
||||||
|
multicastRateMbps = 12;
|
||||||
|
break;
|
||||||
|
case rate18mbps:
|
||||||
|
multicastRateMbps = 18;
|
||||||
|
break;
|
||||||
|
case rate24mbps:
|
||||||
|
multicastRateMbps = 24;
|
||||||
|
break;
|
||||||
|
case rate36mbps:
|
||||||
|
multicastRateMbps = 36;
|
||||||
|
break;
|
||||||
|
case rate48mbps:
|
||||||
|
multicastRateMbps = 48;
|
||||||
|
break;
|
||||||
|
case rate54mbps:
|
||||||
|
multicastRateMbps = 54;
|
||||||
|
break;
|
||||||
|
case auto:
|
||||||
|
default:
|
||||||
|
multicastRateMbps = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (freqBand != null) {
|
if (freqBand != null) {
|
||||||
try {
|
try {
|
||||||
configureWifiRrm(ovsdbClient, freqBand, elementRadioConfig.getBackupChannelNumber(), rxCellSizeDb,
|
configureWifiRrm(ovsdbClient, freqBand, elementRadioConfig.getBackupChannelNumber(),
|
||||||
probeResponseThresholdDb, clientDisconnectThresholdDb, managementRate, bestApSettings);
|
probeResponseThresholdDb, clientDisconnectThresholdDb, managementRate, bestApSettings,
|
||||||
|
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);
|
||||||
@@ -4970,9 +5006,8 @@ public class OvsdbDao {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void configureWifiRrm(OvsdbClient ovsdbClient, String freqBand, int backupChannel,
|
private void configureWifiRrm(OvsdbClient ovsdbClient, String freqBand, int backupChannel,
|
||||||
AutoOrManualValue rxCellSize, AutoOrManualValue probeResponseThreshold,
|
AutoOrManualValue probeResponseThreshold, AutoOrManualValue clientDisconnectThreshold,
|
||||||
AutoOrManualValue clientDisconnectThreshold, ManagementRate managementRate,
|
ManagementRate managementRate, RadioBestApSettings bestApSettings, int multicastRate)
|
||||||
RadioBestApSettings bestApSettings)
|
|
||||||
throws OvsdbClientException, TimeoutException, ExecutionException, InterruptedException {
|
throws OvsdbClientException, TimeoutException, ExecutionException, InterruptedException {
|
||||||
|
|
||||||
List<Operation> operations = new ArrayList<>();
|
List<Operation> operations = new ArrayList<>();
|
||||||
@@ -4981,10 +5016,10 @@ public class OvsdbDao {
|
|||||||
updateColumns.put("freq_band", new Atom<>(freqBand));
|
updateColumns.put("freq_band", new Atom<>(freqBand));
|
||||||
updateColumns.put("backup_channel", new Atom<>(backupChannel));
|
updateColumns.put("backup_channel", new Atom<>(backupChannel));
|
||||||
|
|
||||||
if (rxCellSize == null || rxCellSize.isAuto()) {
|
if (ovsdbClient.getSchema(ovsdbName).get().getTables().get(wifiRadioConfigDbTable).getColumns()
|
||||||
updateColumns.put("cell_size", new com.vmware.ovsdb.protocol.operation.notation.Set());
|
.containsKey("mcast_rate")) {
|
||||||
} else {
|
|
||||||
updateColumns.put("cell_size", new Atom<>(rxCellSize.getValue()));
|
updateColumns.put("mcast_rate", new Atom<>(multicastRate));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (probeResponseThreshold == null || probeResponseThreshold.isAuto()) {
|
if (probeResponseThreshold == null || probeResponseThreshold.isAuto()) {
|
||||||
@@ -4999,10 +5034,13 @@ public class OvsdbDao {
|
|||||||
updateColumns.put("client_disconnect_threshold", new Atom<>(clientDisconnectThreshold.getValue()));
|
updateColumns.put("client_disconnect_threshold", new Atom<>(clientDisconnectThreshold.getValue()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ovsdbClient.getSchema(ovsdbName).get().getTables().get(wifiRadioConfigDbTable).getColumns()
|
||||||
|
.containsKey("beacon_rate")) {
|
||||||
if (managementRate == null || managementRate == ManagementRate.auto) {
|
if (managementRate == null || managementRate == ManagementRate.auto) {
|
||||||
updateColumns.put("basic_rate", new com.vmware.ovsdb.protocol.operation.notation.Set());
|
updateColumns.put("beacon_rate", new Atom<>(0));
|
||||||
} else {
|
} else {
|
||||||
updateColumns.put("basic_rate", new Atom<>(managementRate.getId() * 10));
|
updateColumns.put("beacon_rate", new Atom<>(managementRate.getId() * 10));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bestApSettings == null) {
|
if (bestApSettings == null) {
|
||||||
@@ -5027,7 +5065,7 @@ public class OvsdbDao {
|
|||||||
CompletableFuture<OperationResult[]> fResult = ovsdbClient.transact(ovsdbName, operations);
|
CompletableFuture<OperationResult[]> fResult = ovsdbClient.transact(ovsdbName, operations);
|
||||||
OperationResult[] result = fResult.get(ovsdbTimeoutSec, TimeUnit.SECONDS);
|
OperationResult[] result = fResult.get(ovsdbTimeoutSec, TimeUnit.SECONDS);
|
||||||
|
|
||||||
LOG.debug("Provisioned rrm config {} for {}", rxCellSize, freqBand);
|
LOG.debug("Provisioned rrm config with multicastRate {} Mbps for {}", multicastRate, freqBand);
|
||||||
|
|
||||||
for (OperationResult res : result) {
|
for (OperationResult res : result) {
|
||||||
LOG.debug("Op Result {}", res);
|
LOG.debug("Op Result {}", res);
|
||||||
|
|||||||
Reference in New Issue
Block a user