diff --git a/opensync-ext-cloud/src/main/java/com/telecominfraproject/wlan/opensync/external/integration/OpensyncExternalIntegrationCloud.java b/opensync-ext-cloud/src/main/java/com/telecominfraproject/wlan/opensync/external/integration/OpensyncExternalIntegrationCloud.java index d494c93..a5fe999 100644 --- a/opensync-ext-cloud/src/main/java/com/telecominfraproject/wlan/opensync/external/integration/OpensyncExternalIntegrationCloud.java +++ b/opensync-ext-cloud/src/main/java/com/telecominfraproject/wlan/opensync/external/integration/OpensyncExternalIntegrationCloud.java @@ -826,7 +826,7 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra profileContainer.getChildrenOfType(equipmentConfig.getProfileId(), ProfileType.ssid)); ret.setMetricsProfiles( - profileContainer.getChildrenOfType(equipmentConfig.getProfileId(), ProfileType.metrics)); + profileContainer.getChildrenOfType(equipmentConfig.getProfileId(), ProfileType.service_metrics_collection_config)); Set radiusSet = new HashSet<>(); Set captiveProfileIds = new HashSet<>(); @@ -842,7 +842,7 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra for (Profile ssidProfile : ret.getSsidProfile()) { hotspot20ProfileSet - .addAll(profileContainer.getChildrenOfType(ssidProfile.getId(), ProfileType.hotspot_2pt0)); + .addAll(profileContainer.getChildrenOfType(ssidProfile.getId(), ProfileType.passpoint)); radiusSet .addAll(profileContainer.getChildrenOfType(ret.getApProfile().getId(), ProfileType.radius)); @@ -862,11 +862,11 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra if (hotspot20ProfileSet.size() > 0) { for (Profile hotspot20Profile : hotspot20ProfileSet) { hotspot20OperatorSet.addAll( - profileContainer.getChildrenOfType(hotspot20Profile.getId(), ProfileType.operator)); + profileContainer.getChildrenOfType(hotspot20Profile.getId(), ProfileType.passpoint_operator)); hotspot20VenueSet.addAll( - profileContainer.getChildrenOfType(hotspot20Profile.getId(), ProfileType.venue)); + profileContainer.getChildrenOfType(hotspot20Profile.getId(), ProfileType.passpoint_venue)); hotspot20ProviderSet.addAll( - profileContainer.getChildrenOfType(hotspot20Profile.getId(), ProfileType.id_provider)); + profileContainer.getChildrenOfType(hotspot20Profile.getId(), ProfileType.passpoint_osu_id_provider)); } hotspotConfig.setHotspot20OperatorSet(hotspot20OperatorSet); hotspotConfig.setHotspot20ProfileSet(hotspot20ProfileSet); diff --git a/opensync-ext-cloud/src/main/java/com/telecominfraproject/wlan/opensync/external/integration/OpensyncExternalIntegrationMqttMessageProcessor.java b/opensync-ext-cloud/src/main/java/com/telecominfraproject/wlan/opensync/external/integration/OpensyncExternalIntegrationMqttMessageProcessor.java index adabe58..c18b120 100644 --- a/opensync-ext-cloud/src/main/java/com/telecominfraproject/wlan/opensync/external/integration/OpensyncExternalIntegrationMqttMessageProcessor.java +++ b/opensync-ext-cloud/src/main/java/com/telecominfraproject/wlan/opensync/external/integration/OpensyncExternalIntegrationMqttMessageProcessor.java @@ -1657,7 +1657,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { ipAddress = InetAddress.getByName(dnsProbeMetricFromAp.getServerIP()); cloudDnsProbeMetric.setDnsServerIp(ipAddress); } catch (UnknownHostException e) { - LOG.error("Could not get DNS Server IP from network_probe metrics", e); + LOG.error("Could not get DNS Server IP from network_probe service_metrics_collection_config", e); } } @@ -2145,7 +2145,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { try { if (client.hasConnected() && client.getConnected() && client.hasMacAddress()) { - // update metrics for connected client + // update service_metrics_collection_config for connected client ClientSession session = handleClientSessionMetricsUpdate(customerId, equipmentId, locationId, radioType, clientReport.getTimestampMs(), client); if (session != null) { @@ -2155,7 +2155,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { // Make sure, if we have a session for this client, // it // shows disconnected. - // update any metrics that need update if the + // update any service_metrics_collection_config that need update if the // disconnect occured during this window if (client.hasMacAddress()) { ClientSession session = clientServiceInterface.getSessionOrNull(customerId, equipmentId, diff --git a/opensync-gateway/src/main/java/com/telecominfraproject/wlan/opensync/ovsdb/dao/OvsdbDao.java b/opensync-gateway/src/main/java/com/telecominfraproject/wlan/opensync/ovsdb/dao/OvsdbDao.java index f0ab05c..71de0e6 100644 --- a/opensync-gateway/src/main/java/com/telecominfraproject/wlan/opensync/ovsdb/dao/OvsdbDao.java +++ b/opensync-gateway/src/main/java/com/telecominfraproject/wlan/opensync/ovsdb/dao/OvsdbDao.java @@ -66,30 +66,30 @@ import com.telecominfraproject.wlan.profile.bonjour.models.BonjourGatewayProfile import com.telecominfraproject.wlan.profile.bonjour.models.BonjourServiceSet; import com.telecominfraproject.wlan.profile.captiveportal.models.CaptivePortalAuthenticationType; import com.telecominfraproject.wlan.profile.captiveportal.models.CaptivePortalConfiguration; -import com.telecominfraproject.wlan.profile.metrics.ChannelUtilizationSurveyType; +import com.telecominfraproject.wlan.profile.metrics.ServiceMetricsChannelUtilizationSurveyType; import com.telecominfraproject.wlan.profile.metrics.ServiceMetricConfigParameters; import com.telecominfraproject.wlan.profile.metrics.ServiceMetricRadioConfigParameters; import com.telecominfraproject.wlan.profile.metrics.ServiceMetricSurveyConfigParameters; import com.telecominfraproject.wlan.profile.metrics.ServiceMetricsCollectionConfigProfile; -import com.telecominfraproject.wlan.profile.metrics.StatsReportFormat; +import com.telecominfraproject.wlan.profile.metrics.ServiceMetricsStatsReportFormat; import com.telecominfraproject.wlan.profile.models.Profile; import com.telecominfraproject.wlan.profile.models.common.ManagedFileInfo; 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.IPv4PasspointAddressType; -import com.telecominfraproject.wlan.profile.passpoint.models.IPv6PasspointAddressType; -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.EapMethods; -import com.telecominfraproject.wlan.profile.passpoint.provider.models.Hotspot20IdProviderProfile; -import com.telecominfraproject.wlan.profile.passpoint.provider.models.NaiRealmEapAuthInnerNonEap; -import com.telecominfraproject.wlan.profile.passpoint.provider.models.NaiRealmEapAuthParam; -import com.telecominfraproject.wlan.profile.passpoint.provider.models.NaiRealmEapCredType; -import com.telecominfraproject.wlan.profile.passpoint.provider.models.OsuIcon; -import com.telecominfraproject.wlan.profile.passpoint.venue.models.VenueName; -import com.telecominfraproject.wlan.profile.passpoint.venue.models.VenueProfile; -import com.telecominfraproject.wlan.profile.passpoint.venue.models.VenueTypeAssignment; +import com.telecominfraproject.wlan.profile.passpoint.models.PasspointDuple; +import com.telecominfraproject.wlan.profile.passpoint.models.PasspointIPv4AddressType; +import com.telecominfraproject.wlan.profile.passpoint.models.PasspointIPv6AddressType; +import com.telecominfraproject.wlan.profile.passpoint.models.PasspointMccMnc; +import com.telecominfraproject.wlan.profile.passpoint.models.PasspointProfile; +import com.telecominfraproject.wlan.profile.passpoint.models.operator.PasspointOperatorProfile; +import com.telecominfraproject.wlan.profile.passpoint.models.provider.PasspointEapMethods; +import com.telecominfraproject.wlan.profile.passpoint.models.provider.PasspointNaiRealmEapAuthInnerNonEap; +import com.telecominfraproject.wlan.profile.passpoint.models.provider.PasspointNaiRealmEapAuthParam; +import com.telecominfraproject.wlan.profile.passpoint.models.provider.PasspointNaiRealmEapCredType; +import com.telecominfraproject.wlan.profile.passpoint.models.provider.PasspointOsuIcon; +import com.telecominfraproject.wlan.profile.passpoint.models.provider.PasspointOsuProviderProfile; +import com.telecominfraproject.wlan.profile.passpoint.models.venue.PasspointVenueProfile; +import com.telecominfraproject.wlan.profile.passpoint.models.venue.PasspointVenueName; +import com.telecominfraproject.wlan.profile.passpoint.models.venue.ProfileVenueTypeAssignment; import com.telecominfraproject.wlan.profile.radius.models.RadiusProfile; import com.telecominfraproject.wlan.profile.radius.models.RadiusServer; import com.telecominfraproject.wlan.profile.radius.models.RadiusServiceRegion; @@ -693,7 +693,7 @@ public class OvsdbDao { * */ public void enableNetworkProbeForSyntheticClient(OvsdbClient ovsdbClient) { - LOG.debug("Enable network_probe metrics for synthetic client"); + LOG.debug("Enable network_probe service_metrics_collection_config for synthetic client"); try { List operations = new ArrayList<>(); @@ -3666,7 +3666,7 @@ public class OvsdbDao { List operations = new ArrayList<>(); for (Profile hotspotProfile : hs20cfg.getHotspot20ProfileSet()) { - Hotspot2Profile hs2Profile = (Hotspot2Profile) hotspotProfile.getDetails(); + PasspointProfile hs2Profile = (PasspointProfile) hotspotProfile.getDetails(); Profile operator = hs20cfg.getHotspot20OperatorSet().stream().filter(new Predicate() { @@ -3677,7 +3677,7 @@ public class OvsdbDao { }).findFirst().get(); - OperatorProfile operatorProfile = (OperatorProfile) operator.getDetails(); + PasspointOperatorProfile passpointOperatorProfile = (PasspointOperatorProfile) operator.getDetails(); Profile venue = hs20cfg.getHotspot20VenueSet().stream().filter(new Predicate() { @@ -3688,7 +3688,7 @@ public class OvsdbDao { }).findFirst().get(); - VenueProfile venueProfile = (VenueProfile) venue.getDetails(); + PasspointVenueProfile passpointVenueProfile = (PasspointVenueProfile) venue.getDetails(); Map rowColumns = new HashMap<>(); @@ -3713,7 +3713,7 @@ public class OvsdbDao { Set> naiRealms = new HashSet<>(); Set> roamingOis = new HashSet<>(); for (Profile provider : providerList) { - Hotspot20IdProviderProfile providerProfile = (Hotspot20IdProviderProfile) provider + PasspointOsuProviderProfile providerProfile = (PasspointOsuProviderProfile) provider .getDetails(); if (osuProviders.containsKey(providerProfile.getOsuServerUri())) { Hotspot20OsuProviders hotspot2OsuProviders = osuProviders @@ -3729,8 +3729,8 @@ public class OvsdbDao { domainNames.add(new Atom<>(providerProfile.getDomainName())); getNaiRealms(providerProfile, naiRealms); - for (MccMnc mccMnc : providerProfile.getMccMncList()) { - mccMncBuffer.append(mccMnc.getMccMncPairing()); + for (PasspointMccMnc passpointMccMnc : providerProfile.getMccMncList()) { + mccMncBuffer.append(passpointMccMnc.getMccMncPairing()); mccMncBuffer.append(";"); } @@ -3773,12 +3773,12 @@ public class OvsdbDao { hs2Profile.getIpAddressTypeAvailability(); rowColumns.put("deauth_request_timeout", new Atom<>(hs2Profile.getDeauthRequestTimeout())); rowColumns.put("osen", - new Atom<>(operatorProfile.isServerOnlyAuthenticatedL2EncryptionNetwork())); + new Atom<>(passpointOperatorProfile.isServerOnlyAuthenticatedL2EncryptionNetwork())); rowColumns.put("tos", new Atom<>(hs2Profile.getTermsAndConditionsFile().getApExportUrl())); Set> operatorFriendlyName = new HashSet<>(); - operatorProfile.getOperatorFriendlyName().stream() + passpointOperatorProfile.getOperatorFriendlyName().stream() .forEach(c -> operatorFriendlyName.add(new Atom<>(c.getAsDuple()))); com.vmware.ovsdb.protocol.operation.notation.Set operatorFriendlyNameSet = com.vmware.ovsdb.protocol.operation.notation.Set .of(operatorFriendlyName); @@ -3804,9 +3804,9 @@ public class OvsdbDao { Set> venueNames = new HashSet<>(); Set> venueUrls = new HashSet<>(); int index = 1; - for (VenueName venueName : venueProfile.getVenueNameSet()) { - venueNames.add(new Atom(venueName.getAsDuple())); - String url = String.valueOf(index) + ":" + venueName.getVenueUrl(); + for (PasspointVenueName passpointVenueName : passpointVenueProfile.getVenueNameSet()) { + venueNames.add(new Atom(passpointVenueName.getAsDuple())); + String url = String.valueOf(index) + ":" + passpointVenueName.getVenueUrl(); venueUrls.add(new Atom(url)); index++; } @@ -3817,9 +3817,9 @@ public class OvsdbDao { rowColumns.put("venue_name", venueNameSet); rowColumns.put("venue_url", venueUrlSet); - VenueTypeAssignment venueTypeAssignment = venueProfile.getVenueTypeAssignment(); - String groupType = String.valueOf(venueTypeAssignment.getVenueGroupId()) + ":" - + venueTypeAssignment.getVenueTypeId(); + ProfileVenueTypeAssignment profileVenueTypeAssignment = passpointVenueProfile.getVenueTypeAssignment(); + String groupType = String.valueOf(profileVenueTypeAssignment.getVenueGroupId()) + ":" + + profileVenueTypeAssignment.getVenueTypeId(); rowColumns.put("venue_group_type", new Atom<>(groupType)); @@ -3827,15 +3827,15 @@ public class OvsdbDao { // # (ipv4_type & 0x3f) << 2 | (ipv6_type & 0x3) << 2 // 0x3f = 63 in decimal // 0x3 = 3 in decimal - if (IPv6PasspointAddressType.getByName( - hs2Profile.getIpAddressTypeAvailability()) != IPv6PasspointAddressType.UNSUPPORTED) { - int availability = IPv6PasspointAddressType + if (PasspointIPv6AddressType.getByName( + hs2Profile.getIpAddressTypeAvailability()) != PasspointIPv6AddressType.UNSUPPORTED) { + int availability = PasspointIPv6AddressType .getByName(hs2Profile.getIpAddressTypeAvailability()).getId(); String hexString = Integer.toHexString((availability & 3) << 2); rowColumns.put("ipaddr_type_availability", new Atom<>(hexString)); - } else if (IPv4PasspointAddressType.getByName( - hs2Profile.getIpAddressTypeAvailability()) != IPv4PasspointAddressType.UNSUPPORTED) { - int availability = IPv4PasspointAddressType + } else if (PasspointIPv4AddressType.getByName( + hs2Profile.getIpAddressTypeAvailability()) != PasspointIPv4AddressType.UNSUPPORTED) { + int availability = PasspointIPv4AddressType .getByName(hs2Profile.getIpAddressTypeAvailability()).getId(); String hexString = Integer.toHexString((availability & 63) << 2); rowColumns.put("ipaddr_type_availability", new Atom<>(hexString)); @@ -3918,7 +3918,7 @@ public class OvsdbDao { if (hs20cfg.getHotspot20ProviderSet() != null && hs20cfg.getHotspot20ProviderSet().size() > 0) { for (Profile provider : hs20cfg.getHotspot20ProviderSet()) { - Hotspot20IdProviderProfile providerProfile = (Hotspot20IdProviderProfile) provider.getDetails(); + PasspointOsuProviderProfile providerProfile = (PasspointOsuProviderProfile) provider.getDetails(); Map rowColumns = new HashMap<>(); rowColumns.put("osu_nai", new Atom<>(providerProfile.getOsuNaiStandalone())); // TODO: temporary check schema until AP has delivered @@ -3976,10 +3976,10 @@ public class OvsdbDao { } - protected void getOsuProviderServiceDescriptions(Hotspot20IdProviderProfile providerProfile, + protected void getOsuProviderServiceDescriptions(PasspointOsuProviderProfile providerProfile, Map rowColumns) { Set> serviceDescriptions = new HashSet<>(); - for (Hotspot20Duple serviceDescription : providerProfile.getOsuServiceDescription()) { + for (PasspointDuple serviceDescription : providerProfile.getOsuServiceDescription()) { serviceDescriptions.add(new Atom(serviceDescription.getAsDuple())); } @@ -3990,7 +3990,7 @@ public class OvsdbDao { } } - protected void getOsuProviderMethodList(Hotspot20IdProviderProfile providerProfile, Map rowColumns) { + protected void getOsuProviderMethodList(PasspointOsuProviderProfile providerProfile, Map rowColumns) { Set> methods = new HashSet<>(); for (Integer method : providerProfile.getOsuMethodList()) { methods.add(new Atom(method)); @@ -4002,10 +4002,10 @@ public class OvsdbDao { } } - protected void getOsuProviderFriendlyNames(Hotspot20IdProviderProfile providerProfile, + protected void getOsuProviderFriendlyNames(PasspointOsuProviderProfile providerProfile, Map rowColumns) { Set> providerFriendlyNames = new HashSet<>(); - for (Hotspot20Duple friendlyName : providerProfile.getOsuFriendlyName()) { + for (PasspointDuple friendlyName : providerProfile.getOsuFriendlyName()) { providerFriendlyNames.add(new Atom(friendlyName.getAsDuple())); } @@ -4016,12 +4016,12 @@ public class OvsdbDao { } } - protected void getOsuIconUuidsForOsuProvider(OvsdbClient ovsdbClient, Hotspot20IdProviderProfile providerProfile, + protected void getOsuIconUuidsForOsuProvider(OvsdbClient ovsdbClient, PasspointOsuProviderProfile providerProfile, Map rowColumns) { Map osuIconsMap = getProvisionedHotspot20IconConfig(ovsdbClient); Set iconsSet = new HashSet<>(); if (osuIconsMap.size() > 0) { - for (OsuIcon icon : providerProfile.getOsuIconList()) { + for (PasspointOsuIcon icon : providerProfile.getOsuIconList()) { if (osuIconsMap.containsKey(icon.getIconName())) { iconsSet.add(osuIconsMap.get(icon.getIconName()).uuid); } @@ -4035,7 +4035,7 @@ public class OvsdbDao { } } - protected void getNaiRealms(Hotspot20IdProviderProfile providerProfile, Set> naiRealms) { + protected void getNaiRealms(PasspointOsuProviderProfile providerProfile, Set> naiRealms) { providerProfile.getNaiRealmList().stream().forEach(c -> { StringBuffer naiBuffer = new StringBuffer(); @@ -4062,16 +4062,16 @@ public class OvsdbDao { eapMap.entrySet().stream().forEach(e -> { String eapMethodName = e.getKey(); - String eapMethodId = String.valueOf(EapMethods.getByName(eapMethodName).getId()); + String eapMethodId = String.valueOf(PasspointEapMethods.getByName(eapMethodName).getId()); naiBuffer.append(eapMethodId); for (String credential : e.getValue()) { String[] keyValue = credential.split(":"); - String keyId = String.valueOf(NaiRealmEapAuthParam.getByName(keyValue[0]).getId()); - if (keyValue[0].equals(NaiRealmEapAuthParam.NAI_REALM_EAP_AUTH_NON_EAP_INNER_AUTH.getName())) { + String keyId = String.valueOf(PasspointNaiRealmEapAuthParam.getByName(keyValue[0]).getId()); + if (keyValue[0].equals(PasspointNaiRealmEapAuthParam.NAI_REALM_EAP_AUTH_NON_EAP_INNER_AUTH.getName())) { - String valueId = String.valueOf(NaiRealmEapAuthInnerNonEap.getByName(keyValue[1]).getId()); + String valueId = String.valueOf(PasspointNaiRealmEapAuthInnerNonEap.getByName(keyValue[1]).getId()); naiBuffer.append("["); naiBuffer.append(keyId); @@ -4079,11 +4079,11 @@ public class OvsdbDao { naiBuffer.append(valueId); naiBuffer.append("]"); - } else if (keyValue[0].equals(NaiRealmEapAuthParam.NAI_REALM_EAP_AUTH_CRED_TYPE.getName()) + } else if (keyValue[0].equals(PasspointNaiRealmEapAuthParam.NAI_REALM_EAP_AUTH_CRED_TYPE.getName()) || keyValue[0] - .equals(NaiRealmEapAuthParam.NAI_REALM_EAP_AUTH_TUNNELED_CRED_TYPE.getName())) { + .equals(PasspointNaiRealmEapAuthParam.NAI_REALM_EAP_AUTH_TUNNELED_CRED_TYPE.getName())) { - String valueId = String.valueOf(NaiRealmEapCredType.getByName(keyValue[1]).getId()); + String valueId = String.valueOf(PasspointNaiRealmEapCredType.getByName(keyValue[1]).getId()); naiBuffer.append("["); naiBuffer.append(keyId); @@ -4120,30 +4120,30 @@ public class OvsdbDao { if (hs20cfg.getHotspot20ProviderSet() != null && hs20cfg.getHotspot20ProviderSet().size() > 0) { for (Profile provider : hs20cfg.getHotspot20ProviderSet()) { - Hotspot20IdProviderProfile providerProfile = (Hotspot20IdProviderProfile) provider.getDetails(); - for (OsuIcon osuIcon : providerProfile.getOsuIconList()) { + PasspointOsuProviderProfile providerProfile = (PasspointOsuProviderProfile) provider.getDetails(); + for (PasspointOsuIcon passpointOsuIcon : providerProfile.getOsuIconList()) { // ovsdbColumns = { "name", "path", "url", // "lang_code", "height", "img_type", "width" }; Map rowColumns = new HashMap<>(); - rowColumns.put("name", new Atom<>(osuIcon.getIconName())); + rowColumns.put("name", new Atom<>(passpointOsuIcon.getIconName())); if (schema.getTables().get(hotspot20IconConfigDbTable).getColumns().containsKey("path")) { - rowColumns.put("path", new Atom<>(osuIcon.getFilePath())); + rowColumns.put("path", new Atom<>(passpointOsuIcon.getFilePath())); } - rowColumns.put("url", new Atom<>(osuIcon.getImageUrl())); - rowColumns.put("lang_code", new Atom<>(osuIcon.getLanguageCode())); - rowColumns.put("height", new Atom<>(osuIcon.getIconHeight())); - rowColumns.put("img_type", new Atom<>(OsuIcon.ICON_TYPE)); - rowColumns.put("width", new Atom<>(osuIcon.getIconWidth())); + rowColumns.put("url", new Atom<>(passpointOsuIcon.getImageUrl())); + rowColumns.put("lang_code", new Atom<>(passpointOsuIcon.getLanguageCode())); + rowColumns.put("height", new Atom<>(passpointOsuIcon.getIconHeight())); + rowColumns.put("img_type", new Atom<>(PasspointOsuIcon.ICON_TYPE)); + rowColumns.put("width", new Atom<>(passpointOsuIcon.getIconWidth())); Row row = new Row(rowColumns); - if (!osuIconConfigs.containsKey(osuIcon.getIconName())) { + if (!osuIconConfigs.containsKey(passpointOsuIcon.getIconName())) { Insert newHs20Config = new Insert(hotspot20IconConfigDbTable, row); operations.add(newHs20Config); } else { List conditions = new ArrayList<>(); conditions - .add(new Condition("name", Function.EQUALS, new Atom<>(osuIcon.getIconName()))); + .add(new Condition("name", Function.EQUALS, new Atom<>(passpointOsuIcon.getIconName()))); Update newHs20Config = new Update(hotspot20IconConfigDbTable, conditions, row); operations.add(newHs20Config); } @@ -4285,9 +4285,9 @@ public class OvsdbDao { .of(thresholdMap); RadioType radioType = parameters.getRadioType(); - ChannelUtilizationSurveyType channelType = parameters.getChannelSurveyType(); + ServiceMetricsChannelUtilizationSurveyType channelType = parameters.getChannelSurveyType(); int scanInterval = parameters.getScanIntervalMillis(); - StatsReportFormat format = parameters.getStatsReportFormat(); + ServiceMetricsStatsReportFormat format = parameters.getStatsReportFormat(); int reportingInterval = parameters.getReportingIntervalSeconds(); int samplingInterval = parameters.getSamplingInterval(); @@ -4299,7 +4299,7 @@ public class OvsdbDao { if (dataType.equals(ServiceMetricDataType.ApNode)) { // extra reports that are part of ApNode // metric - if (channelType.equals(ChannelUtilizationSurveyType.ON_CHANNEL)) { + if (channelType.equals(ServiceMetricsChannelUtilizationSurveyType.ON_CHANNEL)) { provisionWifiStatsConfigFromProfile("device", reportingInterval, samplingInterval, operations); if (((ApNetworkConfiguration) opensyncApConfig.getApProfile().getDetails()) @@ -4421,11 +4421,11 @@ public class OvsdbDao { } private void provisionWifiStatsConfigFromProfile(String statsType, Map> allowedChannels, - RadioType radioType, ChannelUtilizationSurveyType channelType, int scanInterval, StatsReportFormat format, + RadioType radioType, ServiceMetricsChannelUtilizationSurveyType channelType, int scanInterval, ServiceMetricsStatsReportFormat format, int reportingInterval, int samplingInterval, List operations, com.vmware.ovsdb.protocol.operation.notation.Map thresholds) { - if (channelType.equals(ChannelUtilizationSurveyType.ON_CHANNEL)) { + if (channelType.equals(ServiceMetricsChannelUtilizationSurveyType.ON_CHANNEL)) { Map rowColumns = new HashMap<>(); rowColumns.put("radio_type", diff --git a/opensync-gateway/src/main/java/com/telecominfraproject/wlan/opensync/ovsdb/dao/utilities/OvsdbToWlanCloudTypeMappingUtility.java b/opensync-gateway/src/main/java/com/telecominfraproject/wlan/opensync/ovsdb/dao/utilities/OvsdbToWlanCloudTypeMappingUtility.java index d191b08..10d9b85 100644 --- a/opensync-gateway/src/main/java/com/telecominfraproject/wlan/opensync/ovsdb/dao/utilities/OvsdbToWlanCloudTypeMappingUtility.java +++ b/opensync-gateway/src/main/java/com/telecominfraproject/wlan/opensync/ovsdb/dao/utilities/OvsdbToWlanCloudTypeMappingUtility.java @@ -5,7 +5,7 @@ import com.telecominfraproject.wlan.core.model.equipment.RadioType; import com.telecominfraproject.wlan.core.model.equipment.SecurityType; import com.telecominfraproject.wlan.opensync.external.integration.models.ConnectNodeInfo; import com.telecominfraproject.wlan.opensync.ovsdb.dao.models.enumerations.DhcpFpDeviceType; -import com.telecominfraproject.wlan.profile.metrics.ChannelUtilizationSurveyType; +import com.telecominfraproject.wlan.profile.metrics.ServiceMetricsChannelUtilizationSurveyType; import com.telecominfraproject.wlan.servicemetric.apnode.models.StateUpDownError; import com.telecominfraproject.wlan.servicemetric.models.ServiceMetricDataType; import com.telecominfraproject.wlan.status.equipment.models.EquipmentUpgradeState; @@ -83,7 +83,7 @@ public class OvsdbToWlanCloudTypeMappingUtility { } - public static String getOvsdbStatsSurveyTypeFromProfileSurveyType(ChannelUtilizationSurveyType surveyType) { + public static String getOvsdbStatsSurveyTypeFromProfileSurveyType(ServiceMetricsChannelUtilizationSurveyType surveyType) { switch (surveyType) { case FULL: return "full"; diff --git a/opensync-gateway/src/test/java/com/telecominfraproject/wlan/opensync/ovsdb/dao/OvsdbDaoTestUtilities.java b/opensync-gateway/src/test/java/com/telecominfraproject/wlan/opensync/ovsdb/dao/OvsdbDaoTestUtilities.java index 4021d5b..e5daed6 100644 --- a/opensync-gateway/src/test/java/com/telecominfraproject/wlan/opensync/ovsdb/dao/OvsdbDaoTestUtilities.java +++ b/opensync-gateway/src/test/java/com/telecominfraproject/wlan/opensync/ovsdb/dao/OvsdbDaoTestUtilities.java @@ -14,14 +14,14 @@ 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.passpoint.models.PasspointDuple; +import com.telecominfraproject.wlan.profile.passpoint.models.PasspointMccMnc; +import com.telecominfraproject.wlan.profile.passpoint.models.PasspointProfile; +import com.telecominfraproject.wlan.profile.passpoint.models.operator.PasspointOperatorProfile; +import com.telecominfraproject.wlan.profile.passpoint.models.provider.PasspointNaiRealmInformation; +import com.telecominfraproject.wlan.profile.passpoint.models.provider.PasspointOsuIcon; +import com.telecominfraproject.wlan.profile.passpoint.models.provider.PasspointOsuProviderProfile; +import com.telecominfraproject.wlan.profile.passpoint.models.venue.PasspointVenueProfile; 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; @@ -75,22 +75,22 @@ public class OvsdbDaoTestUtilities { passpointHotspotConfig = new Profile(); passpointHotspotConfig.setCustomerId(customer.getId()); passpointHotspotConfig.setName("TipWlan-Hotspot20-Config"); - passpointHotspotConfig.setProfileType(ProfileType.hotspot_2pt0); + passpointHotspotConfig.setProfileType(ProfileType.passpoint); Set 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()); + passpointHotspotConfig.setDetails(PasspointProfile.createWithDefaults()); Set providerNames = new HashSet<>(); providerNames.add(hotspot20IdProviderProfile.getName()); providerNames.add(hotspot20IdProviderProfile2.getName()); - ((Hotspot2Profile) passpointHotspotConfig.getDetails()).setIdProviderProfileNames(providerNames); - ((Hotspot2Profile) passpointHotspotConfig.getDetails()) + ((PasspointProfile) passpointHotspotConfig.getDetails()).setIdProviderProfileNames(providerNames); + ((PasspointProfile) passpointHotspotConfig.getDetails()) .setOperatorProfileName(passpointOperatorProfile.getName()); - ((Hotspot2Profile) passpointHotspotConfig.getDetails()).setVenueProfileName(passpointVenueProfile.getName()); - ((Hotspot2Profile) passpointHotspotConfig.getDetails()).setOsuSsidName(profileSsidOpen.getName()); + ((PasspointProfile) passpointHotspotConfig.getDetails()).setVenueProfileName(passpointVenueProfile.getName()); + ((PasspointProfile) passpointHotspotConfig.getDetails()).setOsuSsidName(profileSsidOpen.getName()); profileSsidPsk.getChildProfileIds().add(passpointHotspotConfig.getId()); return passpointHotspotConfig; } @@ -101,16 +101,16 @@ public class OvsdbDaoTestUtilities { 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 mccMncList = new ArrayList<>(); - mccMncList.add(mccMnc); + hotspot20IdProviderProfile.setProfileType(ProfileType.passpoint_osu_id_provider); + PasspointMccMnc passpointMccMnc = PasspointMccMnc.createWithDefaults(); + passpointMccMnc.setMcc(mcc); + passpointMccMnc.setMnc(mnc); + passpointMccMnc.setIso(iso); + passpointMccMnc.setCountry(country); + passpointMccMnc.setCountryCode(1); + passpointMccMnc.setNetwork(network); + List mccMncList = new ArrayList<>(); + mccMncList.add(passpointMccMnc); Set naiRealms = new HashSet<>(); naiRealms.add(naiRealm); naiRealm.split("."); @@ -130,8 +130,8 @@ public class OvsdbDaoTestUtilities { passpointVenueProfile = new Profile(); passpointVenueProfile.setCustomerId(customer.getId()); passpointVenueProfile.setName("TipWlan-Hotspot20-Venue"); - passpointVenueProfile.setProfileType(ProfileType.venue); - passpointVenueProfile.setDetails(VenueProfile.createWithDefaults()); + passpointVenueProfile.setProfileType(ProfileType.passpoint_venue); + passpointVenueProfile.setDetails(PasspointVenueProfile.createWithDefaults()); return passpointVenueProfile; } @@ -140,8 +140,8 @@ public class OvsdbDaoTestUtilities { passpointOperatorProfile = new Profile(); passpointOperatorProfile.setCustomerId(customer.getId()); passpointOperatorProfile.setName("TipWlan-Hotspot20-Operator"); - passpointOperatorProfile.setProfileType(ProfileType.operator); - passpointOperatorProfile.setDetails(OperatorProfile.createWithDefaults()); + passpointOperatorProfile.setProfileType(ProfileType.passpoint_operator); + passpointOperatorProfile.setDetails(PasspointOperatorProfile.createWithDefaults()); return passpointOperatorProfile; } @@ -203,13 +203,13 @@ public class OvsdbDaoTestUtilities { } static Profile createOsuProviderProfile(Customer customer, Profile hotspot20IdProviderProfile, - List mccMncList, Set realms, String serverUri, String suffix, String domainName, + List mccMncList, Set realms, String serverUri, String suffix, String domainName, List roamingOi) { - Hotspot20IdProviderProfile passpointIdProviderProfile = Hotspot20IdProviderProfile.createWithDefaults(); + PasspointOsuProviderProfile passpointIdProviderProfile = PasspointOsuProviderProfile.createWithDefaults(); passpointIdProviderProfile.setMccMncList(mccMncList); - OsuIcon icon1 = new OsuIcon(); + PasspointOsuIcon icon1 = new PasspointOsuIcon(); icon1.setIconLocale(Locale.CANADA); icon1.setIconWidth(32); icon1.setIconHeight(32); @@ -217,7 +217,7 @@ public class OvsdbDaoTestUtilities { icon1.setIconName("icon32eng"); icon1.setImageUrl("https://localhost:9096/icon32eng.png"); icon1.setFilePath("/tmp/icon32eng.png"); - OsuIcon icon2 = new OsuIcon(); + PasspointOsuIcon icon2 = new PasspointOsuIcon(); icon2.setIconLocale(Locale.CANADA_FRENCH); icon2.setIconWidth(32); icon2.setIconHeight(32); @@ -225,7 +225,7 @@ public class OvsdbDaoTestUtilities { icon2.setIconName("icon32fra"); icon2.setImageUrl("https://localhost:9096/icon32fra.png"); icon2.setFilePath("/tmp/icon32fra.png"); - OsuIcon icon3 = new OsuIcon(); + PasspointOsuIcon icon3 = new PasspointOsuIcon(); icon3.setIconLocale(Locale.US); icon3.setIconWidth(32); icon3.setIconHeight(32); @@ -233,16 +233,16 @@ public class OvsdbDaoTestUtilities { icon3.setIconName("icon32usa"); icon3.setImageUrl("https://localhost:9096/icon32usa.png"); icon3.setFilePath("/tmp/icon32usa.png"); - List osuIconList = new ArrayList<>(); + List osuIconList = new ArrayList<>(); osuIconList.add(icon1); osuIconList.add(icon2); osuIconList.add(icon3); passpointIdProviderProfile.setOsuIconList(osuIconList); passpointIdProviderProfile.setRoamingOi(roamingOi); - List naiRealmList = new ArrayList<>(); + List naiRealmList = new ArrayList<>(); - NaiRealmInformation naiRealmInfo = NaiRealmInformation.createWithDefaults(); + PasspointNaiRealmInformation naiRealmInfo = PasspointNaiRealmInformation.createWithDefaults(); naiRealmInfo.setNaiRealms(realms); naiRealmList.add(naiRealmInfo); @@ -254,22 +254,22 @@ public class OvsdbDaoTestUtilities { methodList.add(1); methodList.add(0); passpointIdProviderProfile.setOsuMethodList(methodList); - Hotspot20Duple enOsuProvider = Hotspot20Duple.createWithDefaults(); + PasspointDuple enOsuProvider = PasspointDuple.createWithDefaults(); enOsuProvider.setLocale(Locale.CANADA); enOsuProvider.setDupleName("Example provider " + suffix); - Hotspot20Duple frOsuProvider = Hotspot20Duple.createWithDefaults(); + PasspointDuple frOsuProvider = PasspointDuple.createWithDefaults(); frOsuProvider.setLocale(Locale.CANADA_FRENCH); frOsuProvider.setDupleName("Exemple de fournisseur " + suffix); - List friendlyNameList = new ArrayList<>(); + List friendlyNameList = new ArrayList<>(); friendlyNameList.add(enOsuProvider); friendlyNameList.add(frOsuProvider); passpointIdProviderProfile.setOsuFriendlyName(friendlyNameList); - List osuServiceDescription = new ArrayList<>(); - Hotspot20Duple enService = Hotspot20Duple.createWithDefaults(); + List osuServiceDescription = new ArrayList<>(); + PasspointDuple enService = PasspointDuple.createWithDefaults(); enService.setLocale(Locale.CANADA); enService.setDupleName("Example services " + suffix); osuServiceDescription.add(enService); - Hotspot20Duple frService = Hotspot20Duple.createWithDefaults(); + PasspointDuple frService = PasspointDuple.createWithDefaults(); frService.setLocale(Locale.CANADA_FRENCH); frService.setDupleName("Exemples de services " + suffix); osuServiceDescription.add(frService); @@ -301,7 +301,7 @@ public class OvsdbDaoTestUtilities { 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"), + com.vmware.ovsdb.protocol.operation.notation.Set.of(new Atom<>("eng:Default friendly passpoint_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( @@ -318,7 +318,7 @@ public class OvsdbDaoTestUtilities { 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"), + columns.put("venue_name", com.vmware.ovsdb.protocol.operation.notation.Set.of(new Atom<>("eng:Example passpoint_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")));