mirror of
https://github.com/Telecominfraproject/wlan-cloud-opensync-controller.git
synced 2025-11-02 11:37:49 +00:00
OVSDB AP Configuration: AP & SSIDs
This commit is contained in:
@@ -31,16 +31,13 @@ import com.telecominfraproject.wlan.equipment.EquipmentServiceInterface;
|
||||
import com.telecominfraproject.wlan.equipment.models.ApElementConfiguration;
|
||||
import com.telecominfraproject.wlan.equipment.models.ElementRadioConfiguration;
|
||||
import com.telecominfraproject.wlan.equipment.models.Equipment;
|
||||
import com.telecominfraproject.wlan.equipment.models.StateSetting;
|
||||
import com.telecominfraproject.wlan.location.models.Location;
|
||||
import com.telecominfraproject.wlan.location.service.LocationServiceInterface;
|
||||
import com.telecominfraproject.wlan.opensync.external.integration.controller.OpensyncCloudGatewayController;
|
||||
import com.telecominfraproject.wlan.opensync.external.integration.models.ConnectNodeInfo;
|
||||
import com.telecominfraproject.wlan.opensync.external.integration.models.OpensyncAPConfig;
|
||||
import com.telecominfraproject.wlan.opensync.external.integration.models.OpensyncAPInetState;
|
||||
import com.telecominfraproject.wlan.opensync.external.integration.models.OpensyncAPRadioConfig;
|
||||
import com.telecominfraproject.wlan.opensync.external.integration.models.OpensyncAPRadioState;
|
||||
import com.telecominfraproject.wlan.opensync.external.integration.models.OpensyncAPSsidConfig;
|
||||
import com.telecominfraproject.wlan.opensync.external.integration.models.OpensyncAPVIFState;
|
||||
import com.telecominfraproject.wlan.opensync.external.integration.models.OpensyncAWLANNode;
|
||||
import com.telecominfraproject.wlan.opensync.external.integration.models.OpensyncWifiAssociatedClients;
|
||||
@@ -67,6 +64,8 @@ import com.telecominfraproject.wlan.status.equipment.models.EquipmentProtocolSta
|
||||
import com.telecominfraproject.wlan.status.equipment.models.EquipmentUpgradeState;
|
||||
import com.telecominfraproject.wlan.status.equipment.models.EquipmentUpgradeStatusData;
|
||||
import com.telecominfraproject.wlan.status.equipment.models.VLANStatusData;
|
||||
import com.telecominfraproject.wlan.status.equipment.report.models.ActiveBSSID;
|
||||
import com.telecominfraproject.wlan.status.equipment.report.models.ActiveBSSIDs;
|
||||
import com.telecominfraproject.wlan.status.models.Status;
|
||||
import com.telecominfraproject.wlan.status.models.StatusCode;
|
||||
import com.telecominfraproject.wlan.status.models.StatusDataType;
|
||||
@@ -183,8 +182,7 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
ce = equipmentServiceInterface.create(ce);
|
||||
}
|
||||
|
||||
Profile apProfile = profileServiceInterface
|
||||
.getOrNull(ce.getProfileId());
|
||||
Profile apProfile = profileServiceInterface.getOrNull(ce.getProfileId());
|
||||
|
||||
if (apProfile == null) {
|
||||
|
||||
@@ -208,7 +206,7 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
|
||||
apProfile = profileServiceInterface.create(apProfile);
|
||||
|
||||
//update AP only if the apProfile was missing
|
||||
// update AP only if the apProfile was missing
|
||||
ce.setProfileId(apProfile.getId());
|
||||
ce = equipmentServiceInterface.update(ce);
|
||||
}
|
||||
@@ -222,7 +220,6 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
equipmentRoutingRecord.setEquipmentId(ce.getId());
|
||||
equipmentRoutingRecord = routingServiceInterface.create(equipmentRoutingRecord);
|
||||
|
||||
|
||||
gatewayController.registerCustomerEquipment(ce.getName(), ce.getCustomerId(), ce.getId());
|
||||
|
||||
OvsdbSession ovsdbSession = ovsdbSessionMapInterface.getSession(apId);
|
||||
@@ -243,132 +240,135 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
|
||||
try {
|
||||
|
||||
Status statusRecord = statusServiceInterface.getOrNull(ce.getCustomerId(), ce.getId(), StatusDataType.EQUIPMENT_ADMIN);
|
||||
if (statusRecord == null) {
|
||||
statusRecord = new Status();
|
||||
statusRecord.setCustomerId(ce.getCustomerId());
|
||||
statusRecord.setEquipmentId(ce.getId());
|
||||
Status statusRecord = statusServiceInterface.getOrNull(ce.getCustomerId(), ce.getId(),
|
||||
StatusDataType.EQUIPMENT_ADMIN);
|
||||
if (statusRecord == null) {
|
||||
statusRecord = new Status();
|
||||
statusRecord.setCustomerId(ce.getCustomerId());
|
||||
statusRecord.setEquipmentId(ce.getId());
|
||||
|
||||
EquipmentAdminStatusData statusData = new EquipmentAdminStatusData();
|
||||
statusRecord.setDetails(statusData);
|
||||
}
|
||||
EquipmentAdminStatusData statusData = new EquipmentAdminStatusData();
|
||||
statusRecord.setDetails(statusData);
|
||||
}
|
||||
|
||||
((EquipmentAdminStatusData) statusRecord.getDetails()).setStatusCode(StatusCode.normal);
|
||||
// Update the equipment admin status
|
||||
statusRecord = statusServiceInterface.update(statusRecord);
|
||||
((EquipmentAdminStatusData) statusRecord.getDetails()).setStatusCode(StatusCode.normal);
|
||||
// Update the equipment admin status
|
||||
statusRecord = statusServiceInterface.update(statusRecord);
|
||||
|
||||
// update LAN status - nothing to do here for now
|
||||
statusRecord = statusServiceInterface.getOrNull(ce.getCustomerId(), ce.getId(), StatusDataType.LANINFO);
|
||||
if (statusRecord == null) {
|
||||
statusRecord = new Status();
|
||||
statusRecord.setCustomerId(ce.getCustomerId());
|
||||
statusRecord.setEquipmentId(ce.getId());
|
||||
// update LAN status - nothing to do here for now
|
||||
statusRecord = statusServiceInterface.getOrNull(ce.getCustomerId(), ce.getId(), StatusDataType.LANINFO);
|
||||
if (statusRecord == null) {
|
||||
statusRecord = new Status();
|
||||
statusRecord.setCustomerId(ce.getCustomerId());
|
||||
statusRecord.setEquipmentId(ce.getId());
|
||||
|
||||
EquipmentLANStatusData statusData = new EquipmentLANStatusData();
|
||||
statusRecord.setDetails(statusData);
|
||||
}
|
||||
EquipmentLANStatusData statusData = new EquipmentLANStatusData();
|
||||
statusRecord.setDetails(statusData);
|
||||
}
|
||||
|
||||
Map<Integer, VLANStatusData> vlanStatusDataMap = new HashMap<>();
|
||||
((EquipmentLANStatusData) statusRecord.getDetails()).setVlanStatusDataMap(vlanStatusDataMap);
|
||||
Map<Integer, VLANStatusData> vlanStatusDataMap = new HashMap<>();
|
||||
((EquipmentLANStatusData) statusRecord.getDetails()).setVlanStatusDataMap(vlanStatusDataMap);
|
||||
|
||||
statusServiceInterface.update(statusRecord);
|
||||
statusServiceInterface.update(statusRecord);
|
||||
|
||||
// update protocol status
|
||||
statusRecord = statusServiceInterface.getOrNull(ce.getCustomerId(), ce.getId(), StatusDataType.PROTOCOL);
|
||||
if (statusRecord == null) {
|
||||
statusRecord = new Status();
|
||||
statusRecord.setCustomerId(ce.getCustomerId());
|
||||
statusRecord.setEquipmentId(ce.getId());
|
||||
// update protocol status
|
||||
statusRecord = statusServiceInterface.getOrNull(ce.getCustomerId(), ce.getId(), StatusDataType.PROTOCOL);
|
||||
if (statusRecord == null) {
|
||||
statusRecord = new Status();
|
||||
statusRecord.setCustomerId(ce.getCustomerId());
|
||||
statusRecord.setEquipmentId(ce.getId());
|
||||
|
||||
EquipmentProtocolStatusData statusData = new EquipmentProtocolStatusData();
|
||||
statusRecord.setDetails(statusData);
|
||||
}
|
||||
EquipmentProtocolStatusData statusData = new EquipmentProtocolStatusData();
|
||||
statusRecord.setDetails(statusData);
|
||||
}
|
||||
|
||||
EquipmentProtocolStatusData protocolStatusData = ((EquipmentProtocolStatusData) statusRecord
|
||||
.getDetails());
|
||||
protocolStatusData.setPoweredOn(true);
|
||||
protocolStatusData.setCloudProtocolVersion("1100");
|
||||
protocolStatusData.setProtocolState(EquipmentProtocolState.ready);
|
||||
protocolStatusData.setBandPlan("FCC");
|
||||
protocolStatusData.setBaseMacAddress(MacAddress.valueOf(connectNodeInfo.macAddress));
|
||||
protocolStatusData.setCloudCfgDataVersion(42L);
|
||||
protocolStatusData.setReportedCfgDataVersion(42L);
|
||||
protocolStatusData.setCountryCode("CA");
|
||||
protocolStatusData.setReportedCC(CountryCode.ca);
|
||||
protocolStatusData.setReportedHwVersion(connectNodeInfo.platformVersion);
|
||||
protocolStatusData.setReportedSwVersion(connectNodeInfo.firmwareVersion);
|
||||
protocolStatusData.setReportedSwAltVersion(connectNodeInfo.firmwareVersion);
|
||||
try {
|
||||
EquipmentProtocolStatusData protocolStatusData = ((EquipmentProtocolStatusData) statusRecord.getDetails());
|
||||
protocolStatusData.setPoweredOn(true);
|
||||
protocolStatusData.setCloudProtocolVersion("1100");
|
||||
protocolStatusData.setProtocolState(EquipmentProtocolState.ready);
|
||||
protocolStatusData.setBandPlan("FCC");
|
||||
protocolStatusData.setBaseMacAddress(MacAddress.valueOf(connectNodeInfo.macAddress));
|
||||
protocolStatusData.setCloudCfgDataVersion(42L);
|
||||
protocolStatusData.setReportedCfgDataVersion(42L);
|
||||
protocolStatusData.setCountryCode("CA");
|
||||
protocolStatusData.setReportedCC(CountryCode.ca);
|
||||
protocolStatusData.setReportedHwVersion(connectNodeInfo.platformVersion);
|
||||
protocolStatusData.setReportedSwVersion(connectNodeInfo.firmwareVersion);
|
||||
protocolStatusData.setReportedSwAltVersion(connectNodeInfo.firmwareVersion);
|
||||
try {
|
||||
protocolStatusData.setReportedIpV4Addr(InetAddress.getByName(connectNodeInfo.ipV4Address));
|
||||
} catch (UnknownHostException e) {
|
||||
// do nothing here
|
||||
}
|
||||
if (connectNodeInfo.macAddress != null && MacAddress.valueOf(connectNodeInfo.macAddress) != null) {
|
||||
protocolStatusData.setReportedMacAddr(MacAddress.valueOf(connectNodeInfo.macAddress));
|
||||
}
|
||||
protocolStatusData.setReportedSku(connectNodeInfo.skuNumber);
|
||||
protocolStatusData.setSerialNumber(connectNodeInfo.serialNumber);
|
||||
protocolStatusData.setSystemName(connectNodeInfo.model);
|
||||
if (connectNodeInfo.macAddress != null && MacAddress.valueOf(connectNodeInfo.macAddress) != null) {
|
||||
protocolStatusData.setReportedMacAddr(MacAddress.valueOf(connectNodeInfo.macAddress));
|
||||
}
|
||||
protocolStatusData.setReportedSku(connectNodeInfo.skuNumber);
|
||||
protocolStatusData.setSerialNumber(connectNodeInfo.serialNumber);
|
||||
protocolStatusData.setSystemName(connectNodeInfo.model);
|
||||
|
||||
statusServiceInterface.update(statusRecord);
|
||||
statusServiceInterface.update(statusRecord);
|
||||
|
||||
statusRecord = statusServiceInterface.getOrNull(ce.getCustomerId(), ce.getId(), StatusDataType.FIRMWARE);
|
||||
if (statusRecord == null) {
|
||||
statusRecord = new Status();
|
||||
statusRecord.setCustomerId(ce.getCustomerId());
|
||||
statusRecord.setEquipmentId(ce.getId());
|
||||
EquipmentUpgradeStatusData statusData = new EquipmentUpgradeStatusData();
|
||||
statusRecord.setDetails(statusData);
|
||||
}
|
||||
EquipmentUpgradeStatusData fwUpgradeStatusData = ((EquipmentUpgradeStatusData) statusRecord
|
||||
.getDetails());
|
||||
fwUpgradeStatusData.setActiveSwVersion(connectNodeInfo.firmwareVersion);
|
||||
fwUpgradeStatusData.setAlternateSwVersion(connectNodeInfo.firmwareVersion);
|
||||
fwUpgradeStatusData.setTargetSwVersion(connectNodeInfo.firmwareVersion);
|
||||
fwUpgradeStatusData.setUpgradeState(EquipmentUpgradeState.up_to_date);
|
||||
statusRecord = statusServiceInterface.getOrNull(ce.getCustomerId(), ce.getId(), StatusDataType.FIRMWARE);
|
||||
if (statusRecord == null) {
|
||||
statusRecord = new Status();
|
||||
statusRecord.setCustomerId(ce.getCustomerId());
|
||||
statusRecord.setEquipmentId(ce.getId());
|
||||
EquipmentUpgradeStatusData statusData = new EquipmentUpgradeStatusData();
|
||||
statusRecord.setDetails(statusData);
|
||||
}
|
||||
EquipmentUpgradeStatusData fwUpgradeStatusData = ((EquipmentUpgradeStatusData) statusRecord.getDetails());
|
||||
fwUpgradeStatusData.setActiveSwVersion(connectNodeInfo.firmwareVersion);
|
||||
fwUpgradeStatusData.setAlternateSwVersion(connectNodeInfo.firmwareVersion);
|
||||
fwUpgradeStatusData.setTargetSwVersion(connectNodeInfo.firmwareVersion);
|
||||
fwUpgradeStatusData.setUpgradeState(EquipmentUpgradeState.up_to_date);
|
||||
|
||||
statusServiceInterface.update(statusRecord);
|
||||
statusServiceInterface.update(statusRecord);
|
||||
|
||||
// TODO:
|
||||
// equipmentStatusInterface.updateNetworkAdminStatus(networkAdminStatusRecord);
|
||||
// dtop: this one populates traffic capacity and usage dial on the
|
||||
// main dashboard
|
||||
// from APDemoMetric properties getPeriodLengthSec, getRxBytes2G,
|
||||
// getTxBytes2G, getRxBytes5G, getTxBytes5G
|
||||
Status networkAdminStatusRec = statusServiceInterface.getOrNull(ce.getCustomerId(), 0, StatusDataType.NETWORK_ADMIN);
|
||||
if (networkAdminStatusRec == null) {
|
||||
networkAdminStatusRec = new Status();
|
||||
networkAdminStatusRec.setCustomerId(ce.getCustomerId());
|
||||
networkAdminStatusRec.setEquipmentId(0);
|
||||
NetworkAdminStatusData statusData = new NetworkAdminStatusData();
|
||||
networkAdminStatusRec.setDetails(statusData);
|
||||
}
|
||||
// TODO:
|
||||
// equipmentStatusInterface.updateNetworkAdminStatus(networkAdminStatusRecord);
|
||||
// dtop: this one populates traffic capacity and usage dial on the
|
||||
// main dashboard
|
||||
// from APDemoMetric properties getPeriodLengthSec, getRxBytes2G,
|
||||
// getTxBytes2G, getRxBytes5G, getTxBytes5G
|
||||
Status networkAdminStatusRec = statusServiceInterface.getOrNull(ce.getCustomerId(), 0,
|
||||
StatusDataType.NETWORK_ADMIN);
|
||||
if (networkAdminStatusRec == null) {
|
||||
networkAdminStatusRec = new Status();
|
||||
networkAdminStatusRec.setCustomerId(ce.getCustomerId());
|
||||
networkAdminStatusRec.setEquipmentId(ce.getId());
|
||||
NetworkAdminStatusData statusData = new NetworkAdminStatusData();
|
||||
networkAdminStatusRec.setDetails(statusData);
|
||||
}
|
||||
|
||||
NetworkAdminStatusData netAdminStatusData = (NetworkAdminStatusData) networkAdminStatusRec.getDetails();
|
||||
netAdminStatusData.setDhcpStatus(StatusCode.normal);
|
||||
netAdminStatusData.setCloudLinkStatus(StatusCode.normal);
|
||||
netAdminStatusData.setDnsStatus(StatusCode.normal);
|
||||
networkAdminStatusRec.setDetails(netAdminStatusData);
|
||||
NetworkAdminStatusData netAdminStatusData = (NetworkAdminStatusData) networkAdminStatusRec.getDetails();
|
||||
netAdminStatusData.setDhcpStatus(StatusCode.normal);
|
||||
netAdminStatusData.setCloudLinkStatus(StatusCode.normal);
|
||||
netAdminStatusData.setDnsStatus(StatusCode.normal);
|
||||
|
||||
statusServiceInterface.update(networkAdminStatusRec);
|
||||
networkAdminStatusRec.setDetails(netAdminStatusData);
|
||||
|
||||
Status networkAggStatusRec = statusServiceInterface.getOrNull(ce.getCustomerId(), 0, StatusDataType.NETWORK_AGGREGATE);
|
||||
if (networkAggStatusRec == null) {
|
||||
networkAggStatusRec = new Status();
|
||||
networkAggStatusRec.setCustomerId(ce.getCustomerId());
|
||||
NetworkAggregateStatusData naStatusData = new NetworkAggregateStatusData();
|
||||
networkAggStatusRec.setDetails(naStatusData);
|
||||
}
|
||||
statusServiceInterface.update(networkAdminStatusRec);
|
||||
|
||||
UserDetails userDetails = ((NetworkAggregateStatusData) networkAggStatusRec.getDetails()).getUserDetails();
|
||||
LOG.debug("UserDetails {}", userDetails.toPrettyString());
|
||||
Status networkAggStatusRec = statusServiceInterface.getOrNull(ce.getCustomerId(), 0,
|
||||
StatusDataType.NETWORK_AGGREGATE);
|
||||
if (networkAggStatusRec == null) {
|
||||
networkAggStatusRec = new Status();
|
||||
networkAggStatusRec.setCustomerId(ce.getCustomerId());
|
||||
NetworkAggregateStatusData naStatusData = new NetworkAggregateStatusData();
|
||||
networkAggStatusRec.setDetails(naStatusData);
|
||||
}
|
||||
|
||||
statusServiceInterface.update(networkAggStatusRec);
|
||||
UserDetails userDetails = ((NetworkAggregateStatusData) networkAggStatusRec.getDetails()).getUserDetails();
|
||||
if (userDetails != null)
|
||||
LOG.debug("UserDetails {}", userDetails.toPrettyString());
|
||||
|
||||
} catch (Exception e) {
|
||||
// do nothing
|
||||
LOG.debug("Exception in updateApStatus", e);
|
||||
}
|
||||
statusServiceInterface.update(networkAggStatusRec);
|
||||
|
||||
} catch (Exception e) {
|
||||
// do nothing
|
||||
LOG.debug("Exception in updateApStatus", e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -413,8 +413,12 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
|
||||
ret = new OpensyncAPConfig();
|
||||
|
||||
ret.setCustomerEquipment(equipmentConfig);
|
||||
|
||||
Location eqLocation = locationServiceInterface.get(equipmentConfig.getLocationId());
|
||||
|
||||
ret.setEquipmentLocation(eqLocation);
|
||||
|
||||
// extract country, radio channels from resolvedEqCfg
|
||||
String country = "CA";
|
||||
CountryCode countryCode = Location.getCountryCode(eqLocation);
|
||||
@@ -449,69 +453,49 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
|
||||
}
|
||||
|
||||
LOG.debug("Channel erc24 {}", radioChannel24G);
|
||||
LOG.debug("Channel erc5gl {}", radioChannel5LG);
|
||||
LOG.debug("Channel erc5gh {}", radioChannel5HG);
|
||||
|
||||
OpensyncAPRadioConfig radioConfig = new OpensyncAPRadioConfig();
|
||||
radioConfig.setCountry(country);
|
||||
radioConfig.setRadioChannel24G(radioChannel24G);
|
||||
radioConfig.setRadioChannel5LG(radioChannel5LG);
|
||||
radioConfig.setRadioChannel5HG(radioChannel5HG);
|
||||
|
||||
ret.setRadioConfig(radioConfig);
|
||||
|
||||
// extract ssid parameters from resolvedEqCfg
|
||||
List<OpensyncAPSsidConfig> ssidConfigs = new ArrayList<>();
|
||||
|
||||
com.telecominfraproject.wlan.profile.models.Profile apProfile = profileServiceInterface
|
||||
.getOrNull(equipmentConfig.getProfileId());
|
||||
|
||||
ret.setApProfile(apProfile);
|
||||
|
||||
if (apProfile != null) {
|
||||
Set<Long> childProfileIds = apProfile.getChildProfileIds();
|
||||
|
||||
for (Long id : childProfileIds) {
|
||||
com.telecominfraproject.wlan.profile.models.Profile profile = profileServiceInterface.get(id);
|
||||
if (profile.getProfileType().equals(ProfileType.ssid)) {
|
||||
|
||||
SsidConfiguration ssidCfg = (SsidConfiguration) profile.getDetails();
|
||||
ssidCfg.setSsid(profile.getName());
|
||||
|
||||
for (RadioType radioType : ssidCfg.getAppliedRadios()) {
|
||||
OpensyncAPSsidConfig osSsidCfg = new OpensyncAPSsidConfig();
|
||||
|
||||
osSsidCfg.setSsid(profile.getName());
|
||||
osSsidCfg.setRadioType(radioType);
|
||||
osSsidCfg.setBroadcast(ssidCfg.getBroadcastSsid() == StateSetting.enabled);
|
||||
|
||||
if (ssidCfg.getSecureMode() == SecureMode.wpa2OnlyPSK
|
||||
|| ssidCfg.getSecureMode() == SecureMode.wpa2PSK) {
|
||||
osSsidCfg.setEncryption("WPA-PSK");
|
||||
osSsidCfg.setMode("2");
|
||||
|
||||
ssidCfg.setSecureMode(SecureMode.wpa2PSK);
|
||||
} else if (ssidCfg.getSecureMode() == SecureMode.wpaPSK) {
|
||||
osSsidCfg.setEncryption("WPA-PSK");
|
||||
osSsidCfg.setMode("1");
|
||||
|
||||
ssidCfg.setSecureMode(SecureMode.wpaPSK);
|
||||
|
||||
} else {
|
||||
LOG.warn("Unsupported encryption mode {} - will use WPA-PSK instead",
|
||||
ssidCfg.getSecureMode());
|
||||
osSsidCfg.setEncryption("WPA-PSK");
|
||||
osSsidCfg.setMode("2");
|
||||
|
||||
ssidCfg.setSecureMode(SecureMode.wpa2PSK);
|
||||
}
|
||||
|
||||
if (ssidCfg.getKeyStr() == null) {
|
||||
osSsidCfg.setKey("12345678");
|
||||
} else {
|
||||
osSsidCfg.setKey(ssidCfg.getKeyStr());
|
||||
ssidCfg.setKeyStr("12345678");
|
||||
}
|
||||
|
||||
ssidConfigs.add(osSsidCfg);
|
||||
|
||||
}
|
||||
profile.setDetails(ssidCfg);
|
||||
ret.setSsidProfile(profile);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ret.setSsidConfigs(ssidConfigs);
|
||||
|
||||
} catch (Exception e) {
|
||||
LOG.error("Cannot read config for AP {}", apId, e);
|
||||
}
|
||||
@@ -933,32 +917,99 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
public void wifiVIFStateDbTableUpdate(List<OpensyncAPVIFState> vifStateTables, String apId) {
|
||||
if (vifStateTables == null || vifStateTables.isEmpty() || apId == null)
|
||||
return;
|
||||
|
||||
Equipment ce = getCustomerEquipment(apId);
|
||||
if (ce == null) {
|
||||
LOG.debug("Cannot get equipmentId {} for apId {}", apId);
|
||||
return;
|
||||
}
|
||||
|
||||
int customerId = ce.getCustomerId();
|
||||
long equipmentId = ce.getId();
|
||||
|
||||
OpensyncNode osNode = null;
|
||||
|
||||
synchronized (opensyncNodeMap) {
|
||||
|
||||
if (opensyncNodeMap.containsKey(apId)) {
|
||||
|
||||
Status activeBssids = statusServiceInterface.getOrNull(customerId, equipmentId,
|
||||
StatusDataType.ACTIVE_BSSIDS);
|
||||
if (activeBssids == null) {
|
||||
activeBssids = new Status();
|
||||
activeBssids.setCustomerId(customerId);
|
||||
activeBssids.setEquipmentId(equipmentId);
|
||||
activeBssids.setStatusDataType(StatusDataType.ACTIVE_BSSIDS);
|
||||
activeBssids.setDetails(new ActiveBSSIDs());
|
||||
statusServiceInterface.update(activeBssids);
|
||||
}
|
||||
ActiveBSSIDs bssids = (ActiveBSSIDs) activeBssids.getDetails();
|
||||
List<ActiveBSSID> bssidList = bssids.getActiveBSSIDs();
|
||||
|
||||
osNode = opensyncNodeMap.get(apId);
|
||||
for (OpensyncAPVIFState vifState : vifStateTables) {
|
||||
if (vifState.isEnabled())
|
||||
if (vifState.isEnabled()) {
|
||||
osNode.updateVifState(vifState);
|
||||
String ssid = vifState.getSsid(); // ssid
|
||||
if (ssid != null) {
|
||||
int channel = vifState.getChannel(); // channel for this ssid
|
||||
int numDevicesConnected = vifState.getAssociatedClients().size();
|
||||
if (channel > 0) {
|
||||
OpensyncAPRadioState radioState = osNode.getRadioForChannel(channel);
|
||||
if (radioState != null) {
|
||||
String bssidAsMacString = radioState.getMac();
|
||||
RadioType radioType = null;
|
||||
if (osNode.getRadioForChannel(channel).getFreqBand().equals("2.4G"))
|
||||
radioType = RadioType.is2dot4GHz;
|
||||
else if (osNode.getRadioForChannel(channel).getFreqBand().equals("5GL"))
|
||||
radioType = RadioType.is5GHzL;
|
||||
else if (osNode.getRadioForChannel(channel).getFreqBand().equals("5GU"))
|
||||
radioType = RadioType.is5GHzU;
|
||||
else if (osNode.getRadioForChannel(channel).getFreqBand().equals("5G"))
|
||||
radioType = RadioType.is5GHz;
|
||||
|
||||
if (bssidAsMacString != null && bssidAsMacString != "" && radioType != null) {
|
||||
|
||||
boolean found = false;
|
||||
for (ActiveBSSID activeBssid : bssidList) {
|
||||
if (activeBssid.getBssid().equals(bssidAsMacString)
|
||||
&& activeBssid.getRadioType().equals(radioType)) {
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
ActiveBSSID newBssid = new ActiveBSSID();
|
||||
newBssid.setBssid(bssidAsMacString);
|
||||
newBssid.setSsid(ssid);
|
||||
newBssid.setRadioType(radioType);
|
||||
newBssid.setNumDevicesConnected(numDevicesConnected);
|
||||
bssidList.add(newBssid);
|
||||
bssids.setActiveBSSIDs(bssidList);
|
||||
activeBssids.setDetails(bssids);
|
||||
statusServiceInterface.update(activeBssids);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
opensyncNodeMap.put(apId, osNode);
|
||||
// LOG.debug("Updated VIF States for AP to NodeMap {}",
|
||||
// opensyncNodeMap.get(apId).toPrettyString());
|
||||
} else {
|
||||
OvsdbSession session = ovsdbSessionMapInterface.getSession(apId);
|
||||
|
||||
if (session != null) {
|
||||
int customerId = session.getCustomerId();
|
||||
long equipmentId = session.getEquipmentId();
|
||||
osNode = new OpensyncNode(apId, null, customerId, equipmentId);
|
||||
for (OpensyncAPVIFState vifState : vifStateTables) {
|
||||
if (vifState.isEnabled())
|
||||
osNode.updateVifState(vifState);
|
||||
}
|
||||
opensyncNodeMap.put(apId, osNode);
|
||||
// Do not add Status updates here as this is the only object in this map, and
|
||||
// therefore it will not contain the required peer entities to do the status
|
||||
// updates. These will be handled in subsequent table status updates.
|
||||
|
||||
osNode = new OpensyncNode(apId, null, customerId, equipmentId);
|
||||
for (OpensyncAPVIFState vifState : vifStateTables) {
|
||||
if (vifState.isEnabled())
|
||||
osNode.updateVifState(vifState);
|
||||
}
|
||||
opensyncNodeMap.put(apId, osNode);
|
||||
}
|
||||
|
||||
osNode = opensyncNodeMap.get(apId);
|
||||
@@ -1111,14 +1162,16 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
|
||||
@Override
|
||||
public void wifiVIFStateDbTableDelete(List<OpensyncAPVIFState> vifStateTables, String apId) {
|
||||
OvsdbSession session = ovsdbSessionMapInterface.getSession(apId);
|
||||
long equipmentId = session.getEquipmentId();
|
||||
|
||||
if (equipmentId < 0L) {
|
||||
LOG.debug("Cannot get equipmentId {} for session {}", equipmentId);
|
||||
Equipment ce = getCustomerEquipment(apId);
|
||||
if (ce == null) {
|
||||
LOG.debug("Cannot get equipmentId {} for apId {}", apId);
|
||||
return;
|
||||
}
|
||||
|
||||
int customerId = ce.getCustomerId();
|
||||
long equipmentId = ce.getId();
|
||||
|
||||
synchronized (opensyncNodeMap) {
|
||||
|
||||
if (opensyncNodeMap.containsKey(apId)) {
|
||||
|
||||
@@ -1,37 +1,59 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>tip-wlan-cloud-root-pom</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
<artifactId>opensync-ext-interface</artifactId>
|
||||
<name>opensync-ext-interface</name>
|
||||
<description>Interface that defines how opensync gateway gets the AP config</description>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>base-models</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>tip-wlan-opensync-protobuf</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
</dependency>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>tip-wlan-cloud-root-pom</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../../wlan-cloud-root</relativePath>
|
||||
</parent>
|
||||
<artifactId>opensync-ext-interface</artifactId>
|
||||
<name>opensync-ext-interface</name>
|
||||
<description>Interface that defines how opensync gateway gets the AP config</description>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>base-models</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<artifactId>tip-wlan-opensync-protobuf</artifactId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>equipment-models</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>profile-models</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>location-models</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>routing-models</artifactId>
|
||||
<groupId>com.telecominfraproject.wlan</groupId>
|
||||
<version>${tip-wlan-cloud.release.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.vmware.ovsdb</groupId>
|
||||
<artifactId>ovsdb-client</artifactId>
|
||||
<version>1.0.1</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<groupId>org.slf4j</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.vmware.ovsdb</groupId>
|
||||
<artifactId>ovsdb-client</artifactId>
|
||||
<version>1.0.1</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<groupId>org.slf4j</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -1,81 +1,97 @@
|
||||
package com.telecominfraproject.wlan.opensync.external.integration.models;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.telecominfraproject.wlan.core.model.equipment.RadioType;
|
||||
import com.telecominfraproject.wlan.core.model.json.BaseJsonModel;
|
||||
import com.telecominfraproject.wlan.equipment.models.Equipment;
|
||||
import com.telecominfraproject.wlan.location.models.Location;
|
||||
import com.telecominfraproject.wlan.profile.models.Profile;
|
||||
import com.telecominfraproject.wlan.routing.models.EquipmentGatewayRecord;
|
||||
import com.telecominfraproject.wlan.routing.models.EquipmentRoutingRecord;
|
||||
|
||||
public class OpensyncAPConfig extends BaseJsonModel {
|
||||
|
||||
private static final long serialVersionUID = 3917975477206236668L;
|
||||
private static final long serialVersionUID = 3917975477206236668L;
|
||||
|
||||
private OpensyncAPRadioConfig radioConfig;
|
||||
private List<OpensyncAPSsidConfig> ssidConfigs;
|
||||
private Equipment customerEquipment;
|
||||
private Profile apProfile;
|
||||
private Profile ssidProfile;
|
||||
private Location equipmentLocation;
|
||||
private EquipmentRoutingRecord equipmentRouting;
|
||||
private EquipmentGatewayRecord equipmentGateway;
|
||||
|
||||
public EquipmentGatewayRecord getEquipmentGateway() {
|
||||
return equipmentGateway;
|
||||
}
|
||||
|
||||
public OpensyncAPRadioConfig getRadioConfig() {
|
||||
return radioConfig;
|
||||
}
|
||||
public void setEquipmentGateway(EquipmentGatewayRecord equipmentGateway) {
|
||||
this.equipmentGateway = equipmentGateway;
|
||||
}
|
||||
|
||||
public EquipmentRoutingRecord getEquipmentRouting() {
|
||||
return equipmentRouting;
|
||||
}
|
||||
|
||||
public void setRadioConfig(OpensyncAPRadioConfig radioConfig) {
|
||||
this.radioConfig = radioConfig;
|
||||
}
|
||||
public void setEquipmentRouting(EquipmentRoutingRecord equipmentRouting) {
|
||||
this.equipmentRouting = equipmentRouting;
|
||||
}
|
||||
|
||||
public Equipment getCustomerEquipment() {
|
||||
return customerEquipment;
|
||||
}
|
||||
|
||||
public List<OpensyncAPSsidConfig> getSsidConfigs() {
|
||||
return ssidConfigs;
|
||||
}
|
||||
public void setCustomerEquipment(Equipment customerEquipment) {
|
||||
this.customerEquipment = customerEquipment;
|
||||
}
|
||||
|
||||
public Profile getApProfile() {
|
||||
return apProfile;
|
||||
}
|
||||
|
||||
public void setSsidConfigs(List<OpensyncAPSsidConfig> ssidConfigs) {
|
||||
this.ssidConfigs = ssidConfigs;
|
||||
}
|
||||
public void setApProfile(Profile apProfile) {
|
||||
this.apProfile = apProfile;
|
||||
}
|
||||
|
||||
public Profile getSsidProfile() {
|
||||
return ssidProfile;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OpensyncAPConfig clone() {
|
||||
OpensyncAPConfig ret = (OpensyncAPConfig)super.clone();
|
||||
if(radioConfig!=null) {
|
||||
ret.radioConfig = radioConfig.clone();
|
||||
}
|
||||
public void setSsidProfile(Profile ssidProfile) {
|
||||
this.ssidProfile = ssidProfile;
|
||||
}
|
||||
|
||||
if(ssidConfigs!=null) {
|
||||
ret.ssidConfigs = new ArrayList<OpensyncAPSsidConfig>();
|
||||
for(OpensyncAPSsidConfig s: ssidConfigs) {
|
||||
ret.ssidConfigs.add(s.clone());
|
||||
}
|
||||
}
|
||||
public Location getEquipmentLocation() {
|
||||
return equipmentLocation;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
public void setEquipmentLocation(Location equipmentLocation) {
|
||||
this.equipmentLocation = equipmentLocation;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
OpensyncAPConfig cfg = new OpensyncAPConfig();
|
||||
cfg.radioConfig = new OpensyncAPRadioConfig();
|
||||
cfg.ssidConfigs = new ArrayList<OpensyncAPSsidConfig>();
|
||||
public String getCountryCode() {
|
||||
return Location.getCountryCode(this.equipmentLocation).toString();
|
||||
}
|
||||
|
||||
cfg.radioConfig.setRadioChannel24G(1);
|
||||
cfg.radioConfig.setRadioChannel5LG(44);
|
||||
cfg.radioConfig.setRadioChannel5HG(108);
|
||||
public static long getSerialversionuid() {
|
||||
return serialVersionUID;
|
||||
}
|
||||
|
||||
OpensyncAPSsidConfig ssidCfg = new OpensyncAPSsidConfig();
|
||||
ssidCfg.setRadioType(RadioType.is2dot4GHz);
|
||||
ssidCfg.setSsid("Connectus-standalone");
|
||||
ssidCfg.setEncryption("WPA-PSK");
|
||||
ssidCfg.setKey("12345678");
|
||||
ssidCfg.setMode("2");
|
||||
cfg.ssidConfigs.add(ssidCfg);
|
||||
@Override
|
||||
public OpensyncAPConfig clone() {
|
||||
OpensyncAPConfig ret = (OpensyncAPConfig) super.clone();
|
||||
|
||||
ssidCfg = new OpensyncAPSsidConfig();
|
||||
ssidCfg.setRadioType(RadioType.is5GHz);
|
||||
ssidCfg.setSsid("Connectus-standalone-5");
|
||||
ssidCfg.setEncryption("WPA-PSK");
|
||||
ssidCfg.setKey("12345678");
|
||||
ssidCfg.setMode("2");
|
||||
cfg.ssidConfigs.add(ssidCfg);
|
||||
if (customerEquipment != null)
|
||||
ret.customerEquipment = customerEquipment.clone();
|
||||
if (equipmentLocation != null)
|
||||
ret.equipmentLocation = equipmentLocation.clone();
|
||||
if (ssidProfile != null)
|
||||
ret.ssidProfile = ssidProfile.clone();
|
||||
if (apProfile != null)
|
||||
ret.apProfile = apProfile.clone();
|
||||
if (equipmentRouting != null)
|
||||
ret.equipmentRouting = equipmentRouting.clone();
|
||||
if (equipmentGateway != null)
|
||||
ret.equipmentGateway = equipmentGateway.clone();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
System.out.println(cfg.toPrettyString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
package com.telecominfraproject.wlan.opensync.external.integration.models;
|
||||
|
||||
import com.telecominfraproject.wlan.core.model.json.BaseJsonModel;
|
||||
|
||||
public class OpensyncAPRadioConfig extends BaseJsonModel {
|
||||
|
||||
private static final long serialVersionUID = 5683558403622855381L;
|
||||
|
||||
private String country;
|
||||
private int radioChannel24G;
|
||||
private int radioChannel5LG;
|
||||
private int radioChannel5HG;
|
||||
|
||||
public int getRadioChannel24G() {
|
||||
return radioChannel24G;
|
||||
}
|
||||
|
||||
public void setRadioChannel24G(int radioChannel24G) {
|
||||
this.radioChannel24G = radioChannel24G;
|
||||
}
|
||||
|
||||
public int getRadioChannel5LG() {
|
||||
return radioChannel5LG;
|
||||
}
|
||||
|
||||
public void setRadioChannel5LG(int radioChannel5LG) {
|
||||
this.radioChannel5LG = radioChannel5LG;
|
||||
}
|
||||
|
||||
public int getRadioChannel5HG() {
|
||||
return radioChannel5HG;
|
||||
}
|
||||
|
||||
public void setRadioChannel5HG(int radioChannel5HG) {
|
||||
this.radioChannel5HG = radioChannel5HG;
|
||||
}
|
||||
|
||||
public String getCountry() {
|
||||
return country;
|
||||
}
|
||||
|
||||
public void setCountry(String country) {
|
||||
this.country = country;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OpensyncAPRadioConfig clone() {
|
||||
return (OpensyncAPRadioConfig)super.clone();
|
||||
}
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
package com.telecominfraproject.wlan.opensync.external.integration.models;
|
||||
|
||||
import com.telecominfraproject.wlan.core.model.equipment.RadioType;
|
||||
import com.telecominfraproject.wlan.core.model.json.BaseJsonModel;
|
||||
|
||||
public class OpensyncAPSsidConfig extends BaseJsonModel {
|
||||
|
||||
private static final long serialVersionUID = -8540144450360788799L;
|
||||
|
||||
private RadioType radioType;
|
||||
private String ssid;
|
||||
private String encryption;
|
||||
private String key;
|
||||
private String mode;
|
||||
private boolean broadcast;
|
||||
|
||||
public RadioType getRadioType() {
|
||||
return radioType;
|
||||
}
|
||||
|
||||
public void setRadioType(RadioType radioType) {
|
||||
this.radioType = radioType;
|
||||
}
|
||||
|
||||
public String getSsid() {
|
||||
return ssid;
|
||||
}
|
||||
|
||||
public void setSsid(String ssid) {
|
||||
this.ssid = ssid;
|
||||
}
|
||||
|
||||
public String getEncryption() {
|
||||
return encryption;
|
||||
}
|
||||
|
||||
public void setEncryption(String encryption) {
|
||||
this.encryption = encryption;
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public void setKey(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
public String getMode() {
|
||||
return mode;
|
||||
}
|
||||
|
||||
public void setMode(String mode) {
|
||||
this.mode = mode;
|
||||
}
|
||||
|
||||
public boolean isBroadcast() {
|
||||
return broadcast;
|
||||
}
|
||||
|
||||
public void setBroadcast(boolean broadcast) {
|
||||
this.broadcast = broadcast;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OpensyncAPSsidConfig clone() {
|
||||
return (OpensyncAPSsidConfig)super.clone();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,6 +11,8 @@ import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Profile;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.telecominfraproject.wlan.equipment.models.Equipment;
|
||||
import com.telecominfraproject.wlan.location.models.Location;
|
||||
import com.telecominfraproject.wlan.opensync.external.integration.models.ConnectNodeInfo;
|
||||
import com.telecominfraproject.wlan.opensync.external.integration.models.OpensyncAPConfig;
|
||||
import com.telecominfraproject.wlan.opensync.external.integration.models.OpensyncAPInetState;
|
||||
@@ -29,8 +31,17 @@ public class OpensyncExternalIntegrationSimple implements OpensyncExternalIntegr
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(OpensyncExternalIntegrationSimple.class);
|
||||
|
||||
@Value("${connectus.ovsdb.configFileName:/Users/dtop/Documents/TIP_WLAN_repos/opensync_wifi_controller/opensync_ext_static/src/main/resources/config_2_ssids.json}")
|
||||
private String configFileName;
|
||||
@Value("${connectus.ovsdb.customerEquipmentFileName:/Users/mikehansen/git/wlan-cloud-workspace/wlan-cloud-opensync-controller/opensync-ext-static/src/main/resources/EquipmentExample.json}")
|
||||
private String customerEquipmentFileName;
|
||||
|
||||
@Value("${connectus.ovsdb.apProfileFileName:/Users/mikehansen/git/wlan-cloud-workspace/wlan-cloud-opensync-controller/opensync-ext-static/src/main/resources/ProfileAPExample.json}")
|
||||
private String apProfileFileName;
|
||||
|
||||
@Value("${connectus.ovsdb.ssidProfileFileName:/Users/mikehansen/git/wlan-cloud-workspace/wlan-cloud-opensync-controller/opensync-ext-static/src/main/resources/ProfileSsid.json}")
|
||||
private String ssidProfileFileName;
|
||||
|
||||
@Value("${connectus.ovsdb.locationFileName:/Users/mikehansen/git/wlan-cloud-workspace/wlan-cloud-opensync-controller/opensync-ext-static/src/main/resources/LocationBuildingExample.json}")
|
||||
private String locationFileName;
|
||||
|
||||
@PostConstruct
|
||||
private void postCreate() {
|
||||
@@ -48,13 +59,28 @@ public class OpensyncExternalIntegrationSimple implements OpensyncExternalIntegr
|
||||
}
|
||||
|
||||
public OpensyncAPConfig getApConfig(String apId) {
|
||||
LOG.info("Retrieving config for AP {} from file {}", apId, configFileName);
|
||||
LOG.info("Retrieving config for AP {}", apId);
|
||||
OpensyncAPConfig ret = null;
|
||||
|
||||
try {
|
||||
ret = OpensyncAPConfig.fromFile(configFileName, OpensyncAPConfig.class);
|
||||
|
||||
Equipment equipment = Equipment.fromFile(customerEquipmentFileName, Equipment.class);
|
||||
equipment.setInventoryId(apId);
|
||||
equipment.setName(apId);
|
||||
|
||||
com.telecominfraproject.wlan.profile.models.Profile apProfile = com.telecominfraproject.wlan.profile.models.Profile.fromFile(apProfileFileName, com.telecominfraproject.wlan.profile.models.Profile.class);
|
||||
com.telecominfraproject.wlan.profile.models.Profile ssidProfile = com.telecominfraproject.wlan.profile.models.Profile.fromFile(ssidProfileFileName, com.telecominfraproject.wlan.profile.models.Profile.class);
|
||||
|
||||
Location location = Location.fromFile(locationFileName, Location.class);
|
||||
|
||||
ret = new OpensyncAPConfig();
|
||||
ret.setCustomerEquipment(equipment);
|
||||
ret.setApProfile(apProfile);
|
||||
ret.setSsidProfile(ssidProfile);
|
||||
ret.setEquipmentLocation(location);
|
||||
|
||||
} catch (IOException e) {
|
||||
LOG.error("Cannot read config from {}", configFileName, e);
|
||||
LOG.error("Cannot read config file", e);
|
||||
}
|
||||
|
||||
LOG.debug("Config content : {}", ret);
|
||||
@@ -63,7 +89,7 @@ public class OpensyncExternalIntegrationSimple implements OpensyncExternalIntegr
|
||||
}
|
||||
|
||||
public void processMqttMessage(String topic, Report report) {
|
||||
LOG.info("Received PlumeStatsReport on topic {} for ap {}\n{}", topic, report.getNodeID(),report);
|
||||
LOG.info("Received PlumeStatsReport on topic {} for ap {}\n{}", topic, report.getNodeID(), report);
|
||||
}
|
||||
|
||||
public void processMqttMessage(String topic, FlowReport flowReport) {
|
||||
@@ -106,16 +132,16 @@ public class OpensyncExternalIntegrationSimple implements OpensyncExternalIntegr
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void wifiVIFStateDbTableDelete(List<OpensyncAPVIFState> vifStateTables, String apId) {
|
||||
// TODO Auto-generated method stub
|
||||
@Override
|
||||
public void wifiVIFStateDbTableDelete(List<OpensyncAPVIFState> vifStateTables, String apId) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void wifiAssociatedClientsDbTableDelete(String deletedClientMac, String apId) {
|
||||
// TODO Auto-generated method stub
|
||||
@Override
|
||||
public void wifiAssociatedClientsDbTableDelete(String deletedClientMac, String apId) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
290
opensync-ext-static/src/main/resources/EquipmentExample.json
Normal file
290
opensync-ext-static/src/main/resources/EquipmentExample.json
Normal file
@@ -0,0 +1,290 @@
|
||||
{
|
||||
"model_type" : "Equipment",
|
||||
"id" : 50,
|
||||
"customerId" : 2,
|
||||
"profileId" : 2,
|
||||
"locationId" : 8,
|
||||
"equipmentType" : "AP",
|
||||
"inventoryId" : "ap-50",
|
||||
"name" : "AP 50",
|
||||
"details" : {
|
||||
"model_type" : "ApElementConfiguration",
|
||||
"sampleDetailsStr" : null,
|
||||
"elementConfigVersion" : "AP-V1",
|
||||
"equipmentType" : "AP",
|
||||
"deviceMode" : "standaloneAP",
|
||||
"gettingIP" : "dhcp",
|
||||
"staticIP" : null,
|
||||
"staticIpMaskCidr" : null,
|
||||
"staticIpGw" : null,
|
||||
"gettingDNS" : "dhcp",
|
||||
"staticDnsIp1" : null,
|
||||
"staticDnsIp2" : null,
|
||||
"peerInfoList" : [ ],
|
||||
"deviceName" : "Default Device Name",
|
||||
"locationData" : null,
|
||||
"locallyConfiguredMgmtVlan" : 0,
|
||||
"locallyConfigured" : false,
|
||||
"deploymentType" : "CEILING",
|
||||
"syntheticClientEnabled" : null,
|
||||
"frameReportThrottleEnabled" : true,
|
||||
"antennaType" : "OMNI",
|
||||
"costSavingEventsEnabled" : true,
|
||||
"forwardMode" : "BRIDGE",
|
||||
"radioMap" : {
|
||||
"is2dot4GHz" : {
|
||||
"model_type" : "ElementRadioConfiguration",
|
||||
"radioType" : "is2dot4GHz",
|
||||
"channelNumber" : 6,
|
||||
"manualChannelNumber" : 6,
|
||||
"backupChannelNumber" : 11,
|
||||
"autoChannelSelection" : true,
|
||||
"channelBandwidth" : "is20MHz",
|
||||
"bannedChannels" : [ ],
|
||||
"rxCellSizeDb" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : -90
|
||||
},
|
||||
"probeResponseThresholdDb" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : -90
|
||||
},
|
||||
"clientDisconnectThresholdDb" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : -90
|
||||
},
|
||||
"eirpTxPower" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : 18
|
||||
},
|
||||
"bestApEnabled" : null,
|
||||
"neighbouringListApConfig" : {
|
||||
"model_type" : "NeighbouringAPListConfiguration",
|
||||
"minSignal" : -85,
|
||||
"maxAps" : 25
|
||||
},
|
||||
"minAutoCellSize" : -80,
|
||||
"perimeterDetectionEnabled" : true,
|
||||
"bestAPSteerType" : "both",
|
||||
"deauthAttackDetection" : null,
|
||||
"allowedChannelsPowerLevels" : [ ],
|
||||
"activeChannel" : 6
|
||||
},
|
||||
"is5GHzL" : {
|
||||
"model_type" : "ElementRadioConfiguration",
|
||||
"radioType" : "is5GHzL",
|
||||
"channelNumber" : 36,
|
||||
"manualChannelNumber" : 36,
|
||||
"backupChannelNumber" : 44,
|
||||
"autoChannelSelection" : true,
|
||||
"channelBandwidth" : "is80MHz",
|
||||
"bannedChannels" : [ ],
|
||||
"rxCellSizeDb" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : -90
|
||||
},
|
||||
"probeResponseThresholdDb" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : -90
|
||||
},
|
||||
"clientDisconnectThresholdDb" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : -90
|
||||
},
|
||||
"eirpTxPower" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : 18
|
||||
},
|
||||
"bestApEnabled" : null,
|
||||
"neighbouringListApConfig" : {
|
||||
"model_type" : "NeighbouringAPListConfiguration",
|
||||
"minSignal" : -85,
|
||||
"maxAps" : 25
|
||||
},
|
||||
"minAutoCellSize" : -80,
|
||||
"perimeterDetectionEnabled" : true,
|
||||
"bestAPSteerType" : "both",
|
||||
"deauthAttackDetection" : null,
|
||||
"allowedChannelsPowerLevels" : [ ],
|
||||
"activeChannel" : 36
|
||||
},
|
||||
"is5GHzU" : {
|
||||
"model_type" : "ElementRadioConfiguration",
|
||||
"radioType" : "is5GHzU",
|
||||
"channelNumber" : 108,
|
||||
"manualChannelNumber" : 108,
|
||||
"backupChannelNumber" : 116,
|
||||
"autoChannelSelection" : true,
|
||||
"channelBandwidth" : "is80MHz",
|
||||
"bannedChannels" : [ ],
|
||||
"rxCellSizeDb" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : -90
|
||||
},
|
||||
"probeResponseThresholdDb" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : -90
|
||||
},
|
||||
"clientDisconnectThresholdDb" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : -90
|
||||
},
|
||||
"eirpTxPower" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : 18
|
||||
},
|
||||
"bestApEnabled" : null,
|
||||
"neighbouringListApConfig" : {
|
||||
"model_type" : "NeighbouringAPListConfiguration",
|
||||
"minSignal" : -85,
|
||||
"maxAps" : 25
|
||||
},
|
||||
"minAutoCellSize" : -80,
|
||||
"perimeterDetectionEnabled" : true,
|
||||
"bestAPSteerType" : "both",
|
||||
"deauthAttackDetection" : null,
|
||||
"allowedChannelsPowerLevels" : [ ],
|
||||
"activeChannel" : 108
|
||||
}
|
||||
},
|
||||
"advancedRadioMap" : {
|
||||
"is2dot4GHz" : {
|
||||
"model_type" : "RadioConfiguration",
|
||||
"radioType" : "is2dot4GHz",
|
||||
"radioAdminState" : "enabled",
|
||||
"fragmentationThresholdBytes" : 2346,
|
||||
"rtsCtsThreshold" : 65535,
|
||||
"autoChannelSelection" : "disabled",
|
||||
"radioMode" : "modeN",
|
||||
"mimoMode" : "twoByTwo",
|
||||
"wmmState" : "enabled",
|
||||
"uapsdState" : "enabled",
|
||||
"maxNumClients" : 100,
|
||||
"stationIsolation" : "disabled",
|
||||
"multicastRate" : "auto",
|
||||
"managementRate" : "auto",
|
||||
"activeScanSettings" : {
|
||||
"model_type" : "ActiveScanSettings",
|
||||
"enabled" : true,
|
||||
"scanFrequencySeconds" : 10,
|
||||
"scanDurationMillis" : 65
|
||||
},
|
||||
"channelHopSettings" : {
|
||||
"model_type" : "ChannelHopSettings",
|
||||
"noiseFloorThresholdInDB" : -75,
|
||||
"noiseFloorThresholdTimeInSeconds" : 180,
|
||||
"nonWifiThresholdInPercentage" : 50,
|
||||
"nonWifiThresholdTimeInSeconds" : 180,
|
||||
"obssHopMode" : "NON_WIFI"
|
||||
},
|
||||
"bestApSettings" : {
|
||||
"model_type" : "RadioBestApSettings",
|
||||
"mlComputed" : true,
|
||||
"dropInSnrPercentage" : 20,
|
||||
"minLoadFactor" : 50
|
||||
},
|
||||
"forceScanDuringVoice" : "disabled",
|
||||
"legacyBSSRate" : "enabled",
|
||||
"beaconInterval" : 100,
|
||||
"deauthAttackDetection" : null
|
||||
},
|
||||
"is5GHzU" : {
|
||||
"model_type" : "RadioConfiguration",
|
||||
"radioType" : "is5GHzU",
|
||||
"radioAdminState" : "enabled",
|
||||
"fragmentationThresholdBytes" : 2346,
|
||||
"rtsCtsThreshold" : 65535,
|
||||
"autoChannelSelection" : "disabled",
|
||||
"radioMode" : "modeAC",
|
||||
"mimoMode" : "twoByTwo",
|
||||
"wmmState" : "enabled",
|
||||
"uapsdState" : "enabled",
|
||||
"maxNumClients" : 100,
|
||||
"stationIsolation" : "disabled",
|
||||
"multicastRate" : "auto",
|
||||
"managementRate" : "auto",
|
||||
"activeScanSettings" : {
|
||||
"model_type" : "ActiveScanSettings",
|
||||
"enabled" : true,
|
||||
"scanFrequencySeconds" : 10,
|
||||
"scanDurationMillis" : 65
|
||||
},
|
||||
"channelHopSettings" : {
|
||||
"model_type" : "ChannelHopSettings",
|
||||
"noiseFloorThresholdInDB" : -75,
|
||||
"noiseFloorThresholdTimeInSeconds" : 180,
|
||||
"nonWifiThresholdInPercentage" : 50,
|
||||
"nonWifiThresholdTimeInSeconds" : 180,
|
||||
"obssHopMode" : "NON_WIFI"
|
||||
},
|
||||
"bestApSettings" : {
|
||||
"model_type" : "RadioBestApSettings",
|
||||
"mlComputed" : true,
|
||||
"dropInSnrPercentage" : 30,
|
||||
"minLoadFactor" : 40
|
||||
},
|
||||
"forceScanDuringVoice" : "disabled",
|
||||
"legacyBSSRate" : "enabled",
|
||||
"beaconInterval" : 100,
|
||||
"deauthAttackDetection" : null
|
||||
},
|
||||
"is5GHzL" : {
|
||||
"model_type" : "RadioConfiguration",
|
||||
"radioType" : "is5GHzL",
|
||||
"radioAdminState" : "enabled",
|
||||
"fragmentationThresholdBytes" : 2346,
|
||||
"rtsCtsThreshold" : 65535,
|
||||
"autoChannelSelection" : "disabled",
|
||||
"radioMode" : "modeAC",
|
||||
"mimoMode" : "twoByTwo",
|
||||
"wmmState" : "enabled",
|
||||
"uapsdState" : "enabled",
|
||||
"maxNumClients" : 100,
|
||||
"stationIsolation" : "disabled",
|
||||
"multicastRate" : "auto",
|
||||
"managementRate" : "auto",
|
||||
"activeScanSettings" : {
|
||||
"model_type" : "ActiveScanSettings",
|
||||
"enabled" : true,
|
||||
"scanFrequencySeconds" : 10,
|
||||
"scanDurationMillis" : 65
|
||||
},
|
||||
"channelHopSettings" : {
|
||||
"model_type" : "ChannelHopSettings",
|
||||
"noiseFloorThresholdInDB" : -75,
|
||||
"noiseFloorThresholdTimeInSeconds" : 180,
|
||||
"nonWifiThresholdInPercentage" : 50,
|
||||
"nonWifiThresholdTimeInSeconds" : 180,
|
||||
"obssHopMode" : "NON_WIFI"
|
||||
},
|
||||
"bestApSettings" : {
|
||||
"model_type" : "RadioBestApSettings",
|
||||
"mlComputed" : true,
|
||||
"dropInSnrPercentage" : 30,
|
||||
"minLoadFactor" : 40
|
||||
},
|
||||
"forceScanDuringVoice" : "disabled",
|
||||
"legacyBSSRate" : "enabled",
|
||||
"beaconInterval" : 100,
|
||||
"deauthAttackDetection" : null
|
||||
}
|
||||
}
|
||||
},
|
||||
"latitude" : null,
|
||||
"longitude" : null,
|
||||
"serial" : "serial-ap-50",
|
||||
"createdTimestamp" : 1589915837067,
|
||||
"lastModifiedTimestamp" : 1589915837067
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"model_type" : "Location",
|
||||
"id" : 7,
|
||||
"parentId" : 2,
|
||||
"locationType" : "BUILDING",
|
||||
"customerId" : 2,
|
||||
"name" : "Building 2",
|
||||
"details" : {
|
||||
"model_type" : "LocationDetails",
|
||||
"countryCode" : "usa",
|
||||
"maintenanceWindow" : null,
|
||||
"rrmEnabled" : true,
|
||||
"dailyRebalancingDetails" : {
|
||||
"SUNDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"MONDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"TUESDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"WEDNESDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"THURSDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"FRIDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"SATURDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"createdTimestamp" : 1589567347442,
|
||||
"lastModifiedTimestamp" : 1589567347442
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"model_type" : "Location",
|
||||
"id" : 2,
|
||||
"parentId" : 0,
|
||||
"locationType" : "SITE",
|
||||
"customerId" : 2,
|
||||
"name" : "Menlo Park",
|
||||
"details" : {
|
||||
"model_type" : "LocationDetails",
|
||||
"countryCode" : "usa",
|
||||
"maintenanceWindow" : null,
|
||||
"rrmEnabled" : true,
|
||||
"dailyRebalancingDetails" : {
|
||||
"SUNDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"MONDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"TUESDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"WEDNESDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"THURSDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"FRIDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"SATURDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"createdTimestamp" : 1589567474314,
|
||||
"lastModifiedTimestamp" : 1589567474314
|
||||
}
|
||||
50
opensync-ext-static/src/main/resources/ProfileAPExample.json
Normal file
50
opensync-ext-static/src/main/resources/ProfileAPExample.json
Normal file
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"model_type" : "Profile",
|
||||
"id" : 2,
|
||||
"customerId" : 2,
|
||||
"profileType" : "equipment_ap",
|
||||
"name" : "ApProfile",
|
||||
"details" : {
|
||||
"model_type" : "ApNetworkConfiguration",
|
||||
"sampleDetailsStr" : null,
|
||||
"networkConfigVersion" : "AP-1",
|
||||
"equipmentType" : "AP",
|
||||
"vlanNative" : true,
|
||||
"vlan" : 0,
|
||||
"ntpServer" : {
|
||||
"model_type" : "AutoOrManualString",
|
||||
"auto" : true,
|
||||
"value" : "pool.ntp.org"
|
||||
},
|
||||
"syslogRelay" : null,
|
||||
"rtlsSettings" : null,
|
||||
"syntheticClientEnabled" : true,
|
||||
"ledControlEnabled" : true,
|
||||
"equipmentDiscovery" : false,
|
||||
"radioMap" : {
|
||||
"is5GHz" : {
|
||||
"model_type" : "RadioProfileConfiguration",
|
||||
"bestApEnabled" : true,
|
||||
"bestAPSteerType" : "both"
|
||||
},
|
||||
"is2dot4GHz" : {
|
||||
"model_type" : "RadioProfileConfiguration",
|
||||
"bestApEnabled" : true,
|
||||
"bestAPSteerType" : "both"
|
||||
},
|
||||
"is5GHzU" : {
|
||||
"model_type" : "RadioProfileConfiguration",
|
||||
"bestApEnabled" : true,
|
||||
"bestAPSteerType" : "both"
|
||||
},
|
||||
"is5GHzL" : {
|
||||
"model_type" : "RadioProfileConfiguration",
|
||||
"bestApEnabled" : true,
|
||||
"bestAPSteerType" : "both"
|
||||
}
|
||||
}
|
||||
},
|
||||
"createdTimestamp" : 1589567037365,
|
||||
"lastModifiedTimestamp" : 1589567037365,
|
||||
"childProfileIds" : [ 1 ]
|
||||
}
|
||||
58
opensync-ext-static/src/main/resources/ProfileSsid.json
Normal file
58
opensync-ext-static/src/main/resources/ProfileSsid.json
Normal file
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"model_type" : "Profile",
|
||||
"id" : 1,
|
||||
"customerId" : 2,
|
||||
"profileType" : "ssid",
|
||||
"name" : "Connectus-local",
|
||||
"details" : {
|
||||
"model_type" : "SsidConfiguration",
|
||||
"sampleDetailsStr" : null,
|
||||
"ssid" : "Connectus-local",
|
||||
"appliedRadios" : [ "is5GHzL", "is5GHzU", "is2dot4GHz" ],
|
||||
"ssidAdminState" : "enabled",
|
||||
"secureMode" : "wpa2PSK",
|
||||
"vlanId" : 1,
|
||||
"keyStr" : "12345678",
|
||||
"broadcastSsid" : "enabled",
|
||||
"keyRefresh" : 0,
|
||||
"noLocalSubnets" : false,
|
||||
"radiusServiceName" : null,
|
||||
"captivePortalId" : null,
|
||||
"bandwidthLimitDown" : 0,
|
||||
"bandwidthLimitUp" : 0,
|
||||
"videoTrafficOnly" : false,
|
||||
"radioBasedConfigs" : {
|
||||
"is5GHz" : {
|
||||
"model_type" : "RadioBasedSsidConfiguration",
|
||||
"enable80211r" : null,
|
||||
"enable80211k" : null,
|
||||
"enable80211v" : null
|
||||
},
|
||||
"is2dot4GHz" : {
|
||||
"model_type" : "RadioBasedSsidConfiguration",
|
||||
"enable80211r" : null,
|
||||
"enable80211k" : null,
|
||||
"enable80211v" : null
|
||||
},
|
||||
"is5GHzU" : {
|
||||
"model_type" : "RadioBasedSsidConfiguration",
|
||||
"enable80211r" : null,
|
||||
"enable80211k" : null,
|
||||
"enable80211v" : null
|
||||
},
|
||||
"is5GHzL" : {
|
||||
"model_type" : "RadioBasedSsidConfiguration",
|
||||
"enable80211r" : null,
|
||||
"enable80211k" : null,
|
||||
"enable80211v" : null
|
||||
}
|
||||
},
|
||||
"bonjourGatewayProfileId" : null,
|
||||
"enable80211w" : null,
|
||||
"wepConfig" : null,
|
||||
"forwardMode" : null
|
||||
},
|
||||
"createdTimestamp" : 1589567130432,
|
||||
"lastModifiedTimestamp" : 1589567130432,
|
||||
"childProfileIds" : [ ]
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
"radioConfig" : {
|
||||
"model_type" : "OpensyncAPRadioConfig",
|
||||
"country" : "CA",
|
||||
"radioChannel24G" : 1,
|
||||
"radioChannel24G" : 6,
|
||||
"radioChannel5LG" : 44,
|
||||
"radioChannel5HG" : 108
|
||||
},
|
||||
|
||||
@@ -22,7 +22,11 @@ RUN mkdir -p /app/logs /app/opensync /app/config
|
||||
COPY maven/app.jar /app
|
||||
COPY app/opensync/logback.xml /app/opensync/logback.xml
|
||||
COPY app/run.sh /app
|
||||
COPY app/opensync/config_2_ssids.json /app/opensync/config_2_ssids.json
|
||||
COPY app/opensync/EquipmentExample.json /app/opensync/EquipmentExample.json
|
||||
COPY app/opensync/ProfileAPExample.json /app/opensync/ProfileAPExample.json
|
||||
COPY app/opensync/ProfileSsid.json /app/opensync/ProfileSsid.json
|
||||
COPY app/opensync/LocationBuildingExample.json /app/opensync/LocationBuildingExample.json
|
||||
|
||||
VOLUME ["/app/logs", "/app/config"]
|
||||
|
||||
RUN chmod +x /app/run.sh
|
||||
|
||||
@@ -0,0 +1,290 @@
|
||||
{
|
||||
"model_type" : "Equipment",
|
||||
"id" : 50,
|
||||
"customerId" : 2,
|
||||
"profileId" : 2,
|
||||
"locationId" : 8,
|
||||
"equipmentType" : "AP",
|
||||
"inventoryId" : "ap-50",
|
||||
"name" : "AP 50",
|
||||
"details" : {
|
||||
"model_type" : "ApElementConfiguration",
|
||||
"sampleDetailsStr" : null,
|
||||
"elementConfigVersion" : "AP-V1",
|
||||
"equipmentType" : "AP",
|
||||
"deviceMode" : "standaloneAP",
|
||||
"gettingIP" : "dhcp",
|
||||
"staticIP" : null,
|
||||
"staticIpMaskCidr" : null,
|
||||
"staticIpGw" : null,
|
||||
"gettingDNS" : "dhcp",
|
||||
"staticDnsIp1" : null,
|
||||
"staticDnsIp2" : null,
|
||||
"peerInfoList" : [ ],
|
||||
"deviceName" : "Default Device Name",
|
||||
"locationData" : null,
|
||||
"locallyConfiguredMgmtVlan" : 0,
|
||||
"locallyConfigured" : false,
|
||||
"deploymentType" : "CEILING",
|
||||
"syntheticClientEnabled" : null,
|
||||
"frameReportThrottleEnabled" : true,
|
||||
"antennaType" : "OMNI",
|
||||
"costSavingEventsEnabled" : true,
|
||||
"forwardMode" : "BRIDGE",
|
||||
"radioMap" : {
|
||||
"is2dot4GHz" : {
|
||||
"model_type" : "ElementRadioConfiguration",
|
||||
"radioType" : "is2dot4GHz",
|
||||
"channelNumber" : 6,
|
||||
"manualChannelNumber" : 6,
|
||||
"backupChannelNumber" : 11,
|
||||
"autoChannelSelection" : true,
|
||||
"channelBandwidth" : "is20MHz",
|
||||
"bannedChannels" : [ ],
|
||||
"rxCellSizeDb" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : -90
|
||||
},
|
||||
"probeResponseThresholdDb" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : -90
|
||||
},
|
||||
"clientDisconnectThresholdDb" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : -90
|
||||
},
|
||||
"eirpTxPower" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : 18
|
||||
},
|
||||
"bestApEnabled" : null,
|
||||
"neighbouringListApConfig" : {
|
||||
"model_type" : "NeighbouringAPListConfiguration",
|
||||
"minSignal" : -85,
|
||||
"maxAps" : 25
|
||||
},
|
||||
"minAutoCellSize" : -80,
|
||||
"perimeterDetectionEnabled" : true,
|
||||
"bestAPSteerType" : "both",
|
||||
"deauthAttackDetection" : null,
|
||||
"allowedChannelsPowerLevels" : [ ],
|
||||
"activeChannel" : 6
|
||||
},
|
||||
"is5GHzL" : {
|
||||
"model_type" : "ElementRadioConfiguration",
|
||||
"radioType" : "is5GHzL",
|
||||
"channelNumber" : 36,
|
||||
"manualChannelNumber" : 36,
|
||||
"backupChannelNumber" : 44,
|
||||
"autoChannelSelection" : true,
|
||||
"channelBandwidth" : "is80MHz",
|
||||
"bannedChannels" : [ ],
|
||||
"rxCellSizeDb" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : -90
|
||||
},
|
||||
"probeResponseThresholdDb" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : -90
|
||||
},
|
||||
"clientDisconnectThresholdDb" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : -90
|
||||
},
|
||||
"eirpTxPower" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : 18
|
||||
},
|
||||
"bestApEnabled" : null,
|
||||
"neighbouringListApConfig" : {
|
||||
"model_type" : "NeighbouringAPListConfiguration",
|
||||
"minSignal" : -85,
|
||||
"maxAps" : 25
|
||||
},
|
||||
"minAutoCellSize" : -80,
|
||||
"perimeterDetectionEnabled" : true,
|
||||
"bestAPSteerType" : "both",
|
||||
"deauthAttackDetection" : null,
|
||||
"allowedChannelsPowerLevels" : [ ],
|
||||
"activeChannel" : 36
|
||||
},
|
||||
"is5GHzU" : {
|
||||
"model_type" : "ElementRadioConfiguration",
|
||||
"radioType" : "is5GHzU",
|
||||
"channelNumber" : 108,
|
||||
"manualChannelNumber" : 108,
|
||||
"backupChannelNumber" : 116,
|
||||
"autoChannelSelection" : true,
|
||||
"channelBandwidth" : "is80MHz",
|
||||
"bannedChannels" : [ ],
|
||||
"rxCellSizeDb" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : -90
|
||||
},
|
||||
"probeResponseThresholdDb" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : -90
|
||||
},
|
||||
"clientDisconnectThresholdDb" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : -90
|
||||
},
|
||||
"eirpTxPower" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : 18
|
||||
},
|
||||
"bestApEnabled" : null,
|
||||
"neighbouringListApConfig" : {
|
||||
"model_type" : "NeighbouringAPListConfiguration",
|
||||
"minSignal" : -85,
|
||||
"maxAps" : 25
|
||||
},
|
||||
"minAutoCellSize" : -80,
|
||||
"perimeterDetectionEnabled" : true,
|
||||
"bestAPSteerType" : "both",
|
||||
"deauthAttackDetection" : null,
|
||||
"allowedChannelsPowerLevels" : [ ],
|
||||
"activeChannel" : 108
|
||||
}
|
||||
},
|
||||
"advancedRadioMap" : {
|
||||
"is2dot4GHz" : {
|
||||
"model_type" : "RadioConfiguration",
|
||||
"radioType" : "is2dot4GHz",
|
||||
"radioAdminState" : "enabled",
|
||||
"fragmentationThresholdBytes" : 2346,
|
||||
"rtsCtsThreshold" : 65535,
|
||||
"autoChannelSelection" : "disabled",
|
||||
"radioMode" : "modeN",
|
||||
"mimoMode" : "twoByTwo",
|
||||
"wmmState" : "enabled",
|
||||
"uapsdState" : "enabled",
|
||||
"maxNumClients" : 100,
|
||||
"stationIsolation" : "disabled",
|
||||
"multicastRate" : "auto",
|
||||
"managementRate" : "auto",
|
||||
"activeScanSettings" : {
|
||||
"model_type" : "ActiveScanSettings",
|
||||
"enabled" : true,
|
||||
"scanFrequencySeconds" : 10,
|
||||
"scanDurationMillis" : 65
|
||||
},
|
||||
"channelHopSettings" : {
|
||||
"model_type" : "ChannelHopSettings",
|
||||
"noiseFloorThresholdInDB" : -75,
|
||||
"noiseFloorThresholdTimeInSeconds" : 180,
|
||||
"nonWifiThresholdInPercentage" : 50,
|
||||
"nonWifiThresholdTimeInSeconds" : 180,
|
||||
"obssHopMode" : "NON_WIFI"
|
||||
},
|
||||
"bestApSettings" : {
|
||||
"model_type" : "RadioBestApSettings",
|
||||
"mlComputed" : true,
|
||||
"dropInSnrPercentage" : 20,
|
||||
"minLoadFactor" : 50
|
||||
},
|
||||
"forceScanDuringVoice" : "disabled",
|
||||
"legacyBSSRate" : "enabled",
|
||||
"beaconInterval" : 100,
|
||||
"deauthAttackDetection" : null
|
||||
},
|
||||
"is5GHzU" : {
|
||||
"model_type" : "RadioConfiguration",
|
||||
"radioType" : "is5GHzU",
|
||||
"radioAdminState" : "enabled",
|
||||
"fragmentationThresholdBytes" : 2346,
|
||||
"rtsCtsThreshold" : 65535,
|
||||
"autoChannelSelection" : "disabled",
|
||||
"radioMode" : "modeAC",
|
||||
"mimoMode" : "twoByTwo",
|
||||
"wmmState" : "enabled",
|
||||
"uapsdState" : "enabled",
|
||||
"maxNumClients" : 100,
|
||||
"stationIsolation" : "disabled",
|
||||
"multicastRate" : "auto",
|
||||
"managementRate" : "auto",
|
||||
"activeScanSettings" : {
|
||||
"model_type" : "ActiveScanSettings",
|
||||
"enabled" : true,
|
||||
"scanFrequencySeconds" : 10,
|
||||
"scanDurationMillis" : 65
|
||||
},
|
||||
"channelHopSettings" : {
|
||||
"model_type" : "ChannelHopSettings",
|
||||
"noiseFloorThresholdInDB" : -75,
|
||||
"noiseFloorThresholdTimeInSeconds" : 180,
|
||||
"nonWifiThresholdInPercentage" : 50,
|
||||
"nonWifiThresholdTimeInSeconds" : 180,
|
||||
"obssHopMode" : "NON_WIFI"
|
||||
},
|
||||
"bestApSettings" : {
|
||||
"model_type" : "RadioBestApSettings",
|
||||
"mlComputed" : true,
|
||||
"dropInSnrPercentage" : 30,
|
||||
"minLoadFactor" : 40
|
||||
},
|
||||
"forceScanDuringVoice" : "disabled",
|
||||
"legacyBSSRate" : "enabled",
|
||||
"beaconInterval" : 100,
|
||||
"deauthAttackDetection" : null
|
||||
},
|
||||
"is5GHzL" : {
|
||||
"model_type" : "RadioConfiguration",
|
||||
"radioType" : "is5GHzL",
|
||||
"radioAdminState" : "enabled",
|
||||
"fragmentationThresholdBytes" : 2346,
|
||||
"rtsCtsThreshold" : 65535,
|
||||
"autoChannelSelection" : "disabled",
|
||||
"radioMode" : "modeAC",
|
||||
"mimoMode" : "twoByTwo",
|
||||
"wmmState" : "enabled",
|
||||
"uapsdState" : "enabled",
|
||||
"maxNumClients" : 100,
|
||||
"stationIsolation" : "disabled",
|
||||
"multicastRate" : "auto",
|
||||
"managementRate" : "auto",
|
||||
"activeScanSettings" : {
|
||||
"model_type" : "ActiveScanSettings",
|
||||
"enabled" : true,
|
||||
"scanFrequencySeconds" : 10,
|
||||
"scanDurationMillis" : 65
|
||||
},
|
||||
"channelHopSettings" : {
|
||||
"model_type" : "ChannelHopSettings",
|
||||
"noiseFloorThresholdInDB" : -75,
|
||||
"noiseFloorThresholdTimeInSeconds" : 180,
|
||||
"nonWifiThresholdInPercentage" : 50,
|
||||
"nonWifiThresholdTimeInSeconds" : 180,
|
||||
"obssHopMode" : "NON_WIFI"
|
||||
},
|
||||
"bestApSettings" : {
|
||||
"model_type" : "RadioBestApSettings",
|
||||
"mlComputed" : true,
|
||||
"dropInSnrPercentage" : 30,
|
||||
"minLoadFactor" : 40
|
||||
},
|
||||
"forceScanDuringVoice" : "disabled",
|
||||
"legacyBSSRate" : "enabled",
|
||||
"beaconInterval" : 100,
|
||||
"deauthAttackDetection" : null
|
||||
}
|
||||
}
|
||||
},
|
||||
"latitude" : null,
|
||||
"longitude" : null,
|
||||
"serial" : "serial-ap-50",
|
||||
"createdTimestamp" : 1589915837067,
|
||||
"lastModifiedTimestamp" : 1589915837067
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"model_type" : "Location",
|
||||
"id" : 7,
|
||||
"parentId" : 2,
|
||||
"locationType" : "BUILDING",
|
||||
"customerId" : 2,
|
||||
"name" : "Building 2",
|
||||
"details" : {
|
||||
"model_type" : "LocationDetails",
|
||||
"countryCode" : "usa",
|
||||
"maintenanceWindow" : null,
|
||||
"rrmEnabled" : true,
|
||||
"dailyRebalancingDetails" : {
|
||||
"SUNDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"MONDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"TUESDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"WEDNESDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"THURSDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"FRIDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"SATURDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"createdTimestamp" : 1589567347442,
|
||||
"lastModifiedTimestamp" : 1589567347442
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"model_type" : "Location",
|
||||
"id" : 2,
|
||||
"parentId" : 0,
|
||||
"locationType" : "SITE",
|
||||
"customerId" : 2,
|
||||
"name" : "Menlo Park",
|
||||
"details" : {
|
||||
"model_type" : "LocationDetails",
|
||||
"countryCode" : "usa",
|
||||
"maintenanceWindow" : null,
|
||||
"rrmEnabled" : true,
|
||||
"dailyRebalancingDetails" : {
|
||||
"SUNDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"MONDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"TUESDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"WEDNESDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"THURSDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"FRIDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"SATURDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"createdTimestamp" : 1589567474314,
|
||||
"lastModifiedTimestamp" : 1589567474314
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"model_type" : "Profile",
|
||||
"id" : 2,
|
||||
"customerId" : 2,
|
||||
"profileType" : "equipment_ap",
|
||||
"name" : "ApProfile",
|
||||
"details" : {
|
||||
"model_type" : "ApNetworkConfiguration",
|
||||
"sampleDetailsStr" : null,
|
||||
"networkConfigVersion" : "AP-1",
|
||||
"equipmentType" : "AP",
|
||||
"vlanNative" : true,
|
||||
"vlan" : 0,
|
||||
"ntpServer" : {
|
||||
"model_type" : "AutoOrManualString",
|
||||
"auto" : true,
|
||||
"value" : "pool.ntp.org"
|
||||
},
|
||||
"syslogRelay" : null,
|
||||
"rtlsSettings" : null,
|
||||
"syntheticClientEnabled" : true,
|
||||
"ledControlEnabled" : true,
|
||||
"equipmentDiscovery" : false,
|
||||
"radioMap" : {
|
||||
"is5GHz" : {
|
||||
"model_type" : "RadioProfileConfiguration",
|
||||
"bestApEnabled" : true,
|
||||
"bestAPSteerType" : "both"
|
||||
},
|
||||
"is2dot4GHz" : {
|
||||
"model_type" : "RadioProfileConfiguration",
|
||||
"bestApEnabled" : true,
|
||||
"bestAPSteerType" : "both"
|
||||
},
|
||||
"is5GHzU" : {
|
||||
"model_type" : "RadioProfileConfiguration",
|
||||
"bestApEnabled" : true,
|
||||
"bestAPSteerType" : "both"
|
||||
},
|
||||
"is5GHzL" : {
|
||||
"model_type" : "RadioProfileConfiguration",
|
||||
"bestApEnabled" : true,
|
||||
"bestAPSteerType" : "both"
|
||||
}
|
||||
}
|
||||
},
|
||||
"createdTimestamp" : 1589567037365,
|
||||
"lastModifiedTimestamp" : 1589567037365,
|
||||
"childProfileIds" : [ 1 ]
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"model_type" : "Profile",
|
||||
"id" : 1,
|
||||
"customerId" : 2,
|
||||
"profileType" : "ssid",
|
||||
"name" : "Connectus-local",
|
||||
"details" : {
|
||||
"model_type" : "SsidConfiguration",
|
||||
"sampleDetailsStr" : null,
|
||||
"ssid" : "Connectus-local",
|
||||
"appliedRadios" : [ "is5GHzL", "is5GHzU", "is2dot4GHz" ],
|
||||
"ssidAdminState" : "enabled",
|
||||
"secureMode" : "wpa2PSK",
|
||||
"vlanId" : 1,
|
||||
"keyStr" : "12345678",
|
||||
"broadcastSsid" : "enabled",
|
||||
"keyRefresh" : 0,
|
||||
"noLocalSubnets" : false,
|
||||
"radiusServiceName" : null,
|
||||
"captivePortalId" : null,
|
||||
"bandwidthLimitDown" : 0,
|
||||
"bandwidthLimitUp" : 0,
|
||||
"videoTrafficOnly" : false,
|
||||
"radioBasedConfigs" : {
|
||||
"is5GHz" : {
|
||||
"model_type" : "RadioBasedSsidConfiguration",
|
||||
"enable80211r" : null,
|
||||
"enable80211k" : null,
|
||||
"enable80211v" : null
|
||||
},
|
||||
"is2dot4GHz" : {
|
||||
"model_type" : "RadioBasedSsidConfiguration",
|
||||
"enable80211r" : null,
|
||||
"enable80211k" : null,
|
||||
"enable80211v" : null
|
||||
},
|
||||
"is5GHzU" : {
|
||||
"model_type" : "RadioBasedSsidConfiguration",
|
||||
"enable80211r" : null,
|
||||
"enable80211k" : null,
|
||||
"enable80211v" : null
|
||||
},
|
||||
"is5GHzL" : {
|
||||
"model_type" : "RadioBasedSsidConfiguration",
|
||||
"enable80211r" : null,
|
||||
"enable80211k" : null,
|
||||
"enable80211v" : null
|
||||
}
|
||||
},
|
||||
"bonjourGatewayProfileId" : null,
|
||||
"enable80211w" : null,
|
||||
"wepConfig" : null,
|
||||
"forwardMode" : null
|
||||
},
|
||||
"createdTimestamp" : 1589567130432,
|
||||
"lastModifiedTimestamp" : 1589567130432,
|
||||
"childProfileIds" : [ ]
|
||||
}
|
||||
@@ -31,7 +31,11 @@ OVSDB_SERVER_KEYSTORE_FILE="${OVSDB_SERVER_KEYSTORE_FILE:=/opt/tip-wlan/certs/se
|
||||
OVSDB_SERVER_KEYSTORE_PASSWORD="${OVSDB_SERVER_KEYSTORE_PASSWORD:=mypassword}"
|
||||
OVSDB_SERVER_TRUSTSTORE_FILE="${OVSDB_SERVER_TRUSTSTORE_FILE:=/opt/tip-wlan/certs/truststore.jks}"
|
||||
OVSDB_SERVER_TRUSTSTORE_PASSWORD="${OVSDB_SERVER_TRUSTSTORE_PASSWORD:=mypassword}"
|
||||
OVSDB_CONFIG_FILE="${OVSDB_CONFIG_FILE:=/app/opensync/config_2_ssids.json}"
|
||||
OVSDB_EQUIPMENT_CONFIG_FILE="${OVSDB_EQUIPMENT_CONFIG_FILE:=/app/opensync/EquipmentExample.json}"
|
||||
OVSDB_APPROFILE_CONFIG_FILE="${OVSDB_AP_PROFILE_CONFIG_FILE:=/app/opensync/ProfileAPExample.json}"
|
||||
OVSDB_SSIDPROFILE_CONFIG_FILE="${OVSDB_SSIDPROFILE_CONFIG_FILE:=/app/opensync/ProfileSsid.json}"
|
||||
OVSDB_LOCATION_CONFIG_FILE="${OVSDB_LOCATION_CONFIG_FILE:=/app/opensync/LocationBuildingExample.json}"
|
||||
|
||||
|
||||
echo Reading AP configuration from $OVSDB_CONFIG_FILE
|
||||
|
||||
@@ -104,7 +108,10 @@ OVSDB_PROPS="$OVSDB_PROPS -Dconnectus.ovsdb.trustStore=$OVSDB_SERVER_TRUSTSTORE_
|
||||
OVSDB_PROPS="$OVSDB_PROPS -Dconnectus.ovsdb.trustStorePassword=$OVSDB_SERVER_TRUSTSTORE_PASSWORD"
|
||||
OVSDB_PROPS="$OVSDB_PROPS -Dconnectus.ovsdb.keyStore=$OVSDB_SERVER_KEYSTORE_FILE"
|
||||
OVSDB_PROPS="$OVSDB_PROPS -Dconnectus.ovsdb.keyStorePassword=$OVSDB_SERVER_KEYSTORE_PASSWORD"
|
||||
OVSDB_PROPS="$OVSDB_PROPS -Dconnectus.ovsdb.configFileName=$OVSDB_CONFIG_FILE"
|
||||
OVSDB_PROPS="$OVSDB_PROPS -Dconnectus.ovsdb.customerEquipmentFileName=$OVSDB_EQUIPMENT_CONFIG_FILE"
|
||||
OVSDB_PROPS="$OVSDB_PROPS -Dconnectus.ovsdb.apProfileFileName=$OVSDB_APPROFILE_CONFIG_FILE"
|
||||
OVSDB_PROPS="$OVSDB_PROPS -Dconnectus.ovsdb.ssidProfileFileName=$OVSDB_SSIDPROFILE_CONFIG_FILE"
|
||||
OVSDB_PROPS="$OVSDB_PROPS -Dconnectus.ovsdb.locationFileName=$OVSDB_LOCATION_CONFIG_FILE"
|
||||
|
||||
MQTT_PROPS=" "
|
||||
MQTT_PROPS="$MQTT_PROPS -Dconnectus.mqttBroker.address=$MQTT_BROKER_HOST"
|
||||
|
||||
@@ -9,7 +9,10 @@ RUN mkdir -p /opt/tip-wlan/certs
|
||||
COPY maven/app.jar /app
|
||||
COPY app/opensync/logback.xml /app/opensync/logback.xml
|
||||
COPY app/run.sh /app
|
||||
COPY app/opensync/config_2_ssids.json /app/opensync/config_2_ssids.json
|
||||
COPY app/opensync/EquipmentExample.json /app/opensync/EquipmentExample.json
|
||||
COPY app/opensync/ProfileAPExample.json /app/opensync/ProfileAPExample.json
|
||||
COPY app/opensync/ProfileSsid.json /app/opensync/ProfileSsid.json
|
||||
COPY app/opensync/LocationBuildingExample.json /app/opensync/LocationBuildingExample.json
|
||||
|
||||
RUN chmod +x /app/run.sh
|
||||
|
||||
|
||||
@@ -0,0 +1,290 @@
|
||||
{
|
||||
"model_type" : "Equipment",
|
||||
"id" : 50,
|
||||
"customerId" : 2,
|
||||
"profileId" : 2,
|
||||
"locationId" : 8,
|
||||
"equipmentType" : "AP",
|
||||
"inventoryId" : "ap-50",
|
||||
"name" : "AP 50",
|
||||
"details" : {
|
||||
"model_type" : "ApElementConfiguration",
|
||||
"sampleDetailsStr" : null,
|
||||
"elementConfigVersion" : "AP-V1",
|
||||
"equipmentType" : "AP",
|
||||
"deviceMode" : "standaloneAP",
|
||||
"gettingIP" : "dhcp",
|
||||
"staticIP" : null,
|
||||
"staticIpMaskCidr" : null,
|
||||
"staticIpGw" : null,
|
||||
"gettingDNS" : "dhcp",
|
||||
"staticDnsIp1" : null,
|
||||
"staticDnsIp2" : null,
|
||||
"peerInfoList" : [ ],
|
||||
"deviceName" : "Default Device Name",
|
||||
"locationData" : null,
|
||||
"locallyConfiguredMgmtVlan" : 0,
|
||||
"locallyConfigured" : false,
|
||||
"deploymentType" : "CEILING",
|
||||
"syntheticClientEnabled" : null,
|
||||
"frameReportThrottleEnabled" : true,
|
||||
"antennaType" : "OMNI",
|
||||
"costSavingEventsEnabled" : true,
|
||||
"forwardMode" : "BRIDGE",
|
||||
"radioMap" : {
|
||||
"is2dot4GHz" : {
|
||||
"model_type" : "ElementRadioConfiguration",
|
||||
"radioType" : "is2dot4GHz",
|
||||
"channelNumber" : 6,
|
||||
"manualChannelNumber" : 6,
|
||||
"backupChannelNumber" : 11,
|
||||
"autoChannelSelection" : true,
|
||||
"channelBandwidth" : "is20MHz",
|
||||
"bannedChannels" : [ ],
|
||||
"rxCellSizeDb" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : -90
|
||||
},
|
||||
"probeResponseThresholdDb" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : -90
|
||||
},
|
||||
"clientDisconnectThresholdDb" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : -90
|
||||
},
|
||||
"eirpTxPower" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : 18
|
||||
},
|
||||
"bestApEnabled" : null,
|
||||
"neighbouringListApConfig" : {
|
||||
"model_type" : "NeighbouringAPListConfiguration",
|
||||
"minSignal" : -85,
|
||||
"maxAps" : 25
|
||||
},
|
||||
"minAutoCellSize" : -80,
|
||||
"perimeterDetectionEnabled" : true,
|
||||
"bestAPSteerType" : "both",
|
||||
"deauthAttackDetection" : null,
|
||||
"allowedChannelsPowerLevels" : [ ],
|
||||
"activeChannel" : 6
|
||||
},
|
||||
"is5GHzL" : {
|
||||
"model_type" : "ElementRadioConfiguration",
|
||||
"radioType" : "is5GHzL",
|
||||
"channelNumber" : 36,
|
||||
"manualChannelNumber" : 36,
|
||||
"backupChannelNumber" : 44,
|
||||
"autoChannelSelection" : true,
|
||||
"channelBandwidth" : "is80MHz",
|
||||
"bannedChannels" : [ ],
|
||||
"rxCellSizeDb" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : -90
|
||||
},
|
||||
"probeResponseThresholdDb" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : -90
|
||||
},
|
||||
"clientDisconnectThresholdDb" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : -90
|
||||
},
|
||||
"eirpTxPower" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : 18
|
||||
},
|
||||
"bestApEnabled" : null,
|
||||
"neighbouringListApConfig" : {
|
||||
"model_type" : "NeighbouringAPListConfiguration",
|
||||
"minSignal" : -85,
|
||||
"maxAps" : 25
|
||||
},
|
||||
"minAutoCellSize" : -80,
|
||||
"perimeterDetectionEnabled" : true,
|
||||
"bestAPSteerType" : "both",
|
||||
"deauthAttackDetection" : null,
|
||||
"allowedChannelsPowerLevels" : [ ],
|
||||
"activeChannel" : 36
|
||||
},
|
||||
"is5GHzU" : {
|
||||
"model_type" : "ElementRadioConfiguration",
|
||||
"radioType" : "is5GHzU",
|
||||
"channelNumber" : 108,
|
||||
"manualChannelNumber" : 108,
|
||||
"backupChannelNumber" : 116,
|
||||
"autoChannelSelection" : true,
|
||||
"channelBandwidth" : "is80MHz",
|
||||
"bannedChannels" : [ ],
|
||||
"rxCellSizeDb" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : -90
|
||||
},
|
||||
"probeResponseThresholdDb" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : -90
|
||||
},
|
||||
"clientDisconnectThresholdDb" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : -90
|
||||
},
|
||||
"eirpTxPower" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : 18
|
||||
},
|
||||
"bestApEnabled" : null,
|
||||
"neighbouringListApConfig" : {
|
||||
"model_type" : "NeighbouringAPListConfiguration",
|
||||
"minSignal" : -85,
|
||||
"maxAps" : 25
|
||||
},
|
||||
"minAutoCellSize" : -80,
|
||||
"perimeterDetectionEnabled" : true,
|
||||
"bestAPSteerType" : "both",
|
||||
"deauthAttackDetection" : null,
|
||||
"allowedChannelsPowerLevels" : [ ],
|
||||
"activeChannel" : 108
|
||||
}
|
||||
},
|
||||
"advancedRadioMap" : {
|
||||
"is2dot4GHz" : {
|
||||
"model_type" : "RadioConfiguration",
|
||||
"radioType" : "is2dot4GHz",
|
||||
"radioAdminState" : "enabled",
|
||||
"fragmentationThresholdBytes" : 2346,
|
||||
"rtsCtsThreshold" : 65535,
|
||||
"autoChannelSelection" : "disabled",
|
||||
"radioMode" : "modeN",
|
||||
"mimoMode" : "twoByTwo",
|
||||
"wmmState" : "enabled",
|
||||
"uapsdState" : "enabled",
|
||||
"maxNumClients" : 100,
|
||||
"stationIsolation" : "disabled",
|
||||
"multicastRate" : "auto",
|
||||
"managementRate" : "auto",
|
||||
"activeScanSettings" : {
|
||||
"model_type" : "ActiveScanSettings",
|
||||
"enabled" : true,
|
||||
"scanFrequencySeconds" : 10,
|
||||
"scanDurationMillis" : 65
|
||||
},
|
||||
"channelHopSettings" : {
|
||||
"model_type" : "ChannelHopSettings",
|
||||
"noiseFloorThresholdInDB" : -75,
|
||||
"noiseFloorThresholdTimeInSeconds" : 180,
|
||||
"nonWifiThresholdInPercentage" : 50,
|
||||
"nonWifiThresholdTimeInSeconds" : 180,
|
||||
"obssHopMode" : "NON_WIFI"
|
||||
},
|
||||
"bestApSettings" : {
|
||||
"model_type" : "RadioBestApSettings",
|
||||
"mlComputed" : true,
|
||||
"dropInSnrPercentage" : 20,
|
||||
"minLoadFactor" : 50
|
||||
},
|
||||
"forceScanDuringVoice" : "disabled",
|
||||
"legacyBSSRate" : "enabled",
|
||||
"beaconInterval" : 100,
|
||||
"deauthAttackDetection" : null
|
||||
},
|
||||
"is5GHzU" : {
|
||||
"model_type" : "RadioConfiguration",
|
||||
"radioType" : "is5GHzU",
|
||||
"radioAdminState" : "enabled",
|
||||
"fragmentationThresholdBytes" : 2346,
|
||||
"rtsCtsThreshold" : 65535,
|
||||
"autoChannelSelection" : "disabled",
|
||||
"radioMode" : "modeAC",
|
||||
"mimoMode" : "twoByTwo",
|
||||
"wmmState" : "enabled",
|
||||
"uapsdState" : "enabled",
|
||||
"maxNumClients" : 100,
|
||||
"stationIsolation" : "disabled",
|
||||
"multicastRate" : "auto",
|
||||
"managementRate" : "auto",
|
||||
"activeScanSettings" : {
|
||||
"model_type" : "ActiveScanSettings",
|
||||
"enabled" : true,
|
||||
"scanFrequencySeconds" : 10,
|
||||
"scanDurationMillis" : 65
|
||||
},
|
||||
"channelHopSettings" : {
|
||||
"model_type" : "ChannelHopSettings",
|
||||
"noiseFloorThresholdInDB" : -75,
|
||||
"noiseFloorThresholdTimeInSeconds" : 180,
|
||||
"nonWifiThresholdInPercentage" : 50,
|
||||
"nonWifiThresholdTimeInSeconds" : 180,
|
||||
"obssHopMode" : "NON_WIFI"
|
||||
},
|
||||
"bestApSettings" : {
|
||||
"model_type" : "RadioBestApSettings",
|
||||
"mlComputed" : true,
|
||||
"dropInSnrPercentage" : 30,
|
||||
"minLoadFactor" : 40
|
||||
},
|
||||
"forceScanDuringVoice" : "disabled",
|
||||
"legacyBSSRate" : "enabled",
|
||||
"beaconInterval" : 100,
|
||||
"deauthAttackDetection" : null
|
||||
},
|
||||
"is5GHzL" : {
|
||||
"model_type" : "RadioConfiguration",
|
||||
"radioType" : "is5GHzL",
|
||||
"radioAdminState" : "enabled",
|
||||
"fragmentationThresholdBytes" : 2346,
|
||||
"rtsCtsThreshold" : 65535,
|
||||
"autoChannelSelection" : "disabled",
|
||||
"radioMode" : "modeAC",
|
||||
"mimoMode" : "twoByTwo",
|
||||
"wmmState" : "enabled",
|
||||
"uapsdState" : "enabled",
|
||||
"maxNumClients" : 100,
|
||||
"stationIsolation" : "disabled",
|
||||
"multicastRate" : "auto",
|
||||
"managementRate" : "auto",
|
||||
"activeScanSettings" : {
|
||||
"model_type" : "ActiveScanSettings",
|
||||
"enabled" : true,
|
||||
"scanFrequencySeconds" : 10,
|
||||
"scanDurationMillis" : 65
|
||||
},
|
||||
"channelHopSettings" : {
|
||||
"model_type" : "ChannelHopSettings",
|
||||
"noiseFloorThresholdInDB" : -75,
|
||||
"noiseFloorThresholdTimeInSeconds" : 180,
|
||||
"nonWifiThresholdInPercentage" : 50,
|
||||
"nonWifiThresholdTimeInSeconds" : 180,
|
||||
"obssHopMode" : "NON_WIFI"
|
||||
},
|
||||
"bestApSettings" : {
|
||||
"model_type" : "RadioBestApSettings",
|
||||
"mlComputed" : true,
|
||||
"dropInSnrPercentage" : 30,
|
||||
"minLoadFactor" : 40
|
||||
},
|
||||
"forceScanDuringVoice" : "disabled",
|
||||
"legacyBSSRate" : "enabled",
|
||||
"beaconInterval" : 100,
|
||||
"deauthAttackDetection" : null
|
||||
}
|
||||
}
|
||||
},
|
||||
"latitude" : null,
|
||||
"longitude" : null,
|
||||
"serial" : "serial-ap-50",
|
||||
"createdTimestamp" : 1589915837067,
|
||||
"lastModifiedTimestamp" : 1589915837067
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"model_type" : "Location",
|
||||
"id" : 7,
|
||||
"parentId" : 2,
|
||||
"locationType" : "BUILDING",
|
||||
"customerId" : 2,
|
||||
"name" : "Building 2",
|
||||
"details" : {
|
||||
"model_type" : "LocationDetails",
|
||||
"countryCode" : "usa",
|
||||
"maintenanceWindow" : null,
|
||||
"rrmEnabled" : true,
|
||||
"dailyRebalancingDetails" : {
|
||||
"SUNDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"MONDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"TUESDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"WEDNESDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"THURSDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"FRIDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"SATURDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"createdTimestamp" : 1589567347442,
|
||||
"lastModifiedTimestamp" : 1589567347442
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"model_type" : "Location",
|
||||
"id" : 2,
|
||||
"parentId" : 0,
|
||||
"locationType" : "SITE",
|
||||
"customerId" : 2,
|
||||
"name" : "Menlo Park",
|
||||
"details" : {
|
||||
"model_type" : "LocationDetails",
|
||||
"countryCode" : "usa",
|
||||
"maintenanceWindow" : null,
|
||||
"rrmEnabled" : true,
|
||||
"dailyRebalancingDetails" : {
|
||||
"SUNDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"MONDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"TUESDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"WEDNESDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"THURSDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"FRIDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"SATURDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"createdTimestamp" : 1589567474314,
|
||||
"lastModifiedTimestamp" : 1589567474314
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"model_type" : "Profile",
|
||||
"id" : 2,
|
||||
"customerId" : 2,
|
||||
"profileType" : "equipment_ap",
|
||||
"name" : "ApProfile",
|
||||
"details" : {
|
||||
"model_type" : "ApNetworkConfiguration",
|
||||
"sampleDetailsStr" : null,
|
||||
"networkConfigVersion" : "AP-1",
|
||||
"equipmentType" : "AP",
|
||||
"vlanNative" : true,
|
||||
"vlan" : 0,
|
||||
"ntpServer" : {
|
||||
"model_type" : "AutoOrManualString",
|
||||
"auto" : true,
|
||||
"value" : "pool.ntp.org"
|
||||
},
|
||||
"syslogRelay" : null,
|
||||
"rtlsSettings" : null,
|
||||
"syntheticClientEnabled" : true,
|
||||
"ledControlEnabled" : true,
|
||||
"equipmentDiscovery" : false,
|
||||
"radioMap" : {
|
||||
"is5GHz" : {
|
||||
"model_type" : "RadioProfileConfiguration",
|
||||
"bestApEnabled" : true,
|
||||
"bestAPSteerType" : "both"
|
||||
},
|
||||
"is2dot4GHz" : {
|
||||
"model_type" : "RadioProfileConfiguration",
|
||||
"bestApEnabled" : true,
|
||||
"bestAPSteerType" : "both"
|
||||
},
|
||||
"is5GHzU" : {
|
||||
"model_type" : "RadioProfileConfiguration",
|
||||
"bestApEnabled" : true,
|
||||
"bestAPSteerType" : "both"
|
||||
},
|
||||
"is5GHzL" : {
|
||||
"model_type" : "RadioProfileConfiguration",
|
||||
"bestApEnabled" : true,
|
||||
"bestAPSteerType" : "both"
|
||||
}
|
||||
}
|
||||
},
|
||||
"createdTimestamp" : 1589567037365,
|
||||
"lastModifiedTimestamp" : 1589567037365,
|
||||
"childProfileIds" : [ 1 ]
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"model_type" : "Profile",
|
||||
"id" : 1,
|
||||
"customerId" : 2,
|
||||
"profileType" : "ssid",
|
||||
"name" : "Connectus-local",
|
||||
"details" : {
|
||||
"model_type" : "SsidConfiguration",
|
||||
"sampleDetailsStr" : null,
|
||||
"ssid" : "Connectus-local",
|
||||
"appliedRadios" : [ "is5GHzL", "is5GHzU", "is2dot4GHz" ],
|
||||
"ssidAdminState" : "enabled",
|
||||
"secureMode" : "wpa2PSK",
|
||||
"vlanId" : 1,
|
||||
"keyStr" : "12345678",
|
||||
"broadcastSsid" : "enabled",
|
||||
"keyRefresh" : 0,
|
||||
"noLocalSubnets" : false,
|
||||
"radiusServiceName" : null,
|
||||
"captivePortalId" : null,
|
||||
"bandwidthLimitDown" : 0,
|
||||
"bandwidthLimitUp" : 0,
|
||||
"videoTrafficOnly" : false,
|
||||
"radioBasedConfigs" : {
|
||||
"is5GHz" : {
|
||||
"model_type" : "RadioBasedSsidConfiguration",
|
||||
"enable80211r" : null,
|
||||
"enable80211k" : null,
|
||||
"enable80211v" : null
|
||||
},
|
||||
"is2dot4GHz" : {
|
||||
"model_type" : "RadioBasedSsidConfiguration",
|
||||
"enable80211r" : null,
|
||||
"enable80211k" : null,
|
||||
"enable80211v" : null
|
||||
},
|
||||
"is5GHzU" : {
|
||||
"model_type" : "RadioBasedSsidConfiguration",
|
||||
"enable80211r" : null,
|
||||
"enable80211k" : null,
|
||||
"enable80211v" : null
|
||||
},
|
||||
"is5GHzL" : {
|
||||
"model_type" : "RadioBasedSsidConfiguration",
|
||||
"enable80211r" : null,
|
||||
"enable80211k" : null,
|
||||
"enable80211v" : null
|
||||
}
|
||||
},
|
||||
"bonjourGatewayProfileId" : null,
|
||||
"enable80211w" : null,
|
||||
"wepConfig" : null,
|
||||
"forwardMode" : null
|
||||
},
|
||||
"createdTimestamp" : 1589567130432,
|
||||
"lastModifiedTimestamp" : 1589567130432,
|
||||
"childProfileIds" : [ ]
|
||||
}
|
||||
@@ -19,7 +19,10 @@ OVSDB_PROPS+=" -Dconnectus.ovsdb.redirector.listenPort=6643"
|
||||
OVSDB_PROPS+=" -Dconnectus.ovsdb.timeoutSec=30"
|
||||
OVSDB_PROPS+=" -Dconnectus.ovsdb.trustStore=/opt/tip-wlan/certs/truststore.jks"
|
||||
OVSDB_PROPS+=" -Dconnectus.ovsdb.keyStore=/opt/tip-wlan/certs/server.pkcs12"
|
||||
OVSDB_PROPS+=" -Dconnectus.ovsdb.configFileName=/app/opensync/config_2_ssids.json"
|
||||
OVSDB_PROPS+=" -Dconnectus.ovsdb.customerEquipmentFileName=$OVSDB_EQUIPMENT_CONFIG_FILE"
|
||||
OVSDB_PROPS+=" -Dconnectus.ovsdb.apProfileFileName=$OVSDB_APPROFILE_CONFIG_FILE"
|
||||
OVSDB_PROPS+=" -Dconnectus.ovsdb.ssidProfileFileName=$OVSDB_SSIDPROFILE_CONFIG_FILE"
|
||||
OVSDB_PROPS+=" -Dconnectus.ovsdb.locationFileName=$OVSDB_LOCATION_CONFIG_FILE"
|
||||
|
||||
MQTT_PROPS=" "
|
||||
MQTT_PROPS+=" -Dconnectus.mqttBroker.address=tip-wlan-opensync-mqtt-broker"
|
||||
|
||||
@@ -0,0 +1,290 @@
|
||||
{
|
||||
"model_type" : "Equipment",
|
||||
"id" : 50,
|
||||
"customerId" : 2,
|
||||
"profileId" : 2,
|
||||
"locationId" : 8,
|
||||
"equipmentType" : "AP",
|
||||
"inventoryId" : "ap-50",
|
||||
"name" : "AP 50",
|
||||
"details" : {
|
||||
"model_type" : "ApElementConfiguration",
|
||||
"sampleDetailsStr" : null,
|
||||
"elementConfigVersion" : "AP-V1",
|
||||
"equipmentType" : "AP",
|
||||
"deviceMode" : "standaloneAP",
|
||||
"gettingIP" : "dhcp",
|
||||
"staticIP" : null,
|
||||
"staticIpMaskCidr" : null,
|
||||
"staticIpGw" : null,
|
||||
"gettingDNS" : "dhcp",
|
||||
"staticDnsIp1" : null,
|
||||
"staticDnsIp2" : null,
|
||||
"peerInfoList" : [ ],
|
||||
"deviceName" : "Default Device Name",
|
||||
"locationData" : null,
|
||||
"locallyConfiguredMgmtVlan" : 0,
|
||||
"locallyConfigured" : false,
|
||||
"deploymentType" : "CEILING",
|
||||
"syntheticClientEnabled" : null,
|
||||
"frameReportThrottleEnabled" : true,
|
||||
"antennaType" : "OMNI",
|
||||
"costSavingEventsEnabled" : true,
|
||||
"forwardMode" : "BRIDGE",
|
||||
"radioMap" : {
|
||||
"is2dot4GHz" : {
|
||||
"model_type" : "ElementRadioConfiguration",
|
||||
"radioType" : "is2dot4GHz",
|
||||
"channelNumber" : 6,
|
||||
"manualChannelNumber" : 6,
|
||||
"backupChannelNumber" : 11,
|
||||
"autoChannelSelection" : true,
|
||||
"channelBandwidth" : "is20MHz",
|
||||
"bannedChannels" : [ ],
|
||||
"rxCellSizeDb" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : -90
|
||||
},
|
||||
"probeResponseThresholdDb" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : -90
|
||||
},
|
||||
"clientDisconnectThresholdDb" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : -90
|
||||
},
|
||||
"eirpTxPower" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : 18
|
||||
},
|
||||
"bestApEnabled" : null,
|
||||
"neighbouringListApConfig" : {
|
||||
"model_type" : "NeighbouringAPListConfiguration",
|
||||
"minSignal" : -85,
|
||||
"maxAps" : 25
|
||||
},
|
||||
"minAutoCellSize" : -80,
|
||||
"perimeterDetectionEnabled" : true,
|
||||
"bestAPSteerType" : "both",
|
||||
"deauthAttackDetection" : null,
|
||||
"allowedChannelsPowerLevels" : [ ],
|
||||
"activeChannel" : 6
|
||||
},
|
||||
"is5GHzL" : {
|
||||
"model_type" : "ElementRadioConfiguration",
|
||||
"radioType" : "is5GHzL",
|
||||
"channelNumber" : 36,
|
||||
"manualChannelNumber" : 36,
|
||||
"backupChannelNumber" : 44,
|
||||
"autoChannelSelection" : true,
|
||||
"channelBandwidth" : "is80MHz",
|
||||
"bannedChannels" : [ ],
|
||||
"rxCellSizeDb" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : -90
|
||||
},
|
||||
"probeResponseThresholdDb" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : -90
|
||||
},
|
||||
"clientDisconnectThresholdDb" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : -90
|
||||
},
|
||||
"eirpTxPower" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : 18
|
||||
},
|
||||
"bestApEnabled" : null,
|
||||
"neighbouringListApConfig" : {
|
||||
"model_type" : "NeighbouringAPListConfiguration",
|
||||
"minSignal" : -85,
|
||||
"maxAps" : 25
|
||||
},
|
||||
"minAutoCellSize" : -80,
|
||||
"perimeterDetectionEnabled" : true,
|
||||
"bestAPSteerType" : "both",
|
||||
"deauthAttackDetection" : null,
|
||||
"allowedChannelsPowerLevels" : [ ],
|
||||
"activeChannel" : 36
|
||||
},
|
||||
"is5GHzU" : {
|
||||
"model_type" : "ElementRadioConfiguration",
|
||||
"radioType" : "is5GHzU",
|
||||
"channelNumber" : 108,
|
||||
"manualChannelNumber" : 108,
|
||||
"backupChannelNumber" : 116,
|
||||
"autoChannelSelection" : true,
|
||||
"channelBandwidth" : "is80MHz",
|
||||
"bannedChannels" : [ ],
|
||||
"rxCellSizeDb" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : -90
|
||||
},
|
||||
"probeResponseThresholdDb" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : -90
|
||||
},
|
||||
"clientDisconnectThresholdDb" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : -90
|
||||
},
|
||||
"eirpTxPower" : {
|
||||
"model_type" : "AutoOrManualValue",
|
||||
"auto" : true,
|
||||
"value" : 18
|
||||
},
|
||||
"bestApEnabled" : null,
|
||||
"neighbouringListApConfig" : {
|
||||
"model_type" : "NeighbouringAPListConfiguration",
|
||||
"minSignal" : -85,
|
||||
"maxAps" : 25
|
||||
},
|
||||
"minAutoCellSize" : -80,
|
||||
"perimeterDetectionEnabled" : true,
|
||||
"bestAPSteerType" : "both",
|
||||
"deauthAttackDetection" : null,
|
||||
"allowedChannelsPowerLevels" : [ ],
|
||||
"activeChannel" : 108
|
||||
}
|
||||
},
|
||||
"advancedRadioMap" : {
|
||||
"is2dot4GHz" : {
|
||||
"model_type" : "RadioConfiguration",
|
||||
"radioType" : "is2dot4GHz",
|
||||
"radioAdminState" : "enabled",
|
||||
"fragmentationThresholdBytes" : 2346,
|
||||
"rtsCtsThreshold" : 65535,
|
||||
"autoChannelSelection" : "disabled",
|
||||
"radioMode" : "modeN",
|
||||
"mimoMode" : "twoByTwo",
|
||||
"wmmState" : "enabled",
|
||||
"uapsdState" : "enabled",
|
||||
"maxNumClients" : 100,
|
||||
"stationIsolation" : "disabled",
|
||||
"multicastRate" : "auto",
|
||||
"managementRate" : "auto",
|
||||
"activeScanSettings" : {
|
||||
"model_type" : "ActiveScanSettings",
|
||||
"enabled" : true,
|
||||
"scanFrequencySeconds" : 10,
|
||||
"scanDurationMillis" : 65
|
||||
},
|
||||
"channelHopSettings" : {
|
||||
"model_type" : "ChannelHopSettings",
|
||||
"noiseFloorThresholdInDB" : -75,
|
||||
"noiseFloorThresholdTimeInSeconds" : 180,
|
||||
"nonWifiThresholdInPercentage" : 50,
|
||||
"nonWifiThresholdTimeInSeconds" : 180,
|
||||
"obssHopMode" : "NON_WIFI"
|
||||
},
|
||||
"bestApSettings" : {
|
||||
"model_type" : "RadioBestApSettings",
|
||||
"mlComputed" : true,
|
||||
"dropInSnrPercentage" : 20,
|
||||
"minLoadFactor" : 50
|
||||
},
|
||||
"forceScanDuringVoice" : "disabled",
|
||||
"legacyBSSRate" : "enabled",
|
||||
"beaconInterval" : 100,
|
||||
"deauthAttackDetection" : null
|
||||
},
|
||||
"is5GHzU" : {
|
||||
"model_type" : "RadioConfiguration",
|
||||
"radioType" : "is5GHzU",
|
||||
"radioAdminState" : "enabled",
|
||||
"fragmentationThresholdBytes" : 2346,
|
||||
"rtsCtsThreshold" : 65535,
|
||||
"autoChannelSelection" : "disabled",
|
||||
"radioMode" : "modeAC",
|
||||
"mimoMode" : "twoByTwo",
|
||||
"wmmState" : "enabled",
|
||||
"uapsdState" : "enabled",
|
||||
"maxNumClients" : 100,
|
||||
"stationIsolation" : "disabled",
|
||||
"multicastRate" : "auto",
|
||||
"managementRate" : "auto",
|
||||
"activeScanSettings" : {
|
||||
"model_type" : "ActiveScanSettings",
|
||||
"enabled" : true,
|
||||
"scanFrequencySeconds" : 10,
|
||||
"scanDurationMillis" : 65
|
||||
},
|
||||
"channelHopSettings" : {
|
||||
"model_type" : "ChannelHopSettings",
|
||||
"noiseFloorThresholdInDB" : -75,
|
||||
"noiseFloorThresholdTimeInSeconds" : 180,
|
||||
"nonWifiThresholdInPercentage" : 50,
|
||||
"nonWifiThresholdTimeInSeconds" : 180,
|
||||
"obssHopMode" : "NON_WIFI"
|
||||
},
|
||||
"bestApSettings" : {
|
||||
"model_type" : "RadioBestApSettings",
|
||||
"mlComputed" : true,
|
||||
"dropInSnrPercentage" : 30,
|
||||
"minLoadFactor" : 40
|
||||
},
|
||||
"forceScanDuringVoice" : "disabled",
|
||||
"legacyBSSRate" : "enabled",
|
||||
"beaconInterval" : 100,
|
||||
"deauthAttackDetection" : null
|
||||
},
|
||||
"is5GHzL" : {
|
||||
"model_type" : "RadioConfiguration",
|
||||
"radioType" : "is5GHzL",
|
||||
"radioAdminState" : "enabled",
|
||||
"fragmentationThresholdBytes" : 2346,
|
||||
"rtsCtsThreshold" : 65535,
|
||||
"autoChannelSelection" : "disabled",
|
||||
"radioMode" : "modeAC",
|
||||
"mimoMode" : "twoByTwo",
|
||||
"wmmState" : "enabled",
|
||||
"uapsdState" : "enabled",
|
||||
"maxNumClients" : 100,
|
||||
"stationIsolation" : "disabled",
|
||||
"multicastRate" : "auto",
|
||||
"managementRate" : "auto",
|
||||
"activeScanSettings" : {
|
||||
"model_type" : "ActiveScanSettings",
|
||||
"enabled" : true,
|
||||
"scanFrequencySeconds" : 10,
|
||||
"scanDurationMillis" : 65
|
||||
},
|
||||
"channelHopSettings" : {
|
||||
"model_type" : "ChannelHopSettings",
|
||||
"noiseFloorThresholdInDB" : -75,
|
||||
"noiseFloorThresholdTimeInSeconds" : 180,
|
||||
"nonWifiThresholdInPercentage" : 50,
|
||||
"nonWifiThresholdTimeInSeconds" : 180,
|
||||
"obssHopMode" : "NON_WIFI"
|
||||
},
|
||||
"bestApSettings" : {
|
||||
"model_type" : "RadioBestApSettings",
|
||||
"mlComputed" : true,
|
||||
"dropInSnrPercentage" : 30,
|
||||
"minLoadFactor" : 40
|
||||
},
|
||||
"forceScanDuringVoice" : "disabled",
|
||||
"legacyBSSRate" : "enabled",
|
||||
"beaconInterval" : 100,
|
||||
"deauthAttackDetection" : null
|
||||
}
|
||||
}
|
||||
},
|
||||
"latitude" : null,
|
||||
"longitude" : null,
|
||||
"serial" : "serial-ap-50",
|
||||
"createdTimestamp" : 1589915837067,
|
||||
"lastModifiedTimestamp" : 1589915837067
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"model_type" : "Location",
|
||||
"id" : 7,
|
||||
"parentId" : 2,
|
||||
"locationType" : "BUILDING",
|
||||
"customerId" : 2,
|
||||
"name" : "Building 2",
|
||||
"details" : {
|
||||
"model_type" : "LocationDetails",
|
||||
"countryCode" : "usa",
|
||||
"maintenanceWindow" : null,
|
||||
"rrmEnabled" : true,
|
||||
"dailyRebalancingDetails" : {
|
||||
"SUNDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"MONDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"TUESDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"WEDNESDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"THURSDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"FRIDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"SATURDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"createdTimestamp" : 1589567347442,
|
||||
"lastModifiedTimestamp" : 1589567347442
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"model_type" : "Location",
|
||||
"id" : 2,
|
||||
"parentId" : 0,
|
||||
"locationType" : "SITE",
|
||||
"customerId" : 2,
|
||||
"name" : "Menlo Park",
|
||||
"details" : {
|
||||
"model_type" : "LocationDetails",
|
||||
"countryCode" : "usa",
|
||||
"maintenanceWindow" : null,
|
||||
"rrmEnabled" : true,
|
||||
"dailyRebalancingDetails" : {
|
||||
"SUNDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"MONDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"TUESDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"WEDNESDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"THURSDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"FRIDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
},
|
||||
"SATURDAY" : {
|
||||
"model_type" : "LocationActivityDetails",
|
||||
"busyTime" : "13:30",
|
||||
"quietTime" : "3:30",
|
||||
"timezone" : "US/Eastern",
|
||||
"lastBusySnapshot" : 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"createdTimestamp" : 1589567474314,
|
||||
"lastModifiedTimestamp" : 1589567474314
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"model_type" : "Profile",
|
||||
"id" : 2,
|
||||
"customerId" : 2,
|
||||
"profileType" : "equipment_ap",
|
||||
"name" : "ApProfile",
|
||||
"details" : {
|
||||
"model_type" : "ApNetworkConfiguration",
|
||||
"sampleDetailsStr" : null,
|
||||
"networkConfigVersion" : "AP-1",
|
||||
"equipmentType" : "AP",
|
||||
"vlanNative" : true,
|
||||
"vlan" : 0,
|
||||
"ntpServer" : {
|
||||
"model_type" : "AutoOrManualString",
|
||||
"auto" : true,
|
||||
"value" : "pool.ntp.org"
|
||||
},
|
||||
"syslogRelay" : null,
|
||||
"rtlsSettings" : null,
|
||||
"syntheticClientEnabled" : true,
|
||||
"ledControlEnabled" : true,
|
||||
"equipmentDiscovery" : false,
|
||||
"radioMap" : {
|
||||
"is5GHz" : {
|
||||
"model_type" : "RadioProfileConfiguration",
|
||||
"bestApEnabled" : true,
|
||||
"bestAPSteerType" : "both"
|
||||
},
|
||||
"is2dot4GHz" : {
|
||||
"model_type" : "RadioProfileConfiguration",
|
||||
"bestApEnabled" : true,
|
||||
"bestAPSteerType" : "both"
|
||||
},
|
||||
"is5GHzU" : {
|
||||
"model_type" : "RadioProfileConfiguration",
|
||||
"bestApEnabled" : true,
|
||||
"bestAPSteerType" : "both"
|
||||
},
|
||||
"is5GHzL" : {
|
||||
"model_type" : "RadioProfileConfiguration",
|
||||
"bestApEnabled" : true,
|
||||
"bestAPSteerType" : "both"
|
||||
}
|
||||
}
|
||||
},
|
||||
"createdTimestamp" : 1589567037365,
|
||||
"lastModifiedTimestamp" : 1589567037365,
|
||||
"childProfileIds" : [ 1 ]
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"model_type" : "Profile",
|
||||
"id" : 1,
|
||||
"customerId" : 2,
|
||||
"profileType" : "ssid",
|
||||
"name" : "Connectus-local",
|
||||
"details" : {
|
||||
"model_type" : "SsidConfiguration",
|
||||
"sampleDetailsStr" : null,
|
||||
"ssid" : "Connectus-local",
|
||||
"appliedRadios" : [ "is5GHzL", "is5GHzU", "is2dot4GHz" ],
|
||||
"ssidAdminState" : "enabled",
|
||||
"secureMode" : "wpa2PSK",
|
||||
"vlanId" : 1,
|
||||
"keyStr" : "12345678",
|
||||
"broadcastSsid" : "enabled",
|
||||
"keyRefresh" : 0,
|
||||
"noLocalSubnets" : false,
|
||||
"radiusServiceName" : null,
|
||||
"captivePortalId" : null,
|
||||
"bandwidthLimitDown" : 0,
|
||||
"bandwidthLimitUp" : 0,
|
||||
"videoTrafficOnly" : false,
|
||||
"radioBasedConfigs" : {
|
||||
"is5GHz" : {
|
||||
"model_type" : "RadioBasedSsidConfiguration",
|
||||
"enable80211r" : null,
|
||||
"enable80211k" : null,
|
||||
"enable80211v" : null
|
||||
},
|
||||
"is2dot4GHz" : {
|
||||
"model_type" : "RadioBasedSsidConfiguration",
|
||||
"enable80211r" : null,
|
||||
"enable80211k" : null,
|
||||
"enable80211v" : null
|
||||
},
|
||||
"is5GHzU" : {
|
||||
"model_type" : "RadioBasedSsidConfiguration",
|
||||
"enable80211r" : null,
|
||||
"enable80211k" : null,
|
||||
"enable80211v" : null
|
||||
},
|
||||
"is5GHzL" : {
|
||||
"model_type" : "RadioBasedSsidConfiguration",
|
||||
"enable80211r" : null,
|
||||
"enable80211k" : null,
|
||||
"enable80211v" : null
|
||||
}
|
||||
},
|
||||
"bonjourGatewayProfileId" : null,
|
||||
"enable80211w" : null,
|
||||
"wepConfig" : null,
|
||||
"forwardMode" : null
|
||||
},
|
||||
"createdTimestamp" : 1589567130432,
|
||||
"lastModifiedTimestamp" : 1589567130432,
|
||||
"childProfileIds" : [ ]
|
||||
}
|
||||
@@ -13,5 +13,5 @@
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.telecominfraproject.wlan.opensync.experiment.OpenSyncProcess"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="opensync-gateway-static-process"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="--add-opens java.base/java.lang=ALL-UNNAMED -Dssl.props=file://${project_loc:opensync-gateway-static-process}/src/main/resources/app/certs/ssl.properties -Dtip.wlan.httpClientConfig=file://${project_loc:opensync-gateway-static-process}/src/main/resources/app/certs/httpClientConfig.json -Djavax.net.ssl.keyStore=${connectus_certs}/client_keystore.jks -Djavax.net.ssl.keyStorePassword=mypassword -Djavax.net.ssl.trustStore=${connectus_certs}/truststore.jks -Djavax.net.ssl.trustStorePassword=mypassword -Dconnectus.ovsdb.managerAddr=${local_server_address} -Dconnectus.ovsdb.listenPort=6640 -Dconnectus.ovsdb.redirector.listenPort=6643 -Dconnectus.ovsdb.timeoutSec=30 -Dconnectus.ovsdb.trustStore=${connectus_certs}/truststore.jks -Dconnectus.ovsdb.keyStore=${connectus_certs}/server.pkcs12 -Dconnectus.ovsdb.configFileName=${project_loc:opensync-ext-static}/src/main/resources/config_2_ssids.json -Dconnectus.mqttBroker.address=${local_server_address} -Dconnectus.mqttBroker.listenPort=1883 -Dspring.profiles.include=use_ssl,use_webtoken_auth,use_single_ds,RestTemplateConfiguration_X509_client_cert_auth,opensync_static_config,mqtt_receiver,ovsdb_redirector,ovsdb_manager"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="--add-opens java.base/java.lang=ALL-UNNAMED -Dssl.props=file://${project_loc:opensync-gateway-static-process}/src/main/resources/app/certs/ssl.properties -Dtip.wlan.httpClientConfig=file://${project_loc:opensync-gateway-static-process}/src/main/resources/app/certs/httpClientConfig.json -Djavax.net.ssl.keyStore=${connectus_certs}/client_keystore.jks -Djavax.net.ssl.keyStorePassword=mypassword -Djavax.net.ssl.trustStore=${connectus_certs}/truststore.jks -Djavax.net.ssl.trustStorePassword=mypassword -Dconnectus.ovsdb.managerAddr=${local_server_address} -Dconnectus.ovsdb.listenPort=6640 -Dconnectus.ovsdb.redirector.listenPort=6643 -Dconnectus.ovsdb.timeoutSec=30 -Dconnectus.ovsdb.trustStore=${connectus_certs}/truststore.jks -Dconnectus.ovsdb.keyStore=${connectus_certs}/server.pkcs12 -Dconnectus.ovsdb.customerEquipmentFileName=${project_loc:opensync-ext-static}/src/main/resources/EquipmentExample.json -Dconnectus.ovsdb.apProfileFileName=${project_loc:opensync-ext-static}/src/main/resources/ProfileAPExample.json -Dconnectus.ovsdb.ssidProfileFileName=${project_loc:opensync-ext-static}/src/main/resources/ProfileSsid.json -Dconnectus.ovsdb.locationFileName=${project_loc:opensync-ext-static}/src/main/resources/LocationBuildingExample.json -Dconnectus.mqttBroker.address=${local_server_address} -Dconnectus.mqttBroker.listenPort=1883 -Dspring.profiles.include=use_ssl,use_webtoken_auth,use_single_ds,RestTemplateConfiguration_X509_client_cert_auth,opensync_static_config,mqtt_receiver,ovsdb_redirector,ovsdb_manager"/>
|
||||
</launchConfiguration>
|
||||
|
||||
@@ -45,352 +45,353 @@ import io.netty.handler.ssl.SslContext;
|
||||
@Component
|
||||
public class ConnectusOvsdbClient implements ConnectusOvsdbClientInterface {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ConnectusOvsdbClient.class);
|
||||
|
||||
@org.springframework.beans.factory.annotation.Value("${connectus.ovsdb.listenPort:6640}")
|
||||
private int ovsdbListenPort;
|
||||
|
||||
@org.springframework.beans.factory.annotation.Value("${connectus.manager.collectionIntervalSec.deviceStats:10}")
|
||||
private long collectionIntervalSecDeviceStats;
|
||||
|
||||
@Autowired
|
||||
private SslContext sslContext;
|
||||
|
||||
@Autowired
|
||||
private OvsdbPassiveConnectionListener listener;
|
||||
|
||||
@Autowired
|
||||
private OvsdbDao ovsdbDao;
|
||||
|
||||
@Autowired
|
||||
private OpensyncExternalIntegrationInterface extIntegrationInterface;
|
||||
|
||||
@Autowired
|
||||
private OvsdbSessionMapInterface ovsdbSessionMapInterface;
|
||||
|
||||
@PostConstruct
|
||||
private void postCreate() {
|
||||
listenForConnections();
|
||||
}
|
||||
|
||||
public void listenForConnections() {
|
||||
|
||||
ConnectionCallback connectionCallback = new ConnectionCallback() {
|
||||
public void connected(OvsdbClient ovsdbClient) {
|
||||
String remoteHost = ovsdbClient.getConnectionInfo().getRemoteAddress().getHostAddress();
|
||||
int localPort = ovsdbClient.getConnectionInfo().getLocalPort();
|
||||
String subjectDn = null;
|
||||
try {
|
||||
subjectDn = ((X509Certificate) ovsdbClient.getConnectionInfo().getRemoteCertificate())
|
||||
.getSubjectDN().getName();
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ConnectusOvsdbClient.class);
|
||||
|
||||
@org.springframework.beans.factory.annotation.Value("${connectus.ovsdb.listenPort:6640}")
|
||||
private int ovsdbListenPort;
|
||||
|
||||
@org.springframework.beans.factory.annotation.Value("${connectus.manager.collectionIntervalSec.deviceStats:10}")
|
||||
private long collectionIntervalSecDeviceStats;
|
||||
|
||||
@Autowired
|
||||
private SslContext sslContext;
|
||||
|
||||
@Autowired
|
||||
private OvsdbPassiveConnectionListener listener;
|
||||
|
||||
@Autowired
|
||||
private OvsdbDao ovsdbDao;
|
||||
|
||||
@Autowired
|
||||
private OpensyncExternalIntegrationInterface extIntegrationInterface;
|
||||
|
||||
@Autowired
|
||||
private OvsdbSessionMapInterface ovsdbSessionMapInterface;
|
||||
|
||||
@PostConstruct
|
||||
private void postCreate() {
|
||||
listenForConnections();
|
||||
}
|
||||
|
||||
public void listenForConnections() {
|
||||
|
||||
ConnectionCallback connectionCallback = new ConnectionCallback() {
|
||||
public void connected(OvsdbClient ovsdbClient) {
|
||||
String remoteHost = ovsdbClient.getConnectionInfo().getRemoteAddress().getHostAddress();
|
||||
int localPort = ovsdbClient.getConnectionInfo().getLocalPort();
|
||||
String subjectDn = null;
|
||||
try {
|
||||
subjectDn = ((X509Certificate) ovsdbClient.getConnectionInfo().getRemoteCertificate())
|
||||
.getSubjectDN().getName();
|
||||
|
||||
String clientCn = SslUtil.extractCN(subjectDn);
|
||||
LOG.info("ovsdbClient connecting from {} on port {} clientCn {}", remoteHost, localPort, clientCn);
|
||||
String clientCn = SslUtil.extractCN(subjectDn);
|
||||
LOG.info("ovsdbClient connecting from {} on port {} clientCn {}", remoteHost, localPort, clientCn);
|
||||
|
||||
ConnectNodeInfo connectNodeInfo = ovsdbDao.getConnectNodeInfo(ovsdbClient);
|
||||
|
||||
// successfully connected - register it in our
|
||||
// connectedClients table
|
||||
// In Plume's environment clientCn is not unique that's why
|
||||
// we are augmenting it
|
||||
// with the serialNumber and using it as a key (equivalent
|
||||
// of KDC unique qrCode)
|
||||
String key = clientCn + "_" + connectNodeInfo.serialNumber;
|
||||
ConnectusOvsdbClient.this.ovsdbSessionMapInterface.newSession(key, ovsdbClient);
|
||||
extIntegrationInterface.apConnected(key, connectNodeInfo);
|
||||
ConnectNodeInfo connectNodeInfo = ovsdbDao.getConnectNodeInfo(ovsdbClient);
|
||||
|
||||
// successfully connected - register it in our
|
||||
// connectedClients table
|
||||
// In Plume's environment clientCn is not unique that's why
|
||||
// we are augmenting it
|
||||
// with the serialNumber and using it as a key (equivalent
|
||||
// of KDC unique qrCode)
|
||||
String key = clientCn + "_" + connectNodeInfo.serialNumber;
|
||||
ConnectusOvsdbClient.this.ovsdbSessionMapInterface.newSession(key, ovsdbClient);
|
||||
extIntegrationInterface.apConnected(key, connectNodeInfo);
|
||||
|
||||
// push configuration to AP
|
||||
connectNodeInfo = processConnectRequest(ovsdbClient, clientCn, connectNodeInfo);
|
||||
// push configuration to AP
|
||||
connectNodeInfo = processConnectRequest(ovsdbClient, clientCn, connectNodeInfo);
|
||||
|
||||
LOG.info("ovsdbClient connected from {} on port {} key {} ", remoteHost, localPort, key);
|
||||
LOG.info("ovsdbClient connectedClients = {}",
|
||||
ConnectusOvsdbClient.this.ovsdbSessionMapInterface.getNumSessions());
|
||||
LOG.info("ovsdbClient connected from {} on port {} key {} ", remoteHost, localPort, key);
|
||||
LOG.info("ovsdbClient connectedClients = {}",
|
||||
ConnectusOvsdbClient.this.ovsdbSessionMapInterface.getNumSessions());
|
||||
|
||||
monitorOvsdbStateTables(ovsdbClient, key);
|
||||
monitorOvsdbStateTables(ovsdbClient, key);
|
||||
|
||||
} catch (Exception e) {
|
||||
LOG.error("ovsdbClient error", e);
|
||||
// something is wrong with the SSL
|
||||
ovsdbClient.shutdown();
|
||||
return;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LOG.error("ovsdbClient error", e);
|
||||
// something is wrong with the SSL
|
||||
ovsdbClient.shutdown();
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void disconnected(OvsdbClient ovsdbClient) {
|
||||
String remoteHost = ovsdbClient.getConnectionInfo().getRemoteAddress().getHostAddress();
|
||||
int localPort = ovsdbClient.getConnectionInfo().getLocalPort();
|
||||
String subjectDn = null;
|
||||
try {
|
||||
subjectDn = ((X509Certificate) ovsdbClient.getConnectionInfo().getRemoteCertificate())
|
||||
.getSubjectDN().getName();
|
||||
} catch (Exception e) {
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
|
||||
public void disconnected(OvsdbClient ovsdbClient) {
|
||||
String remoteHost = ovsdbClient.getConnectionInfo().getRemoteAddress().getHostAddress();
|
||||
int localPort = ovsdbClient.getConnectionInfo().getLocalPort();
|
||||
String subjectDn = null;
|
||||
try {
|
||||
subjectDn = ((X509Certificate) ovsdbClient.getConnectionInfo().getRemoteCertificate())
|
||||
.getSubjectDN().getName();
|
||||
} catch (Exception e) {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
String clientCn = SslUtil.extractCN(subjectDn);
|
||||
String clientCn = SslUtil.extractCN(subjectDn);
|
||||
|
||||
// disconnected - deregister ovsdbClient from our
|
||||
// connectedClients table
|
||||
// unfortunately we only know clientCn at this point, but in
|
||||
// Plume's environment
|
||||
// they are not unique
|
||||
// so we are doing a reverse lookup here, and then if we find
|
||||
// the key we will
|
||||
// remove the entry from the connectedClients.
|
||||
String key = ConnectusOvsdbClient.this.ovsdbSessionMapInterface.lookupClientId(ovsdbClient);
|
||||
// disconnected - deregister ovsdbClient from our
|
||||
// connectedClients table
|
||||
// unfortunately we only know clientCn at this point, but in
|
||||
// Plume's environment
|
||||
// they are not unique
|
||||
// so we are doing a reverse lookup here, and then if we find
|
||||
// the key we will
|
||||
// remove the entry from the connectedClients.
|
||||
String key = ConnectusOvsdbClient.this.ovsdbSessionMapInterface.lookupClientId(ovsdbClient);
|
||||
|
||||
if (key != null) {
|
||||
|
||||
// turn off monitor
|
||||
try {
|
||||
ovsdbClient.cancelMonitor(OvsdbDao.wifiRadioStateDbTable + "_" + key);
|
||||
ovsdbClient.cancelMonitor(OvsdbDao.wifiVifStateDbTable + "_" + key);
|
||||
ovsdbClient.cancelMonitor(OvsdbDao.wifiInetStateDbTable + "_" + key);
|
||||
ovsdbClient.cancelMonitor(OvsdbDao.wifiAssociatedClientsDbTable + "_" + key);
|
||||
ovsdbClient.cancelMonitor(OvsdbDao.awlanNodeDbTable + "_" + key);
|
||||
|
||||
} catch (OvsdbClientException e) {
|
||||
LOG.warn("Could not cancel Monitor {}", e.getMessage());
|
||||
}
|
||||
|
||||
extIntegrationInterface.apDisconnected(key);
|
||||
ConnectusOvsdbClient.this.ovsdbSessionMapInterface.removeSession(key);
|
||||
}
|
||||
|
||||
ovsdbClient.shutdown();
|
||||
|
||||
LOG.info("ovsdbClient disconnected from {} on port {} clientCn {} key {} ", remoteHost, localPort,
|
||||
clientCn, key);
|
||||
LOG.info("ovsdbClient connectedClients = {}",
|
||||
ConnectusOvsdbClient.this.ovsdbSessionMapInterface.getNumSessions());
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
listener.startListeningWithSsl(ovsdbListenPort, sslContext, connectionCallback).join();
|
||||
|
||||
LOG.debug("manager waiting for connection on port {}...", ovsdbListenPort);
|
||||
}
|
||||
|
||||
private ConnectNodeInfo processConnectRequest(OvsdbClient ovsdbClient, String clientCn,
|
||||
ConnectNodeInfo connectNodeInfo) {
|
||||
|
||||
LOG.debug("Starting Client connect");
|
||||
connectNodeInfo = ovsdbDao.updateConnectNodeInfoOnConnect(ovsdbClient, clientCn, connectNodeInfo);
|
||||
|
||||
String apId = clientCn + "_" + connectNodeInfo.serialNumber;
|
||||
OpensyncAPConfig opensyncAPConfig = extIntegrationInterface.getApConfig(apId);
|
||||
|
||||
ovsdbDao.configureStats(ovsdbClient);
|
||||
if (key != null) {
|
||||
|
||||
// turn off monitor
|
||||
try {
|
||||
ovsdbClient.cancelMonitor(OvsdbDao.wifiRadioStateDbTable + "_" + key);
|
||||
ovsdbClient.cancelMonitor(OvsdbDao.wifiVifStateDbTable + "_" + key);
|
||||
ovsdbClient.cancelMonitor(OvsdbDao.wifiInetStateDbTable + "_" + key);
|
||||
ovsdbClient.cancelMonitor(OvsdbDao.wifiAssociatedClientsDbTable + "_" + key);
|
||||
ovsdbClient.cancelMonitor(OvsdbDao.awlanNodeDbTable + "_" + key);
|
||||
|
||||
} catch (OvsdbClientException e) {
|
||||
LOG.warn("Could not cancel Monitor {}", e.getMessage());
|
||||
}
|
||||
|
||||
extIntegrationInterface.apDisconnected(key);
|
||||
ConnectusOvsdbClient.this.ovsdbSessionMapInterface.removeSession(key);
|
||||
}
|
||||
|
||||
ovsdbClient.shutdown();
|
||||
|
||||
LOG.info("ovsdbClient disconnected from {} on port {} clientCn {} key {} ", remoteHost, localPort,
|
||||
clientCn, key);
|
||||
LOG.info("ovsdbClient connectedClients = {}",
|
||||
ConnectusOvsdbClient.this.ovsdbSessionMapInterface.getNumSessions());
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
listener.startListeningWithSsl(ovsdbListenPort, sslContext, connectionCallback).join();
|
||||
|
||||
LOG.debug("manager waiting for connection on port {}...", ovsdbListenPort);
|
||||
}
|
||||
|
||||
private ConnectNodeInfo processConnectRequest(OvsdbClient ovsdbClient, String clientCn,
|
||||
ConnectNodeInfo connectNodeInfo) {
|
||||
|
||||
LOG.debug("Starting Client connect");
|
||||
connectNodeInfo = ovsdbDao.updateConnectNodeInfoOnConnect(ovsdbClient, clientCn, connectNodeInfo);
|
||||
|
||||
String apId = clientCn + "_" + connectNodeInfo.serialNumber;
|
||||
OpensyncAPConfig opensyncAPConfig = extIntegrationInterface.getApConfig(apId);
|
||||
|
||||
ovsdbDao.configureStats(ovsdbClient);
|
||||
|
||||
// Check if device stats is configured in Wifi_Stats_Config table,
|
||||
// provision it
|
||||
// if needed
|
||||
if (ovsdbDao.getDeviceStatsReportingInterval(ovsdbClient) != collectionIntervalSecDeviceStats) {
|
||||
ovsdbDao.updateDeviceStatsReportingInterval(ovsdbClient, collectionIntervalSecDeviceStats);
|
||||
}
|
||||
|
||||
ovsdbDao.provisionBridgePortInterface(ovsdbClient);
|
||||
|
||||
ovsdbDao.removeAllSsids(ovsdbClient);
|
||||
|
||||
if (opensyncAPConfig != null) {
|
||||
ovsdbDao.configureWifiRadios(ovsdbClient, opensyncAPConfig.getRadioConfig());
|
||||
ovsdbDao.configureSsids(ovsdbClient, opensyncAPConfig.getSsidConfigs());
|
||||
}
|
||||
|
||||
ovsdbDao.configureWifiInet(ovsdbClient);
|
||||
|
||||
LOG.debug("Client connect Done");
|
||||
return connectNodeInfo;
|
||||
}
|
||||
|
||||
public Set<String> getConnectedClientIds() {
|
||||
return ovsdbSessionMapInterface.getConnectedClientIds();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param apId
|
||||
* @param newRedirectorAddress
|
||||
* @return updated value of the redirector
|
||||
*/
|
||||
public String changeRedirectorAddress(String apId, String newRedirectorAddress) {
|
||||
OvsdbSession ovsdbSession = ovsdbSessionMapInterface.getSession(apId);
|
||||
if (ovsdbSession == null) {
|
||||
throw new IllegalStateException("AP with id " + apId + " is not connected");
|
||||
}
|
||||
|
||||
String ret = ovsdbDao.changeRedirectorAddress(ovsdbSession.getOvsdbClient(), apId, newRedirectorAddress);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processConfigChanged(String apId) {
|
||||
LOG.debug("Starting processConfigChanged for {}", apId);
|
||||
|
||||
OvsdbSession ovsdbSession = ovsdbSessionMapInterface.getSession(apId);
|
||||
if (ovsdbSession == null) {
|
||||
throw new IllegalStateException("AP with id " + apId + " is not connected");
|
||||
}
|
||||
|
||||
OvsdbClient ovsdbClient = ovsdbSession.getOvsdbClient();
|
||||
OpensyncAPConfig opensyncAPConfig = extIntegrationInterface.getApConfig(apId);
|
||||
|
||||
if (opensyncAPConfig != null) {
|
||||
ovsdbDao.removeAllSsids(ovsdbClient);
|
||||
ovsdbDao.configureWifiRadios(ovsdbClient, opensyncAPConfig.getRadioConfig());
|
||||
ovsdbDao.configureSsids(ovsdbClient, opensyncAPConfig.getSsidConfigs());
|
||||
}
|
||||
|
||||
LOG.debug("Finished processConfigChanged for {}", apId);
|
||||
}
|
||||
|
||||
private void monitorOvsdbStateTables(OvsdbClient ovsdbClient, String key) throws OvsdbClientException {
|
||||
CompletableFuture<TableUpdates> rsCf = ovsdbClient
|
||||
.monitor(OvsdbDao.ovsdbName, OvsdbDao.wifiRadioStateDbTable + "_" + key,
|
||||
new MonitorRequests(ImmutableMap.of(OvsdbDao.wifiRadioStateDbTable,
|
||||
new MonitorRequest(new MonitorSelect(true, true, false, true)))),
|
||||
new MonitorCallback() {
|
||||
|
||||
@Override
|
||||
public void update(TableUpdates tableUpdates) {
|
||||
extIntegrationInterface.wifiRadioStatusDbTableUpdate(
|
||||
ovsdbDao.getOpensyncAPRadioState(tableUpdates, key, ovsdbClient), key);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
extIntegrationInterface
|
||||
.wifiRadioStatusDbTableUpdate(ovsdbDao.getOpensyncAPRadioState(rsCf.join(), key, ovsdbClient), key);
|
||||
|
||||
CompletableFuture<TableUpdates> isCf = ovsdbClient
|
||||
.monitor(OvsdbDao.ovsdbName, OvsdbDao.wifiInetStateDbTable + "_" + key,
|
||||
new MonitorRequests(ImmutableMap.of(OvsdbDao.wifiInetStateDbTable,
|
||||
new MonitorRequest(new MonitorSelect(true, true, false, true)))),
|
||||
new MonitorCallback() {
|
||||
|
||||
@Override
|
||||
public void update(TableUpdates tableUpdates) {
|
||||
|
||||
extIntegrationInterface.wifiInetStateDbTableUpdate(
|
||||
ovsdbDao.getOpensyncAPInetState(tableUpdates, key, ovsdbClient), key);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
extIntegrationInterface
|
||||
.wifiInetStateDbTableUpdate(ovsdbDao.getOpensyncAPInetState(isCf.join(), key, ovsdbClient), key);
|
||||
|
||||
CompletableFuture<TableUpdates> vsCf = ovsdbClient.monitor(OvsdbDao.ovsdbName,
|
||||
OvsdbDao.wifiVifStateDbTable + "_" + key,
|
||||
new MonitorRequests(ImmutableMap.of(OvsdbDao.wifiVifStateDbTable,
|
||||
new MonitorRequest(new MonitorSelect(true, true, true, true)))),
|
||||
new MonitorCallback() {
|
||||
@Override
|
||||
public void update(TableUpdates tableUpdates) {
|
||||
// extIntegrationInterface.wifiVIFStateDbTableUpdate(
|
||||
// ovsdbDao.getOpensyncAPVIFState(tableUpdates,
|
||||
// key, ovsdbClient), key);
|
||||
List<OpensyncAPVIFState> vifsToDelete = new ArrayList<OpensyncAPVIFState>();
|
||||
for (Entry<String, TableUpdate> tableUpdate : tableUpdates.getTableUpdates().entrySet()) {
|
||||
|
||||
for (Entry<UUID, RowUpdate> rowUpdate : tableUpdate.getValue().getRowUpdates().entrySet()) {
|
||||
if (rowUpdate.getValue().getOld() != null && rowUpdate.getValue().getNew() == null) {
|
||||
Row row = rowUpdate.getValue().getOld();
|
||||
String ifName = null;
|
||||
String ssid = null;
|
||||
if (row.getColumns().get("ssid") != null && row.getColumns().get("ssid").getClass()
|
||||
.equals(com.vmware.ovsdb.protocol.operation.notation.Atom.class)) {
|
||||
ssid = row.getStringColumn("ssid");
|
||||
}
|
||||
if (row.getColumns().get("if_name") != null && row.getColumns().get("if_name").getClass()
|
||||
.equals(com.vmware.ovsdb.protocol.operation.notation.Atom.class)) {
|
||||
ifName = row.getStringColumn("if_name");
|
||||
}
|
||||
if (ifName != null && ssid != null) {
|
||||
OpensyncAPVIFState toBeDeleted = new OpensyncAPVIFState();
|
||||
toBeDeleted.setSsid(ssid);
|
||||
toBeDeleted.setIfName(ifName);
|
||||
vifsToDelete.add(toBeDeleted);
|
||||
}
|
||||
tableUpdate.getValue().getRowUpdates().remove(rowUpdate.getKey());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (tableUpdate.getValue().getRowUpdates().values().isEmpty()) {
|
||||
tableUpdates.getTableUpdates().remove(tableUpdate.getKey());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!vifsToDelete.isEmpty()) {
|
||||
extIntegrationInterface.wifiVIFStateDbTableDelete(vifsToDelete, key);
|
||||
}
|
||||
if (tableUpdates.getTableUpdates().entrySet().isEmpty())
|
||||
extIntegrationInterface.wifiVIFStateDbTableUpdate(
|
||||
ovsdbDao.getOpensyncAPVIFState(tableUpdates, key, ovsdbClient), key);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
extIntegrationInterface.wifiVIFStateDbTableUpdate(ovsdbDao.getOpensyncAPVIFState(vsCf.join(), key, ovsdbClient),
|
||||
key);
|
||||
|
||||
CompletableFuture<TableUpdates> acCf = ovsdbClient.monitor(OvsdbDao.ovsdbName,
|
||||
OvsdbDao.wifiAssociatedClientsDbTable + "_" + key,
|
||||
new MonitorRequests(ImmutableMap.of(OvsdbDao.wifiAssociatedClientsDbTable,
|
||||
new MonitorRequest(new MonitorSelect(true, true, true, true)))),
|
||||
new MonitorCallback() {
|
||||
|
||||
@Override
|
||||
public void update(TableUpdates tableUpdates) {
|
||||
|
||||
boolean insertOrModify = false;
|
||||
for (TableUpdate tableUpdate : tableUpdates.getTableUpdates().values()) {
|
||||
|
||||
for (RowUpdate rowUpdate : tableUpdate.getRowUpdates().values()) {
|
||||
if (rowUpdate.getOld() != null && rowUpdate.getNew() == null) {
|
||||
insertOrModify = false;
|
||||
Row row = rowUpdate.getOld();
|
||||
String deletedClientMac = row.getStringColumn("mac");
|
||||
extIntegrationInterface.wifiAssociatedClientsDbTableDelete(deletedClientMac, key);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (insertOrModify) {
|
||||
extIntegrationInterface.wifiAssociatedClientsDbTableUpdate(
|
||||
ovsdbDao.getOpensyncWifiAssociatedClients(tableUpdates, key, ovsdbClient), key);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
extIntegrationInterface.wifiAssociatedClientsDbTableUpdate(
|
||||
ovsdbDao.getOpensyncWifiAssociatedClients(acCf.join(), key, ovsdbClient), key);
|
||||
|
||||
CompletableFuture<TableUpdates> awCf = ovsdbClient
|
||||
.monitor(OvsdbDao.ovsdbName, OvsdbDao.awlanNodeDbTable + "_" + key,
|
||||
new MonitorRequests(ImmutableMap.of(OvsdbDao.awlanNodeDbTable,
|
||||
new MonitorRequest(new MonitorSelect(true, false, false, true)))),
|
||||
new MonitorCallback() {
|
||||
|
||||
@Override
|
||||
public void update(TableUpdates tableUpdates) {
|
||||
extIntegrationInterface.awlanNodeDbTableUpdate(
|
||||
ovsdbDao.getOpensyncAWLANNode(tableUpdates, key, ovsdbClient), key);
|
||||
}
|
||||
|
||||
});
|
||||
extIntegrationInterface.awlanNodeDbTableUpdate(ovsdbDao.getOpensyncAWLANNode(awCf.join(), key, ovsdbClient),
|
||||
key);
|
||||
|
||||
}
|
||||
// Check if device stats is configured in Wifi_Stats_Config table,
|
||||
// provision it
|
||||
// if needed
|
||||
if (ovsdbDao.getDeviceStatsReportingInterval(ovsdbClient) != collectionIntervalSecDeviceStats) {
|
||||
ovsdbDao.updateDeviceStatsReportingInterval(ovsdbClient, collectionIntervalSecDeviceStats);
|
||||
}
|
||||
|
||||
ovsdbDao.provisionBridgePortInterface(ovsdbClient);
|
||||
|
||||
ovsdbDao.removeAllSsids(ovsdbClient);
|
||||
|
||||
if (opensyncAPConfig != null) {
|
||||
ovsdbDao.configureWifiRadios(ovsdbClient, opensyncAPConfig);
|
||||
ovsdbDao.configureSsids(ovsdbClient, opensyncAPConfig);
|
||||
}
|
||||
|
||||
ovsdbDao.configureWifiInet(ovsdbClient);
|
||||
|
||||
LOG.debug("Client connect Done");
|
||||
return connectNodeInfo;
|
||||
}
|
||||
|
||||
public Set<String> getConnectedClientIds() {
|
||||
return ovsdbSessionMapInterface.getConnectedClientIds();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param apId
|
||||
* @param newRedirectorAddress
|
||||
* @return updated value of the redirector
|
||||
*/
|
||||
public String changeRedirectorAddress(String apId, String newRedirectorAddress) {
|
||||
OvsdbSession ovsdbSession = ovsdbSessionMapInterface.getSession(apId);
|
||||
if (ovsdbSession == null) {
|
||||
throw new IllegalStateException("AP with id " + apId + " is not connected");
|
||||
}
|
||||
|
||||
String ret = ovsdbDao.changeRedirectorAddress(ovsdbSession.getOvsdbClient(), apId, newRedirectorAddress);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processConfigChanged(String apId) {
|
||||
LOG.debug("Starting processConfigChanged for {}", apId);
|
||||
|
||||
OvsdbSession ovsdbSession = ovsdbSessionMapInterface.getSession(apId);
|
||||
if (ovsdbSession == null) {
|
||||
throw new IllegalStateException("AP with id " + apId + " is not connected");
|
||||
}
|
||||
|
||||
OvsdbClient ovsdbClient = ovsdbSession.getOvsdbClient();
|
||||
OpensyncAPConfig opensyncAPConfig = extIntegrationInterface.getApConfig(apId);
|
||||
|
||||
if (opensyncAPConfig != null) {
|
||||
ovsdbDao.removeAllSsids(ovsdbClient);
|
||||
ovsdbDao.configureWifiRadios(ovsdbClient, opensyncAPConfig);
|
||||
ovsdbDao.configureSsids(ovsdbClient, opensyncAPConfig);
|
||||
}
|
||||
|
||||
LOG.debug("Finished processConfigChanged for {}", apId);
|
||||
}
|
||||
|
||||
private void monitorOvsdbStateTables(OvsdbClient ovsdbClient, String key) throws OvsdbClientException {
|
||||
CompletableFuture<TableUpdates> rsCf = ovsdbClient
|
||||
.monitor(OvsdbDao.ovsdbName, OvsdbDao.wifiRadioStateDbTable + "_" + key,
|
||||
new MonitorRequests(ImmutableMap.of(OvsdbDao.wifiRadioStateDbTable,
|
||||
new MonitorRequest(new MonitorSelect(true, true, false, true)))),
|
||||
new MonitorCallback() {
|
||||
|
||||
@Override
|
||||
public void update(TableUpdates tableUpdates) {
|
||||
extIntegrationInterface.wifiRadioStatusDbTableUpdate(
|
||||
ovsdbDao.getOpensyncAPRadioState(tableUpdates, key, ovsdbClient), key);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
extIntegrationInterface
|
||||
.wifiRadioStatusDbTableUpdate(ovsdbDao.getOpensyncAPRadioState(rsCf.join(), key, ovsdbClient), key);
|
||||
|
||||
CompletableFuture<TableUpdates> isCf = ovsdbClient
|
||||
.monitor(OvsdbDao.ovsdbName, OvsdbDao.wifiInetStateDbTable + "_" + key,
|
||||
new MonitorRequests(ImmutableMap.of(OvsdbDao.wifiInetStateDbTable,
|
||||
new MonitorRequest(new MonitorSelect(true, true, false, true)))),
|
||||
new MonitorCallback() {
|
||||
|
||||
@Override
|
||||
public void update(TableUpdates tableUpdates) {
|
||||
|
||||
extIntegrationInterface.wifiInetStateDbTableUpdate(
|
||||
ovsdbDao.getOpensyncAPInetState(tableUpdates, key, ovsdbClient), key);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
extIntegrationInterface
|
||||
.wifiInetStateDbTableUpdate(ovsdbDao.getOpensyncAPInetState(isCf.join(), key, ovsdbClient), key);
|
||||
|
||||
CompletableFuture<TableUpdates> vsCf = ovsdbClient.monitor(OvsdbDao.ovsdbName,
|
||||
OvsdbDao.wifiVifStateDbTable + "_" + key,
|
||||
new MonitorRequests(ImmutableMap.of(OvsdbDao.wifiVifStateDbTable,
|
||||
new MonitorRequest(new MonitorSelect(true, true, true, true)))),
|
||||
new MonitorCallback() {
|
||||
@Override
|
||||
public void update(TableUpdates tableUpdates) {
|
||||
// extIntegrationInterface.wifiVIFStateDbTableUpdate(
|
||||
// ovsdbDao.getOpensyncAPVIFState(tableUpdates,
|
||||
// key, ovsdbClient), key);
|
||||
List<OpensyncAPVIFState> vifsToDelete = new ArrayList<OpensyncAPVIFState>();
|
||||
for (Entry<String, TableUpdate> tableUpdate : tableUpdates.getTableUpdates().entrySet()) {
|
||||
|
||||
for (Entry<UUID, RowUpdate> rowUpdate : tableUpdate.getValue().getRowUpdates().entrySet()) {
|
||||
if (rowUpdate.getValue().getOld() != null && rowUpdate.getValue().getNew() == null) {
|
||||
Row row = rowUpdate.getValue().getOld();
|
||||
String ifName = null;
|
||||
String ssid = null;
|
||||
if (row.getColumns().get("ssid") != null && row.getColumns().get("ssid").getClass()
|
||||
.equals(com.vmware.ovsdb.protocol.operation.notation.Atom.class)) {
|
||||
ssid = row.getStringColumn("ssid");
|
||||
}
|
||||
if (row.getColumns().get("if_name") != null
|
||||
&& row.getColumns().get("if_name").getClass()
|
||||
.equals(com.vmware.ovsdb.protocol.operation.notation.Atom.class)) {
|
||||
ifName = row.getStringColumn("if_name");
|
||||
}
|
||||
if (ifName != null && ssid != null) {
|
||||
OpensyncAPVIFState toBeDeleted = new OpensyncAPVIFState();
|
||||
toBeDeleted.setSsid(ssid);
|
||||
toBeDeleted.setIfName(ifName);
|
||||
vifsToDelete.add(toBeDeleted);
|
||||
}
|
||||
tableUpdate.getValue().getRowUpdates().remove(rowUpdate.getKey());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (tableUpdate.getValue().getRowUpdates().values().isEmpty()) {
|
||||
tableUpdates.getTableUpdates().remove(tableUpdate.getKey());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!vifsToDelete.isEmpty()) {
|
||||
extIntegrationInterface.wifiVIFStateDbTableDelete(vifsToDelete, key);
|
||||
}
|
||||
if (tableUpdates.getTableUpdates().entrySet().isEmpty())
|
||||
extIntegrationInterface.wifiVIFStateDbTableUpdate(
|
||||
ovsdbDao.getOpensyncAPVIFState(tableUpdates, key, ovsdbClient), key);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
extIntegrationInterface.wifiVIFStateDbTableUpdate(ovsdbDao.getOpensyncAPVIFState(vsCf.join(), key, ovsdbClient),
|
||||
key);
|
||||
|
||||
CompletableFuture<TableUpdates> acCf = ovsdbClient.monitor(OvsdbDao.ovsdbName,
|
||||
OvsdbDao.wifiAssociatedClientsDbTable + "_" + key,
|
||||
new MonitorRequests(ImmutableMap.of(OvsdbDao.wifiAssociatedClientsDbTable,
|
||||
new MonitorRequest(new MonitorSelect(true, true, true, true)))),
|
||||
new MonitorCallback() {
|
||||
|
||||
@Override
|
||||
public void update(TableUpdates tableUpdates) {
|
||||
|
||||
boolean insertOrModify = false;
|
||||
for (TableUpdate tableUpdate : tableUpdates.getTableUpdates().values()) {
|
||||
|
||||
for (RowUpdate rowUpdate : tableUpdate.getRowUpdates().values()) {
|
||||
if (rowUpdate.getOld() != null && rowUpdate.getNew() == null) {
|
||||
insertOrModify = false;
|
||||
Row row = rowUpdate.getOld();
|
||||
String deletedClientMac = row.getStringColumn("mac");
|
||||
extIntegrationInterface.wifiAssociatedClientsDbTableDelete(deletedClientMac, key);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (insertOrModify) {
|
||||
extIntegrationInterface.wifiAssociatedClientsDbTableUpdate(
|
||||
ovsdbDao.getOpensyncWifiAssociatedClients(tableUpdates, key, ovsdbClient), key);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
extIntegrationInterface.wifiAssociatedClientsDbTableUpdate(
|
||||
ovsdbDao.getOpensyncWifiAssociatedClients(acCf.join(), key, ovsdbClient), key);
|
||||
|
||||
CompletableFuture<TableUpdates> awCf = ovsdbClient
|
||||
.monitor(OvsdbDao.ovsdbName, OvsdbDao.awlanNodeDbTable + "_" + key,
|
||||
new MonitorRequests(ImmutableMap.of(OvsdbDao.awlanNodeDbTable,
|
||||
new MonitorRequest(new MonitorSelect(true, false, false, true)))),
|
||||
new MonitorCallback() {
|
||||
|
||||
@Override
|
||||
public void update(TableUpdates tableUpdates) {
|
||||
extIntegrationInterface.awlanNodeDbTableUpdate(
|
||||
ovsdbDao.getOpensyncAWLANNode(tableUpdates, key, ovsdbClient), key);
|
||||
}
|
||||
|
||||
});
|
||||
extIntegrationInterface.awlanNodeDbTableUpdate(ovsdbDao.getOpensyncAWLANNode(awCf.join(), key, ovsdbClient),
|
||||
key);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String closeSession(String apId) {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,45 +7,46 @@ import java.util.Set;
|
||||
|
||||
import com.vmware.ovsdb.protocol.operation.notation.Uuid;
|
||||
|
||||
public class WifiRadioConfigInfo implements Cloneable{
|
||||
public class WifiRadioConfigInfo implements Cloneable {
|
||||
|
||||
public Set<Uuid> vifConfigUuids;
|
||||
public Set<Uuid> vifConfigUuids;
|
||||
|
||||
public String freqBand;
|
||||
public int channel;
|
||||
public Integer txPower;
|
||||
public String channelMode;
|
||||
public boolean enabled;
|
||||
public String htMode;
|
||||
public Map<String,String> hwConfig;
|
||||
public String country;
|
||||
public String freqBand;
|
||||
public int channel;
|
||||
public Integer txPower;
|
||||
public String channelMode;
|
||||
public boolean enabled;
|
||||
public String htMode;
|
||||
public Map<String, String> hwConfig;
|
||||
public String country;
|
||||
public int beaconInterval;
|
||||
|
||||
public String ifName;
|
||||
public Uuid uuid;
|
||||
public String ifName;
|
||||
public Uuid uuid;
|
||||
|
||||
@Override
|
||||
public WifiRadioConfigInfo clone() {
|
||||
try {
|
||||
WifiRadioConfigInfo ret = (WifiRadioConfigInfo)super.clone();
|
||||
if(vifConfigUuids!=null) {
|
||||
ret.vifConfigUuids = new HashSet<>(this.vifConfigUuids);
|
||||
}
|
||||
@Override
|
||||
public WifiRadioConfigInfo clone() {
|
||||
try {
|
||||
WifiRadioConfigInfo ret = (WifiRadioConfigInfo) super.clone();
|
||||
if (vifConfigUuids != null) {
|
||||
ret.vifConfigUuids = new HashSet<>(this.vifConfigUuids);
|
||||
}
|
||||
|
||||
if(hwConfig!=null) {
|
||||
ret.hwConfig = new HashMap<>(this.hwConfig);
|
||||
}
|
||||
return ret;
|
||||
}catch(CloneNotSupportedException e) {
|
||||
throw new IllegalStateException("Cannot clone ", e);
|
||||
}
|
||||
}
|
||||
if (hwConfig != null) {
|
||||
ret.hwConfig = new HashMap<>(this.hwConfig);
|
||||
}
|
||||
return ret;
|
||||
} catch (CloneNotSupportedException e) {
|
||||
throw new IllegalStateException("Cannot clone ", e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format(
|
||||
"WifiRadioConfigInfo [vifConfigUuids=%s, freqBand=%s, channel=%s, txPower=%s, channelMode=%s, enabled=%s, htMode=%s, hwConfig=%s, country=%s, ifName=%s, uuid=%s]",
|
||||
vifConfigUuids, freqBand, channel, txPower, channelMode, enabled, htMode, hwConfig, country, ifName,
|
||||
uuid);
|
||||
}
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format(
|
||||
"WifiRadioConfigInfo [vifConfigUuids=%s, freqBand=%s, channel=%s, txPower=%s, channelMode=%s, enabled=%s, htMode=%s, hwConfig=%s, country=%s, bcn_int=%s, ifName=%s, uuid=%s]",
|
||||
vifConfigUuids, freqBand, channel, txPower, channelMode, enabled, htMode, hwConfig, country,
|
||||
beaconInterval, ifName, uuid);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user