mirror of
https://github.com/Telecominfraproject/wlan-cloud-opensync-controller.git
synced 2025-12-26 15:17:03 +00:00
Compare commits
38 Commits
WIFI-797-R
...
feature/NE
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5f35b59a34 | ||
|
|
d3729a47d2 | ||
|
|
20484b634a | ||
|
|
a7af164bb1 | ||
|
|
e31b8ebd12 | ||
|
|
bdde9561f3 | ||
|
|
2964aa3c3c | ||
|
|
01d9d7538c | ||
|
|
ed5f445f11 | ||
|
|
b47d2ccda1 | ||
|
|
b6d6e4dea7 | ||
|
|
1e822e432c | ||
|
|
95173ada39 | ||
|
|
5bfd5dfac7 | ||
|
|
14b410e84b | ||
|
|
c8bace4850 | ||
|
|
b182a6953d | ||
|
|
acdd5eddbf | ||
|
|
c1de88aa05 | ||
|
|
28fcf06175 | ||
|
|
a3159ed34e | ||
|
|
ee56a5b2bb | ||
|
|
b60a72c202 | ||
|
|
b9dd818ca4 | ||
|
|
1d7f822ed4 | ||
|
|
6c784367ed | ||
|
|
176f549168 | ||
|
|
896c38c024 | ||
|
|
15e26fd829 | ||
|
|
4df03431ed | ||
|
|
7ef59937f2 | ||
|
|
0e80415e52 | ||
|
|
10b3a6227d | ||
|
|
3adb56f113 | ||
|
|
39da1f83a3 | ||
|
|
7f51486979 | ||
|
|
62672f090b | ||
|
|
012935818d |
1
opensync-ext-cloud/.gitignore
vendored
1
opensync-ext-cloud/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
/target/
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.telecominfraproject.wlan.opensync.external.integration;
|
||||
|
||||
import java.net.Inet4Address;
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.ArrayList;
|
||||
@@ -148,6 +149,14 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
private boolean isAutoconfigEnabled;
|
||||
@Value("${tip.wlan.ovsdb.defaultFwVersion:r10947-65030d81f3}")
|
||||
private String defaultFwVersion;
|
||||
@org.springframework.beans.factory.annotation.Value("${tip.wlan.ovsdb.wifi-iface.default_lan_type:bridge}")
|
||||
public String defaultLanInterfaceType;
|
||||
@org.springframework.beans.factory.annotation.Value("${tip.wlan.ovsdb.wifi-iface.default_lan_name:lan}")
|
||||
public String defaultLanInterfaceName;
|
||||
@org.springframework.beans.factory.annotation.Value("${tip.wlan.ovsdb.wifi-iface.default_wan_type:bridge}")
|
||||
public String defaultWanInterfaceType;
|
||||
@org.springframework.beans.factory.annotation.Value("${tip.wlan.ovsdb.wifi-iface.default_wan_name:wan}")
|
||||
public String defaultWanInterfaceName;
|
||||
|
||||
@Autowired
|
||||
private CacheManager cacheManagerShortLived;
|
||||
@@ -171,7 +180,6 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
return ce;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void apConnected(String apId, ConnectNodeInfo connectNodeInfo) {
|
||||
|
||||
@@ -329,6 +337,8 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
|
||||
updateApStatus(ce, connectNodeInfo);
|
||||
|
||||
removeNonWifiClients(ce, connectNodeInfo);
|
||||
|
||||
OvsdbSession ovsdbSession = ovsdbSessionMapInterface.getSession(apId);
|
||||
ovsdbSession.setRoutingId(equipmentRoutingRecord.getId());
|
||||
ovsdbSession.setEquipmentId(ce.getId());
|
||||
@@ -420,7 +430,6 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
|
||||
apProfile.getChildProfileIds().add(rfProfile.getId());
|
||||
|
||||
|
||||
// Update AP profile with SSID and RF child profiles
|
||||
apProfile = profileServiceInterface.update(apProfile);
|
||||
|
||||
@@ -502,9 +511,12 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
protocolStatusData.setReportedSwVersion("Unknown");
|
||||
}
|
||||
try {
|
||||
protocolStatusData.setReportedIpV4Addr(InetAddress.getByName(connectNodeInfo.ipV4Address));
|
||||
if (connectNodeInfo.ipV4Address != null) {
|
||||
protocolStatusData.setReportedIpV4Addr(InetAddress.getByName(connectNodeInfo.ipV4Address));
|
||||
}
|
||||
} catch (UnknownHostException e) {
|
||||
// do nothing here
|
||||
LOG.error("Could not set IpV4Addr {} on AP {} due to UnknownHostException ",
|
||||
connectNodeInfo.ipV4Address, ce.getName(), e);
|
||||
}
|
||||
if ((connectNodeInfo.macAddress != null) && (MacAddress.valueOf(connectNodeInfo.macAddress) != null)) {
|
||||
protocolStatusData.setReportedMacAddr(MacAddress.valueOf(connectNodeInfo.macAddress));
|
||||
@@ -513,7 +525,8 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
protocolStatusData.setSerialNumber(connectNodeInfo.serialNumber);
|
||||
protocolStatusData.setSystemName(connectNodeInfo.model);
|
||||
statusRecord.setDetails(protocolStatusData);
|
||||
statusServiceInterface.update(statusRecord);
|
||||
Status protocolStatus = statusServiceInterface.update(statusRecord);
|
||||
LOG.debug("ProtocolStatus for AP {} updated to {}", ce.getName(), protocolStatus);
|
||||
|
||||
statusRecord = statusServiceInterface.getOrNull(ce.getCustomerId(), ce.getId(), StatusDataType.FIRMWARE);
|
||||
if (statusRecord == null) {
|
||||
@@ -578,6 +591,32 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
|
||||
}
|
||||
|
||||
private void removeNonWifiClients(Equipment ce, ConnectNodeInfo connectNodeInfo) {
|
||||
// need to make sure that this AP didn't accidentally get registered as
|
||||
// a client previously via a partial DHCP lease event
|
||||
LOG.info("Checking for non-wifi client types for Equipment {}", ce);
|
||||
com.telecominfraproject.wlan.client.models.Client client = clientServiceInterface.getOrNull(ce.getCustomerId(),
|
||||
ce.getBaseMacAddress());
|
||||
|
||||
if (client != null) {
|
||||
ClientSession clientSession = clientServiceInterface.getSessionOrNull(ce.getCustomerId(), ce.getId(),
|
||||
ce.getBaseMacAddress());
|
||||
if (clientSession != null) {
|
||||
clientSession = clientServiceInterface.deleteSession(ce.getCustomerId(), ce.getId(),
|
||||
client.getMacAddress());
|
||||
LOG.info("Removed invalid client session {}", clientSession);
|
||||
}
|
||||
client = clientServiceInterface.delete(ce.getCustomerId(), client.getMacAddress());
|
||||
LOG.info("Removed invalid client type {}", client);
|
||||
} else {
|
||||
LOG.info("No clients with MAC address {} registered for customer {}", ce.getBaseMacAddress(),
|
||||
ce.getCustomerId());
|
||||
}
|
||||
|
||||
LOG.info("Finished checking for and removing non-wifi client types for Equipment {}", ce);
|
||||
|
||||
}
|
||||
|
||||
private void reconcileFwVersionToTrack(Equipment ce, String reportedFwVersionFromAp, String model) {
|
||||
|
||||
LOG.debug("reconcileFwVersionToTrack for AP {} with active firmware version {} model {}", ce.getInventoryId(),
|
||||
@@ -788,7 +827,7 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
|
||||
ret.setMetricsProfiles(
|
||||
profileContainer.getChildrenOfType(equipmentConfig.getProfileId(), ProfileType.metrics));
|
||||
|
||||
|
||||
Set<Profile> radiusSet = new HashSet<>();
|
||||
Set<Long> captiveProfileIds = new HashSet<>();
|
||||
Set<Long> bonjourGatewayProfileIds = new HashSet<>();
|
||||
@@ -804,9 +843,9 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
|
||||
hotspot20ProfileSet
|
||||
.addAll(profileContainer.getChildrenOfType(ssidProfile.getId(), ProfileType.hotspot_2pt0));
|
||||
|
||||
|
||||
radiusSet.addAll(profileContainer.getChildrenOfType(ret.getApProfile().getId(), ProfileType.radius));
|
||||
radiusSet
|
||||
.addAll(profileContainer.getChildrenOfType(ret.getApProfile().getId(), ProfileType.radius));
|
||||
if (ssidProfile.getDetails() != null) {
|
||||
Long captivePortId = ((SsidConfiguration) ssidProfile.getDetails()).getCaptivePortalId();
|
||||
if (captivePortId != null) {
|
||||
@@ -820,19 +859,20 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (hotspot20ProfileSet.size() > 0) {
|
||||
for (Profile hotspot20Profile : hotspot20ProfileSet) {
|
||||
hotspot20OperatorSet.addAll(profileContainer.getChildrenOfType(hotspot20Profile.getId(), ProfileType.operator));
|
||||
hotspot20VenueSet.addAll(profileContainer.getChildrenOfType(hotspot20Profile.getId(), ProfileType.venue));
|
||||
hotspot20ProviderSet.addAll(profileContainer.getChildrenOfType(hotspot20Profile.getId(), ProfileType.id_provider));
|
||||
hotspot20OperatorSet.addAll(
|
||||
profileContainer.getChildrenOfType(hotspot20Profile.getId(), ProfileType.operator));
|
||||
hotspot20VenueSet.addAll(
|
||||
profileContainer.getChildrenOfType(hotspot20Profile.getId(), ProfileType.venue));
|
||||
hotspot20ProviderSet.addAll(
|
||||
profileContainer.getChildrenOfType(hotspot20Profile.getId(), ProfileType.id_provider));
|
||||
}
|
||||
hotspotConfig.setHotspot20OperatorSet(hotspot20OperatorSet);
|
||||
hotspotConfig.setHotspot20ProfileSet(hotspot20ProfileSet);
|
||||
hotspotConfig.setHotspot20ProviderSet(hotspot20ProviderSet);
|
||||
hotspotConfig.setHotspot20VenueSet(hotspot20VenueSet);
|
||||
|
||||
|
||||
ret.setHotspotConfig(hotspotConfig);
|
||||
}
|
||||
|
||||
@@ -865,7 +905,6 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
mqttMessageProcessor.processMqttMessage(topic, report);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void processMqttMessage(String topic, FlowReport flowReport) {
|
||||
mqttMessageProcessor.processMqttMessage(topic, flowReport);
|
||||
@@ -903,11 +942,11 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
// radio type yet
|
||||
}
|
||||
ApElementConfiguration apElementConfig = (ApElementConfiguration) apNode.getDetails();
|
||||
|
||||
|
||||
ProfileContainer profileContainer = new ProfileContainer(
|
||||
profileServiceInterface.getProfileWithChildren(apNode.getProfileId()));
|
||||
RfConfiguration rfConfig = (RfConfiguration) profileContainer.getChildOfTypeOrNull(apNode.getProfileId(), ProfileType.rf)
|
||||
.getDetails();
|
||||
profileServiceInterface.getProfileWithChildren(apNode.getProfileId()));
|
||||
RfConfiguration rfConfig = (RfConfiguration) profileContainer
|
||||
.getChildOfTypeOrNull(apNode.getProfileId(), ProfileType.rf).getDetails();
|
||||
|
||||
for (OpensyncAPVIFState vifState : vifStateTables) {
|
||||
|
||||
@@ -942,11 +981,11 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
Map<RadioType, RfElementConfiguration> rfElementMap = rfConfig.getRfConfigMap();
|
||||
Map<RadioType, ElementRadioConfiguration> elementRadioMap = apElementConfig.getRadioMap();
|
||||
for (RadioType rType : elementRadioMap.keySet()) {
|
||||
boolean autoChannelSelection = rfElementMap.get(rType).getAutoChannelSelection();
|
||||
if (elementRadioMap.get(rType).getActiveChannel(autoChannelSelection) == channel) {
|
||||
radioType = rType;
|
||||
break;
|
||||
}
|
||||
boolean autoChannelSelection = rfElementMap.get(rType).getAutoChannelSelection();
|
||||
if (elementRadioMap.get(rType).getActiveChannel(autoChannelSelection) == channel) {
|
||||
radioType = rType;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
updateActiveBssids(customerId, equipmentId, apId, ssid, radioType, bssid, numClients);
|
||||
@@ -959,7 +998,6 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
updateClientDetailsStatus(customerId, equipmentId, (ActiveBSSIDs) activeBssidsStatus.getDetails());
|
||||
}
|
||||
|
||||
|
||||
LOG.info("Finished wifiVIFStateDbTableUpdate updated {}", activeBssidsStatus);
|
||||
|
||||
}
|
||||
@@ -1057,19 +1095,19 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
}
|
||||
|
||||
if (radioState.getTxPower() > 0) {
|
||||
SourceType txPowerSource = apElementConfiguration.getRadioMap().get(radioState.getFreqBand())
|
||||
.getEirpTxPower().getSource();
|
||||
// Preserve the source while updating the value
|
||||
if (txPowerSource == SourceType.auto) {
|
||||
apElementConfiguration.getRadioMap().get(radioState.getFreqBand())
|
||||
.setEirpTxPower(SourceSelectionValue.createAutomaticInstance(radioState.getTxPower()));
|
||||
} else if (txPowerSource == SourceType.profile) {
|
||||
apElementConfiguration.getRadioMap().get(radioState.getFreqBand())
|
||||
.setEirpTxPower(SourceSelectionValue.createProfileInstance(radioState.getTxPower()));
|
||||
} else {
|
||||
apElementConfiguration.getRadioMap().get(radioState.getFreqBand())
|
||||
.setEirpTxPower(SourceSelectionValue.createManualInstance(radioState.getTxPower()));
|
||||
}
|
||||
SourceType txPowerSource = apElementConfiguration.getRadioMap().get(radioState.getFreqBand())
|
||||
.getEirpTxPower().getSource();
|
||||
// Preserve the source while updating the value
|
||||
if (txPowerSource == SourceType.auto) {
|
||||
apElementConfiguration.getRadioMap().get(radioState.getFreqBand())
|
||||
.setEirpTxPower(SourceSelectionValue.createAutomaticInstance(radioState.getTxPower()));
|
||||
} else if (txPowerSource == SourceType.profile) {
|
||||
apElementConfiguration.getRadioMap().get(radioState.getFreqBand())
|
||||
.setEirpTxPower(SourceSelectionValue.createProfileInstance(radioState.getTxPower()));
|
||||
} else {
|
||||
apElementConfiguration.getRadioMap().get(radioState.getFreqBand())
|
||||
.setEirpTxPower(SourceSelectionValue.createManualInstance(radioState.getTxPower()));
|
||||
}
|
||||
|
||||
LOG.debug("Updated TxPower from Wifi_Radio_State table change for AP {}", apId);
|
||||
}
|
||||
@@ -1104,10 +1142,8 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (protocolStatus != null) {
|
||||
statusServiceInterface.update(protocolStatus);
|
||||
}
|
||||
@@ -1144,6 +1180,8 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
Status activeBssidsStatus = statusServiceInterface.getOrNull(customerId, equipmentId,
|
||||
StatusDataType.ACTIVE_BSSIDS);
|
||||
|
||||
statusServiceInterface.getForCustomer(customerId, null, ImmutableSet.of(StatusDataType.ACTIVE_BSSIDS), null,
|
||||
null);
|
||||
if (activeBssidsStatus == null) {
|
||||
activeBssidsStatus = new Status();
|
||||
activeBssidsStatus.setCustomerId(customerId);
|
||||
@@ -1178,7 +1216,6 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
apId, currentActiveBSSIDs, ssid);
|
||||
}
|
||||
|
||||
|
||||
ActiveBSSID activeBssid = new ActiveBSSID();
|
||||
activeBssid.setBssid(macAddress);
|
||||
activeBssid.setSsid(ssid);
|
||||
@@ -1186,16 +1223,14 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
activeBssid.setNumDevicesConnected(numClients);
|
||||
currentActiveBSSIDs.add(activeBssid);
|
||||
|
||||
|
||||
statusDetails.setActiveBSSIDs(currentActiveBSSIDs);
|
||||
activeBssidsStatus.setDetails(statusDetails);
|
||||
|
||||
activeBssidsStatus = statusServiceInterface.update(activeBssidsStatus);
|
||||
|
||||
if (LOG.isTraceEnabled()) {
|
||||
LOG.trace("Processing Wifi_VIF_State table update for AP {}, updated ACTIVE_BSSID Status {}", apId,
|
||||
activeBssidsStatus.toPrettyString());
|
||||
}
|
||||
LOG.info("Processing Wifi_VIF_State table update for AP {}, updated ACTIVE_BSSID Status {}", apId,
|
||||
activeBssidsStatus);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1203,6 +1238,125 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
|
||||
LOG.debug("Received Wifi_Inet_State table update for AP {}", apId);
|
||||
|
||||
OvsdbSession ovsdbSession = ovsdbSessionMapInterface.getSession(apId);
|
||||
|
||||
if (ovsdbSession == null) {
|
||||
LOG.debug("wifiInetStateDbTableUpdate::Cannot get Session for AP {}", apId);
|
||||
return;
|
||||
}
|
||||
|
||||
int customerId = ovsdbSession.getCustomerId();
|
||||
long equipmentId = ovsdbSession.getEquipmentId();
|
||||
|
||||
if ((customerId < 0) || (equipmentId < 0)) {
|
||||
LOG.debug("wifiInetStateDbTableUpdate::Cannot get valid CustomerId {} or EquipmentId {} for AP {}",
|
||||
customerId, equipmentId, apId);
|
||||
return;
|
||||
}
|
||||
|
||||
Equipment ce = equipmentServiceInterface.getOrNull(equipmentId);
|
||||
|
||||
if (ce == null) {
|
||||
LOG.debug("wifiInetStateDbTableUpdate Cannot get customer Equipment for {}", apId);
|
||||
return;
|
||||
}
|
||||
|
||||
Status lanStatus = statusServiceInterface.getOrNull(customerId, equipmentId, StatusDataType.LANINFO);
|
||||
if (lanStatus == null) {
|
||||
lanStatus = new Status();
|
||||
lanStatus.setCustomerId(customerId);
|
||||
lanStatus.setEquipmentId(equipmentId);
|
||||
lanStatus.setStatusDataType(StatusDataType.LANINFO);
|
||||
lanStatus.setDetails(new EquipmentLANStatusData());
|
||||
lanStatus = statusServiceInterface.update(lanStatus);
|
||||
}
|
||||
|
||||
EquipmentLANStatusData lanStatusData = (EquipmentLANStatusData) lanStatus.getDetails();
|
||||
|
||||
Status protocolStatus = statusServiceInterface.getOrNull(customerId, equipmentId, StatusDataType.PROTOCOL);
|
||||
if (protocolStatus == null) {
|
||||
protocolStatus = new Status();
|
||||
protocolStatus.setCustomerId(customerId);
|
||||
protocolStatus.setEquipmentId(equipmentId);
|
||||
protocolStatus.setStatusDataType(StatusDataType.PROTOCOL);
|
||||
protocolStatus.setDetails(new EquipmentProtocolStatusData());
|
||||
protocolStatus = statusServiceInterface.update(protocolStatus);
|
||||
}
|
||||
|
||||
EquipmentProtocolStatusData protocolStatusData = (EquipmentProtocolStatusData) protocolStatus.getDetails();
|
||||
|
||||
for (OpensyncAPInetState inetState : inetStateTables) {
|
||||
|
||||
if (inetState.ifName != null && inetState.ifName.equals(defaultWanInterfaceName)) {
|
||||
|
||||
if (inetState.inetAddr != null) {
|
||||
try {
|
||||
protocolStatusData.setReportedIpV4Addr(Inet4Address.getByName(inetState.inetAddr));
|
||||
protocolStatus.setDetails(protocolStatusData);
|
||||
protocolStatus = statusServiceInterface.update(protocolStatus);
|
||||
LOG.info("Updated IpV4Addr for AP {} to {} from Wifi_Inet_State change for if_name {}", apId,
|
||||
((EquipmentProtocolStatusData) protocolStatus.getDetails()).getReportedIpV4Addr(),
|
||||
inetState.ifName);
|
||||
LOG.debug("ProtocolStatus for AP {} updated to {}", apId, protocolStatus);
|
||||
|
||||
} catch (UnknownHostException e) {
|
||||
LOG.error("Could not set IpV4Addr {} on AP {} due to UnknownHostException ", inetState.inetAddr,
|
||||
apId, e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (inetState.getIfType().equals("vlan") && inetState.parentIfName != null
|
||||
&& inetState.parentIfName.equals(defaultWanInterfaceName)) {
|
||||
|
||||
try {
|
||||
|
||||
VLANStatusData vlanStatusData = new VLANStatusData();
|
||||
|
||||
if (inetState.gateway != null)
|
||||
vlanStatusData.setGateway(InetAddress.getByName(inetState.getGateway()));
|
||||
|
||||
if (inetState.dns != null) {
|
||||
String primaryDns = inetState.dns.get("primary");
|
||||
if (primaryDns != null) {
|
||||
vlanStatusData.setDnsServer1(InetAddress.getByName(primaryDns));
|
||||
}
|
||||
String secondaryDns = inetState.dns.get("secondary");
|
||||
if (secondaryDns != null) {
|
||||
vlanStatusData.setDnsServer2(InetAddress.getByName(secondaryDns));
|
||||
}
|
||||
}
|
||||
|
||||
if (inetState.netmask != null) {
|
||||
vlanStatusData.setSubnetMask(InetAddress.getByName(inetState.netmask));
|
||||
}
|
||||
if (inetState.dhcpd != null) {
|
||||
String dhcpOption = inetState.dhcpd.get("dhcp_option");
|
||||
if (dhcpOption != null) {
|
||||
String dhcpServer = dhcpOption.split(",")[1];
|
||||
if (dhcpServer != null) {
|
||||
vlanStatusData.setDhcpServer(InetAddress.getByName(dhcpServer));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String inetAddr = inetState.getInetAddr();
|
||||
if (inetAddr != null) {
|
||||
vlanStatusData.setIpBase(InetAddress.getByName(inetAddr));
|
||||
}
|
||||
lanStatusData.getVlanStatusDataMap().put(inetState.vlanId, vlanStatusData);
|
||||
lanStatus.setDetails(lanStatusData);
|
||||
lanStatus = statusServiceInterface.update(lanStatus);
|
||||
|
||||
LOG.info("LANINFO updated for VLAN {}", lanStatus);
|
||||
|
||||
} catch (UnknownHostException e) {
|
||||
LOG.error("Unknown Host while configuring LANINFO", e);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1211,7 +1365,6 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
|
||||
LOG.debug("Received Wifi_Inet_State table delete for AP {}", apId);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1261,9 +1414,6 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
isReassociation = false;
|
||||
|
||||
}
|
||||
ClientInfoDetails clientDetails = (ClientInfoDetails) clientInstance.getDetails();
|
||||
|
||||
clientInstance.setDetails(clientDetails);
|
||||
|
||||
clientInstance = clientServiceInterface.update(clientInstance);
|
||||
|
||||
@@ -1278,16 +1428,13 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
clientSession.setLocationId(ce.getLocationId());
|
||||
ClientSessionDetails clientSessionDetails = new ClientSessionDetails();
|
||||
clientSessionDetails.setIsReassociation(isReassociation);
|
||||
clientSessionDetails.setSessionId(clientInstance.getMacAddress().getAddressAsLong());
|
||||
clientSession.setDetails(clientSessionDetails);
|
||||
|
||||
clientSession = clientServiceInterface.updateSession(clientSession);
|
||||
}
|
||||
|
||||
ClientSessionDetails clientSessionDetails = clientSession.getDetails();
|
||||
clientSessionDetails.setAssociationState(AssociationState._802_11_Associated);
|
||||
clientSessionDetails.setAssocTimestamp(System.currentTimeMillis());
|
||||
clientSessionDetails.setSessionId(clientInstance.getMacAddress().getAddressAsLong());
|
||||
clientSession.getDetails().mergeSession(clientSessionDetails);
|
||||
|
||||
clientSession = clientServiceInterface.updateSession(clientSession);
|
||||
@@ -1337,7 +1484,6 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Status protocolStatus = statusServiceInterface.getOrNull(customerId, equipmentId, StatusDataType.PROTOCOL);
|
||||
if (protocolStatus == null) {
|
||||
protocolStatus = new Status();
|
||||
@@ -1588,7 +1734,6 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
|
||||
}
|
||||
|
||||
|
||||
bssidList.removeAll(toBeDeleted);
|
||||
|
||||
statusDetails.setActiveBSSIDs(bssidList);
|
||||
@@ -1620,33 +1765,31 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
return;
|
||||
}
|
||||
|
||||
Set<MacAddress> macAddressSet = new HashSet<>();
|
||||
macAddressSet.add(new MacAddress(deletedClientMac));
|
||||
List<ClientSession> clientSessionList = clientServiceInterface.getSessions(customerId, macAddressSet);
|
||||
com.telecominfraproject.wlan.client.models.Client client = clientServiceInterface.getOrNull(customerId,
|
||||
new MacAddress(deletedClientMac));
|
||||
ClientSession clientSession = clientServiceInterface.getSessionOrNull(customerId, equipmentId,
|
||||
new MacAddress(deletedClientMac));
|
||||
|
||||
for (ClientSession session : clientSessionList) {
|
||||
|
||||
ClientSessionDetails clientSessionDetails = session.getDetails();
|
||||
|
||||
|
||||
if ((clientSessionDetails.getAssociationState() != null)
|
||||
&& !clientSessionDetails.getAssociationState().equals(AssociationState.Disconnected)) {
|
||||
clientSessionDetails.setDisconnectByClientTimestamp(System.currentTimeMillis());
|
||||
clientSessionDetails.setAssociationState(AssociationState.Disconnected);
|
||||
|
||||
session.setDetails(clientSessionDetails);
|
||||
session = clientServiceInterface.updateSession(session);
|
||||
|
||||
if (LOG.isTraceEnabled()) {
|
||||
LOG.trace("wifiAssociatedClientsDbTableDelete Updated client session, set to disconnected {}",
|
||||
session.toPrettyString());
|
||||
if (client != null) {
|
||||
if (clientSession != null) {
|
||||
if (!clientSession.getDetails().getAssociationState().equals(AssociationState.Disconnected)) {
|
||||
clientSession.getDetails().setAssociationState(AssociationState.Disconnected);
|
||||
clientSession = clientServiceInterface.updateSession(clientSession);
|
||||
LOG.info("Session {} for client {} is now disconnected.", clientSession, client.getMacAddress());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (clientSession != null) {
|
||||
|
||||
clientSession = clientServiceInterface.deleteSession(customerId, equipmentId,
|
||||
new MacAddress(deletedClientMac));
|
||||
|
||||
LOG.info("No client {} found, delete session {}", new MacAddress(deletedClientMac), clientSession);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dhcpLeasedIpDbTableUpdate(List<Map<String, String>> dhcpAttributes, String apId,
|
||||
@@ -1670,7 +1813,6 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Equipment ce = getCustomerEquipment(apId);
|
||||
|
||||
if (ce == null) {
|
||||
@@ -1680,39 +1822,44 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
|
||||
long locationId = ce.getLocationId();
|
||||
|
||||
// "hwaddr":
|
||||
// "inet_addr":
|
||||
// "hostname":
|
||||
// "fingerprint":
|
||||
// "vendor_class":
|
||||
// "lease_time":
|
||||
// "subnet_mask":
|
||||
// "gateway":
|
||||
// "dhcp_server":
|
||||
// "primary_dns":
|
||||
// "secondary_dns":
|
||||
// "db_status":
|
||||
// "device_name":
|
||||
// "device_type":
|
||||
// "manuf_id":
|
||||
|
||||
if (rowUpdateOperation.equals(RowUpdateOperation.INSERT)) {
|
||||
|
||||
|
||||
List<ClientSession> clientSessionList = new ArrayList<>();
|
||||
for (Map<String, String> dhcpLeasedIps : dhcpAttributes) {
|
||||
if (!dhcpLeasedIps.containsKey("hwaddr")) {
|
||||
|
||||
|
||||
LOG.info("Cannot insert a client {} that has no hwaddr.", dhcpLeasedIps);
|
||||
continue;
|
||||
|
||||
}
|
||||
|
||||
MacAddress clientMacAddress = new MacAddress(dhcpLeasedIps.get("hwaddr"));
|
||||
|
||||
com.telecominfraproject.wlan.client.models.Client client = clientServiceInterface.getOrNull(customerId,
|
||||
clientMacAddress);
|
||||
if (client != null) {
|
||||
|
||||
if (client == null) {
|
||||
LOG.info("Cannot find client instance for {}", clientMacAddress);
|
||||
continue;
|
||||
} else if (clientMacAddress.equals(equipmentServiceInterface.get(equipmentId).getBaseMacAddress())) {
|
||||
LOG.info("Not a client device {} ", dhcpLeasedIps);
|
||||
|
||||
|
||||
// In case somehow this equipment has accidentally been
|
||||
// tagged as a client, remove
|
||||
|
||||
ClientSession clientSession = clientServiceInterface.getSessionOrNull(customerId, equipmentId,
|
||||
clientMacAddress);
|
||||
|
||||
if (clientSession != null) {
|
||||
LOG.info("Deleting invalid client session {}",
|
||||
clientServiceInterface.deleteSession(customerId, equipmentId, clientMacAddress));
|
||||
}
|
||||
|
||||
LOG.info("Deleting invalid client {}", clientServiceInterface.delete(customerId, clientMacAddress));
|
||||
|
||||
|
||||
continue;
|
||||
} else {
|
||||
LOG.info("Client {} already exists on the cloud, update client values", dhcpLeasedIps);
|
||||
|
||||
ClientInfoDetails clientDetails = (ClientInfoDetails) client.getDetails();
|
||||
@@ -1729,7 +1876,6 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
|
||||
if (dhcpLeasedIps.containsKey("device_type")) {
|
||||
|
||||
|
||||
DhcpFpDeviceType dhcpFpDeviceType = DhcpFpDeviceType
|
||||
.getByName(dhcpLeasedIps.get("device_type"));
|
||||
ClientType clientType = OvsdbToWlanCloudTypeMappingUtility
|
||||
@@ -1749,6 +1895,7 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
|
||||
// In this case, we might have a session, as the client
|
||||
// already exists on the cloud, update if required
|
||||
|
||||
ClientSession session = updateClientSession(customerId, equipmentId, locationId, dhcpLeasedIps,
|
||||
clientMacAddress);
|
||||
if (session != null) {
|
||||
@@ -1756,49 +1903,7 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
client = new com.telecominfraproject.wlan.client.models.Client();
|
||||
|
||||
client.setCustomerId(customerId);
|
||||
client.setMacAddress(clientMacAddress);
|
||||
|
||||
ClientInfoDetails clientDetails = new ClientInfoDetails();
|
||||
|
||||
if (dhcpLeasedIps.containsKey("hostname")) {
|
||||
|
||||
clientDetails.setHostName(dhcpLeasedIps.get("hostname"));
|
||||
|
||||
}
|
||||
|
||||
if (dhcpLeasedIps.containsKey("fingerprint")) {
|
||||
|
||||
clientDetails.setApFingerprint(dhcpLeasedIps.get("fingerprint"));
|
||||
}
|
||||
|
||||
if (dhcpLeasedIps.containsKey("device_type")) {
|
||||
|
||||
|
||||
DhcpFpDeviceType dhcpFpDeviceType = DhcpFpDeviceType
|
||||
.getByName(dhcpLeasedIps.get("device_type"));
|
||||
ClientType clientType = OvsdbToWlanCloudTypeMappingUtility
|
||||
.getClientTypeForDhcpFpDeviceType(dhcpFpDeviceType);
|
||||
|
||||
LOG.debug("Translate from ovsdb {} to cloud {}", dhcpFpDeviceType, clientType);
|
||||
|
||||
clientDetails.setClientType(clientType.getId());
|
||||
|
||||
}
|
||||
|
||||
client.setDetails(clientDetails);
|
||||
|
||||
client = clientServiceInterface.create(client);
|
||||
|
||||
LOG.info("Created Client {}.", client);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (!clientSessionList.isEmpty()) {
|
||||
@@ -1807,7 +1912,6 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
LOG.info("Updated client sessions {}", clientSessionList);
|
||||
}
|
||||
|
||||
|
||||
} else if (rowUpdateOperation.equals(RowUpdateOperation.MODIFY)
|
||||
|| rowUpdateOperation.equals(RowUpdateOperation.INIT)) {
|
||||
|
||||
@@ -1823,59 +1927,75 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
}
|
||||
|
||||
MacAddress clientMacAddress = new MacAddress(dhcpLeasedIps.get("hwaddr"));
|
||||
|
||||
com.telecominfraproject.wlan.client.models.Client client = clientServiceInterface.getOrNull(customerId,
|
||||
clientMacAddress);
|
||||
if (client == null) {
|
||||
LOG.info("Client {} does not exist on the cloud. Creating...", dhcpLeasedIps);
|
||||
client = new com.telecominfraproject.wlan.client.models.Client();
|
||||
client.setCustomerId(customerId);
|
||||
client.setMacAddress(clientMacAddress);
|
||||
ClientInfoDetails clientDetails = new ClientInfoDetails();
|
||||
LOG.info("Cannot find client instance for {}", clientMacAddress);
|
||||
continue;
|
||||
} else if (clientMacAddress.equals(equipmentServiceInterface.get(equipmentId).getBaseMacAddress())) {
|
||||
|
||||
LOG.info("Not a client device {} ", dhcpLeasedIps);
|
||||
|
||||
|
||||
// In case somehow this equipment has accidentally been
|
||||
// tagged as a client, remove
|
||||
|
||||
ClientSession clientSession = clientServiceInterface.getSessionOrNull(customerId, equipmentId,
|
||||
clientMacAddress);
|
||||
|
||||
if (clientSession != null) {
|
||||
LOG.info("Deleting invalid client session {}",
|
||||
clientServiceInterface.deleteSession(customerId, equipmentId, clientMacAddress));
|
||||
}
|
||||
|
||||
LOG.info("Deleting invalid client {}", clientServiceInterface.delete(customerId, clientMacAddress));
|
||||
|
||||
|
||||
continue;
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
ClientInfoDetails clientDetails = (ClientInfoDetails) client.getDetails();
|
||||
if (dhcpLeasedIps.containsKey("hostname")) {
|
||||
|
||||
clientDetails.setHostName(dhcpLeasedIps.get("hostname"));
|
||||
|
||||
}
|
||||
|
||||
if (dhcpLeasedIps.containsKey("fingerprint")) {
|
||||
|
||||
clientDetails.setApFingerprint(dhcpLeasedIps.get("fingerprint"));
|
||||
}
|
||||
|
||||
if (dhcpLeasedIps.containsKey("device_type")) {
|
||||
|
||||
DhcpFpDeviceType dhcpFpDeviceType = DhcpFpDeviceType
|
||||
.getByName(dhcpLeasedIps.get("device_type"));
|
||||
ClientType clientType = OvsdbToWlanCloudTypeMappingUtility
|
||||
.getClientTypeForDhcpFpDeviceType(dhcpFpDeviceType);
|
||||
|
||||
LOG.debug("Translate from ovsdb {} to cloud {}", dhcpFpDeviceType, clientType);
|
||||
|
||||
clientDetails.setClientType(clientType.getId());
|
||||
|
||||
}
|
||||
|
||||
client.setDetails(clientDetails);
|
||||
|
||||
client = clientServiceInterface.create(client);
|
||||
client = clientServiceInterface.update(client);
|
||||
|
||||
}
|
||||
LOG.info("Updated Client {}.", client);
|
||||
|
||||
ClientInfoDetails clientDetails = (ClientInfoDetails) client.getDetails();
|
||||
if (dhcpLeasedIps.containsKey("hostname")) {
|
||||
// check if there is a session for this client
|
||||
|
||||
clientDetails.setHostName(dhcpLeasedIps.get("hostname"));
|
||||
|
||||
}
|
||||
|
||||
if (dhcpLeasedIps.containsKey("fingerprint")) {
|
||||
|
||||
clientDetails.setApFingerprint(dhcpLeasedIps.get("fingerprint"));
|
||||
}
|
||||
|
||||
if (dhcpLeasedIps.containsKey("device_type")) {
|
||||
|
||||
|
||||
DhcpFpDeviceType dhcpFpDeviceType = DhcpFpDeviceType.getByName(dhcpLeasedIps.get("device_type"));
|
||||
ClientType clientType = OvsdbToWlanCloudTypeMappingUtility
|
||||
.getClientTypeForDhcpFpDeviceType(dhcpFpDeviceType);
|
||||
|
||||
LOG.debug("Translate from ovsdb {} to cloud {}", dhcpFpDeviceType, clientType);
|
||||
|
||||
clientDetails.setClientType(clientType.getId());
|
||||
|
||||
}
|
||||
|
||||
client.setDetails(clientDetails);
|
||||
|
||||
client = clientServiceInterface.update(client);
|
||||
|
||||
LOG.info("Updated Client {}.", client);
|
||||
|
||||
// check if there is a session for this client
|
||||
|
||||
ClientSession session = updateClientSession(customerId, equipmentId, locationId, dhcpLeasedIps,
|
||||
clientMacAddress);
|
||||
if (session != null) {
|
||||
clientSessionList.add(session);
|
||||
ClientSession session = updateClientSession(customerId, equipmentId, locationId, dhcpLeasedIps,
|
||||
clientMacAddress);
|
||||
if (session != null) {
|
||||
clientSessionList.add(session);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1891,7 +2011,6 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
LOG.debug("Recieved deletions, not removing client(s) from cloud", dhcpAttributes);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected ClientSession updateClientSession(int customerId, long equipmentId, long locationId,
|
||||
@@ -1914,9 +2033,8 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
// "device_type":
|
||||
// "manuf_id":
|
||||
|
||||
|
||||
if (session == null) {
|
||||
session = new ClientSession();
|
||||
return null;
|
||||
}
|
||||
session.setCustomerId(customerId);
|
||||
session.setEquipmentId(equipmentId);
|
||||
@@ -1941,14 +2059,12 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (dhcpLeasedIps.containsKey("hostname")) {
|
||||
|
||||
clientSessionDetails.setHostname(dhcpLeasedIps.get("hostname"));
|
||||
|
||||
}
|
||||
|
||||
|
||||
ClientDhcpDetails clientDhcpDetails = new ClientDhcpDetails(clientSessionDetails.getSessionId());
|
||||
|
||||
if (dhcpLeasedIps.containsKey("dhcp_server")) {
|
||||
@@ -2026,7 +2142,6 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (dhcpLeasedIps.containsKey("device_name")) {
|
||||
clientSessionDetails.setClassificationName(dhcpLeasedIps.get("device_name"));
|
||||
}
|
||||
@@ -2035,7 +2150,6 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
|
||||
session.getDetails().mergeSession(clientSessionDetails);
|
||||
|
||||
|
||||
return session;
|
||||
}
|
||||
|
||||
@@ -2048,5 +2162,4 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
// TODO: will handle changes from Command_State table
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1891,8 +1891,8 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
}
|
||||
}
|
||||
|
||||
void handleClientSessionMetricsUpdate(int customerId, long equipmentId, long locationId, RadioType radioType,
|
||||
long timestamp, sts.OpensyncStats.Client client) {
|
||||
ClientSession handleClientSessionMetricsUpdate(int customerId, long equipmentId, long locationId,
|
||||
RadioType radioType, long timestamp, sts.OpensyncStats.Client client) {
|
||||
try
|
||||
|
||||
{
|
||||
@@ -1904,13 +1904,10 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
|
||||
boolean isReassociation = true;
|
||||
if (clientInstance == null) {
|
||||
clientInstance = new com.telecominfraproject.wlan.client.models.Client();
|
||||
clientInstance.setCustomerId(customerId);
|
||||
clientInstance.setMacAddress(new MacAddress(client.getMacAddress()));
|
||||
clientInstance.setDetails(new ClientInfoDetails());
|
||||
clientInstance = clientServiceInterface.create(clientInstance);
|
||||
|
||||
isReassociation = false;
|
||||
LOG.info("Cannot get client instance for {}", client.getMacAddress());
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
LOG.info("Client {}", clientInstance);
|
||||
@@ -1919,18 +1916,8 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
clientInstance.getMacAddress());
|
||||
|
||||
if (clientSession == null) {
|
||||
|
||||
clientSession = new ClientSession();
|
||||
clientSession.setCustomerId(customerId);
|
||||
clientSession.setEquipmentId(equipmentId);
|
||||
clientSession.setLocationId(locationId);
|
||||
clientSession.setMacAddress(clientInstance.getMacAddress());
|
||||
ClientSessionDetails clientSessionDetails = new ClientSessionDetails();
|
||||
clientSessionDetails.setSsid(client.getSsid());
|
||||
clientSessionDetails.setRadioType(radioType);
|
||||
clientSessionDetails.setSessionId(clientInstance.getMacAddress().getAddressAsLong());
|
||||
clientSession.setDetails(new ClientSessionDetails());
|
||||
clientSession = clientServiceInterface.updateSession(clientSession);
|
||||
LOG.info("Cannot get client session for {}", clientInstance.getMacAddress());
|
||||
return null;
|
||||
}
|
||||
|
||||
ClientSessionDetails latestClientSessionDetails = clientSession.getDetails();
|
||||
@@ -1961,7 +1948,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
if (!ssidConfigList.isEmpty()) {
|
||||
|
||||
Profile ssidProfile = ssidConfigList.iterator().next();
|
||||
SsidConfiguration ssidConfig = (SsidConfiguration) ssidProfile.getDetails();
|
||||
if (ssidConfig.getSecureMode().equals(SecureMode.open)) {
|
||||
@@ -1979,7 +1965,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
|| ssidConfig.getSecureMode().equals(SecureMode.wpa2EAP)
|
||||
|| ssidConfig.getSecureMode().equals(SecureMode.wpa2OnlyEAP)) {
|
||||
latestClientSessionDetails.setSecurityType(SecurityType.RADIUS);
|
||||
|
||||
latestClientSessionDetails.setEapDetails(new ClientEapDetails());
|
||||
} else {
|
||||
latestClientSessionDetails.setSecurityType(SecurityType.UNSUPPORTED);
|
||||
@@ -2009,9 +1994,11 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
|
||||
LOG.debug("Updated client session {}", clientSession);
|
||||
|
||||
return clientSession;
|
||||
} catch (Exception e) {
|
||||
LOG.error("Error while attempting to create ClientSession and Info", e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
ClientSessionMetricDetails calculateClientSessionMetricDetails(sts.OpensyncStats.Client client, long timestamp) {
|
||||
@@ -2021,21 +2008,46 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
|
||||
ClientSessionMetricDetails metricDetails = new ClientSessionMetricDetails();
|
||||
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Stats: {} DurationMs {}", client.getStats(), client.getDurationMs());
|
||||
int rssi = client.getStats().getRssi();
|
||||
metricDetails.setRssi(rssi);
|
||||
metricDetails.setRxBytes(client.getStats().getRxBytes());
|
||||
metricDetails.setTxBytes(client.getStats().getTxBytes());
|
||||
|
||||
// Frames : data chunk sent over data-link layer (Ethernet, ATM)
|
||||
// Packets : data chunk sent over IP layer.
|
||||
// in Wifi, these are the same size, so number of packets is equal to
|
||||
// number of frames
|
||||
metricDetails.setTotalTxPackets(client.getStats().getTxFrames());
|
||||
metricDetails.setTotalRxPackets(client.getStats().getRxFrames());
|
||||
metricDetails.setTxDataFrames((int) client.getStats().getTxFrames());
|
||||
metricDetails.setRxDataFrames((int) client.getStats().getRxFrames());
|
||||
// values reported in Kbps, convert to Mbps
|
||||
metricDetails.setRxMbps((float) (client.getStats().getRxRate() / 1000));
|
||||
metricDetails.setTxMbps((float) (client.getStats().getTxRate() / 1000));
|
||||
|
||||
metricDetails.setRxRateKbps((long) client.getStats().getRxRate());
|
||||
metricDetails.setTxRateKbps((long) client.getStats().getTxRate());
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("RxRateKbps {} TxRateKbps {}", metricDetails.getRxRateKbps(), metricDetails.getTxRateKbps());
|
||||
|
||||
// Throughput, do rate / duration
|
||||
if (client.getDurationMs() > 0) {
|
||||
metricDetails.setRxRateKbps((long) client.getStats().getRxRate() / client.getDurationMs());
|
||||
metricDetails.setTxRateKbps((long) client.getStats().getTxRate() / client.getDurationMs());
|
||||
if (client.getDurationMs() > 1000) {
|
||||
int durationSec = client.getDurationMs() / 1000;
|
||||
// 1 Mbit = 125000 B
|
||||
|
||||
float rxBytesFv = Long.valueOf(client.getStats().getRxBytes()).floatValue();
|
||||
float rxBytesToMb = rxBytesFv / 125000F;
|
||||
float txBytesFv = Long.valueOf(client.getStats().getRxBytes()).floatValue();
|
||||
float txBytesToMb = txBytesFv / 125000F;
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("rxBytesToMb {} txBytesToMb {} ", rxBytesToMb, txBytesToMb);
|
||||
|
||||
metricDetails.setRxMbps(rxBytesToMb / durationSec);
|
||||
metricDetails.setTxMbps(txBytesToMb / durationSec);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("RxMbps {} TxMbps {} ", metricDetails.getRxMbps(), metricDetails.getTxMbps());
|
||||
|
||||
} else {
|
||||
LOG.info("Cannot calculate tx/rx throughput for Client {} based on duration of {} Ms",
|
||||
client.getMacAddress(), client.getDurationMs());
|
||||
@@ -2134,9 +2146,11 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
|
||||
if (client.hasConnected() && client.getConnected() && client.hasMacAddress()) {
|
||||
// update metrics for connected client
|
||||
numConnectedClients += 1;
|
||||
handleClientSessionMetricsUpdate(customerId, equipmentId, locationId, radioType,
|
||||
clientReport.getTimestampMs(), client);
|
||||
ClientSession session = handleClientSessionMetricsUpdate(customerId, equipmentId,
|
||||
locationId, radioType, clientReport.getTimestampMs(), client);
|
||||
if (session != null) {
|
||||
numConnectedClients += 1;
|
||||
}
|
||||
} else {
|
||||
// Make sure, if we have a session for this client,
|
||||
// it
|
||||
@@ -2258,7 +2272,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
ProfileContainer profileContainer = new ProfileContainer(
|
||||
profileServiceInterface.getProfileWithChildren(profileId));
|
||||
RfConfiguration rfConfig = (RfConfiguration) profileContainer.getChildOfTypeOrNull(profileId, ProfileType.rf)
|
||||
.getDetails();
|
||||
.getDetails();
|
||||
|
||||
for (Survey survey : report.getSurveyList()) {
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.telecominfraproject.wlan.opensync.external.integration.models;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
import com.telecominfraproject.wlan.core.model.entity.CountryCode;
|
||||
@@ -282,4 +283,34 @@ public class OpensyncAPConfig extends BaseJsonModel {
|
||||
public List<Profile> getMetricsProfiles() {
|
||||
return metricsProfile;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(apProfile, blockedClients, bonjourGatewayProfiles, captiveProfiles, customerEquipment,
|
||||
equipmentGateway, equipmentLocation, equipmentRouting, hotspotConfig, metricsProfile,
|
||||
radiusProfiles, rfProfile, ssidProfile);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof OpensyncAPConfig)) {
|
||||
return false;
|
||||
}
|
||||
OpensyncAPConfig other = (OpensyncAPConfig) obj;
|
||||
return Objects.equals(apProfile, other.apProfile) && Objects.equals(blockedClients, other.blockedClients)
|
||||
&& Objects.equals(bonjourGatewayProfiles, other.bonjourGatewayProfiles)
|
||||
&& Objects.equals(captiveProfiles, other.captiveProfiles)
|
||||
&& Objects.equals(customerEquipment, other.customerEquipment)
|
||||
&& Objects.equals(equipmentGateway, other.equipmentGateway)
|
||||
&& Objects.equals(equipmentLocation, other.equipmentLocation)
|
||||
&& Objects.equals(equipmentRouting, other.equipmentRouting)
|
||||
&& Objects.equals(hotspotConfig, other.hotspotConfig)
|
||||
&& Objects.equals(metricsProfile, other.metricsProfile)
|
||||
&& Objects.equals(radiusProfiles, other.radiusProfiles) && Objects.equals(rfProfile, other.rfProfile)
|
||||
&& Objects.equals(ssidProfile, other.ssidProfile);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -6,13 +6,12 @@ import java.util.Map;
|
||||
import com.telecominfraproject.wlan.core.model.json.BaseJsonModel;
|
||||
import com.vmware.ovsdb.protocol.operation.notation.Uuid;
|
||||
|
||||
public class OpensyncAPInetState extends BaseJsonModel {
|
||||
|
||||
public class OpensyncAPInetState extends BaseJsonModel {
|
||||
|
||||
private static final long serialVersionUID = 1707053648715030173L;
|
||||
|
||||
|
||||
public String ifName;
|
||||
public String dhcpd;
|
||||
public Map<String, String> dhcpd;
|
||||
public String unpnpMode;
|
||||
public String ifType;
|
||||
public String softwdsMacAddr;
|
||||
@@ -37,175 +36,423 @@ public class OpensyncAPInetState extends BaseJsonModel {
|
||||
public String inetConfig;
|
||||
public Uuid _uuid;
|
||||
public Uuid version;
|
||||
public String greLocalInetAddr;
|
||||
public String greRemoteMacAddr;
|
||||
|
||||
|
||||
|
||||
|
||||
public OpensyncAPInetState() {
|
||||
super();
|
||||
dns = new HashMap<>();
|
||||
dhcpc = new HashMap<>();
|
||||
}
|
||||
public String getIfName() {
|
||||
super();
|
||||
dns = new HashMap<>();
|
||||
dhcpc = new HashMap<>();
|
||||
}
|
||||
|
||||
public String getIfName() {
|
||||
return ifName;
|
||||
}
|
||||
|
||||
public void setIfName(String ifName) {
|
||||
this.ifName = ifName;
|
||||
}
|
||||
public String getDhcpd() {
|
||||
|
||||
public Map<String, String> getDhcpd() {
|
||||
return dhcpd;
|
||||
}
|
||||
public void setDhcpd(String dhcpd) {
|
||||
|
||||
public void setDhcpd(Map<String, String> dhcpd) {
|
||||
this.dhcpd = dhcpd;
|
||||
}
|
||||
|
||||
public String getUnpnpMode() {
|
||||
return unpnpMode;
|
||||
}
|
||||
|
||||
public void setUnpnpMode(String unpnpMode) {
|
||||
this.unpnpMode = unpnpMode;
|
||||
}
|
||||
|
||||
public String getIfType() {
|
||||
return ifType;
|
||||
}
|
||||
|
||||
public void setIfType(String ifType) {
|
||||
this.ifType = ifType;
|
||||
}
|
||||
|
||||
public String getSoftwdsMacAddr() {
|
||||
return softwdsMacAddr;
|
||||
}
|
||||
|
||||
public void setSoftwdsMacAddr(String softwdsMacAddr) {
|
||||
this.softwdsMacAddr = softwdsMacAddr;
|
||||
}
|
||||
|
||||
public boolean isEnabled() {
|
||||
return enabled;
|
||||
}
|
||||
|
||||
public void setEnabled(boolean enabled) {
|
||||
this.enabled = enabled;
|
||||
}
|
||||
|
||||
public boolean isSofwdsWrap() {
|
||||
return sofwdsWrap;
|
||||
}
|
||||
|
||||
public void setSofwdsWrap(boolean sofwdsWrap) {
|
||||
this.sofwdsWrap = sofwdsWrap;
|
||||
}
|
||||
|
||||
public int getVlanId() {
|
||||
return vlanId;
|
||||
}
|
||||
|
||||
public void setVlanId(int vlanId) {
|
||||
this.vlanId = vlanId;
|
||||
}
|
||||
|
||||
public String getNetmask() {
|
||||
return netmask;
|
||||
}
|
||||
|
||||
public void setNetmask(String netmask) {
|
||||
this.netmask = netmask;
|
||||
}
|
||||
|
||||
public boolean isNat() {
|
||||
return nat;
|
||||
}
|
||||
|
||||
public void setNat(boolean nat) {
|
||||
this.nat = nat;
|
||||
}
|
||||
|
||||
public String getGreRemoteInetAddr() {
|
||||
return greRemoteInetAddr;
|
||||
}
|
||||
|
||||
public void setGreRemoteInetAddr(String greRemoteInetAddr) {
|
||||
this.greRemoteInetAddr = greRemoteInetAddr;
|
||||
}
|
||||
|
||||
public String getIfUuid() {
|
||||
return ifUuid;
|
||||
}
|
||||
|
||||
public void setIfUuid(String ifUuid) {
|
||||
this.ifUuid = ifUuid;
|
||||
}
|
||||
|
||||
public String getInetAddr() {
|
||||
return inetAddr;
|
||||
}
|
||||
|
||||
public void setInetAddr(String inetAddr) {
|
||||
this.inetAddr = inetAddr;
|
||||
}
|
||||
|
||||
public String getHwAddr() {
|
||||
return hwAddr;
|
||||
}
|
||||
|
||||
public void setHwAddr(String hwAddr) {
|
||||
this.hwAddr = hwAddr;
|
||||
}
|
||||
|
||||
public int getMtw() {
|
||||
return mtw;
|
||||
}
|
||||
|
||||
public void setMtw(int mtw) {
|
||||
this.mtw = mtw;
|
||||
}
|
||||
|
||||
public boolean isNetwork() {
|
||||
return network;
|
||||
}
|
||||
|
||||
public void setNetwork(boolean network) {
|
||||
this.network = network;
|
||||
}
|
||||
|
||||
public Map<String, String> getDns() {
|
||||
return dns;
|
||||
}
|
||||
|
||||
public void setDns(Map<String, String> dns) {
|
||||
this.dns = dns;
|
||||
}
|
||||
|
||||
public String getParentIfName() {
|
||||
return parentIfName;
|
||||
}
|
||||
|
||||
public void setParentIfName(String parentIfName) {
|
||||
this.parentIfName = parentIfName;
|
||||
}
|
||||
|
||||
public String getGreIfName() {
|
||||
return greIfName;
|
||||
}
|
||||
|
||||
public void setGreIfName(String greIfName) {
|
||||
this.greIfName = greIfName;
|
||||
}
|
||||
|
||||
public String getBroadcast() {
|
||||
return broadcast;
|
||||
}
|
||||
|
||||
public void setBroadcast(String broadcast) {
|
||||
this.broadcast = broadcast;
|
||||
}
|
||||
|
||||
public Map<String, String> getDhcpc() {
|
||||
return dhcpc;
|
||||
}
|
||||
|
||||
public void setDhcpc(Map<String, String> dhcpc) {
|
||||
this.dhcpc = dhcpc;
|
||||
}
|
||||
|
||||
public String getGateway() {
|
||||
return gateway;
|
||||
}
|
||||
|
||||
public void setGateway(String gateway) {
|
||||
this.gateway = gateway;
|
||||
}
|
||||
|
||||
public String getIpAssignScheme() {
|
||||
return ipAssignScheme;
|
||||
}
|
||||
|
||||
public void setIpAssignScheme(String ipAssignScheme) {
|
||||
this.ipAssignScheme = ipAssignScheme;
|
||||
}
|
||||
|
||||
public String getInetConfig() {
|
||||
return inetConfig;
|
||||
}
|
||||
|
||||
public void setInetConfig(String inetConfig) {
|
||||
this.inetConfig = inetConfig;
|
||||
}
|
||||
|
||||
public static long getSerialversionuid() {
|
||||
return serialVersionUID;
|
||||
}
|
||||
|
||||
public Uuid get_uuid() {
|
||||
return _uuid;
|
||||
}
|
||||
|
||||
public void set_uuid(Uuid _uuid) {
|
||||
this._uuid = _uuid;
|
||||
}
|
||||
|
||||
public Uuid getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(Uuid version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setGreLocalInetAddr(String greLocalInetAddr) {
|
||||
this.greLocalInetAddr = greLocalInetAddr;
|
||||
|
||||
}
|
||||
|
||||
public String getGreLocalInetAddr() {
|
||||
return greLocalInetAddr;
|
||||
}
|
||||
|
||||
public void setGreRemoteMacAddr(String greRemoteMacAddr) {
|
||||
this.greRemoteMacAddr = greRemoteMacAddr;
|
||||
}
|
||||
|
||||
public String getGreRemoteMacAddr(){
|
||||
return this.greRemoteMacAddr;
|
||||
}
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((_uuid == null) ? 0 : _uuid.hashCode());
|
||||
result = prime * result + ((broadcast == null) ? 0 : broadcast.hashCode());
|
||||
result = prime * result + ((dhcpc == null) ? 0 : dhcpc.hashCode());
|
||||
result = prime * result + ((dhcpd == null) ? 0 : dhcpd.hashCode());
|
||||
result = prime * result + ((dns == null) ? 0 : dns.hashCode());
|
||||
result = prime * result + (enabled ? 1231 : 1237);
|
||||
result = prime * result + ((gateway == null) ? 0 : gateway.hashCode());
|
||||
result = prime * result + ((greIfName == null) ? 0 : greIfName.hashCode());
|
||||
result = prime * result + ((greLocalInetAddr == null) ? 0 : greLocalInetAddr.hashCode());
|
||||
result = prime * result + ((greRemoteInetAddr == null) ? 0 : greRemoteInetAddr.hashCode());
|
||||
result = prime * result + ((hwAddr == null) ? 0 : hwAddr.hashCode());
|
||||
result = prime * result + ((ifName == null) ? 0 : ifName.hashCode());
|
||||
result = prime * result + ((ifType == null) ? 0 : ifType.hashCode());
|
||||
result = prime * result + ((ifUuid == null) ? 0 : ifUuid.hashCode());
|
||||
result = prime * result + ((inetAddr == null) ? 0 : inetAddr.hashCode());
|
||||
result = prime * result + ((inetConfig == null) ? 0 : inetConfig.hashCode());
|
||||
result = prime * result + ((ipAssignScheme == null) ? 0 : ipAssignScheme.hashCode());
|
||||
result = prime * result + mtw;
|
||||
result = prime * result + (nat ? 1231 : 1237);
|
||||
result = prime * result + ((netmask == null) ? 0 : netmask.hashCode());
|
||||
result = prime * result + (network ? 1231 : 1237);
|
||||
result = prime * result + ((parentIfName == null) ? 0 : parentIfName.hashCode());
|
||||
result = prime * result + ((greRemoteMacAddr == null) ? 0 : greRemoteMacAddr.hashCode());
|
||||
result = prime * result + ((softwdsMacAddr == null) ? 0 : softwdsMacAddr.hashCode());
|
||||
result = prime * result + (sofwdsWrap ? 1231 : 1237);
|
||||
result = prime * result + ((unpnpMode == null) ? 0 : unpnpMode.hashCode());
|
||||
result = prime * result + ((version == null) ? 0 : version.hashCode());
|
||||
result = prime * result + vlanId;
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
OpensyncAPInetState other = (OpensyncAPInetState) obj;
|
||||
if (_uuid == null) {
|
||||
if (other._uuid != null)
|
||||
return false;
|
||||
} else if (!_uuid.equals(other._uuid))
|
||||
return false;
|
||||
if (broadcast == null) {
|
||||
if (other.broadcast != null)
|
||||
return false;
|
||||
} else if (!broadcast.equals(other.broadcast))
|
||||
return false;
|
||||
if (dhcpc == null) {
|
||||
if (other.dhcpc != null)
|
||||
return false;
|
||||
} else if (!dhcpc.equals(other.dhcpc))
|
||||
return false;
|
||||
if (dhcpd == null) {
|
||||
if (other.dhcpd != null)
|
||||
return false;
|
||||
} else if (!dhcpd.equals(other.dhcpd))
|
||||
return false;
|
||||
if (dns == null) {
|
||||
if (other.dns != null)
|
||||
return false;
|
||||
} else if (!dns.equals(other.dns))
|
||||
return false;
|
||||
if (enabled != other.enabled)
|
||||
return false;
|
||||
if (gateway == null) {
|
||||
if (other.gateway != null)
|
||||
return false;
|
||||
} else if (!gateway.equals(other.gateway))
|
||||
return false;
|
||||
if (greIfName == null) {
|
||||
if (other.greIfName != null)
|
||||
return false;
|
||||
} else if (!greIfName.equals(other.greIfName))
|
||||
return false;
|
||||
if (greLocalInetAddr == null) {
|
||||
if (other.greLocalInetAddr != null)
|
||||
return false;
|
||||
} else if (!greLocalInetAddr.equals(other.greLocalInetAddr))
|
||||
return false;
|
||||
if (greRemoteInetAddr == null) {
|
||||
if (other.greRemoteInetAddr != null)
|
||||
return false;
|
||||
} else if (!greRemoteInetAddr.equals(other.greRemoteInetAddr))
|
||||
return false;
|
||||
if (hwAddr == null) {
|
||||
if (other.hwAddr != null)
|
||||
return false;
|
||||
} else if (!hwAddr.equals(other.hwAddr))
|
||||
return false;
|
||||
if (ifName == null) {
|
||||
if (other.ifName != null)
|
||||
return false;
|
||||
} else if (!ifName.equals(other.ifName))
|
||||
return false;
|
||||
if (ifType == null) {
|
||||
if (other.ifType != null)
|
||||
return false;
|
||||
} else if (!ifType.equals(other.ifType))
|
||||
return false;
|
||||
if (ifUuid == null) {
|
||||
if (other.ifUuid != null)
|
||||
return false;
|
||||
} else if (!ifUuid.equals(other.ifUuid))
|
||||
return false;
|
||||
if (inetAddr == null) {
|
||||
if (other.inetAddr != null)
|
||||
return false;
|
||||
} else if (!inetAddr.equals(other.inetAddr))
|
||||
return false;
|
||||
if (inetConfig == null) {
|
||||
if (other.inetConfig != null)
|
||||
return false;
|
||||
} else if (!inetConfig.equals(other.inetConfig))
|
||||
return false;
|
||||
if (ipAssignScheme == null) {
|
||||
if (other.ipAssignScheme != null)
|
||||
return false;
|
||||
} else if (!ipAssignScheme.equals(other.ipAssignScheme))
|
||||
return false;
|
||||
if (mtw != other.mtw)
|
||||
return false;
|
||||
if (nat != other.nat)
|
||||
return false;
|
||||
if (netmask == null) {
|
||||
if (other.netmask != null)
|
||||
return false;
|
||||
} else if (!netmask.equals(other.netmask))
|
||||
return false;
|
||||
if (network != other.network)
|
||||
return false;
|
||||
if (parentIfName == null) {
|
||||
if (other.parentIfName != null)
|
||||
return false;
|
||||
} else if (!parentIfName.equals(other.parentIfName))
|
||||
return false;
|
||||
if (greRemoteMacAddr == null) {
|
||||
if (other.greRemoteMacAddr != null)
|
||||
return false;
|
||||
} else if (!greRemoteMacAddr.equals(other.greRemoteMacAddr))
|
||||
return false;
|
||||
if (softwdsMacAddr == null) {
|
||||
if (other.softwdsMacAddr != null)
|
||||
return false;
|
||||
} else if (!softwdsMacAddr.equals(other.softwdsMacAddr))
|
||||
return false;
|
||||
if (sofwdsWrap != other.sofwdsWrap)
|
||||
return false;
|
||||
if (unpnpMode == null) {
|
||||
if (other.unpnpMode != null)
|
||||
return false;
|
||||
} else if (!unpnpMode.equals(other.unpnpMode))
|
||||
return false;
|
||||
if (version == null) {
|
||||
if (other.version != null)
|
||||
return false;
|
||||
} else if (!version.equals(other.version))
|
||||
return false;
|
||||
if (vlanId != other.vlanId)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "OpensyncAPInetState [ifName=" + ifName + ", dhcpd=" + dhcpd + ", unpnpMode=" + unpnpMode + ", ifType="
|
||||
+ ifType + ", softwdsMacAddr=" + softwdsMacAddr + ", enabled=" + enabled + ", sofwdsWrap=" + sofwdsWrap
|
||||
+ ", vlanId=" + vlanId + ", netmask=" + netmask + ", nat=" + nat + ", greRemoteInetAddr="
|
||||
+ greRemoteInetAddr + ", ifUuid=" + ifUuid + ", inetAddr=" + inetAddr + ", hwAddr=" + hwAddr + ", mtw="
|
||||
+ mtw + ", network=" + network + ", dns=" + dns + ", parentIfName=" + parentIfName + ", greIfName="
|
||||
+ greIfName + ", broadcast=" + broadcast + ", dhcpc=" + dhcpc + ", gateway=" + gateway
|
||||
+ ", ipAssignScheme=" + ipAssignScheme + ", inetConfig=" + inetConfig + ", _uuid=" + _uuid
|
||||
+ ", version=" + version + ", greLocalInetAddr=" + greLocalInetAddr + ", greRemoteMacAddr="
|
||||
+ greRemoteMacAddr + "]";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -141,7 +141,6 @@
|
||||
"radioType": "is2dot4GHz",
|
||||
"radioAdminState": "enabled",
|
||||
"fragmentationThresholdBytes": 2346,
|
||||
"wmmState": "enabled",
|
||||
"uapsdState": "enabled",
|
||||
"stationIsolation": "disabled",
|
||||
"managementRate": {
|
||||
@@ -167,7 +166,6 @@
|
||||
"radioType": "is5GHzU",
|
||||
"radioAdminState": "enabled",
|
||||
"fragmentationThresholdBytes": 2346,
|
||||
"wmmState": "enabled",
|
||||
"uapsdState": "enabled",
|
||||
"stationIsolation": "disabled",
|
||||
"managementRate": {
|
||||
@@ -193,7 +191,6 @@
|
||||
"radioType": "is5GHzL",
|
||||
"radioAdminState": "enabled",
|
||||
"fragmentationThresholdBytes": 2346,
|
||||
"wmmState": "enabled",
|
||||
"uapsdState": "enabled",
|
||||
"stationIsolation": "disabled",
|
||||
"managementRate": {
|
||||
@@ -221,4 +218,4 @@
|
||||
"serial": "21P10C68818122",
|
||||
"createdTimestamp": 1591653239821,
|
||||
"lastModifiedTimestamp": 1591653241398
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
"name": "TipWlan-Hotspot20-Operator",
|
||||
"details": {
|
||||
"model_type": "OperatorProfile",
|
||||
"domainName": "telecominfraproject.atlassian.net",
|
||||
"serverOnlyAuthenticatedL2EncryptionNetwork": false,
|
||||
"x509CertificateLocation": "/etc/ca.pem",
|
||||
"operatorFriendlyName": [
|
||||
|
||||
@@ -20,10 +20,10 @@
|
||||
|
||||
<modules>
|
||||
<module>../opensync-ext-interface</module>
|
||||
<module>../opensync-ext-static</module>
|
||||
<module>../opensync-ext-cloud</module>
|
||||
<module>../opensync-gateway</module>
|
||||
<module>../opensync-ext-static</module>
|
||||
<module>../opensync-gateway-static-process</module>
|
||||
<module>../opensync-ext-cloud</module>
|
||||
<module>../opensync-gateway-cloud-process</module>
|
||||
</modules>
|
||||
</profile>
|
||||
|
||||
@@ -20,6 +20,11 @@ SSC_SERVER_HOST="${SSC_SERVER}"
|
||||
ALL_IN_ONE_HOST="${INTEGRATED_SERVER}"
|
||||
FILE_STORE_DIRECTORY="${FILE_STORE_DIRECTORY_INTERNAL:=/tmp/filestore}"
|
||||
FILE_STORE_EXTERNAL_URL="${FILE_STORE_URL}"
|
||||
MQTT_BROKER_EXTERNAL_PORT="${MQTT_BROKER_EXTERNAL_PORT}"
|
||||
OVSDB_EXTERNAL_PORT="${OVSDB_EXTERNAL_PORT}"
|
||||
|
||||
|
||||
|
||||
|
||||
OVSDB_PROPS=" "
|
||||
OVSDB_PROPS+=" -Dtip.wlan.ovsdb.managerAddr=$OVSDB_MANAGER_HOST"
|
||||
@@ -33,6 +38,8 @@ OVSDB_PROPS+=" -Dtip.wlan.ovsdb.configFileName=/app/opensync/config_2_ssids.json
|
||||
MQTT_PROPS=" "
|
||||
MQTT_PROPS+=" -Dtip.wlan.mqttBroker.address.internal=$MQTT_BROKER_HOST_INTERNAL"
|
||||
MQTT_PROPS+=" -Dtip.wlan.mqttBroker.address.external=$MQTT_BROKER_HOST_EXTERNAL"
|
||||
MQTT_PROPS+=" -Dtip.wlan.ovsdb.externalPort=$OVSDB_EXTERNAL_PORT"
|
||||
MQTT_PROPS+=" -Dtip.wlan.mqttBroker.externalPort=$MQTT_BROKER_EXTERNAL_PORT"
|
||||
MQTT_PROPS+=" -Dtip.wlan.mqttBroker.listenPort=1883"
|
||||
|
||||
LOGBACK_CONFIG_FILE="${LOGBACK_CONFIG_FILE:=/app/opensync/logback.xml}"
|
||||
|
||||
1
opensync-gateway-cloud-process/.gitignore
vendored
1
opensync-gateway-cloud-process/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
/target/
|
||||
@@ -34,7 +34,7 @@
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>${docker.fabric.version}</version>
|
||||
<configuration>
|
||||
<verbose>true</verbose>
|
||||
<verbose>false</verbose>
|
||||
<apiVersion>1.23</apiVersion>
|
||||
<images>
|
||||
<image>
|
||||
|
||||
@@ -141,7 +141,6 @@
|
||||
"radioType": "is2dot4GHz",
|
||||
"radioAdminState": "enabled",
|
||||
"fragmentationThresholdBytes": 2346,
|
||||
"wmmState": "enabled",
|
||||
"uapsdState": "enabled",
|
||||
"stationIsolation": "disabled",
|
||||
"managementRate": {
|
||||
@@ -167,7 +166,6 @@
|
||||
"radioType": "is5GHzU",
|
||||
"radioAdminState": "enabled",
|
||||
"fragmentationThresholdBytes": 2346,
|
||||
"wmmState": "enabled",
|
||||
"uapsdState": "enabled",
|
||||
"stationIsolation": "disabled",
|
||||
"managementRate": {
|
||||
@@ -193,7 +191,6 @@
|
||||
"radioType": "is5GHzL",
|
||||
"radioAdminState": "enabled",
|
||||
"fragmentationThresholdBytes": 2346,
|
||||
"wmmState": "enabled",
|
||||
"uapsdState": "enabled",
|
||||
"stationIsolation": "disabled",
|
||||
"managementRate": {
|
||||
@@ -221,4 +218,4 @@
|
||||
"serial": "21P10C68818122",
|
||||
"createdTimestamp": 1591653239821,
|
||||
"lastModifiedTimestamp": 1591653241398
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
"name": "TipWlan-Hotspot20-Operator",
|
||||
"details": {
|
||||
"model_type": "OperatorProfile",
|
||||
"domainName": "telecominfraproject.atlassian.net",
|
||||
"serverOnlyAuthenticatedL2EncryptionNetwork": false,
|
||||
"x509CertificateLocation": "/etc/ca.pem",
|
||||
"operatorFriendlyName": [
|
||||
|
||||
@@ -141,7 +141,6 @@
|
||||
"radioType": "is2dot4GHz",
|
||||
"radioAdminState": "enabled",
|
||||
"fragmentationThresholdBytes": 2346,
|
||||
"wmmState": "enabled",
|
||||
"uapsdState": "enabled",
|
||||
"stationIsolation": "disabled",
|
||||
"managementRate": {
|
||||
@@ -167,7 +166,6 @@
|
||||
"radioType": "is5GHzU",
|
||||
"radioAdminState": "enabled",
|
||||
"fragmentationThresholdBytes": 2346,
|
||||
"wmmState": "enabled",
|
||||
"uapsdState": "enabled",
|
||||
"stationIsolation": "disabled",
|
||||
"managementRate": {
|
||||
@@ -193,7 +191,6 @@
|
||||
"radioType": "is5GHzL",
|
||||
"radioAdminState": "enabled",
|
||||
"fragmentationThresholdBytes": 2346,
|
||||
"wmmState": "enabled",
|
||||
"uapsdState": "enabled",
|
||||
"stationIsolation": "disabled",
|
||||
"managementRate": {
|
||||
@@ -221,4 +218,4 @@
|
||||
"serial": "21P10C68818122",
|
||||
"createdTimestamp": 1591653239821,
|
||||
"lastModifiedTimestamp": 1591653241398
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
"name": "TipWlan-Hotspot20-Operator",
|
||||
"details": {
|
||||
"model_type": "OperatorProfile",
|
||||
"domainName": "telecominfraproject.atlassian.net",
|
||||
"serverOnlyAuthenticatedL2EncryptionNetwork": false,
|
||||
"x509CertificateLocation": "/etc/ca.pem",
|
||||
"operatorFriendlyName": [
|
||||
|
||||
@@ -141,7 +141,6 @@
|
||||
"radioType": "is2dot4GHz",
|
||||
"radioAdminState": "enabled",
|
||||
"fragmentationThresholdBytes": 2346,
|
||||
"wmmState": "enabled",
|
||||
"uapsdState": "enabled",
|
||||
"stationIsolation": "disabled",
|
||||
"managementRate": {
|
||||
@@ -167,7 +166,6 @@
|
||||
"radioType": "is5GHzU",
|
||||
"radioAdminState": "enabled",
|
||||
"fragmentationThresholdBytes": 2346,
|
||||
"wmmState": "enabled",
|
||||
"uapsdState": "enabled",
|
||||
"stationIsolation": "disabled",
|
||||
"managementRate": {
|
||||
@@ -193,7 +191,6 @@
|
||||
"radioType": "is5GHzL",
|
||||
"radioAdminState": "enabled",
|
||||
"fragmentationThresholdBytes": 2346,
|
||||
"wmmState": "enabled",
|
||||
"uapsdState": "enabled",
|
||||
"stationIsolation": "disabled",
|
||||
"managementRate": {
|
||||
@@ -221,4 +218,4 @@
|
||||
"serial": "21P10C68818122",
|
||||
"createdTimestamp": 1591653239821,
|
||||
"lastModifiedTimestamp": 1591653241398
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
"name": "TipWlan-Hotspot20-Operator",
|
||||
"details": {
|
||||
"model_type": "OperatorProfile",
|
||||
"domainName": "telecominfraproject.atlassian.net",
|
||||
"serverOnlyAuthenticatedL2EncryptionNetwork": false,
|
||||
"x509CertificateLocation": "/etc/ca.pem",
|
||||
"operatorFriendlyName": [
|
||||
|
||||
@@ -57,7 +57,7 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
|
||||
@org.springframework.beans.factory.annotation.Value("${tip.wlan.ovsdb.listenPort:6640}")
|
||||
private int ovsdbListenPort;
|
||||
|
||||
@org.springframework.beans.factory.annotation.Value("${tip.wlan.manager.collectionIntervalSec.deviceStats:120}")
|
||||
@org.springframework.beans.factory.annotation.Value("${tip.wlan.manager.collectionIntervalSec.deviceStats:60}")
|
||||
private long collectionIntervalSecDeviceStats;
|
||||
|
||||
@org.springframework.beans.factory.annotation.Value("${tip.wlan.preventClientCnAlteration:false}")
|
||||
@@ -104,7 +104,7 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
|
||||
|
||||
// successfully connected - register it in our
|
||||
// connectedClients table
|
||||
|
||||
|
||||
String key = alterClientCnIfRequired(clientCn, connectNodeInfo);
|
||||
ovsdbSessionMapInterface.newSession(key, ovsdbClient);
|
||||
|
||||
@@ -132,7 +132,6 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void disconnected(OvsdbClient ovsdbClient) {
|
||||
String remoteHost = ovsdbClient.getConnectionInfo().getRemoteAddress().getHostAddress();
|
||||
@@ -192,24 +191,21 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
|
||||
// connectedClients table
|
||||
String apId = alterClientCnIfRequired(clientCn, connectNodeInfo);
|
||||
|
||||
LOG.debug("Client connect for AP {}", apId);
|
||||
LOG.debug("Client {} connect for AP {}", clientCn, apId);
|
||||
|
||||
OpensyncAPConfig opensyncAPConfig = extIntegrationInterface.getApConfig(apId);
|
||||
|
||||
try {
|
||||
ovsdbDao.provisionBridgePortInterface(ovsdbClient);
|
||||
} catch (Exception e) {
|
||||
LOG.warn("Could not provision Bridge->Port->Interface mapping.", e);
|
||||
}
|
||||
ovsdbDao.removeAllStatsConfigs(ovsdbClient); // always
|
||||
ovsdbDao.removeAllSsids(ovsdbClient); // always
|
||||
ovsdbDao.removeWifiRrm(ovsdbClient);
|
||||
|
||||
if (opensyncAPConfig != null) {
|
||||
ovsdbDao.removeAllPasspointConfigs(ovsdbClient);
|
||||
ovsdbDao.removeAllStatsConfigs(ovsdbClient); // always
|
||||
ovsdbDao.removeAllSsids(ovsdbClient, opensyncAPConfig); // always
|
||||
ovsdbDao.removeWifiRrm(ovsdbClient);
|
||||
ovsdbDao.removeAllGreTunnels(ovsdbClient, opensyncAPConfig);
|
||||
ovsdbDao.configureWifiRadios(ovsdbClient, opensyncAPConfig);
|
||||
ovsdbDao.configureInterfaces(ovsdbClient);
|
||||
ovsdbDao.configureSsids(ovsdbClient, opensyncAPConfig);
|
||||
ovsdbDao.configureWifiRrm(ovsdbClient, opensyncAPConfig);
|
||||
ovsdbDao.configureGreTunnels(ovsdbClient, opensyncAPConfig);
|
||||
if (opensyncAPConfig.getHotspotConfig() != null) {
|
||||
ovsdbDao.configureHotspots(ovsdbClient, opensyncAPConfig);
|
||||
}
|
||||
@@ -217,8 +213,19 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
|
||||
if (((ApNetworkConfiguration) opensyncAPConfig.getApProfile().getDetails()).getSyntheticClientEnabled()) {
|
||||
ovsdbDao.enableNetworkProbeForSyntheticClient(ovsdbClient);
|
||||
}
|
||||
} else {
|
||||
ovsdbDao.removeAllPasspointConfigs(ovsdbClient);
|
||||
ovsdbDao.removeAllStatsConfigs(ovsdbClient); // always
|
||||
ovsdbDao.removeAllSsids(ovsdbClient); // always
|
||||
ovsdbDao.removeWifiRrm(ovsdbClient);
|
||||
ovsdbDao.removeAllGreTunnels(ovsdbClient, null);
|
||||
}
|
||||
|
||||
if (ovsdbDao.getDeviceStatsReportingInterval(ovsdbClient) != collectionIntervalSecDeviceStats) {
|
||||
ovsdbDao.updateDeviceStatsReportingInterval(ovsdbClient, collectionIntervalSecDeviceStats);
|
||||
}
|
||||
|
||||
|
||||
LOG.debug("Client connect Done");
|
||||
return connectNodeInfo;
|
||||
}
|
||||
@@ -262,7 +269,9 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
|
||||
return;
|
||||
}
|
||||
|
||||
ovsdbDao.removeAllSsids(ovsdbClient); // always
|
||||
ovsdbDao.removeAllPasspointConfigs(ovsdbClient);
|
||||
ovsdbDao.removeAllSsids(ovsdbClient, opensyncAPConfig); // always
|
||||
ovsdbDao.removeAllGreTunnels(ovsdbClient, opensyncAPConfig);
|
||||
ovsdbDao.removeWifiRrm(ovsdbClient);
|
||||
ovsdbDao.removeAllStatsConfigs(ovsdbClient); // always
|
||||
|
||||
@@ -270,11 +279,14 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
|
||||
ovsdbDao.configureInterfaces(ovsdbClient);
|
||||
ovsdbDao.configureSsids(ovsdbClient, opensyncAPConfig);
|
||||
ovsdbDao.configureWifiRrm(ovsdbClient, opensyncAPConfig);
|
||||
ovsdbDao.configureGreTunnels(ovsdbClient, opensyncAPConfig);
|
||||
if (opensyncAPConfig.getHotspotConfig() != null) {
|
||||
ovsdbDao.configureHotspots(ovsdbClient, opensyncAPConfig);
|
||||
}
|
||||
ovsdbDao.configureStatsFromProfile(ovsdbClient, opensyncAPConfig);
|
||||
|
||||
if (ovsdbDao.getDeviceStatsReportingInterval(ovsdbClient) != collectionIntervalSecDeviceStats) {
|
||||
ovsdbDao.updateDeviceStatsReportingInterval(ovsdbClient, collectionIntervalSecDeviceStats);
|
||||
}
|
||||
LOG.debug("Finished processConfigChanged for {}", apId);
|
||||
|
||||
}
|
||||
@@ -354,7 +366,8 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
|
||||
|
||||
CompletableFuture<TableUpdates> awCf = ovsdbClient.monitor(OvsdbDao.ovsdbName,
|
||||
OvsdbDao.dhcpLeasedIpDbTable + "_" + key,
|
||||
new MonitorRequests(ImmutableMap.of(OvsdbDao.dhcpLeasedIpDbTable, new MonitorRequest())),
|
||||
new MonitorRequests(ImmutableMap.of(OvsdbDao.dhcpLeasedIpDbTable,
|
||||
new MonitorRequest(new MonitorSelect(true, true, true, true)))),
|
||||
new MonitorCallback() {
|
||||
|
||||
@Override
|
||||
@@ -419,15 +432,12 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
|
||||
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
awCf.join();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void monitorCommandStateDbTable(OvsdbClient ovsdbClient, String key) throws OvsdbClientException {
|
||||
|
||||
CompletableFuture<TableUpdates> csCf = ovsdbClient.monitor(OvsdbDao.ovsdbName,
|
||||
@@ -444,7 +454,6 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
|
||||
List<Map<String, String>> delete = new ArrayList<>();
|
||||
List<Map<String, String>> update = new ArrayList<>();
|
||||
|
||||
|
||||
for (TableUpdate tableUpdate : tableUpdates.getTableUpdates().values()) {
|
||||
for (RowUpdate rowUpdate : tableUpdate.getRowUpdates().values()) {
|
||||
|
||||
@@ -498,18 +507,16 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
|
||||
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
csCf.join();
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void monitorAwlanNodeDbTable(OvsdbClient ovsdbClient, String key) throws OvsdbClientException {
|
||||
CompletableFuture<TableUpdates> awCf = ovsdbClient.monitor(OvsdbDao.ovsdbName,
|
||||
OvsdbDao.awlanNodeDbTable + "_" + key,
|
||||
new MonitorRequests(ImmutableMap.of(OvsdbDao.awlanNodeDbTable, new MonitorRequest())),
|
||||
new MonitorRequests(ImmutableMap.of(OvsdbDao.awlanNodeDbTable, new MonitorRequest(new MonitorSelect(true, false, false, true)))),
|
||||
new MonitorCallback() {
|
||||
|
||||
@Override
|
||||
@@ -558,7 +565,6 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
|
||||
|
||||
}
|
||||
|
||||
|
||||
// now address the update/add
|
||||
extIntegrationInterface.wifiAssociatedClientsDbTableUpdate(associatedClients, key);
|
||||
|
||||
@@ -568,50 +574,48 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
|
||||
|
||||
acCf.join();
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void monitorWifiInetStateDbTable(OvsdbClient ovsdbClient, String key) throws OvsdbClientException {
|
||||
CompletableFuture<TableUpdates> isCf = ovsdbClient
|
||||
.monitor(OvsdbDao.ovsdbName, OvsdbDao.wifiInetStateDbTable + "_" + key,
|
||||
new MonitorRequests(ImmutableMap.of(OvsdbDao.wifiInetStateDbTable,
|
||||
new MonitorRequest(new MonitorSelect(false, true, true, true)))),
|
||||
new MonitorCallback() {
|
||||
CompletableFuture<TableUpdates> isCf = ovsdbClient.monitor(OvsdbDao.ovsdbName,
|
||||
OvsdbDao.wifiInetStateDbTable + "_" + key,
|
||||
new MonitorRequests(ImmutableMap.of(OvsdbDao.wifiInetStateDbTable,
|
||||
new MonitorRequest(new MonitorSelect(true, true, true, true)))),
|
||||
new MonitorCallback() {
|
||||
|
||||
@Override
|
||||
public void update(TableUpdates tableUpdates) {
|
||||
LOG.info(OvsdbDao.ovsdbName,
|
||||
OvsdbDao.wifiInetStateDbTable + "_" + key + " monitor callback received {}",
|
||||
tableUpdates);
|
||||
@Override
|
||||
public void update(TableUpdates tableUpdates) {
|
||||
LOG.info(OvsdbDao.ovsdbName,
|
||||
OvsdbDao.wifiInetStateDbTable + "_" + key + " monitor callback received {}",
|
||||
tableUpdates);
|
||||
|
||||
List<OpensyncAPInetState> inetStateInsertOrUpdate = new ArrayList<>();
|
||||
List<OpensyncAPInetState> inetStateDelete = new ArrayList<>();
|
||||
List<OpensyncAPInetState> inetStateInsertOrUpdate = new ArrayList<>();
|
||||
List<OpensyncAPInetState> inetStateDelete = new ArrayList<>();
|
||||
|
||||
for (TableUpdate tableUpdate : tableUpdates.getTableUpdates().values()) {
|
||||
for (TableUpdate tableUpdate : tableUpdates.getTableUpdates().values()) {
|
||||
|
||||
for (RowUpdate rowUpdate : tableUpdate.getRowUpdates().values()) {
|
||||
for (RowUpdate rowUpdate : tableUpdate.getRowUpdates().values()) {
|
||||
|
||||
if (rowUpdate.getNew() == null) {
|
||||
inetStateDelete.addAll(ovsdbDao
|
||||
.getOpensyncApInetStateForRowUpdate(rowUpdate, key, ovsdbClient));
|
||||
} else {
|
||||
inetStateInsertOrUpdate.addAll(ovsdbDao
|
||||
.getOpensyncApInetStateForRowUpdate(rowUpdate, key, ovsdbClient));
|
||||
}
|
||||
|
||||
}
|
||||
if (rowUpdate.getNew() == null) {
|
||||
inetStateDelete.addAll(
|
||||
ovsdbDao.getOpensyncApInetStateForRowUpdate(rowUpdate, key, ovsdbClient));
|
||||
} else {
|
||||
inetStateInsertOrUpdate.addAll(
|
||||
ovsdbDao.getOpensyncApInetStateForRowUpdate(rowUpdate, key, ovsdbClient));
|
||||
}
|
||||
|
||||
|
||||
// delete first
|
||||
extIntegrationInterface.wifiInetStateDbTableUpdate(inetStateDelete, key);
|
||||
|
||||
// now process updates and mutations
|
||||
extIntegrationInterface.wifiInetStateDbTableUpdate(inetStateInsertOrUpdate, key);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
// delete first
|
||||
extIntegrationInterface.wifiInetStateDbTableUpdate(inetStateDelete, key);
|
||||
|
||||
// now process updates and mutations
|
||||
extIntegrationInterface.wifiInetStateDbTableUpdate(inetStateInsertOrUpdate, key);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
isCf.join();
|
||||
|
||||
}
|
||||
@@ -620,7 +624,7 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
|
||||
|
||||
CompletableFuture<TableUpdates> rsCf = ovsdbClient.monitor(OvsdbDao.ovsdbName,
|
||||
OvsdbDao.wifiRadioStateDbTable + "_" + key,
|
||||
new MonitorRequests(ImmutableMap.of(OvsdbDao.wifiRadioStateDbTable, new MonitorRequest())),
|
||||
new MonitorRequests(ImmutableMap.of(OvsdbDao.wifiRadioStateDbTable, new MonitorRequest(new MonitorSelect(true, false, false, true)))),
|
||||
new MonitorCallback() {
|
||||
|
||||
@Override
|
||||
@@ -641,7 +645,7 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
|
||||
|
||||
CompletableFuture<TableUpdates> vsCf = ovsdbClient.monitor(OvsdbDao.ovsdbName,
|
||||
OvsdbDao.wifiVifStateDbTable + "_" + key,
|
||||
new MonitorRequests(ImmutableMap.of(OvsdbDao.wifiVifStateDbTable, new MonitorRequest())),
|
||||
new MonitorRequests(ImmutableMap.of(OvsdbDao.wifiVifStateDbTable, new MonitorRequest(new MonitorSelect(true, true, true, true)))),
|
||||
new MonitorCallback() {
|
||||
|
||||
@Override
|
||||
@@ -680,7 +684,6 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
@@ -723,14 +726,10 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
|
||||
@Override
|
||||
public String processFirmwareFlash(String apId, String firmwareVersion, String username) {
|
||||
OvsdbSession session = ovsdbSessionMapInterface.getSession(apId);
|
||||
OvsdbClient ovsdbClient = session.getOvsdbClient();
|
||||
try {
|
||||
ovsdbDao.configureFirmwareFlash(session.getOvsdbClient(), apId, firmwareVersion, username);
|
||||
} catch (Exception e) {
|
||||
LOG.error("Failed to flash firmware for " + apId + " " + e.getLocalizedMessage());
|
||||
monitorOvsdbStateTables(ovsdbClient, apId); // turn back on so we
|
||||
// can go forward and
|
||||
// recover
|
||||
return "Failed to flash firmware for " + apId + " " + e.getLocalizedMessage();
|
||||
|
||||
}
|
||||
@@ -839,7 +838,6 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
|
||||
return "failed to trigger a factory reset of AP " + apId;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public String alterClientCnIfRequired(String clientCn, ConnectNodeInfo connectNodeInfo) {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,7 @@
|
||||
package com.telecominfraproject.wlan.opensync.ovsdb.dao.models;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.vmware.ovsdb.protocol.operation.notation.Uuid;
|
||||
|
||||
public class WifiInetConfigInfo implements Cloneable{
|
||||
@@ -17,22 +19,126 @@ public class WifiInetConfigInfo implements Cloneable{
|
||||
public String inetAddr;
|
||||
public int mtu;
|
||||
public String netmask;
|
||||
public String gateway;
|
||||
public Map<String,String> dns;
|
||||
public Map<String,String> dhcpd;
|
||||
|
||||
|
||||
@Override
|
||||
public WifiInetConfigInfo clone() {
|
||||
try {
|
||||
WifiInetConfigInfo ret = (WifiInetConfigInfo)super.clone();
|
||||
if (dns != null) ret.dns = this.dns;
|
||||
if (dhcpd != null) ret.dhcpd = this.dhcpd;
|
||||
return ret;
|
||||
}catch(CloneNotSupportedException e) {
|
||||
throw new IllegalStateException("Cannot clone ", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format(
|
||||
"WifiInetConfigInfo [nat=%s, broadcast=%s, enabled=%s, ifName=%s, ifType=%s, ipAssignScheme=%s, network=%s, uuid=%s, inetAddr=%s, mtu=%s, netmask=%s, vlanId=%s]",
|
||||
nat, broadcast, enabled, ifName, ifType, ipAssignScheme, network, uuid,inetAddr, mtu, netmask, vlanId);
|
||||
}
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((broadcast == null) ? 0 : broadcast.hashCode());
|
||||
result = prime * result + ((dhcpd == null) ? 0 : dhcpd.hashCode());
|
||||
result = prime * result + ((dns == null) ? 0 : dns.hashCode());
|
||||
result = prime * result + (enabled ? 1231 : 1237);
|
||||
result = prime * result + ((gateway == null) ? 0 : gateway.hashCode());
|
||||
result = prime * result + ((ifName == null) ? 0 : ifName.hashCode());
|
||||
result = prime * result + ((ifType == null) ? 0 : ifType.hashCode());
|
||||
result = prime * result + ((inetAddr == null) ? 0 : inetAddr.hashCode());
|
||||
result = prime * result + ((ipAssignScheme == null) ? 0 : ipAssignScheme.hashCode());
|
||||
result = prime * result + mtu;
|
||||
result = prime * result + (nat ? 1231 : 1237);
|
||||
result = prime * result + ((netmask == null) ? 0 : netmask.hashCode());
|
||||
result = prime * result + (network ? 1231 : 1237);
|
||||
result = prime * result + ((uuid == null) ? 0 : uuid.hashCode());
|
||||
result = prime * result + vlanId;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
WifiInetConfigInfo other = (WifiInetConfigInfo) obj;
|
||||
if (broadcast == null) {
|
||||
if (other.broadcast != null)
|
||||
return false;
|
||||
} else if (!broadcast.equals(other.broadcast))
|
||||
return false;
|
||||
if (dhcpd == null) {
|
||||
if (other.dhcpd != null)
|
||||
return false;
|
||||
} else if (!dhcpd.equals(other.dhcpd))
|
||||
return false;
|
||||
if (dns == null) {
|
||||
if (other.dns != null)
|
||||
return false;
|
||||
} else if (!dns.equals(other.dns))
|
||||
return false;
|
||||
if (enabled != other.enabled)
|
||||
return false;
|
||||
if (gateway == null) {
|
||||
if (other.gateway != null)
|
||||
return false;
|
||||
} else if (!gateway.equals(other.gateway))
|
||||
return false;
|
||||
if (ifName == null) {
|
||||
if (other.ifName != null)
|
||||
return false;
|
||||
} else if (!ifName.equals(other.ifName))
|
||||
return false;
|
||||
if (ifType == null) {
|
||||
if (other.ifType != null)
|
||||
return false;
|
||||
} else if (!ifType.equals(other.ifType))
|
||||
return false;
|
||||
if (inetAddr == null) {
|
||||
if (other.inetAddr != null)
|
||||
return false;
|
||||
} else if (!inetAddr.equals(other.inetAddr))
|
||||
return false;
|
||||
if (ipAssignScheme == null) {
|
||||
if (other.ipAssignScheme != null)
|
||||
return false;
|
||||
} else if (!ipAssignScheme.equals(other.ipAssignScheme))
|
||||
return false;
|
||||
if (mtu != other.mtu)
|
||||
return false;
|
||||
if (nat != other.nat)
|
||||
return false;
|
||||
if (netmask == null) {
|
||||
if (other.netmask != null)
|
||||
return false;
|
||||
} else if (!netmask.equals(other.netmask))
|
||||
return false;
|
||||
if (network != other.network)
|
||||
return false;
|
||||
if (uuid == null) {
|
||||
if (other.uuid != null)
|
||||
return false;
|
||||
} else if (!uuid.equals(other.uuid))
|
||||
return false;
|
||||
if (vlanId != other.vlanId)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "WifiInetConfigInfo [nat=" + nat + ", enabled=" + enabled + ", ifName=" + ifName + ", ifType=" + ifType
|
||||
+ ", ipAssignScheme=" + ipAssignScheme + ", network=" + network + ", uuid=" + uuid + ", vlanId="
|
||||
+ vlanId + ", broadcast=" + broadcast + ", inetAddr=" + inetAddr + ", mtu=" + mtu + ", netmask="
|
||||
+ netmask + ", gateway=" + gateway + ", dns=" + dns + ", dhcpd=" + dhcpd + "]";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package com.telecominfraproject.wlan.opensync.ovsdb.dao.models;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
import com.vmware.ovsdb.protocol.operation.notation.Uuid;
|
||||
@@ -44,6 +45,30 @@ public class WifiRadioConfigInfo implements Cloneable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(beaconInterval, channel, channelMode, country, enabled, freqBand, htMode, hwConfig, hwType,
|
||||
ifName, txPower, uuid, vifConfigUuids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof WifiRadioConfigInfo)) {
|
||||
return false;
|
||||
}
|
||||
WifiRadioConfigInfo other = (WifiRadioConfigInfo) obj;
|
||||
return beaconInterval == other.beaconInterval && channel == other.channel
|
||||
&& Objects.equals(channelMode, other.channelMode) && Objects.equals(country, other.country)
|
||||
&& enabled == other.enabled && Objects.equals(freqBand, other.freqBand)
|
||||
&& Objects.equals(htMode, other.htMode) && Objects.equals(hwConfig, other.hwConfig)
|
||||
&& Objects.equals(hwType, other.hwType) && Objects.equals(ifName, other.ifName)
|
||||
&& Objects.equals(txPower, other.txPower) && Objects.equals(uuid, other.uuid)
|
||||
&& Objects.equals(vifConfigUuids, other.vifConfigUuids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format(
|
||||
"WifiRadioConfigInfo [vifConfigUuids=%s, freqBand=%s, channel=%s, txPower=%s, channelMode=%s, enabled=%s, htMode=%s, hwConfig=%s, hwType=%s, country=%s, bcn_int=%s, ifName=%s, uuid=%s]",
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package com.telecominfraproject.wlan.opensync.ovsdb.dao.models;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
import com.vmware.ovsdb.protocol.operation.notation.Uuid;
|
||||
@@ -38,12 +40,41 @@ public class WifiVifConfigInfo implements Cloneable{
|
||||
if(security!=null) {
|
||||
ret.security = new HashMap<>(this.security);
|
||||
}
|
||||
if (macList!=null) {
|
||||
ret.macList = new HashSet<>(this.macList);
|
||||
}
|
||||
return ret;
|
||||
}catch(CloneNotSupportedException e) {
|
||||
throw new IllegalStateException("Cannot clone ", e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(apBridge, bridge, btm, enabled, ftMobilityDomain, ftPsk, groupRekey, ifName, macList,
|
||||
macListType, minHwMode, mode, rrm, security, ssid, ssidBroadcast, uapsdEnable, uuid, vifRadioIdx,
|
||||
vlanId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof WifiVifConfigInfo)) {
|
||||
return false;
|
||||
}
|
||||
WifiVifConfigInfo other = (WifiVifConfigInfo) obj;
|
||||
return Objects.equals(apBridge, other.apBridge) && Objects.equals(bridge, other.bridge) && btm == other.btm
|
||||
&& enabled == other.enabled && ftMobilityDomain == other.ftMobilityDomain && ftPsk == other.ftPsk
|
||||
&& groupRekey == other.groupRekey && Objects.equals(ifName, other.ifName)
|
||||
&& Objects.equals(macList, other.macList) && Objects.equals(macListType, other.macListType)
|
||||
&& Objects.equals(minHwMode, other.minHwMode) && Objects.equals(mode, other.mode) && rrm == other.rrm
|
||||
&& Objects.equals(security, other.security) && Objects.equals(ssid, other.ssid)
|
||||
&& Objects.equals(ssidBroadcast, other.ssidBroadcast) && uapsdEnable == other.uapsdEnable
|
||||
&& Objects.equals(uuid, other.uuid) && vifRadioIdx == other.vifRadioIdx && vlanId == other.vlanId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format(
|
||||
|
||||
@@ -126,7 +126,7 @@ public class OpensyncGatewayTipWlanOvsdbClientTest {
|
||||
Mockito.verify(ovsdbSessionMapInterface).getSession("Test_Client_21P10C68818122");
|
||||
Mockito.verify(ovsdbSession).getOvsdbClient();
|
||||
Mockito.verify(opensyncExternalIntegrationInterface).getApConfig("Test_Client_21P10C68818122");
|
||||
Mockito.verify(ovsdbDao).removeAllSsids(ovsdbClient);
|
||||
Mockito.verify(ovsdbDao).removeAllSsids(ovsdbClient, apConfig);
|
||||
Mockito.verify(ovsdbDao).removeAllStatsConfigs(ovsdbClient);
|
||||
Mockito.verify(ovsdbDao).configureWifiRadios(ovsdbClient, apConfig);
|
||||
Mockito.verify(ovsdbDao).configureSsids(ovsdbClient, apConfig);
|
||||
|
||||
@@ -3,9 +3,11 @@ package com.telecominfraproject.wlan.opensync.ovsdb.dao;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.InetAddress;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@@ -27,21 +29,17 @@ import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.test.context.ActiveProfiles;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
import org.springframework.util.ResourceUtils;
|
||||
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.github.fge.jackson.JsonLoader;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.telecominfraproject.wlan.customer.models.Customer;
|
||||
import com.telecominfraproject.wlan.opensync.external.integration.models.ConnectNodeInfo;
|
||||
import com.telecominfraproject.wlan.opensync.external.integration.models.OpensyncAPInetState;
|
||||
import com.telecominfraproject.wlan.opensync.external.integration.models.OpensyncAPRadioState;
|
||||
import com.telecominfraproject.wlan.opensync.external.integration.models.OpensyncAPVIFState;
|
||||
import com.telecominfraproject.wlan.opensync.external.integration.models.OpensyncAPConfig;
|
||||
import com.telecominfraproject.wlan.opensync.external.integration.models.OpensyncAPHotspot20Config;
|
||||
import com.telecominfraproject.wlan.profile.models.Profile;
|
||||
import com.telecominfraproject.wlan.profile.models.ProfileType;
|
||||
import com.telecominfraproject.wlan.profile.network.models.ApNetworkConfiguration;
|
||||
import com.vmware.ovsdb.exception.OvsdbClientException;
|
||||
import com.vmware.ovsdb.jsonrpc.v1.util.JsonUtil;
|
||||
import com.vmware.ovsdb.protocol.methods.RowUpdate;
|
||||
import com.vmware.ovsdb.protocol.methods.TableUpdate;
|
||||
import com.vmware.ovsdb.protocol.methods.TableUpdates;
|
||||
import com.vmware.ovsdb.protocol.operation.notation.Atom;
|
||||
import com.vmware.ovsdb.protocol.operation.notation.Row;
|
||||
import com.vmware.ovsdb.protocol.operation.notation.Uuid;
|
||||
@@ -50,18 +48,28 @@ import com.vmware.ovsdb.protocol.operation.result.ErrorResult;
|
||||
import com.vmware.ovsdb.protocol.operation.result.InsertResult;
|
||||
import com.vmware.ovsdb.protocol.operation.result.OperationResult;
|
||||
import com.vmware.ovsdb.protocol.operation.result.SelectResult;
|
||||
import com.vmware.ovsdb.protocol.schema.DatabaseSchema;
|
||||
import com.vmware.ovsdb.protocol.schema.TableSchema;
|
||||
import com.vmware.ovsdb.service.OvsdbClient;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@ActiveProfiles(profiles = { "integration_test", }) // NOTE: these profiles will
|
||||
// be ADDED to the list of
|
||||
// active profiles
|
||||
// be ADDED to the list of
|
||||
// active profiles
|
||||
@SpringBootTest(webEnvironment = WebEnvironment.NONE, classes = OvsdbDaoTest.class)
|
||||
@Import(value = { OvsdbDao.class, OvsdbDaoTest.Config.class,
|
||||
|
||||
})
|
||||
public class OvsdbDaoTest {
|
||||
|
||||
private static final long HOTSPOT_CONFIG_ID = 1;
|
||||
private static final long HOTSPOT_PROVIDER_ID_1 = 2;
|
||||
private static final long HOTSPOT_PROVIDER_ID_2 = 3;
|
||||
private static final long SSID_PSK_ID = 4;
|
||||
private static final long SSID_OSU_ID = 5;
|
||||
private static final long OPERATOR_ID = 6;
|
||||
private static final long VENUE_ID = 7;
|
||||
private static final long EQUIPMENT_AP_ID = 8;
|
||||
private static final String LAN_IF_TYPE = "bridge";
|
||||
|
||||
private static final String LAN_IF_NAME = "br-lan";
|
||||
@@ -97,9 +105,12 @@ public class OvsdbDaoTest {
|
||||
@Mock(answer = Answers.RETURNS_MOCKS)
|
||||
OvsdbClient ovsdbClient;
|
||||
|
||||
@Mock
|
||||
@Mock(answer = Answers.RETURNS_MOCKS)
|
||||
CompletableFuture<OperationResult[]> futureResult;
|
||||
|
||||
@Mock(answer = Answers.RETURNS_MOCKS)
|
||||
CompletableFuture<OperationResult[]> selectionFutureResult;
|
||||
|
||||
@Autowired
|
||||
OvsdbDao ovsdbDao;
|
||||
|
||||
@@ -108,6 +119,7 @@ public class OvsdbDaoTest {
|
||||
@Configuration
|
||||
// @PropertySource({ "classpath:persistence-${envTarget:dev}.properties" })
|
||||
static class Config {
|
||||
|
||||
@Bean
|
||||
public OvsdbDao ovsdbDao() {
|
||||
return new OvsdbDao();
|
||||
@@ -124,6 +136,253 @@ public class OvsdbDaoTest {
|
||||
mockito.finishMocking();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testRemoveAllGreTunnels() throws Exception {
|
||||
List<Row> rows = new ArrayList<>();
|
||||
OperationResult[] operationResult = new OperationResult[] { new SelectResult(rows) };
|
||||
Mockito.when(ovsdbClient.transact(Mockito.eq(OvsdbDao.ovsdbName), Mockito.anyList()))
|
||||
.thenReturn(selectionFutureResult);
|
||||
Mockito.when(selectionFutureResult.get(30, TimeUnit.SECONDS)).thenReturn(operationResult);
|
||||
Profile apProfile = new Profile();
|
||||
apProfile.setCustomerId(2);
|
||||
apProfile.setId(1L);
|
||||
apProfile.setName("ApProfile");
|
||||
apProfile.setProfileType(ProfileType.equipment_ap);
|
||||
ApNetworkConfiguration tunnelProfileDetails = ApNetworkConfiguration.createWithDefaults();
|
||||
|
||||
tunnelProfileDetails.setGreLocalInetAddr(InetAddress.getByName("10.0.10.10"));
|
||||
tunnelProfileDetails.setGreRemoteInetAddr(InetAddress.getByName("192.168.0.10"));
|
||||
tunnelProfileDetails.setGreTunnelName("gre1");
|
||||
tunnelProfileDetails.setGreParentIfName("wan");
|
||||
apProfile.setDetails(tunnelProfileDetails);
|
||||
OpensyncAPConfig apConfig = Mockito.mock(OpensyncAPConfig.class);
|
||||
Mockito.when(apConfig.getApProfile()).thenReturn(apProfile);
|
||||
ovsdbDao.removeAllGreTunnels(ovsdbClient, apConfig);
|
||||
|
||||
Mockito.verify(apConfig, Mockito.times(2)).getApProfile();
|
||||
Mockito.verify(ovsdbClient, Mockito.times(1)).transact(Mockito.eq(OvsdbDao.ovsdbName), Mockito.anyList());
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testRemoveAllGreTunnelsNoProfile() throws Exception {
|
||||
List<Row> rows = new ArrayList<>();
|
||||
OperationResult[] operationResult = new OperationResult[] { new SelectResult(rows) };
|
||||
Mockito.when(ovsdbClient.transact(Mockito.eq(OvsdbDao.ovsdbName), Mockito.anyList()))
|
||||
.thenReturn(selectionFutureResult);
|
||||
Mockito.when(selectionFutureResult.get(30, TimeUnit.SECONDS)).thenReturn(operationResult);
|
||||
|
||||
ovsdbDao.removeAllGreTunnels(ovsdbClient, null);
|
||||
|
||||
Mockito.verify(ovsdbClient, Mockito.times(1)).transact(Mockito.eq(OvsdbDao.ovsdbName), Mockito.anyList());
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testConfigureGreTunnels() throws Exception {
|
||||
List<Row> rows = new ArrayList<>();
|
||||
OperationResult[] operationResult = new OperationResult[] { new SelectResult(rows) };
|
||||
Mockito.when(ovsdbClient.transact(Mockito.eq(OvsdbDao.ovsdbName), Mockito.anyList()))
|
||||
.thenReturn(selectionFutureResult);
|
||||
Mockito.when(selectionFutureResult.get(30, TimeUnit.SECONDS)).thenReturn(operationResult);
|
||||
Profile apProfile = new Profile();
|
||||
apProfile.setCustomerId(2);
|
||||
apProfile.setId(1L);
|
||||
apProfile.setName("ApProfile");
|
||||
apProfile.setProfileType(ProfileType.equipment_ap);
|
||||
ApNetworkConfiguration tunnelProfileDetails = ApNetworkConfiguration.createWithDefaults();
|
||||
|
||||
tunnelProfileDetails.setGreLocalInetAddr(InetAddress.getByName("10.0.10.10"));
|
||||
tunnelProfileDetails.setGreRemoteInetAddr(InetAddress.getByName("192.168.0.10"));
|
||||
tunnelProfileDetails.setGreTunnelName("gre1");
|
||||
tunnelProfileDetails.setGreParentIfName("wan");
|
||||
apProfile.setDetails(tunnelProfileDetails);
|
||||
|
||||
OpensyncAPConfig apConfig = Mockito.mock(OpensyncAPConfig.class);
|
||||
Mockito.when(apConfig.getApProfile()).thenReturn(apProfile);
|
||||
ovsdbDao.configureGreTunnels(ovsdbClient, apConfig);
|
||||
// 1 call to check existence, 1 to add profile
|
||||
Mockito.verify(ovsdbClient, Mockito.times(2)).transact(Mockito.eq(OvsdbDao.ovsdbName), Mockito.anyList());
|
||||
Mockito.verify(apConfig, Mockito.times(3)).getApProfile();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Test
|
||||
public void testConfigureHotspots() throws Exception {
|
||||
|
||||
DatabaseSchema schemaMock = Mockito.mock(DatabaseSchema.class);
|
||||
CompletableFuture<DatabaseSchema> schemaFuture = Mockito.mock(CompletableFuture.class);
|
||||
Mockito.when(schemaFuture.get(Mockito.anyLong(), Mockito.any())).thenReturn(schemaMock);
|
||||
HashMap<String, TableSchema> mapMock = Mockito.mock(HashMap.class);
|
||||
|
||||
Mockito.when(mapMock.containsKey(Mockito.any())).thenReturn(true);
|
||||
Mockito.when(mapMock.get(Mockito.any())).thenReturn(Mockito.mock(TableSchema.class));
|
||||
Mockito.when(schemaMock.getTables()).thenReturn(mapMock);
|
||||
Mockito.when(ovsdbClient.getSchema(Mockito.anyString())).thenReturn(schemaFuture);
|
||||
|
||||
OpensyncAPConfig apConfig = new OpensyncAPConfig();
|
||||
OpensyncAPHotspot20Config hsConfig = new OpensyncAPHotspot20Config();
|
||||
Customer customer = new Customer();
|
||||
|
||||
Profile profileSsidPsk = OvsdbDaoTestUtilities.createPasspointAccessSsid(customer);
|
||||
profileSsidPsk.setId(SSID_PSK_ID);
|
||||
Profile profileSsidOsu = OvsdbDaoTestUtilities.createPasspointOsuSsid(customer);
|
||||
profileSsidOsu.setId(SSID_OSU_ID);
|
||||
Profile passpointOperatorProfile = OvsdbDaoTestUtilities.createPasspointOperatorProfile(customer);
|
||||
passpointOperatorProfile.setId(OPERATOR_ID);
|
||||
Profile passpointVenueProfile = OvsdbDaoTestUtilities.createPasspointVenueProfile(customer);
|
||||
passpointVenueProfile.setId(VENUE_ID);
|
||||
Profile hotspot20IdProviderProfile = new Profile();
|
||||
hotspot20IdProviderProfile.setId(HOTSPOT_PROVIDER_ID_1);
|
||||
hotspot20IdProviderProfile = OvsdbDaoTestUtilities.createPasspointIdProviderProfile(customer,
|
||||
hotspot20IdProviderProfile, "TipWlan-Hotspot20-OSU-Provider", "Rogers AT&T Wireless", "Canada", "ca",
|
||||
302, 720, "rogers.com", 1);
|
||||
Profile hotspot20IdProviderProfile2 = new Profile();
|
||||
hotspot20IdProviderProfile2.setId(HOTSPOT_PROVIDER_ID_2);
|
||||
hotspot20IdProviderProfile2 = OvsdbDaoTestUtilities.createPasspointIdProviderProfile(customer,
|
||||
hotspot20IdProviderProfile2, "TipWlan-Hotspot20-OSU-Provider-2", "Telus Mobility", "Canada", "ca", 302,
|
||||
220, "telus.com", 1);
|
||||
|
||||
profileSsidOsu.getChildProfileIds().add(hotspot20IdProviderProfile.getId());
|
||||
profileSsidOsu.getChildProfileIds().add(hotspot20IdProviderProfile2.getId());
|
||||
|
||||
Profile passpointHotspotConfig = OvsdbDaoTestUtilities.createPasspointHotspotConfig(customer,
|
||||
hotspot20IdProviderProfile2, hotspot20IdProviderProfile, passpointOperatorProfile,
|
||||
passpointVenueProfile, profileSsidPsk, profileSsidOsu);
|
||||
passpointHotspotConfig.setId(HOTSPOT_CONFIG_ID);
|
||||
|
||||
Profile hotspotProfileAp = OvsdbDaoTestUtilities.createPasspointApProfile(customer, profileSsidPsk,
|
||||
profileSsidOsu);
|
||||
hotspotProfileAp.setId(EQUIPMENT_AP_ID);
|
||||
|
||||
hsConfig.setHotspot20OperatorSet(Set.of(passpointOperatorProfile));
|
||||
hsConfig.setHotspot20ProviderSet(Set.of(hotspot20IdProviderProfile, hotspot20IdProviderProfile2));
|
||||
hsConfig.setHotspot20VenueSet(Set.of(passpointVenueProfile));
|
||||
hsConfig.setHotspot20ProfileSet(Set.of(passpointHotspotConfig));
|
||||
|
||||
apConfig.setHotspotConfig(hsConfig);
|
||||
|
||||
apConfig.setApProfile(hotspotProfileAp);
|
||||
|
||||
apConfig.setSsidProfile(List.of(profileSsidOsu, profileSsidPsk));
|
||||
|
||||
Mockito.when(futureResult.get(Mockito.anyLong(), Mockito.eq(TimeUnit.SECONDS))).thenReturn(OvsdbDaoTestUtilities.hs20IconRows())
|
||||
.thenReturn(OvsdbDaoTestUtilities.hs20InsertIconRows()).thenReturn(OvsdbDaoTestUtilities.hs20OsuProviders()).thenReturn(OvsdbDaoTestUtilities.hs20IconRows())
|
||||
.thenReturn(OvsdbDaoTestUtilities.hs20IconRows()).thenReturn(OvsdbDaoTestUtilities.hs20InsertProviderRows()).thenReturn(OvsdbDaoTestUtilities.hs20Config())
|
||||
.thenReturn(OvsdbDaoTestUtilities.hs20OsuProviders()).thenReturn(OvsdbDaoTestUtilities.vifConfigRows()).thenReturn(OvsdbDaoTestUtilities.vifConfigRows())
|
||||
.thenReturn(OvsdbDaoTestUtilities.hs20Config());
|
||||
|
||||
Mockito.when(ovsdbClient.transact(Mockito.eq(OvsdbDao.ovsdbName), Mockito.anyList())).thenReturn(futureResult);
|
||||
|
||||
ovsdbDao.configureHotspots(ovsdbClient, apConfig);
|
||||
|
||||
Mockito.verify(futureResult, Mockito.times(11)).get(Mockito.anyLong(), Mockito.eq(TimeUnit.SECONDS));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testConfigureGreTunnelsWithNoLocalAddress() throws Exception {
|
||||
List<Row> rows = new ArrayList<>();
|
||||
OperationResult[] operationResult = new OperationResult[] { new SelectResult(rows) };
|
||||
Mockito.when(ovsdbClient.transact(Mockito.eq(OvsdbDao.ovsdbName), Mockito.anyList()))
|
||||
.thenReturn(selectionFutureResult);
|
||||
Mockito.when(selectionFutureResult.get(30, TimeUnit.SECONDS)).thenReturn(operationResult);
|
||||
Profile apProfile = new Profile();
|
||||
apProfile.setCustomerId(2);
|
||||
apProfile.setId(1L);
|
||||
apProfile.setName("ApProfile");
|
||||
apProfile.setProfileType(ProfileType.equipment_ap);
|
||||
ApNetworkConfiguration tunnelProfileDetails = ApNetworkConfiguration.createWithDefaults();
|
||||
|
||||
tunnelProfileDetails.setGreRemoteInetAddr(InetAddress.getByName("192.168.0.10"));
|
||||
tunnelProfileDetails.setGreTunnelName("gre1");
|
||||
tunnelProfileDetails.setGreParentIfName("wan");
|
||||
apProfile.setDetails(tunnelProfileDetails);
|
||||
|
||||
OpensyncAPConfig apConfig = Mockito.mock(OpensyncAPConfig.class);
|
||||
Mockito.when(apConfig.getApProfile()).thenReturn(apProfile);
|
||||
ovsdbDao.configureGreTunnels(ovsdbClient, apConfig);
|
||||
// 2 calls to check existence, 2 calls to insert tunnel (1 each per
|
||||
// Profile)
|
||||
Mockito.verify(ovsdbClient, Mockito.times(2)).transact(Mockito.eq(OvsdbDao.ovsdbName), Mockito.anyList());
|
||||
Mockito.verify(apConfig, Mockito.times(3)).getApProfile();
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testConfigureGreTunnelsWithNoRemoteAddress() throws Exception {
|
||||
Profile apProfile = new Profile();
|
||||
apProfile.setCustomerId(2);
|
||||
apProfile.setId(1L);
|
||||
apProfile.setName("ApProfile");
|
||||
apProfile.setProfileType(ProfileType.equipment_ap);
|
||||
ApNetworkConfiguration tunnelProfileDetails = ApNetworkConfiguration.createWithDefaults();
|
||||
|
||||
tunnelProfileDetails.setGreLocalInetAddr(InetAddress.getByName("10.0.10.10"));
|
||||
tunnelProfileDetails.setGreTunnelName("gre1");
|
||||
tunnelProfileDetails.setGreParentIfName("wan");
|
||||
apProfile.setDetails(tunnelProfileDetails);
|
||||
|
||||
OpensyncAPConfig apConfig = Mockito.mock(OpensyncAPConfig.class);
|
||||
Mockito.when(apConfig.getApProfile()).thenReturn(apProfile);
|
||||
ovsdbDao.configureGreTunnels(ovsdbClient, apConfig);
|
||||
// Should not create
|
||||
Mockito.verify(ovsdbClient, Mockito.times(0)).transact(Mockito.eq(OvsdbDao.ovsdbName), Mockito.anyList());
|
||||
Mockito.verify(apConfig, Mockito.times(3)).getApProfile();
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testConfigureGreTunnelsWithNoParentInterface() throws Exception {
|
||||
Profile apProfile = new Profile();
|
||||
apProfile.setCustomerId(2);
|
||||
apProfile.setId(1L);
|
||||
apProfile.setName("ApProfile");
|
||||
apProfile.setProfileType(ProfileType.equipment_ap);
|
||||
ApNetworkConfiguration tunnelProfileDetails = ApNetworkConfiguration.createWithDefaults();
|
||||
|
||||
tunnelProfileDetails.setGreLocalInetAddr(InetAddress.getByName("10.0.10.10"));
|
||||
tunnelProfileDetails.setGreRemoteInetAddr(InetAddress.getByName("192.168.0.10"));
|
||||
tunnelProfileDetails.setGreTunnelName("gre1");
|
||||
apProfile.setDetails(tunnelProfileDetails);
|
||||
|
||||
OpensyncAPConfig apConfig = Mockito.mock(OpensyncAPConfig.class);
|
||||
Mockito.when(apConfig.getApProfile()).thenReturn(apProfile);
|
||||
ovsdbDao.configureGreTunnels(ovsdbClient, apConfig);
|
||||
// Should not create
|
||||
Mockito.verify(ovsdbClient, Mockito.times(0)).transact(Mockito.eq(OvsdbDao.ovsdbName), Mockito.anyList());
|
||||
Mockito.verify(apConfig, Mockito.times(3)).getApProfile();
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testConfigureGreTunnelsWithNoTunnelName() throws Exception {
|
||||
Profile apProfile = new Profile();
|
||||
apProfile.setCustomerId(2);
|
||||
apProfile.setId(1L);
|
||||
apProfile.setName("ApProfile");
|
||||
apProfile.setProfileType(ProfileType.equipment_ap);
|
||||
ApNetworkConfiguration tunnelProfileDetails = ApNetworkConfiguration.createWithDefaults();
|
||||
|
||||
tunnelProfileDetails.setGreLocalInetAddr(InetAddress.getByName("10.0.10.10"));
|
||||
tunnelProfileDetails.setGreRemoteInetAddr(InetAddress.getByName("192.168.0.10"));
|
||||
tunnelProfileDetails.setGreParentIfName("wan");
|
||||
|
||||
apProfile.setDetails(tunnelProfileDetails);
|
||||
|
||||
OpensyncAPConfig apConfig = Mockito.mock(OpensyncAPConfig.class);
|
||||
Mockito.when(apConfig.getApProfile()).thenReturn(apProfile);
|
||||
ovsdbDao.configureGreTunnels(ovsdbClient, apConfig);
|
||||
// Should not create
|
||||
Mockito.verify(ovsdbClient, Mockito.times(0)).transact(Mockito.eq(OvsdbDao.ovsdbName), Mockito.anyList());
|
||||
Mockito.verify(apConfig, Mockito.times(3)).getApProfile();
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetConnectNodeInfo() throws Exception {
|
||||
|
||||
@@ -207,7 +466,7 @@ public class OvsdbDaoTest {
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
@Test(expected = RuntimeException.class)
|
||||
public void testFailGetConnectNodeInfo() throws Exception {
|
||||
|
||||
Mockito.when(ovsdbClient.transact(Mockito.eq(OvsdbDao.ovsdbName), Mockito.anyList())).thenReturn(futureResult);
|
||||
@@ -387,94 +646,6 @@ public class OvsdbDaoTest {
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOvsdbDaoGetOpensyncAPVIFState() throws Exception {
|
||||
|
||||
String path = "src/test/resources/Wifi_VIF_State-home-ap-24.json";
|
||||
|
||||
File file = new File(path);
|
||||
String absolutePath = file.getAbsolutePath();
|
||||
File jsonFile = ResourceUtils.getFile(absolutePath);
|
||||
|
||||
JsonNode jn = JsonLoader.fromFile(jsonFile);
|
||||
Row row = JsonUtil.deserializeNoException(jn.toString(), Row.class);
|
||||
RowUpdate rowUpdate = new RowUpdate();
|
||||
rowUpdate.setNew(row);
|
||||
|
||||
path = "src/test/resources/Wifi_VIF_State-home-ap-l50.json";
|
||||
file = new File(path);
|
||||
absolutePath = file.getAbsolutePath();
|
||||
jsonFile = ResourceUtils.getFile(absolutePath);
|
||||
jn = JsonLoader.fromFile(jsonFile);
|
||||
Row row1 = JsonUtil.deserializeNoException(jn.toString(), Row.class);
|
||||
|
||||
RowUpdate rowUpdate1 = new RowUpdate();
|
||||
rowUpdate1.setNew(row1);
|
||||
|
||||
path = "src/test/resources/Wifi_VIF_State-home-ap-u50.json";
|
||||
file = new File(path);
|
||||
absolutePath = file.getAbsolutePath();
|
||||
jsonFile = ResourceUtils.getFile(absolutePath);
|
||||
jn = JsonLoader.fromFile(jsonFile);
|
||||
Row row2 = JsonUtil.deserializeNoException(jn.toString(), Row.class);
|
||||
|
||||
RowUpdate rowUpdate2 = new RowUpdate();
|
||||
rowUpdate2.setNew(row2);
|
||||
|
||||
List<OpensyncAPVIFState> vifStateList = ovsdbDao.getOpensyncApVifStateForRowUpdate(rowUpdate, "SomeAPId", ovsdbClient);
|
||||
assert (vifStateList.size() == 1);
|
||||
vifStateList.addAll(ovsdbDao.getOpensyncApVifStateForRowUpdate(rowUpdate1, "SomeAPId", ovsdbClient));
|
||||
assert (vifStateList.size() == 2);
|
||||
vifStateList.addAll(ovsdbDao.getOpensyncApVifStateForRowUpdate(rowUpdate2, "SomeAPId", ovsdbClient));
|
||||
assert (vifStateList.size() == 3);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOvsdbDaoGetOpensyncAPRadioState() throws Exception {
|
||||
|
||||
String path = "src/test/resources/Wifi_Radio_State-home-ap-24.json";
|
||||
|
||||
File file = new File(path);
|
||||
String absolutePath = file.getAbsolutePath();
|
||||
File jsonFile = ResourceUtils.getFile(absolutePath);
|
||||
|
||||
JsonNode jn = JsonLoader.fromFile(jsonFile);
|
||||
Row row = JsonUtil.deserializeNoException(jn.toString(), Row.class);
|
||||
RowUpdate rowUpdate = new RowUpdate();
|
||||
rowUpdate.setNew(row);
|
||||
|
||||
path = "src/test/resources/Wifi_Radio_State-home-ap-l50.json";
|
||||
file = new File(path);
|
||||
absolutePath = file.getAbsolutePath();
|
||||
jsonFile = ResourceUtils.getFile(absolutePath);
|
||||
jn = JsonLoader.fromFile(jsonFile);
|
||||
Row row1 = JsonUtil.deserializeNoException(jn.toString(), Row.class);
|
||||
|
||||
RowUpdate rowUpdate1 = new RowUpdate();
|
||||
rowUpdate1.setNew(row1);
|
||||
|
||||
path = "src/test/resources/Wifi_Radio_State-home-ap-u50.json";
|
||||
file = new File(path);
|
||||
absolutePath = file.getAbsolutePath();
|
||||
jsonFile = ResourceUtils.getFile(absolutePath);
|
||||
jn = JsonLoader.fromFile(jsonFile);
|
||||
Row row2 = JsonUtil.deserializeNoException(jn.toString(), Row.class);
|
||||
|
||||
RowUpdate rowUpdate2 = new RowUpdate();
|
||||
rowUpdate2.setNew(row2);
|
||||
|
||||
TableUpdate tableUpdate = new TableUpdate(ImmutableMap.of(row.getUuidColumn("_uuid").getUuid(), rowUpdate,
|
||||
row1.getUuidColumn("_uuid").getUuid(), rowUpdate1, row2.getUuidColumn("_uuid").getUuid(), rowUpdate2));
|
||||
TableUpdates tableUpdates = new TableUpdates(ImmutableMap.of(OvsdbDao.wifiRadioStateDbTable, tableUpdate));
|
||||
|
||||
List<OpensyncAPRadioState> radioStateList = ovsdbDao.getOpensyncAPRadioState(tableUpdates, "SomeAPId",
|
||||
ovsdbClient);
|
||||
assert (radioStateList.size() == 3);
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testObsdbDaoEnableNetworkProbe() throws Exception {
|
||||
|
||||
@@ -521,48 +692,9 @@ public class OvsdbDaoTest {
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOvsdbDaoGetOpensyncAPInetState() throws Exception {
|
||||
|
||||
String path = "src/test/resources/Wifi_Inet_State-home-ap-24.json";
|
||||
|
||||
File file = new File(path);
|
||||
String absolutePath = file.getAbsolutePath();
|
||||
File jsonFile = ResourceUtils.getFile(absolutePath);
|
||||
|
||||
JsonNode jn = JsonLoader.fromFile(jsonFile);
|
||||
Row row = JsonUtil.deserializeNoException(jn.toString(), Row.class);
|
||||
RowUpdate rowUpdate = new RowUpdate();
|
||||
rowUpdate.setNew(row);
|
||||
|
||||
path = "src/test/resources/Wifi_Inet_State-home-ap-l50.json";
|
||||
file = new File(path);
|
||||
absolutePath = file.getAbsolutePath();
|
||||
jsonFile = ResourceUtils.getFile(absolutePath);
|
||||
jn = JsonLoader.fromFile(jsonFile);
|
||||
Row row1 = JsonUtil.deserializeNoException(jn.toString(), Row.class);
|
||||
|
||||
RowUpdate rowUpdate1 = new RowUpdate();
|
||||
rowUpdate1.setNew(row1);
|
||||
|
||||
path = "src/test/resources/Wifi_Inet_State-home-ap-u50.json";
|
||||
file = new File(path);
|
||||
absolutePath = file.getAbsolutePath();
|
||||
jsonFile = ResourceUtils.getFile(absolutePath);
|
||||
jn = JsonLoader.fromFile(jsonFile);
|
||||
Row row2 = JsonUtil.deserializeNoException(jn.toString(), Row.class);
|
||||
|
||||
RowUpdate rowUpdate2 = new RowUpdate();
|
||||
rowUpdate2.setNew(row2);
|
||||
|
||||
List<OpensyncAPInetState> inetStateList = ovsdbDao.getOpensyncApInetStateForRowUpdate(rowUpdate, "SomeAPId", ovsdbClient);
|
||||
assert (inetStateList.size() == 1);
|
||||
inetStateList.addAll(ovsdbDao.getOpensyncApInetStateForRowUpdate(rowUpdate1, "SomeAPId", ovsdbClient));
|
||||
assert (inetStateList.size() == 2);
|
||||
inetStateList.addAll(ovsdbDao.getOpensyncApInetStateForRowUpdate(rowUpdate2, "SomeAPId", ovsdbClient));
|
||||
assert (inetStateList.size() == 3);
|
||||
static Row[] hs20Icons = {
|
||||
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,521 @@
|
||||
package com.telecominfraproject.wlan.opensync.ovsdb.dao;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import com.telecominfraproject.wlan.core.model.equipment.RadioType;
|
||||
import com.telecominfraproject.wlan.customer.models.Customer;
|
||||
import com.telecominfraproject.wlan.profile.models.Profile;
|
||||
import com.telecominfraproject.wlan.profile.models.ProfileType;
|
||||
import com.telecominfraproject.wlan.profile.network.models.ApNetworkConfiguration;
|
||||
import com.telecominfraproject.wlan.profile.passpoint.hotspot.models.Hotspot2Profile;
|
||||
import com.telecominfraproject.wlan.profile.passpoint.models.Hotspot20Duple;
|
||||
import com.telecominfraproject.wlan.profile.passpoint.models.MccMnc;
|
||||
import com.telecominfraproject.wlan.profile.passpoint.operator.models.OperatorProfile;
|
||||
import com.telecominfraproject.wlan.profile.passpoint.provider.models.Hotspot20IdProviderProfile;
|
||||
import com.telecominfraproject.wlan.profile.passpoint.provider.models.NaiRealmInformation;
|
||||
import com.telecominfraproject.wlan.profile.passpoint.provider.models.OsuIcon;
|
||||
import com.telecominfraproject.wlan.profile.passpoint.venue.models.VenueProfile;
|
||||
import com.telecominfraproject.wlan.profile.rf.models.RfConfiguration;
|
||||
import com.telecominfraproject.wlan.profile.ssid.models.SsidConfiguration;
|
||||
import com.telecominfraproject.wlan.profile.ssid.models.SsidConfiguration.SecureMode;
|
||||
import com.vmware.ovsdb.protocol.operation.notation.Atom;
|
||||
import com.vmware.ovsdb.protocol.operation.notation.Row;
|
||||
import com.vmware.ovsdb.protocol.operation.notation.Uuid;
|
||||
import com.vmware.ovsdb.protocol.operation.notation.Value;
|
||||
import com.vmware.ovsdb.protocol.operation.result.InsertResult;
|
||||
import com.vmware.ovsdb.protocol.operation.result.OperationResult;
|
||||
import com.vmware.ovsdb.protocol.operation.result.SelectResult;
|
||||
import com.vmware.ovsdb.protocol.operation.result.UpdateResult;
|
||||
|
||||
public class OvsdbDaoTestUtilities {
|
||||
|
||||
|
||||
// Static creation of Profiles and Results to use with the OvsdbDao JUnit tests.
|
||||
|
||||
static void createPasspointHotspot(Customer customer, Profile passpointHotspotConfig,
|
||||
Profile passpointOperatorProfile, Profile passpointVenueProfile, Profile hotspot20IdProviderProfile,
|
||||
Profile hotspot20IdProviderProfile2, Profile profileSsidPsk, Profile profileSsidOsu,
|
||||
Profile hotspotProfileAp) {
|
||||
|
||||
profileSsidPsk = createPasspointAccessSsid(customer);
|
||||
profileSsidOsu = createPasspointOsuSsid(customer);
|
||||
|
||||
passpointOperatorProfile = createPasspointOperatorProfile(customer);
|
||||
|
||||
passpointVenueProfile = createPasspointVenueProfile(customer);
|
||||
|
||||
hotspot20IdProviderProfile = createPasspointIdProviderProfile(customer, hotspot20IdProviderProfile,
|
||||
"TipWlan-Hotspot20-OSU-Provider", "Rogers AT&T Wireless", "Canada", "ca", 302, 720, "rogers.com", 1);
|
||||
|
||||
hotspot20IdProviderProfile2 = createPasspointIdProviderProfile(customer, hotspot20IdProviderProfile2,
|
||||
"TipWlan-Hotspot20-OSU-Provider-2", "Telus Mobility", "Canada", "ca", 302, 220, "telus.com", 1);
|
||||
|
||||
|
||||
profileSsidOsu.getChildProfileIds().add(hotspot20IdProviderProfile.getId());
|
||||
profileSsidOsu.getChildProfileIds().add(hotspot20IdProviderProfile2.getId());
|
||||
|
||||
passpointHotspotConfig = createPasspointHotspotConfig(customer, hotspot20IdProviderProfile2,
|
||||
hotspot20IdProviderProfile, passpointOperatorProfile, passpointVenueProfile, profileSsidPsk,
|
||||
profileSsidOsu);
|
||||
|
||||
hotspotProfileAp = createPasspointApProfile(customer, profileSsidPsk, profileSsidOsu);
|
||||
}
|
||||
|
||||
static Profile createPasspointHotspotConfig(Customer customer, Profile hotspot20IdProviderProfile2,
|
||||
Profile hotspot20IdProviderProfile, Profile passpointOperatorProfile, Profile passpointVenueProfile,
|
||||
Profile profileSsidPsk, Profile profileSsidOpen) {
|
||||
Profile passpointHotspotConfig;
|
||||
passpointHotspotConfig = new Profile();
|
||||
passpointHotspotConfig.setCustomerId(customer.getId());
|
||||
passpointHotspotConfig.setName("TipWlan-Hotspot20-Config");
|
||||
passpointHotspotConfig.setProfileType(ProfileType.hotspot_2pt0);
|
||||
Set<Long> passpointHotspotConfigChildIds = new HashSet<>();
|
||||
passpointHotspotConfigChildIds.add(passpointOperatorProfile.getId());
|
||||
passpointHotspotConfigChildIds.add(passpointVenueProfile.getId());
|
||||
passpointHotspotConfigChildIds.add(hotspot20IdProviderProfile.getId());
|
||||
passpointHotspotConfigChildIds.add(hotspot20IdProviderProfile2.getId());
|
||||
passpointHotspotConfig.setChildProfileIds(passpointHotspotConfigChildIds);
|
||||
passpointHotspotConfig.setDetails(Hotspot2Profile.createWithDefaults());
|
||||
Set<String> providerNames = new HashSet<>();
|
||||
providerNames.add(hotspot20IdProviderProfile.getName());
|
||||
providerNames.add(hotspot20IdProviderProfile2.getName());
|
||||
((Hotspot2Profile) passpointHotspotConfig.getDetails()).setIdProviderProfileNames(providerNames);
|
||||
((Hotspot2Profile) passpointHotspotConfig.getDetails())
|
||||
.setOperatorProfileName(passpointOperatorProfile.getName());
|
||||
((Hotspot2Profile) passpointHotspotConfig.getDetails()).setVenueProfileName(passpointVenueProfile.getName());
|
||||
((Hotspot2Profile) passpointHotspotConfig.getDetails()).setOsuSsidName(profileSsidOpen.getName());
|
||||
profileSsidPsk.getChildProfileIds().add(passpointHotspotConfig.getId());
|
||||
return passpointHotspotConfig;
|
||||
}
|
||||
|
||||
static Profile createPasspointIdProviderProfile(Customer customer, Profile providerProfile, String providerName,
|
||||
String network, String country, String iso, int mcc, int mnc, String naiRealm, int countryCode) {
|
||||
Profile hotspot20IdProviderProfile;
|
||||
hotspot20IdProviderProfile = new Profile();
|
||||
hotspot20IdProviderProfile.setCustomerId(customer.getId());
|
||||
hotspot20IdProviderProfile.setName(providerName);
|
||||
hotspot20IdProviderProfile.setProfileType(ProfileType.id_provider);
|
||||
MccMnc mccMnc = MccMnc.createWithDefaults();
|
||||
mccMnc.setMcc(mcc);
|
||||
mccMnc.setMnc(mnc);
|
||||
mccMnc.setIso(iso);
|
||||
mccMnc.setCountry(country);
|
||||
mccMnc.setCountryCode(1);
|
||||
mccMnc.setNetwork(network);
|
||||
List<MccMnc> mccMncList = new ArrayList<>();
|
||||
mccMncList.add(mccMnc);
|
||||
Set<String> naiRealms = new HashSet<>();
|
||||
naiRealms.add(naiRealm);
|
||||
naiRealm.split(".");
|
||||
List<Byte> roamingOi = new ArrayList<>();
|
||||
roamingOi.add(Byte.valueOf("1"));
|
||||
roamingOi.add(Byte.valueOf("2"));
|
||||
roamingOi.add(Byte.valueOf("3"));
|
||||
roamingOi.add(Byte.valueOf("4"));
|
||||
hotspot20IdProviderProfile = createOsuProviderProfile(customer, hotspot20IdProviderProfile, mccMncList,
|
||||
naiRealms, "https://example.com/osu/" + naiRealm.split(".com")[0], naiRealm.split(".com")[0], naiRealm,
|
||||
roamingOi);
|
||||
return hotspot20IdProviderProfile;
|
||||
}
|
||||
|
||||
static Profile createPasspointVenueProfile(Customer customer) {
|
||||
Profile passpointVenueProfile;
|
||||
passpointVenueProfile = new Profile();
|
||||
passpointVenueProfile.setCustomerId(customer.getId());
|
||||
passpointVenueProfile.setName("TipWlan-Hotspot20-Venue");
|
||||
passpointVenueProfile.setProfileType(ProfileType.venue);
|
||||
passpointVenueProfile.setDetails(VenueProfile.createWithDefaults());
|
||||
return passpointVenueProfile;
|
||||
}
|
||||
|
||||
static Profile createPasspointOperatorProfile(Customer customer) {
|
||||
Profile passpointOperatorProfile;
|
||||
passpointOperatorProfile = new Profile();
|
||||
passpointOperatorProfile.setCustomerId(customer.getId());
|
||||
passpointOperatorProfile.setName("TipWlan-Hotspot20-Operator");
|
||||
passpointOperatorProfile.setProfileType(ProfileType.operator);
|
||||
passpointOperatorProfile.setDetails(OperatorProfile.createWithDefaults());
|
||||
return passpointOperatorProfile;
|
||||
}
|
||||
|
||||
static Profile createPasspointAccessSsid(Customer customer) {
|
||||
Profile profileSsidPsk;
|
||||
profileSsidPsk = new Profile();
|
||||
profileSsidPsk.setCustomerId(customer.getId());
|
||||
profileSsidPsk.setName("TipWlan-cloud-hotspot-access");
|
||||
SsidConfiguration ssidConfigPsk = SsidConfiguration.createWithDefaults();
|
||||
Set<RadioType> appliedRadiosPsk = new HashSet<RadioType>();
|
||||
appliedRadiosPsk.add(RadioType.is5GHzL);
|
||||
appliedRadiosPsk.add(RadioType.is5GHzU);
|
||||
ssidConfigPsk.setSsid("TipWlan-cloud-hotspot-access");
|
||||
ssidConfigPsk.setAppliedRadios(appliedRadiosPsk);
|
||||
ssidConfigPsk.setSecureMode(SecureMode.wpa2PSK);
|
||||
ssidConfigPsk.setKeyStr("testing123");
|
||||
profileSsidPsk.setDetails(ssidConfigPsk);
|
||||
return profileSsidPsk;
|
||||
}
|
||||
|
||||
static Profile createPasspointOsuSsid(Customer customer) {
|
||||
Profile profileSsidPsk;
|
||||
profileSsidPsk = new Profile();
|
||||
profileSsidPsk.setCustomerId(customer.getId());
|
||||
profileSsidPsk.setName("TipWlan-cloud-hotspot-osu");
|
||||
SsidConfiguration ssidConfigPsk = SsidConfiguration.createWithDefaults();
|
||||
Set<RadioType> appliedRadiosPsk = new HashSet<RadioType>();
|
||||
appliedRadiosPsk.add(RadioType.is2dot4GHz);
|
||||
ssidConfigPsk.setSsid("TipWlan-cloud-hotspot-osu");
|
||||
ssidConfigPsk.setAppliedRadios(appliedRadiosPsk);
|
||||
ssidConfigPsk.setSecureMode(SecureMode.open);
|
||||
profileSsidPsk.setDetails(ssidConfigPsk);
|
||||
return profileSsidPsk;
|
||||
}
|
||||
|
||||
static Profile createPasspointApProfile(Customer customer, Profile profileSsidPsk, Profile profileSsidOpen) {
|
||||
|
||||
Profile hotspotProfileAp = new Profile();
|
||||
hotspotProfileAp.setCustomerId(customer.getId());
|
||||
hotspotProfileAp.setName("HotspotProfileAp");
|
||||
hotspotProfileAp.setDetails(ApNetworkConfiguration.createWithDefaults());
|
||||
hotspotProfileAp.getChildProfileIds().add(profileSsidPsk.getId());
|
||||
hotspotProfileAp.getChildProfileIds().add(profileSsidOpen.getId());
|
||||
hotspotProfileAp.getChildProfileIds().add(createPasspointRfProfile(customer).getId());
|
||||
return hotspotProfileAp;
|
||||
|
||||
}
|
||||
|
||||
static Profile createPasspointRfProfile(Customer customer) {
|
||||
|
||||
Profile profileRf = new Profile();
|
||||
profileRf.setCustomerId(customer.getId());
|
||||
profileRf.setName("TipWlan-rf-passpoint");
|
||||
RfConfiguration rfConfig = RfConfiguration.createWithDefaults();
|
||||
rfConfig.getRfConfigMap().forEach((x, y) -> y.setRf("TipWlan-rf-passpoint"));
|
||||
profileRf.setDetails(rfConfig);
|
||||
|
||||
return profileRf;
|
||||
}
|
||||
|
||||
static Profile createOsuProviderProfile(Customer customer, Profile hotspot20IdProviderProfile,
|
||||
List<MccMnc> mccMncList, Set<String> realms, String serverUri, String suffix, String domainName,
|
||||
List<Byte> roamingOi) {
|
||||
|
||||
Hotspot20IdProviderProfile passpointIdProviderProfile = Hotspot20IdProviderProfile.createWithDefaults();
|
||||
|
||||
passpointIdProviderProfile.setMccMncList(mccMncList);
|
||||
OsuIcon icon1 = new OsuIcon();
|
||||
icon1.setIconLocale(Locale.CANADA);
|
||||
icon1.setIconWidth(32);
|
||||
icon1.setIconHeight(32);
|
||||
icon1.setLanguageCode(Locale.CANADA.getISO3Language());
|
||||
icon1.setIconName("icon32eng");
|
||||
icon1.setImageUrl("https://localhost:9096/icon32eng.png");
|
||||
icon1.setFilePath("/tmp/icon32eng.png");
|
||||
OsuIcon icon2 = new OsuIcon();
|
||||
icon2.setIconLocale(Locale.CANADA_FRENCH);
|
||||
icon2.setIconWidth(32);
|
||||
icon2.setIconHeight(32);
|
||||
icon2.setLanguageCode(Locale.CANADA_FRENCH.getISO3Language());
|
||||
icon2.setIconName("icon32fra");
|
||||
icon2.setImageUrl("https://localhost:9096/icon32fra.png");
|
||||
icon2.setFilePath("/tmp/icon32fra.png");
|
||||
OsuIcon icon3 = new OsuIcon();
|
||||
icon3.setIconLocale(Locale.US);
|
||||
icon3.setIconWidth(32);
|
||||
icon3.setIconHeight(32);
|
||||
icon3.setLanguageCode(Locale.US.getISO3Language());
|
||||
icon3.setIconName("icon32usa");
|
||||
icon3.setImageUrl("https://localhost:9096/icon32usa.png");
|
||||
icon3.setFilePath("/tmp/icon32usa.png");
|
||||
List<OsuIcon> osuIconList = new ArrayList<>();
|
||||
osuIconList.add(icon1);
|
||||
osuIconList.add(icon2);
|
||||
osuIconList.add(icon3);
|
||||
passpointIdProviderProfile.setOsuIconList(osuIconList);
|
||||
|
||||
passpointIdProviderProfile.setRoamingOi(roamingOi);
|
||||
List<NaiRealmInformation> naiRealmList = new ArrayList<>();
|
||||
|
||||
NaiRealmInformation naiRealmInfo = NaiRealmInformation.createWithDefaults();
|
||||
naiRealmInfo.setNaiRealms(realms);
|
||||
|
||||
naiRealmList.add(naiRealmInfo);
|
||||
passpointIdProviderProfile.setNaiRealmList(naiRealmList);
|
||||
passpointIdProviderProfile.setDomainName(domainName);
|
||||
passpointIdProviderProfile.setOsuNaiStandalone("anonymous@" + domainName);
|
||||
passpointIdProviderProfile.setOsuNaiShared("anonymous@" + domainName);
|
||||
List<Integer> methodList = new ArrayList<>();
|
||||
methodList.add(1);
|
||||
methodList.add(0);
|
||||
passpointIdProviderProfile.setOsuMethodList(methodList);
|
||||
Hotspot20Duple enOsuProvider = Hotspot20Duple.createWithDefaults();
|
||||
enOsuProvider.setLocale(Locale.CANADA);
|
||||
enOsuProvider.setDupleName("Example provider " + suffix);
|
||||
Hotspot20Duple frOsuProvider = Hotspot20Duple.createWithDefaults();
|
||||
frOsuProvider.setLocale(Locale.CANADA_FRENCH);
|
||||
frOsuProvider.setDupleName("Exemple de fournisseur " + suffix);
|
||||
List<Hotspot20Duple> friendlyNameList = new ArrayList<>();
|
||||
friendlyNameList.add(enOsuProvider);
|
||||
friendlyNameList.add(frOsuProvider);
|
||||
passpointIdProviderProfile.setOsuFriendlyName(friendlyNameList);
|
||||
List<Hotspot20Duple> osuServiceDescription = new ArrayList<>();
|
||||
Hotspot20Duple enService = Hotspot20Duple.createWithDefaults();
|
||||
enService.setLocale(Locale.CANADA);
|
||||
enService.setDupleName("Example services " + suffix);
|
||||
osuServiceDescription.add(enService);
|
||||
Hotspot20Duple frService = Hotspot20Duple.createWithDefaults();
|
||||
frService.setLocale(Locale.CANADA_FRENCH);
|
||||
frService.setDupleName("Exemples de services " + suffix);
|
||||
osuServiceDescription.add(frService);
|
||||
passpointIdProviderProfile.setOsuServiceDescription(osuServiceDescription);
|
||||
passpointIdProviderProfile.setOsuServerUri(serverUri);
|
||||
|
||||
hotspot20IdProviderProfile.setDetails(passpointIdProviderProfile);
|
||||
return hotspot20IdProviderProfile;
|
||||
}
|
||||
|
||||
static OperationResult[] hs20Config() {
|
||||
List<Row> ret = new ArrayList<>();
|
||||
|
||||
Map<String, Value> columns = new HashMap<>();
|
||||
columns.put("_uuid", new Atom<>(Uuid.of(UUID.fromString("28f2b88e-d10d-4cae-832d-784210940709"))));
|
||||
columns.put("_version", new Atom<>(Uuid.of(UUID.randomUUID())));
|
||||
columns.put("anqp_domain_id", new Atom<>(1234));
|
||||
columns.put("connection_capability", new Atom<>(" 6:8888:1"));
|
||||
columns.put("deauth_request_timeout", new Atom<>(0));
|
||||
columns.put("domain_name",
|
||||
com.vmware.ovsdb.protocol.operation.notation.Set.of(new Atom<>("rogers.com"), new Atom<>("telus.com")));
|
||||
columns.put("enable", new Atom<>(true));
|
||||
columns.put("gas_addr3_behavior", new Atom<>(0));
|
||||
columns.put("hessid", new Atom<>("26:f5:a2:ef:2e:56"));
|
||||
columns.put("ipaddr_type_availability", new Atom<>(4));
|
||||
columns.put("mcc_mnc", new Atom<>("302,720;302,220"));
|
||||
columns.put("nai_realm", com.vmware.ovsdb.protocol.operation.notation.Set
|
||||
.of(new Atom<>("0,rogers.com,21[5:7][2:4],13[5:6]"), new Atom<>("0,telus.com,21[5:7][2:4],13[5:6]")));
|
||||
columns.put("network_auth_type", new Atom<>("00"));
|
||||
columns.put("operating_class", new Atom<>(0));
|
||||
columns.put("operator_friendly_name",
|
||||
com.vmware.ovsdb.protocol.operation.notation.Set.of(new Atom<>("eng:Default friendly operator name"),
|
||||
new Atom<>("fra:Nom de l'opérateur convivial par défaut")));
|
||||
columns.put("operator_icons",
|
||||
com.vmware.ovsdb.protocol.operation.notation.Set.of(
|
||||
new Atom<>(Uuid.of(UUID.fromString("5f2d0e46-92bd-43a1-aa66-94474deb2212"))),
|
||||
new Atom<>(Uuid.of(UUID.fromString("7cf892c2-3f04-4851-986c-a7b7d8ad1dfa"))),
|
||||
new Atom<>(Uuid.of(UUID.fromString("9449e6cf-de62-4805-855b-3fc9bb5cd3ec")))));
|
||||
columns.put("osen", new Atom<>(false));
|
||||
columns.put("osu_providers",
|
||||
com.vmware.ovsdb.protocol.operation.notation.Set.of(
|
||||
new Atom<>(Uuid.of(UUID.fromString("33b78c84-3242-4477-831f-185c6532cfda"))),
|
||||
new Atom<>(Uuid.of(UUID.fromString("ae51393c-f9e5-4021-af73-c5ad4b751f88")))));
|
||||
columns.put("osu_ssid", new Atom<>("ssid-open"));
|
||||
columns.put("roaming_oi",
|
||||
com.vmware.ovsdb.protocol.operation.notation.Set.of(new Atom<>("11223344"), new Atom<>("234433")));
|
||||
columns.put("tos", new Atom<>("https://localhost:9091/filestore/termsAndConditions"));
|
||||
columns.put("venue_group_type", new Atom<>("2:8"));
|
||||
columns.put("venue_name", com.vmware.ovsdb.protocol.operation.notation.Set.of(new Atom<>("eng:Example venue"),
|
||||
new Atom<>("fra:Exemple de lieu")));
|
||||
columns.put("venue_url", com.vmware.ovsdb.protocol.operation.notation.Set
|
||||
.of(new Atom<>("1:http://www.example.com/info-fra"), new Atom<>("2:http://www.example.com/info-eng")));
|
||||
columns.put("vif_config",
|
||||
com.vmware.ovsdb.protocol.operation.notation.Set.of(
|
||||
new Atom<>(Uuid.of(UUID.fromString("66abe4b3-2a26-4769-b684-da70e2392a07"))),
|
||||
new Atom<>(Uuid.of(UUID.fromString("fad30b59-fada-41fc-ad62-2afca67cf9d5")))));
|
||||
|
||||
OperationResult[] operationResult = new OperationResult[1];
|
||||
SelectResult selectResult = new SelectResult(ret);
|
||||
operationResult[0] = selectResult;
|
||||
|
||||
return operationResult;
|
||||
}
|
||||
|
||||
static OperationResult[] hs20InsertProviderRows() {
|
||||
|
||||
InsertResult insertResult = new InsertResult(Uuid.of(UUID.fromString("33b78c84-3242-4477-831f-185c6532cfda")));
|
||||
InsertResult insertResult2 = new InsertResult(Uuid.of(UUID.fromString("ae51393c-f9e5-4021-af73-c5ad4b751f88")));
|
||||
|
||||
OperationResult[] operationResult = new OperationResult[2];
|
||||
operationResult[0] = insertResult;
|
||||
operationResult[1] = insertResult2;
|
||||
|
||||
return operationResult;
|
||||
}
|
||||
|
||||
static OperationResult[] hs20OsuProviders() {
|
||||
List<Row> ret = new ArrayList<>();
|
||||
|
||||
Map<String, Value> columns = new HashMap<>();
|
||||
columns.put("_uuid", new Atom<>(Uuid.of(UUID.fromString("33b78c84-3242-4477-831f-185c6532cfda"))));
|
||||
columns.put("_version", new Atom<>(Uuid.of(UUID.randomUUID())));
|
||||
columns.put("method_list", com.vmware.ovsdb.protocol.operation.notation.Set.of(new Atom<>(0), new Atom<>(1)));
|
||||
columns.put("osu_friendly_name", com.vmware.ovsdb.protocol.operation.notation.Set
|
||||
.of(new Atom<>("eng:Example provider rogers"), new Atom<>("fra:Exemple de fournisseur rogers")));
|
||||
columns.put("osu_icons",
|
||||
com.vmware.ovsdb.protocol.operation.notation.Set.of(
|
||||
new Atom<>(Uuid.of(UUID.fromString("5f2d0e46-92bd-43a1-aa66-94474deb2212"))),
|
||||
new Atom<>(Uuid.of(UUID.fromString("7cf892c2-3f04-4851-986c-a7b7d8ad1dfa"))),
|
||||
new Atom<>(Uuid.of(UUID.fromString("9449e6cf-de62-4805-855b-3fc9bb5cd3ec")))));
|
||||
columns.put("osu_nai", new Atom<>("anonymous@rogers.com"));
|
||||
columns.put("server_uri", new Atom<>("https://example.com/osu/rogers"));
|
||||
columns.put("service_description", com.vmware.ovsdb.protocol.operation.notation.Set
|
||||
.of(new Atom<>("eng:Example provider rogers"), new Atom<>("fra:Exemple de fournisseur rogers")));
|
||||
|
||||
ret.add(new Row(columns));
|
||||
|
||||
columns = new HashMap<>();
|
||||
columns.put("_uuid", new Atom<>(Uuid.of(UUID.fromString("ae51393c-f9e5-4021-af73-c5ad4b751f88"))));
|
||||
columns.put("_version", new Atom<>(Uuid.of(UUID.randomUUID())));
|
||||
columns.put("method_list", com.vmware.ovsdb.protocol.operation.notation.Set.of(new Atom<>(0), new Atom<>(1)));
|
||||
columns.put("osu_friendly_name", com.vmware.ovsdb.protocol.operation.notation.Set
|
||||
.of(new Atom<>("eng:Example provider telus"), new Atom<>("fra:Exemple de fournisseur telus")));
|
||||
columns.put("osu_icons",
|
||||
com.vmware.ovsdb.protocol.operation.notation.Set.of(
|
||||
new Atom<>(Uuid.of(UUID.fromString("5f2d0e46-92bd-43a1-aa66-94474deb2212"))),
|
||||
new Atom<>(Uuid.of(UUID.fromString("7cf892c2-3f04-4851-986c-a7b7d8ad1dfa"))),
|
||||
new Atom<>(Uuid.of(UUID.fromString("9449e6cf-de62-4805-855b-3fc9bb5cd3ec")))));
|
||||
columns.put("osu_nai", new Atom<>("anonymous@telus.com"));
|
||||
columns.put("server_uri", new Atom<>("https://example.com/osu/telus"));
|
||||
columns.put("service_description", com.vmware.ovsdb.protocol.operation.notation.Set
|
||||
.of(new Atom<>("eng:Example provider telus"), new Atom<>("fra:Exemple de fournisseur telus")));
|
||||
|
||||
OperationResult[] operationResult = new OperationResult[1];
|
||||
SelectResult selectResult = new SelectResult(ret);
|
||||
operationResult[0] = selectResult;
|
||||
|
||||
return operationResult;
|
||||
}
|
||||
|
||||
static OperationResult[] hs20InsertIconRows() {
|
||||
|
||||
UpdateResult insertResult = new UpdateResult(1);
|
||||
UpdateResult insertResult2 = new UpdateResult(2);
|
||||
UpdateResult insertResult3 = new UpdateResult(3);
|
||||
|
||||
OperationResult[] operationResult = new OperationResult[3];
|
||||
operationResult[0] = insertResult;
|
||||
operationResult[1] = insertResult2;
|
||||
operationResult[2] = insertResult3;
|
||||
|
||||
return operationResult;
|
||||
}
|
||||
|
||||
|
||||
static OperationResult[] hs20IconRows() {
|
||||
List<Row> ret = new ArrayList<>();
|
||||
|
||||
Map<String, Value> columns = new HashMap<>();
|
||||
columns.put("_uuid", new Atom<>(Uuid.of(UUID.fromString("5f2d0e46-92bd-43a1-aa66-94474deb2212"))));
|
||||
columns.put("_version", new Atom<>(Uuid.of(UUID.randomUUID())));
|
||||
columns.put("height", new Atom<>(32L));
|
||||
columns.put("img_type", new Atom<>("image/png"));
|
||||
columns.put("lang_code", new Atom<>("eng"));
|
||||
columns.put("name", new Atom<>("icon32usa"));
|
||||
columns.put("path", new Atom<String>("/tmp/icon32usa.png"));
|
||||
columns.put("url", new Atom<String>("https://localhost:9096/icon32usa.png"));
|
||||
columns.put("width", new Atom<>(32L));
|
||||
|
||||
ret.add(new Row(columns));
|
||||
|
||||
columns = new HashMap<>();
|
||||
columns.put("_uuid", new Atom<>(Uuid.of(UUID.fromString("7cf892c2-3f04-4851-986c-a7b7d8ad1dfa"))));
|
||||
columns.put("_version", new Atom<>(Uuid.of(UUID.randomUUID())));
|
||||
columns.put("height", new Atom<>(32L));
|
||||
columns.put("img_type", new Atom<>("image/png"));
|
||||
columns.put("lang_code", new Atom<>("eng"));
|
||||
columns.put("name", new Atom<>("icon32eng"));
|
||||
columns.put("path", new Atom<String>("/tmp/icon32eng.png"));
|
||||
columns.put("url", new Atom<String>("https://localhost:9096/icon32eng.png"));
|
||||
columns.put("width", new Atom<>(32L));
|
||||
|
||||
ret.add(new Row(columns));
|
||||
|
||||
columns = new HashMap<>();
|
||||
columns.put("_uuid", new Atom<>(Uuid.of(UUID.fromString("9449e6cf-de62-4805-855b-3fc9bb5cd3ec"))));
|
||||
columns.put("_version", new Atom<>(Uuid.of(UUID.randomUUID())));
|
||||
columns.put("height", new Atom<>(32L));
|
||||
columns.put("img_type", new Atom<>("image/png"));
|
||||
columns.put("lang_code", new Atom<>("fra"));
|
||||
columns.put("name", new Atom<>("icon32fra"));
|
||||
columns.put("path", new Atom<String>("/tmp/icon32fra.png"));
|
||||
columns.put("url", new Atom<String>("https://localhost:9096/icon32fra.png"));
|
||||
columns.put("width", new Atom<>(32L));
|
||||
|
||||
ret.add(new Row(columns));
|
||||
|
||||
SelectResult selectResult = new SelectResult(ret);
|
||||
|
||||
OperationResult[] operationResult = new OperationResult[1];
|
||||
operationResult[0] = selectResult;
|
||||
|
||||
return operationResult;
|
||||
}
|
||||
|
||||
static OperationResult[] vifConfigRows() {
|
||||
|
||||
List<Row> ret = new ArrayList<>();
|
||||
Row row = new Row(new HashMap<String, Value>());
|
||||
row.getColumns().put("_uuid", new Atom<>(Uuid.of(UUID.fromString("66abe4b3-2a26-4769-b684-da70e2392a07"))));
|
||||
row.getColumns().put("ssid", new Atom<>("ssid-access"));
|
||||
row.getColumns().put("mac", new Atom<>("26:f5:a2:ef:2e:56"));
|
||||
row.getColumns().put("if_name", new Atom<>("wlan0"));
|
||||
ret.add(row);
|
||||
|
||||
Row row2 = new Row(new HashMap<String, Value>());
|
||||
row2.getColumns().put("_uuid", new Atom<>(Uuid.of(UUID.fromString("fad30b59-fada-41fc-ad62-2afca67cf9d5"))));
|
||||
row2.getColumns().put("ssid", new Atom<>("ssid-access"));
|
||||
row2.getColumns().put("mac", new Atom<>("24:f5:a2:ef:2e:54"));
|
||||
row2.getColumns().put("if_name", new Atom<>("wlan2"));
|
||||
ret.add(row2);
|
||||
|
||||
Row row3 = new Row(new HashMap<String, Value>());
|
||||
row3.getColumns().put("_uuid", new Atom<>(Uuid.of(UUID.randomUUID())));
|
||||
row3.getColumns().put("ssid", new Atom<>("ssid-open"));
|
||||
row3.getColumns().put("mac", new Atom<>("24:f5:a2:ef:2e:55"));
|
||||
row3.getColumns().put("if_name", new Atom<>("wlan1"));
|
||||
ret.add(row3);
|
||||
|
||||
SelectResult selectResult = new SelectResult(ret);
|
||||
|
||||
OperationResult[] operationResult = new OperationResult[1];
|
||||
operationResult[0] = selectResult;
|
||||
return operationResult;
|
||||
}
|
||||
|
||||
static OperationResult[] vifStates() {
|
||||
|
||||
List<Row> ret = new ArrayList<>();
|
||||
|
||||
Row row = new Row(new HashMap<String, Value>());
|
||||
row.getColumns().put("_uuid", new Atom<>(Uuid.of(UUID.fromString("66abe4b3-2a26-4769-b684-da70e2392a07"))));
|
||||
row.getColumns().put("ssid", new Atom<>("ssid-access"));
|
||||
row.getColumns().put("if_name", new Atom<>("wlan0"));
|
||||
ret.add(row);
|
||||
|
||||
Row row2 = new Row(new HashMap<String, Value>());
|
||||
row2.getColumns().put("_uuid", new Atom<>(Uuid.of(UUID.fromString("fad30b59-fada-41fc-ad62-2afca67cf9d5"))));
|
||||
row2.getColumns().put("ssid", new Atom<>("ssid-access"));
|
||||
row2.getColumns().put("if_name", new Atom<>("wlan2"));
|
||||
ret.add(row2);
|
||||
|
||||
Row row3 = new Row(new HashMap<String, Value>());
|
||||
row3.getColumns().put("_uuid", new Atom<>(Uuid.of(UUID.randomUUID())));
|
||||
row3.getColumns().put("ssid", new Atom<>("ssid-open"));
|
||||
row3.getColumns().put("if_name", new Atom<>("wlan1"));
|
||||
ret.add(row3);
|
||||
|
||||
SelectResult selectResult = new SelectResult(ret);
|
||||
|
||||
|
||||
OperationResult[] operationResult = new OperationResult[1];
|
||||
operationResult[0].equals(selectResult);
|
||||
return operationResult;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,110 +0,0 @@
|
||||
{
|
||||
"vif_radio_idx": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"if_name": "home-ap-24",
|
||||
"state": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"mac": "24:f5:a2:ef:2e:54",
|
||||
"ssid": "TipWlan-cloud-3-radios",
|
||||
"uapsd_enable": true,
|
||||
"ap_bridge": false,
|
||||
"wps_pbc": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"mac_list": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"associated_clients": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"btm": 1,
|
||||
"_uuid": [
|
||||
"uuid",
|
||||
"a007d865-fe4b-4265-a9a1-69d4b309e939"
|
||||
],
|
||||
"ssid_broadcast": "enabled",
|
||||
"wps": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"mcast2ucast": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"mode": "ap",
|
||||
"mac_list_type": "none",
|
||||
"wps_pbc_key_id": "",
|
||||
"ft_psk": 0,
|
||||
"channel": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"parent": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"multi_ap": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"ap_vlan_sta_addr": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"security": [
|
||||
"map",
|
||||
[
|
||||
[
|
||||
"encryption",
|
||||
"OPEN"
|
||||
]
|
||||
]
|
||||
],
|
||||
"wds": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"enabled": true,
|
||||
"vlan_id": 1,
|
||||
"min_hw_mode": "11n",
|
||||
"vif_config": [
|
||||
"uuid",
|
||||
"fc3de7db-ee6c-452c-859c-1be81b0b5b24"
|
||||
],
|
||||
"_version": [
|
||||
"uuid",
|
||||
"a96bff45-29bd-423b-9014-10a418683e5d"
|
||||
],
|
||||
"bridge": "lan",
|
||||
"group_rekey": 0,
|
||||
"ft_mobility_domain": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"dynamic_beacon": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"rrm": 1
|
||||
}
|
||||
@@ -1,109 +0,0 @@
|
||||
{
|
||||
"vif_radio_idx": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"if_name": "home-ap-l50",
|
||||
"state": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"mac": "24:f5:a2:ef:2e:55",
|
||||
"ssid": "TipWlan-cloud-3-radios",
|
||||
"uapsd_enable": true,
|
||||
"ap_bridge": false,
|
||||
"wps_pbc": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"mac_list": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"associated_clients": [
|
||||
"uuid",
|
||||
"073c3961-33fe-4054-abc6-ae2e8b91c914"
|
||||
],
|
||||
"btm": 1,
|
||||
"_uuid": [
|
||||
"uuid",
|
||||
"7ebfab8d-0962-4af3-a45b-b5a9d68c86c8"
|
||||
],
|
||||
"ssid_broadcast": "enabled",
|
||||
"wps": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"mcast2ucast": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"mode": "ap",
|
||||
"mac_list_type": "none",
|
||||
"wps_pbc_key_id": "",
|
||||
"ft_psk": 0,
|
||||
"channel": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"parent": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"multi_ap": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"ap_vlan_sta_addr": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"security": [
|
||||
"map",
|
||||
[
|
||||
[
|
||||
"encryption",
|
||||
"OPEN"
|
||||
]
|
||||
]
|
||||
],
|
||||
"wds": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"enabled": true,
|
||||
"vlan_id": 1,
|
||||
"min_hw_mode": "11ac",
|
||||
"vif_config": [
|
||||
"uuid",
|
||||
"54c01e8b-4d67-456e-ab18-cbc89c784c2a"
|
||||
],
|
||||
"_version": [
|
||||
"uuid",
|
||||
"faec64fb-fbc1-417a-9ff4-f30ff2c5be94"
|
||||
],
|
||||
"bridge": "lan",
|
||||
"group_rekey": 0,
|
||||
"ft_mobility_domain": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"dynamic_beacon": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"rrm": 1
|
||||
}
|
||||
@@ -1,109 +0,0 @@
|
||||
{
|
||||
"vif_radio_idx": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"if_name": "home-ap-u50",
|
||||
"state": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"mac": "26:f5:a2:ef:2e:56",
|
||||
"ssid": "TipWlan-cloud-3-radios",
|
||||
"uapsd_enable": true,
|
||||
"ap_bridge": false,
|
||||
"wps_pbc": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"mac_list": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"associated_clients": [
|
||||
"uuid",
|
||||
"c9f5a30d-7ccf-406f-a0d8-f108b377584e"
|
||||
],
|
||||
"btm": 1,
|
||||
"_uuid": [
|
||||
"uuid",
|
||||
"009e6ee9-d687-4201-9c55-f42d26cbd7b5"
|
||||
],
|
||||
"ssid_broadcast": "enabled",
|
||||
"wps": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"mcast2ucast": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"mode": "ap",
|
||||
"mac_list_type": "none",
|
||||
"wps_pbc_key_id": "",
|
||||
"ft_psk": 0,
|
||||
"channel": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"parent": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"multi_ap": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"ap_vlan_sta_addr": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"security": [
|
||||
"map",
|
||||
[
|
||||
[
|
||||
"encryption",
|
||||
"OPEN"
|
||||
]
|
||||
]
|
||||
],
|
||||
"wds": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"enabled": true,
|
||||
"vlan_id": 1,
|
||||
"min_hw_mode": "11ac",
|
||||
"vif_config": [
|
||||
"uuid",
|
||||
"4aeefd3b-b86f-45e4-a9a1-c734363be9c8"
|
||||
],
|
||||
"_version": [
|
||||
"uuid",
|
||||
"e70c7842-6257-46d1-94d3-350a55733fc4"
|
||||
],
|
||||
"bridge": "lan",
|
||||
"group_rekey": 0,
|
||||
"ft_mobility_domain": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"dynamic_beacon": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"rrm": 1
|
||||
}
|
||||
@@ -1,110 +0,0 @@
|
||||
{
|
||||
"vif_radio_idx": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"if_name": "home-ap-24",
|
||||
"state": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"mac": "24:f5:a2:ef:2e:54",
|
||||
"ssid": "TipWlan-cloud-3-radios",
|
||||
"uapsd_enable": true,
|
||||
"ap_bridge": false,
|
||||
"wps_pbc": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"mac_list": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"associated_clients": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"btm": 1,
|
||||
"_uuid": [
|
||||
"uuid",
|
||||
"a007d865-fe4b-4265-a9a1-69d4b309e939"
|
||||
],
|
||||
"ssid_broadcast": "enabled",
|
||||
"wps": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"mcast2ucast": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"mode": "ap",
|
||||
"mac_list_type": "none",
|
||||
"wps_pbc_key_id": "",
|
||||
"ft_psk": 0,
|
||||
"channel": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"parent": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"multi_ap": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"ap_vlan_sta_addr": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"security": [
|
||||
"map",
|
||||
[
|
||||
[
|
||||
"encryption",
|
||||
"OPEN"
|
||||
]
|
||||
]
|
||||
],
|
||||
"wds": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"enabled": true,
|
||||
"vlan_id": 1,
|
||||
"min_hw_mode": "11n",
|
||||
"vif_config": [
|
||||
"uuid",
|
||||
"fc3de7db-ee6c-452c-859c-1be81b0b5b24"
|
||||
],
|
||||
"_version": [
|
||||
"uuid",
|
||||
"a96bff45-29bd-423b-9014-10a418683e5d"
|
||||
],
|
||||
"bridge": "lan",
|
||||
"group_rekey": 0,
|
||||
"ft_mobility_domain": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"dynamic_beacon": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"rrm": 1
|
||||
}
|
||||
@@ -1,109 +0,0 @@
|
||||
{
|
||||
"vif_radio_idx": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"if_name": "home-ap-l50",
|
||||
"state": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"mac": "24:f5:a2:ef:2e:55",
|
||||
"ssid": "TipWlan-cloud-3-radios",
|
||||
"uapsd_enable": true,
|
||||
"ap_bridge": false,
|
||||
"wps_pbc": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"mac_list": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"associated_clients": [
|
||||
"uuid",
|
||||
"073c3961-33fe-4054-abc6-ae2e8b91c914"
|
||||
],
|
||||
"btm": 1,
|
||||
"_uuid": [
|
||||
"uuid",
|
||||
"7ebfab8d-0962-4af3-a45b-b5a9d68c86c8"
|
||||
],
|
||||
"ssid_broadcast": "enabled",
|
||||
"wps": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"mcast2ucast": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"mode": "ap",
|
||||
"mac_list_type": "none",
|
||||
"wps_pbc_key_id": "",
|
||||
"ft_psk": 0,
|
||||
"channel": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"parent": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"multi_ap": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"ap_vlan_sta_addr": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"security": [
|
||||
"map",
|
||||
[
|
||||
[
|
||||
"encryption",
|
||||
"OPEN"
|
||||
]
|
||||
]
|
||||
],
|
||||
"wds": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"enabled": true,
|
||||
"vlan_id": 1,
|
||||
"min_hw_mode": "11ac",
|
||||
"vif_config": [
|
||||
"uuid",
|
||||
"54c01e8b-4d67-456e-ab18-cbc89c784c2a"
|
||||
],
|
||||
"_version": [
|
||||
"uuid",
|
||||
"faec64fb-fbc1-417a-9ff4-f30ff2c5be94"
|
||||
],
|
||||
"bridge": "lan",
|
||||
"group_rekey": 0,
|
||||
"ft_mobility_domain": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"dynamic_beacon": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"rrm": 1
|
||||
}
|
||||
@@ -1,109 +0,0 @@
|
||||
{
|
||||
"vif_radio_idx": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"if_name": "home-ap-u50",
|
||||
"state": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"mac": "26:f5:a2:ef:2e:56",
|
||||
"ssid": "TipWlan-cloud-3-radios",
|
||||
"uapsd_enable": true,
|
||||
"ap_bridge": false,
|
||||
"wps_pbc": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"mac_list": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"associated_clients": [
|
||||
"uuid",
|
||||
"c9f5a30d-7ccf-406f-a0d8-f108b377584e"
|
||||
],
|
||||
"btm": 1,
|
||||
"_uuid": [
|
||||
"uuid",
|
||||
"009e6ee9-d687-4201-9c55-f42d26cbd7b5"
|
||||
],
|
||||
"ssid_broadcast": "enabled",
|
||||
"wps": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"mcast2ucast": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"mode": "ap",
|
||||
"mac_list_type": "none",
|
||||
"wps_pbc_key_id": "",
|
||||
"ft_psk": 0,
|
||||
"channel": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"parent": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"multi_ap": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"ap_vlan_sta_addr": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"security": [
|
||||
"map",
|
||||
[
|
||||
[
|
||||
"encryption",
|
||||
"OPEN"
|
||||
]
|
||||
]
|
||||
],
|
||||
"wds": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"enabled": true,
|
||||
"vlan_id": 1,
|
||||
"min_hw_mode": "11ac",
|
||||
"vif_config": [
|
||||
"uuid",
|
||||
"4aeefd3b-b86f-45e4-a9a1-c734363be9c8"
|
||||
],
|
||||
"_version": [
|
||||
"uuid",
|
||||
"e70c7842-6257-46d1-94d3-350a55733fc4"
|
||||
],
|
||||
"bridge": "lan",
|
||||
"group_rekey": 0,
|
||||
"ft_mobility_domain": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"dynamic_beacon": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"rrm": 1
|
||||
}
|
||||
@@ -1,110 +0,0 @@
|
||||
{
|
||||
"vif_radio_idx": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"if_name": "home-ap-24",
|
||||
"state": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"mac": "24:f5:a2:ef:2e:54",
|
||||
"ssid": "TipWlan-cloud-3-radios",
|
||||
"uapsd_enable": true,
|
||||
"ap_bridge": false,
|
||||
"wps_pbc": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"mac_list": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"associated_clients": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"btm": 1,
|
||||
"_uuid": [
|
||||
"uuid",
|
||||
"a007d865-fe4b-4265-a9a1-69d4b309e939"
|
||||
],
|
||||
"ssid_broadcast": "enabled",
|
||||
"wps": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"mcast2ucast": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"mode": "ap",
|
||||
"mac_list_type": "none",
|
||||
"wps_pbc_key_id": "",
|
||||
"ft_psk": 0,
|
||||
"channel": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"parent": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"multi_ap": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"ap_vlan_sta_addr": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"security": [
|
||||
"map",
|
||||
[
|
||||
[
|
||||
"encryption",
|
||||
"OPEN"
|
||||
]
|
||||
]
|
||||
],
|
||||
"wds": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"enabled": true,
|
||||
"vlan_id": 1,
|
||||
"min_hw_mode": "11n",
|
||||
"vif_config": [
|
||||
"uuid",
|
||||
"fc3de7db-ee6c-452c-859c-1be81b0b5b24"
|
||||
],
|
||||
"_version": [
|
||||
"uuid",
|
||||
"a96bff45-29bd-423b-9014-10a418683e5d"
|
||||
],
|
||||
"bridge": "lan",
|
||||
"group_rekey": 0,
|
||||
"ft_mobility_domain": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"dynamic_beacon": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"rrm": 1
|
||||
}
|
||||
@@ -1,109 +0,0 @@
|
||||
{
|
||||
"vif_radio_idx": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"if_name": "home-ap-l50",
|
||||
"state": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"mac": "24:f5:a2:ef:2e:55",
|
||||
"ssid": "TipWlan-cloud-3-radios",
|
||||
"uapsd_enable": true,
|
||||
"ap_bridge": false,
|
||||
"wps_pbc": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"mac_list": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"associated_clients": [
|
||||
"uuid",
|
||||
"073c3961-33fe-4054-abc6-ae2e8b91c914"
|
||||
],
|
||||
"btm": 1,
|
||||
"_uuid": [
|
||||
"uuid",
|
||||
"7ebfab8d-0962-4af3-a45b-b5a9d68c86c8"
|
||||
],
|
||||
"ssid_broadcast": "enabled",
|
||||
"wps": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"mcast2ucast": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"mode": "ap",
|
||||
"mac_list_type": "none",
|
||||
"wps_pbc_key_id": "",
|
||||
"ft_psk": 0,
|
||||
"channel": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"parent": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"multi_ap": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"ap_vlan_sta_addr": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"security": [
|
||||
"map",
|
||||
[
|
||||
[
|
||||
"encryption",
|
||||
"OPEN"
|
||||
]
|
||||
]
|
||||
],
|
||||
"wds": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"enabled": true,
|
||||
"vlan_id": 1,
|
||||
"min_hw_mode": "11ac",
|
||||
"vif_config": [
|
||||
"uuid",
|
||||
"54c01e8b-4d67-456e-ab18-cbc89c784c2a"
|
||||
],
|
||||
"_version": [
|
||||
"uuid",
|
||||
"faec64fb-fbc1-417a-9ff4-f30ff2c5be94"
|
||||
],
|
||||
"bridge": "lan",
|
||||
"group_rekey": 0,
|
||||
"ft_mobility_domain": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"dynamic_beacon": [
|
||||
"set",
|
||||
[
|
||||
]
|
||||
],
|
||||
"rrm": 1
|
||||
}
|
||||
@@ -1,96 +0,0 @@
|
||||
{
|
||||
"vif_radio_idx": [
|
||||
"set",
|
||||
[]
|
||||
],
|
||||
"if_name": "home-ap-u50",
|
||||
"state": [
|
||||
"set",
|
||||
[]
|
||||
],
|
||||
"mac": "26:f5:a2:ef:2e:56",
|
||||
"ssid": "TipWlan-cloud-3-radios",
|
||||
"uapsd_enable": true,
|
||||
"ap_bridge": false,
|
||||
"wps_pbc": [
|
||||
"set",
|
||||
[]
|
||||
],
|
||||
"mac_list": [
|
||||
"set",
|
||||
[]
|
||||
],
|
||||
"associated_clients": [
|
||||
"uuid",
|
||||
"c9f5a30d-7ccf-406f-a0d8-f108b377584e"
|
||||
],
|
||||
"btm": 1,
|
||||
"_uuid": [
|
||||
"uuid",
|
||||
"009e6ee9-d687-4201-9c55-f42d26cbd7b5"
|
||||
],
|
||||
"ssid_broadcast": "enabled",
|
||||
"wps": [
|
||||
"set",
|
||||
[]
|
||||
],
|
||||
"mcast2ucast": [
|
||||
"set",
|
||||
[]
|
||||
],
|
||||
"mode": "ap",
|
||||
"mac_list_type": "none",
|
||||
"wps_pbc_key_id": "",
|
||||
"ft_psk": 0,
|
||||
"channel": [
|
||||
"set",
|
||||
[]
|
||||
],
|
||||
"parent": [
|
||||
"set",
|
||||
[]
|
||||
],
|
||||
"multi_ap": [
|
||||
"set",
|
||||
[]
|
||||
],
|
||||
"ap_vlan_sta_addr": [
|
||||
"set",
|
||||
[]
|
||||
],
|
||||
"security": [
|
||||
"map",
|
||||
[
|
||||
[
|
||||
"encryption",
|
||||
"OPEN"
|
||||
]
|
||||
]
|
||||
],
|
||||
"wds": [
|
||||
"set",
|
||||
[]
|
||||
],
|
||||
"enabled": true,
|
||||
"vlan_id": 1,
|
||||
"min_hw_mode": "11ac",
|
||||
"vif_config": [
|
||||
"uuid",
|
||||
"4aeefd3b-b86f-45e4-a9a1-c734363be9c8"
|
||||
],
|
||||
"_version": [
|
||||
"uuid",
|
||||
"e70c7842-6257-46d1-94d3-350a55733fc4"
|
||||
],
|
||||
"bridge": "lan",
|
||||
"group_rekey": 0,
|
||||
"ft_mobility_domain": [
|
||||
"set",
|
||||
[]
|
||||
],
|
||||
"dynamic_beacon": [
|
||||
"set",
|
||||
[]
|
||||
],
|
||||
"rrm": 1
|
||||
}
|
||||
Reference in New Issue
Block a user