WIFI-872: Add Profile for Identity

WIFI-878: Define Data Types for Passpoint Profile models
This commit is contained in:
Mike Hansen
2020-10-06 02:34:19 -04:00
parent 8f30d21f69
commit b04d71e75a
44 changed files with 3018 additions and 3006 deletions

View File

@@ -103,20 +103,7 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
// successfully connected - register it in our
// connectedClients table
String key = null;
// can clientCn be altered
if (preventClientCnAlteration) {
key = clientCn;
} else {
// does clientCn already end with the AP serial number, if so, use
// this
if (clientCn.endsWith("_" + connectNodeInfo.serialNumber)) {
key = clientCn;
} else {
// append the serial number
key = clientCn + "_" + connectNodeInfo.serialNumber;
}
}
String key = alterClientCnIfRequired(clientCn, connectNodeInfo);
ovsdbSessionMapInterface.newSession(key, ovsdbClient);
extIntegrationInterface.apConnected(key, connectNodeInfo);
@@ -143,6 +130,7 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
}
@Override
public void disconnected(OvsdbClient ovsdbClient) {
String remoteHost = ovsdbClient.getConnectionInfo().getRemoteAddress().getHostAddress();
@@ -199,20 +187,7 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
// successfully connected - register it in our
// connectedClients table
String apId = null;
// can clientCn be altered
if (preventClientCnAlteration) {
apId = clientCn;
} else {
// does clientCn already end with the AP serial number, if so, use
// this
if (clientCn.endsWith("_" + connectNodeInfo.serialNumber)) {
apId = clientCn;
} else {
// append the serial number
apId = clientCn + "_" + connectNodeInfo.serialNumber;
}
}
String apId = alterClientCnIfRequired(clientCn, connectNodeInfo);
LOG.debug("Client connect for AP {}", apId);
@@ -859,4 +834,21 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
}
public String alterClientCnIfRequired(String clientCn, ConnectNodeInfo connectNodeInfo) {
String key;
// can clientCn be altered
if (preventClientCnAlteration) {
key = clientCn;
} else {
// does clientCn already end with the AP serial number, if so, use
// this
if (clientCn.endsWith("_" + connectNodeInfo.serialNumber)) {
key = clientCn;
} else {
// append the serial number
key = clientCn + "_" + connectNodeInfo.serialNumber;
}
}
return key;
}
}

View File

@@ -3434,7 +3434,12 @@ public class OvsdbDao {
rowColumns.put("gas_addr3_behavior", new Atom<>(hs2Profile.getGasAddr3Behaviour().getId()));
rowColumns.put("operating_class", new Atom<>(hs2Profile.getOperatingClass()));
rowColumns.put("anqp_domain_id", new Atom<>(hs2Profile.getAnqpDomainId()));
Set<Atom<String>> mccMnc = new HashSet<>();
hs2Profile.getMccMnc3gppCellularNetworkInfo().stream()
.forEach(c -> mccMnc.add(new Atom<>(c.getMccMncPairing())));
com.vmware.ovsdb.protocol.operation.notation.Set mccMncSet = com.vmware.ovsdb.protocol.operation.notation.Set
.of(mccMnc);
rowColumns.put("mcc_mnc", mccMncSet);
Set<Atom<String>> connectionCapabilities = new HashSet<>();
hs2Profile.getConnectionCapabilitySet().stream().forEach(
c -> connectionCapabilities.add(new Atom<>(c.getConnectionCapabilitiesIpProtocol() + ":"
@@ -3462,13 +3467,33 @@ public class OvsdbDao {
rowColumns.put("venue_url", venueUrlSet);
VenueTypeAssignment venueTypeAssignment = venueProfile.getVenueTypeAssignment();
String groupType = String.valueOf(venueTypeAssignment.getVenueGroupId()) + ":"
+ venueTypeAssignment.getVenueTypeId();
String groupType = String.valueOf(venueTypeAssignment.getVenueGroupId()) + ":"
+ venueTypeAssignment.getVenueTypeId();
rowColumns.put("venue_group_type", new Atom<>(groupType));
Map<String, WifiVifConfigInfo> vifConfigMap = getProvisionedWifiVifConfigs(ovsdbClient);
Set<Uuid> vifConfigs = new HashSet<>();
for (String ssid : hs2Profile.getAssociatedSsids()) {
if (vifConfigMap != null) {
vifConfigMap.keySet().stream().forEach(k -> {
if (k.endsWith(ssid)) {
WifiVifConfigInfo vifConfig = vifConfigMap.get(k);
vifConfigs.add(vifConfig.uuid);
}
});
}
}
if (vifConfigs.size() > 0) {
com.vmware.ovsdb.protocol.operation.notation.Set vifConfigUuids = com.vmware.ovsdb.protocol.operation.notation.Set
.of(vifConfigs);
rowColumns.put("vif_config", vifConfigUuids);
}
Row row = new Row(rowColumns);
Insert newHs20Config = new Insert(hotspot20ConfigDbTable, row);