Merge branch 'master' of github.com:Telecominfraproject/wlan-cloud-opensync-controller

# Conflicts:
#	opensync-ext-cloud/src/main/java/com/telecominfraproject/wlan/opensync/external/integration/OpensyncExternalIntegrationCloud.java
This commit is contained in:
Dmitry Toptygin
2020-06-29 11:58:53 -04:00
5 changed files with 140 additions and 69 deletions

View File

@@ -93,6 +93,7 @@ import com.telecominfraproject.wlan.status.equipment.report.models.ActiveBSSID;
import com.telecominfraproject.wlan.status.equipment.report.models.ActiveBSSIDs; import com.telecominfraproject.wlan.status.equipment.report.models.ActiveBSSIDs;
import com.telecominfraproject.wlan.status.equipment.report.models.EquipmentCapacityDetails; import com.telecominfraproject.wlan.status.equipment.report.models.EquipmentCapacityDetails;
import com.telecominfraproject.wlan.status.equipment.report.models.EquipmentPerRadioUtilizationDetails; import com.telecominfraproject.wlan.status.equipment.report.models.EquipmentPerRadioUtilizationDetails;
import com.telecominfraproject.wlan.status.equipment.report.models.OperatingSystemPerformance;
import com.telecominfraproject.wlan.status.equipment.report.models.RadioUtilizationReport; import com.telecominfraproject.wlan.status.equipment.report.models.RadioUtilizationReport;
import com.telecominfraproject.wlan.status.models.Status; import com.telecominfraproject.wlan.status.models.Status;
import com.telecominfraproject.wlan.status.models.StatusCode; import com.telecominfraproject.wlan.status.models.StatusCode;
@@ -165,8 +166,10 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
private int autoProvisionedLocationId; private int autoProvisionedLocationId;
@Value("${connectus.ovsdb.autoProvisionedProfileId:1}") @Value("${connectus.ovsdb.autoProvisionedProfileId:1}")
private int autoProvisionedProfileId; private int autoProvisionedProfileId;
@Value("${connectus.ovsdb.autoProvisionedSsid:autoProvisionedSsid}") @Value("${connectus.ovsdb.autoProvisionedSsid:DefaultSsid-}")
private String autoProvisionedSsid; private String autoProvisionedSsid;
@Value("${connectus.ovsdb.autoprovisionedSsidKey:12345678}")
private String autoprovisionedSsidKey;
@Value("${connectus.ovsdb.isAutoconfigEnabled:true}") @Value("${connectus.ovsdb.isAutoconfigEnabled:true}")
private boolean isAutoconfigEnabled; private boolean isAutoconfigEnabled;
@Value("${connectus.ovsdb.defaultFwVersion:r10947-65030d81f3}") @Value("${connectus.ovsdb.defaultFwVersion:r10947-65030d81f3}")
@@ -258,7 +261,8 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
try { try {
ce.setBaseMacAddress(new MacAddress(connectNodeInfo.macAddress)); ce.setBaseMacAddress(new MacAddress(connectNodeInfo.macAddress));
} catch (RuntimeException e) { } catch (RuntimeException e) {
LOG.warn("Auto-provisioning: cannot parse equipment mac address {}", connectNodeInfo.macAddress); LOG.warn("Auto-provisioning: cannot parse equipment mac address {}",
connectNodeInfo.macAddress);
} }
Customer customer = customerServiceInterface.getOrNull(autoProvisionedCustomerId); Customer customer = customerServiceInterface.getOrNull(autoProvisionedCustomerId);
@@ -339,7 +343,6 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
} }
} }
if(profileId == null) { if(profileId == null) {
//create default apProfile if cannot find applicable one: //create default apProfile if cannot find applicable one:
Profile apProfile = createDefaultApProfile(ce, connectNodeInfo); Profile apProfile = createDefaultApProfile(ce, connectNodeInfo);
@@ -350,7 +353,8 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
ce = equipmentServiceInterface.create(ce); ce = equipmentServiceInterface.create(ce);
//update the cache right away, no need to wait until the entry expires // update the cache right away, no need to wait until the
// entry expires
cloudEquipmentRecordCache.put(ce.getInventoryId(), ce); cloudEquipmentRecordCache.put(ce.getInventoryId(), ce);
} else { } else {
@@ -364,14 +368,17 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
} }
if (reportedMacAddress != null) { if (reportedMacAddress != null) {
//check if reported mac address matches what is in the db // check if reported mac address matches what is in the
// db
if (!reportedMacAddress.equals(ce.getBaseMacAddress())) { if (!reportedMacAddress.equals(ce.getBaseMacAddress())) {
//need to update base mac address on equipment in DB // need to update base mac address on equipment in
// DB
ce = equipmentServiceInterface.get(ce.getId()); ce = equipmentServiceInterface.get(ce.getId());
ce.setBaseMacAddress(reportedMacAddress); ce.setBaseMacAddress(reportedMacAddress);
ce = equipmentServiceInterface.update(ce); ce = equipmentServiceInterface.update(ce);
//update the cache right away, no need to wait until the entry expires // update the cache right away, no need to wait
// until the entry expires
cloudEquipmentRecordCache.put(ce.getInventoryId(), ce); cloudEquipmentRecordCache.put(ce.getInventoryId(), ce);
} }
} }
@@ -434,10 +441,15 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
for (RadioType radioType : radioTypes) { for (RadioType radioType : radioTypes) {
Profile ssidProfile = new Profile(); Profile ssidProfile = new Profile();
ssidProfile.setCustomerId(ce.getCustomerId()); ssidProfile.setCustomerId(ce.getCustomerId());
ssidProfile.setName("DefaultSsid-" + radioType.name()+ " for " + ce.getName() ); ssidProfile.setName(autoProvisionedSsid + radioType.name()+ " for " + ce.getName() );
SsidConfiguration ssidConfig = SsidConfiguration.createWithDefaults(); SsidConfiguration ssidConfig = SsidConfiguration.createWithDefaults();
ssidConfig.setSecureMode(SecureMode.open); ssidConfig.setSsid(ssidProfile.getName());
ssidConfig.setSsidAdminState(StateSetting.enabled);
ssidConfig.setBroadcastSsid(StateSetting.enabled);
ssidConfig.setSecureMode(SecureMode.wpa2PSK);
ssidConfig.setKeyStr(autoprovisionedSsidKey);
Set<RadioType> appliedRadios = new HashSet<>(); Set<RadioType> appliedRadios = new HashSet<>();
appliedRadios.add(radioType); appliedRadios.add(radioType);
ssidConfig.setAppliedRadios(appliedRadios); ssidConfig.setAppliedRadios(appliedRadios);
@@ -812,6 +824,8 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
for (Device deviceReport : report.getDeviceList()) { for (Device deviceReport : report.getDeviceList()) {
int avgRadioTemp = 0;
ApPerformance apPerformance = new ApPerformance(); ApPerformance apPerformance = new ApPerformance();
apNodeMetrics.setApPerformance(apPerformance); apNodeMetrics.setApPerformance(apPerformance);
@@ -820,7 +834,7 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
// data.setChannelUtilization5G(channelUtilization5G); // data.setChannelUtilization5G(channelUtilization5G);
if (deviceReport.getRadioTempCount() > 0) { if (deviceReport.getRadioTempCount() > 0) {
int cpuTemperature = 0; float cpuTemperature = 0;
int numSamples = 0; int numSamples = 0;
for (RadioTemp r : deviceReport.getRadioTempList()) { for (RadioTemp r : deviceReport.getRadioTempList()) {
if (r.hasValue()) { if (r.hasValue()) {
@@ -830,7 +844,8 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
} }
if (numSamples > 0) { if (numSamples > 0) {
apPerformance.setCpuTemperature(cpuTemperature / numSamples); avgRadioTemp = Math.round((cpuTemperature / numSamples));
apPerformance.setCpuTemperature(avgRadioTemp);
} }
} }
@@ -847,8 +862,13 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
deviceReport.getMemUtil().getMemTotal() - deviceReport.getMemUtil().getMemUsed()); deviceReport.getMemUtil().getMemTotal() - deviceReport.getMemUtil().getMemUsed());
} }
apPerformance.setUpTime((long) deviceReport.getUptime()); apPerformance.setUpTime((long) deviceReport.getUptime());
updateDeviceStatusForReport(customerId, equipmentId, deviceReport, avgRadioTemp);
} }
// statusList.add(status);
// Main Network dashboard shows Traffic and Capacity values that // Main Network dashboard shows Traffic and Capacity values that
// are calculated from // are calculated from
// ApNodeMetric properties getPeriodLengthSec, getRxBytes2G, // ApNodeMetric properties getPeriodLengthSec, getRxBytes2G,
@@ -869,7 +889,9 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
if (!cl.hasConnected() || cl.getConnected() != true) { if (!cl.hasConnected() || cl.getConnected() != true) {
// this client is not currently connected, skip it // this client is not currently connected, skip it
//TODO: how come AP reports disconencted clients? What if it is a busy coffe shop with thousands of peopele per day, when do clients disappear from the reports? // TODO: how come AP reports disconencted clients? What
// if it is a busy coffe shop with thousands of peopele
// per day, when do clients disappear from the reports?
continue; continue;
} }
@@ -990,6 +1012,39 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
} }
private void updateDeviceStatusForReport(int customerId, long equipmentId, Device deviceReport, int avgRadioTemp) {
Status status = new Status();
status.setCustomerId(customerId);
status.setEquipmentId(equipmentId);
OperatingSystemPerformance eqOsPerformance = new OperatingSystemPerformance();
eqOsPerformance.setUptimeInSeconds(deviceReport.getUptime());
eqOsPerformance.setAvgCpuTemperature(avgRadioTemp);
eqOsPerformance.setAvgCpuUtilization(deviceReport.getCpuUtil().getCpuUtil());
eqOsPerformance
.setAvgFreeMemoryKb(deviceReport.getMemUtil().getMemTotal() - deviceReport.getMemUtil().getMemUsed());
eqOsPerformance.setTotalAvailableMemoryKb(deviceReport.getMemUtil().getMemTotal());
status.setDetails(eqOsPerformance);
status = statusServiceInterface.update(status);
LOG.debug("updated status {}", status);
Status networkAggStatusRec = statusServiceInterface.getOrNull(customerId, equipmentId,
StatusDataType.NETWORK_AGGREGATE);
NetworkAggregateStatusData naStatusData = (NetworkAggregateStatusData) networkAggStatusRec.getDetails();
EquipmentPerformanceDetails equipmentPerformanceDetails = new EquipmentPerformanceDetails();
equipmentPerformanceDetails.setAvgCpuTemperature((int) eqOsPerformance.getAvgCpuTemperature());
equipmentPerformanceDetails.setAvgFreeMemory(eqOsPerformance.getAvgFreeMemoryKb());
naStatusData.setApPerformanceDetails(
equipmentPerformanceDetails.combineWith(naStatusData.getApPerformanceDetails()));
networkAggStatusRec.setDetails(naStatusData);
networkAggStatusRec = statusServiceInterface.update(networkAggStatusRec);
LOG.debug("updated aggregate status {}", networkAggStatusRec);
}
private void populateApClientMetrics(List<ServiceMetric> metricRecordList, Report report, int customerId, private void populateApClientMetrics(List<ServiceMetric> metricRecordList, Report report, int customerId,
long equipmentId) { long equipmentId) {
LOG.debug("populateApClientMetrics for Customer {} Equipment {}", customerId, equipmentId); LOG.debug("populateApClientMetrics for Customer {} Equipment {}", customerId, equipmentId);
@@ -1300,14 +1355,17 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
Status activeBssidsStatus = statusServiceInterface.getOrNull(customerId, equipmentId, Status activeBssidsStatus = statusServiceInterface.getOrNull(customerId, equipmentId,
StatusDataType.ACTIVE_BSSIDS); StatusDataType.ACTIVE_BSSIDS);
ActiveBSSIDs statusDetails = null;
int indexOfBssid = -1;
if (activeBssidsStatus != null) { if (activeBssidsStatus != null) {
ActiveBSSIDs statusDetails = (ActiveBSSIDs) activeBssidsStatus.getDetails(); statusDetails = (ActiveBSSIDs) activeBssidsStatus.getDetails();
for (ActiveBSSID activeBSSID : statusDetails.getActiveBSSIDs()) { for (ActiveBSSID activeBSSID : statusDetails.getActiveBSSIDs()) {
if (activeBSSID.getRadioType().equals(radioType)) { if (activeBSSID.getRadioType().equals(radioType)) {
ssidStatistics.setBssid(new MacAddress(activeBSSID.getBssid())); ssidStatistics.setBssid(new MacAddress(activeBSSID.getBssid()));
// ssid value, in case not in stats, else will take // ssid value, in case not in stats, else will take
// stats value after // stats value after
ssid = activeBSSID.getSsid(); ssid = activeBSSID.getSsid();
indexOfBssid = statusDetails.getActiveBSSIDs().indexOf(activeBSSID);
} }
} }
} }
@@ -1383,6 +1441,13 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
apSsidMetrics.getSsidStats().put(radioType, ssidStatsList); apSsidMetrics.getSsidStats().put(radioType, ssidStatsList);
} }
if (statusDetails != null && indexOfBssid >= 0) {
statusDetails.getActiveBSSIDs().get(indexOfBssid).setNumDevicesConnected(ssidStatistics.getNumClient());
activeBssidsStatus.setDetails(statusDetails);
activeBssidsStatus = statusServiceInterface.update(activeBssidsStatus);
LOG.debug("update activeBSSIDs {}", activeBssidsStatus);
}
} }
LOG.debug("ApSsidMetrics {}", apSsidMetrics); LOG.debug("ApSsidMetrics {}", apSsidMetrics);

View File

@@ -60,15 +60,19 @@ then
fi fi
DEFAULT_BRIDGE="${DEFAULT_BRIDGE:=br-lan}" DEFAULT_BRIDGE="${DEFAULT_BRIDGE:=br-lan}"
DEFAULT_WAN="${DEFAULT_WAN:=eth}" DEFAULT_WAN_TYPE="${DEFAULT_WAN_TYPE:=eth}"
DEFAULT_LAN="${DEFAULT_LAN:=br-lan}" DEFAULT_LAN_TYPE="${DEFAULT_LAN_TYPE:=bridge}"
DEFAULT_LAN_NAME="${DEFAULT_LAN_NAME:=lan}"
AUTO_PROV_CUSTOMER_ID="${AUTO_PROV_CUSTOMER_ID:=2}" AUTO_PROV_CUSTOMER_ID="${AUTO_PROV_CUSTOMER_ID:=2}"
PROV_PROPS=" " PROV_PROPS=" "
PROV_PROPS+=" -Dconnectus.ovsdb.wifi-iface.default_bridge=$DEFAULT_BRIDGE" PROV_PROPS+=" -Dconnectus.ovsdb.wifi-iface.default_bridge=$DEFAULT_BRIDGE"
PROV_PROPS+=" -Dconnectus.ovsdb.wifi-iface.default_wan=$DEFAULT_WAN" PROV_PROPS+=" -Dconnectus.ovsdb.wifi-iface.default_wan_type=$DEFAULT_WAN_TYPE"
PROV_PROPS+=" -Dconnectus.ovsdb.wifi-iface.default_lan=$DEFAULT_LAN" PROV_PROPS+=" -Dconnectus.ovsdb.wifi-iface.default_lan_type=$DEFAULT_LAN_TYPE"
PROV_PROPS+=" -Dconnectus.ovsdb.wifi-iface.default_lan_name=$DEFAULT_LAN_NAME"
PROV_PROPS+=" -Dconnectus.ovsdb.autoProvisionedCustomerId=$AUTO_PROV_CUSTOMER_ID" PROV_PROPS+=" -Dconnectus.ovsdb.autoProvisionedCustomerId=$AUTO_PROV_CUSTOMER_ID"
export ALL_PROPS="$PROFILES $SSL_PROPS $CLIENT_MQTT_SSL_PROPS $OVSDB_PROPS $MQTT_PROPS $LOGGING_PROPS $RESTAPI_PROPS $SPRING_EXTRA_PROPS $HOST_PROPS $PROV_PROPS" export ALL_PROPS="$PROFILES $SSL_PROPS $CLIENT_MQTT_SSL_PROPS $OVSDB_PROPS $MQTT_PROPS $LOGGING_PROPS $RESTAPI_PROPS $SPRING_EXTRA_PROPS $HOST_PROPS $PROV_PROPS"

View File

@@ -51,10 +51,11 @@ OVSDB_DEVICE_RADIO_1="${OVSDB_DEVICE_RADIO_1:=wifi0}"
echo $OVSDB_DEVICE_RADIO_1 echo $OVSDB_DEVICE_RADIO_1
OVSDB_DEVICE_RADIO_2="${OVSDB_DEVICE_RADIO_2:=wifi1}" OVSDB_DEVICE_RADIO_2="${OVSDB_DEVICE_RADIO_2:=wifi1}"
echo $OVSDB_DEVICE_RADIO_2 echo $OVSDB_DEVICE_RADIO_2
OVSDB_DEVICE_DEFAULT_WAN="${OVSDB_DEVICE_DEFAULT_WAN:=eth}" OVSDB_DEVICE_DEFAULT_WAN_TYPE="${OVSDB_DEVICE_DEFAULT_WAN_NAME:=eth}"
echo $OVSDB_DEVICE_DEFAULT_WAN echo $OVSDB_DEVICE_DEFAULT_WAN
OVSDB_DEVICE_DEFAULT_LAN="${OVSDB_DEVICE_DEFAULT_LAN:=br-lan}" OVSDB_DEVICE_DEFAULT_LAN_TYPE="${OVSDB_DEVICE_DEFAULT_LAN_TYPE:=br-lan}"
echo $OVSDB_DEVICE_DEFAULT_LAN echo $OVSDB_DEVICE_DEFAULT_LAN
OVSDB_DEVICE_DEFAULT_LAN_NAME="${OVSDB_DEVICE_DEFAULT_LAN_NAME:=lan}"
echo Reading AP configuration from $OVSDB_CONFIG_FILE echo Reading AP configuration from $OVSDB_CONFIG_FILE
@@ -133,8 +134,9 @@ OVSDB_PROPS="$OVSDB_PROPS -Dconnectus.ovsdb.ssidProfileFileName=$OVSDB_SSIDPROFI
OVSDB_PROPS="$OVSDB_PROPS -Dconnectus.ovsdb.radiusProfileFileName=$OVSDB_RADIUSPROFILE_CONFIG_FILE" OVSDB_PROPS="$OVSDB_PROPS -Dconnectus.ovsdb.radiusProfileFileName=$OVSDB_RADIUSPROFILE_CONFIG_FILE"
OVSDB_PROPS="$OVSDB_PROPS -Dconnectus.ovsdb.locationFileName=$OVSDB_LOCATION_CONFIG_FILE" OVSDB_PROPS="$OVSDB_PROPS -Dconnectus.ovsdb.locationFileName=$OVSDB_LOCATION_CONFIG_FILE"
OVSDB_PROPS="$OVSDB_PROPS -Dconnectus.ovsdb.wifi-iface.default_bridge=$OVSDB_IF_DEFAULT_BRIDGE" OVSDB_PROPS="$OVSDB_PROPS -Dconnectus.ovsdb.wifi-iface.default_bridge=$OVSDB_IF_DEFAULT_BRIDGE"
OVSDB_PROPS="$OVSDB_PROPS -Dconnectus.ovsdb.wifi-iface.default_wan=$OVSDB_DEVICE_DEFAULT_WAN" OVSDB_PROPS="$OVSDB_PROPS -Dconnectus.ovsdb.wifi-iface.default_wan_type=$OVSDB_DEVICE_DEFAULT_WAN_TYPE"
OVSDB_PROPS="$OVSDB_PROPS -Dconnectus.ovsdb.wifi-iface.default_lan=$OVSDB_DEVICE_DEFAULT_LAN" OVSDB_PROPS="$OVSDB_PROPS -Dconnectus.ovsdb.wifi-iface.default_lan_type=$OVSDB_DEVICE_DEFAULT_LAN_TYPE"
OVSDB_PROPS="$OVSDB_PROPS -Dconnectus.ovsdb.wifi-iface.default_lan_name=$OVSDB_DEVICE_DEFAULT_LAN_NAME"
OVSDB_PROPS="$OVSDB_PROPS -Dconnectus.ovsdb.wifi-iface.default_radio0=$OVSDB_IF_DEFAULT_RADIO_0" OVSDB_PROPS="$OVSDB_PROPS -Dconnectus.ovsdb.wifi-iface.default_radio0=$OVSDB_IF_DEFAULT_RADIO_0"
OVSDB_PROPS="$OVSDB_PROPS -Dconnectus.ovsdb.wifi-iface.default_radio1=$OVSDB_IF_DEFAULT_RADIO_1" OVSDB_PROPS="$OVSDB_PROPS -Dconnectus.ovsdb.wifi-iface.default_radio1=$OVSDB_IF_DEFAULT_RADIO_1"
OVSDB_PROPS="$OVSDB_PROPS -Dconnectus.ovsdb.wifi-iface.default_radio2=$OVSDB_IF_DEFAULT_RADIO_2" OVSDB_PROPS="$OVSDB_PROPS -Dconnectus.ovsdb.wifi-iface.default_radio2=$OVSDB_IF_DEFAULT_RADIO_2"

View File

@@ -25,8 +25,9 @@ OVSDB_PROPS+=" -Dconnectus.ovsdb.ssidProfileFileName=$OVSDB_SSIDPROFILE_CONFIG_F
OVSDB_PROPS+=" -Dconnectus.ovsdb.radiusProfileFileName=$OVSDB_RADIUSPROFILE_CONFIG_FILE" OVSDB_PROPS+=" -Dconnectus.ovsdb.radiusProfileFileName=$OVSDB_RADIUSPROFILE_CONFIG_FILE"
OVSDB_PROPS+=" -Dconnectus.ovsdb.locationFileName=$OVSDB_LOCATION_CONFIG_FILE" OVSDB_PROPS+=" -Dconnectus.ovsdb.locationFileName=$OVSDB_LOCATION_CONFIG_FILE"
OVSDB_PROPS+=" -Dconnectus.ovsdb.wifi-iface.default_bridge=$OVSDB_IF_DEFAULT_BRIDGE" OVSDB_PROPS+=" -Dconnectus.ovsdb.wifi-iface.default_bridge=$OVSDB_IF_DEFAULT_BRIDGE"
OVSDB_PROPS+=" -Dconnectus.ovsdb.wifi-iface.default_wan=$OVSDB_DEVICE_DEFAULT_WAN" OVSDB_PROPS+=" -Dconnectus.ovsdb.wifi-iface.default_wan_type=$OVSDB_DEVICE_DEFAULT_WAN_TYPE"
OVSDB_PROPS+=" -Dconnectus.ovsdb.wifi-iface.default_lan=$OVSDB_DEVICE_DEFAULT_LAN" OVSDB_PROPS+=" -Dconnectus.ovsdb.wifi-iface.default_lan_type=$OVSDB_DEVICE_DEFAULT_LAN_TYPE"
OVSDB_PROPS+=" -Dconnectus.ovsdb.wifi-iface.default_lan_name=$OVSDB_DEVICE_DEFAULT_LAN_NAME"
OVSDB_PROPS+=" -Dconnectus.ovsdb.wifi-iface.default_radio0=$OVSDB_IF_DEFAULT_RADIO_0" OVSDB_PROPS+=" -Dconnectus.ovsdb.wifi-iface.default_radio0=$OVSDB_IF_DEFAULT_RADIO_0"
OVSDB_PROPS+=" -Dconnectus.ovsdb.wifi-iface.default_radio1=$OVSDB_IF_DEFAULT_RADIO_1" OVSDB_PROPS+=" -Dconnectus.ovsdb.wifi-iface.default_radio1=$OVSDB_IF_DEFAULT_RADIO_1"
OVSDB_PROPS+=" -Dconnectus.ovsdb.wifi-iface.default_radio2=$OVSDB_IF_DEFAULT_RADIO_2" OVSDB_PROPS+=" -Dconnectus.ovsdb.wifi-iface.default_radio2=$OVSDB_IF_DEFAULT_RADIO_2"

View File

@@ -94,10 +94,13 @@ public class OvsdbDao {
@org.springframework.beans.factory.annotation.Value("${connectus.ovsdb.wifi-iface.default_bridge:defaultBridgeForEAPOL}") @org.springframework.beans.factory.annotation.Value("${connectus.ovsdb.wifi-iface.default_bridge:defaultBridgeForEAPOL}")
public String bridgeNameVifInterfaces; public String bridgeNameVifInterfaces;
@org.springframework.beans.factory.annotation.Value("${connectus.ovsdb.wifi-iface.default_lan:bridge}") @org.springframework.beans.factory.annotation.Value("${connectus.ovsdb.wifi-iface.default_lan_type:bridge}")
public String defaultLanInterfaceType; public String defaultLanInterfaceType;
@org.springframework.beans.factory.annotation.Value("${connectus.ovsdb.wifi-iface.default_wan:eth}") @org.springframework.beans.factory.annotation.Value("${connectus.ovsdb.wifi-iface.default_lan_name:lan}")
public String defaultLanInterfaceName;
@org.springframework.beans.factory.annotation.Value("${connectus.ovsdb.wifi-iface.default_wan_type:eth}")
public String defaultWanInterfaceType; public String defaultWanInterfaceType;
@org.springframework.beans.factory.annotation.Value("${connectus.ovsdb.wifi-iface.default_radio1:home-ap-24}") @org.springframework.beans.factory.annotation.Value("${connectus.ovsdb.wifi-iface.default_radio1:home-ap-24}")
@@ -2201,10 +2204,6 @@ public class OvsdbDao {
List<RadioType> enabledRadiosFromAp = new ArrayList<>(); List<RadioType> enabledRadiosFromAp = new ArrayList<>();
getEnabledRadios(ovsdbClient, enabledRadiosFromAp); getEnabledRadios(ovsdbClient, enabledRadiosFromAp);
ConnectNodeInfo connectNodeInfo = getConnectNodeInfo(ovsdbClient);
LOG.info("connectNodeInfo = {}", connectNodeInfo.toString());
for (Profile ssidProfile : opensyncApConfig.getSsidProfile()) { for (Profile ssidProfile : opensyncApConfig.getSsidProfile()) {
SsidConfiguration ssidConfig = (SsidConfiguration) ssidProfile.getDetails(); SsidConfiguration ssidConfig = (SsidConfiguration) ssidProfile.getDetails();
@@ -2338,7 +2337,7 @@ public class OvsdbDao {
if (!getProvisionedWifiVifConfigs(ovsdbClient).containsKey(ifName + "_" + ssidConfig.getSsid())) { if (!getProvisionedWifiVifConfigs(ovsdbClient).containsKey(ifName + "_" + ssidConfig.getSsid())) {
try { try {
configureSingleSsid(ovsdbClient, connectNodeInfo.lanIfName, ifName, ssidConfig.getSsid(), configureSingleSsid(ovsdbClient, defaultLanInterfaceName, ifName, ssidConfig.getSsid(),
ssidBroadcast, security, freqBand, ssidConfig.getVlanId(), rrmEnabled, enable80211r, ssidBroadcast, security, freqBand, ssidConfig.getVlanId(), rrmEnabled, enable80211r,
minHwMode, enabled, keyRefresh, uapsdEnabled, apBridge, ssidConfig.getForwardMode(), minHwMode, enabled, keyRefresh, uapsdEnabled, apBridge, ssidConfig.getForwardMode(),
gateway, inet, dns, ipAssignScheme); gateway, inet, dns, ipAssignScheme);