WIFI-908: Provision Hotspot20_Config in opensync database via opensync gateway, using new Hotspot/passpoint profiles

Setting tos and roamingOi in Hotspot20_Config
This commit is contained in:
Mike Hansen
2020-10-13 18:15:57 -04:00
parent 6b3b835e80
commit e9553ae54f

View File

@@ -3486,6 +3486,7 @@ public class OvsdbDao {
Set<Atom<String>> domainNames = new HashSet<>(); Set<Atom<String>> domainNames = new HashSet<>();
StringBuffer mccMncBuffer = new StringBuffer(); StringBuffer mccMncBuffer = new StringBuffer();
Set<Atom<String>> naiRealms = new HashSet<>(); Set<Atom<String>> naiRealms = new HashSet<>();
Set<Atom<String>> roamingOis = new HashSet<>();
for (Profile provider : providerList) { for (Profile provider : providerList) {
Hotspot20IdProviderProfile providerProfile = (Hotspot20IdProviderProfile) provider Hotspot20IdProviderProfile providerProfile = (Hotspot20IdProviderProfile) provider
.getDetails(); .getDetails();
@@ -3493,6 +3494,11 @@ public class OvsdbDao {
Hotspot20OsuProviders hotspot2OsuProviders = osuProviders Hotspot20OsuProviders hotspot2OsuProviders = osuProviders
.get(providerProfile.getOsuServerUri()); .get(providerProfile.getOsuServerUri());
StringBuffer roamingOiOctets = new StringBuffer();
providerProfile.getRoamingOi().stream().forEach(o -> {
roamingOiOctets.append(Byte.toString(o));
});
roamingOis.add(new Atom<>(roamingOiOctets.toString()));
osuProvidersUuids.add(hotspot2OsuProviders.uuid); osuProvidersUuids.add(hotspot2OsuProviders.uuid);
osuIconUuids.addAll(hotspot2OsuProviders.osuIcons); osuIconUuids.addAll(hotspot2OsuProviders.osuIcons);
domainNames.add(new Atom<>(providerProfile.getDomainName())); domainNames.add(new Atom<>(providerProfile.getDomainName()));
@@ -3513,6 +3519,10 @@ public class OvsdbDao {
rowColumns.put("mcc_mnc", new Atom<>(mccMncString)); rowColumns.put("mcc_mnc", new Atom<>(mccMncString));
com.vmware.ovsdb.protocol.operation.notation.Set roamingOiSet = com.vmware.ovsdb.protocol.operation.notation.Set
.of(roamingOis);
rowColumns.put("roaming_oi", roamingOiSet);
com.vmware.ovsdb.protocol.operation.notation.Set naiRealmsSet = com.vmware.ovsdb.protocol.operation.notation.Set com.vmware.ovsdb.protocol.operation.notation.Set naiRealmsSet = com.vmware.ovsdb.protocol.operation.notation.Set
.of(naiRealms); .of(naiRealms);
rowColumns.put("nai_realm", naiRealmsSet); rowColumns.put("nai_realm", naiRealmsSet);
@@ -3540,6 +3550,8 @@ public class OvsdbDao {
rowColumns.put("osen", rowColumns.put("osen",
new Atom<>(operatorProfile.isServerOnlyAuthenticatedL2EncryptionNetwork())); new Atom<>(operatorProfile.isServerOnlyAuthenticatedL2EncryptionNetwork()));
rowColumns.put("tos", new Atom<>(hs2Profile.getTermsAndConditionsFile().getApExportUrl()));
Set<Atom<String>> operatorFriendlyName = new HashSet<>(); Set<Atom<String>> operatorFriendlyName = new HashSet<>();
operatorProfile.getOperatorFriendlyName().stream() operatorProfile.getOperatorFriendlyName().stream()
.forEach(c -> operatorFriendlyName.add(new Atom<>(c.getAsDuple()))); .forEach(c -> operatorFriendlyName.add(new Atom<>(c.getAsDuple())));