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 6d8c0aa..40f17c4 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 @@ -229,7 +229,7 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra ce.setSerial(connectNodeInfo.serialNumber); ce.setDetails(ApElementConfiguration.createWithDefaults()); ce.setCustomerId(autoProvisionedCustomerId); - ce.setName(ce.getEquipmentType().name() + "_" + ce.getSerial()); + ce.setName(apId); ApElementConfiguration apElementConfig = (ApElementConfiguration) ce.getDetails(); apElementConfig.setDeviceName(ce.getName()); diff --git a/opensync-ext-interface/src/main/java/com/telecominfraproject/wlan/opensync/external/integration/models/ConnectNodeInfo.java b/opensync-ext-interface/src/main/java/com/telecominfraproject/wlan/opensync/external/integration/models/ConnectNodeInfo.java index c61845f..e628816 100644 --- a/opensync-ext-interface/src/main/java/com/telecominfraproject/wlan/opensync/external/integration/models/ConnectNodeInfo.java +++ b/opensync-ext-interface/src/main/java/com/telecominfraproject/wlan/opensync/external/integration/models/ConnectNodeInfo.java @@ -2,8 +2,10 @@ package com.telecominfraproject.wlan.opensync.external.integration.models; import java.util.HashMap; import java.util.Map; +import java.util.Objects; public class ConnectNodeInfo implements Cloneable { + public Map mqttSettings = new HashMap<>(); public Map versionMatrix = new HashMap<>(); public Map wifiRadioStates = new HashMap<>(); @@ -45,13 +47,45 @@ public class ConnectNodeInfo implements Cloneable { } @Override - public String toString() { - return String.format( - "ConnectNodeInfo [mqttSettings=%s, redirectorAddr=%s, managerAddr=%s, skuNumber=%s, serialNumber=%s, " - + "macAddress=%s, ipV4Address=%s, platformVersion=%s, firmwareVersion=%s, revision=%s, model=%s, ifName=%s, lanIpV4Address=%s, lanIfName=%s, lanIfType=%s, lanMacAddress=%s, ifType=%s, wifiRadioStates=%s, versionMatrix=%s]", - mqttSettings, redirectorAddr, managerAddr, skuNumber, serialNumber, macAddress, ipV4Address, - platformVersion, firmwareVersion, revision, model, ifName, lanIpV4Address, lanIfName, lanIfType, - lanMacAddress, ifType, wifiRadioStates, versionMatrix); + public int hashCode() { + return Objects.hash(country, firmwareVersion, ifName, ifType, ipV4Address, lanIfName, lanIfType, lanIpV4Address, + lanMacAddress, macAddress, managerAddr, model, mqttSettings, platformVersion, redirectorAddr, revision, + serialNumber, skuNumber, versionMatrix, wifiRadioStates); } + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (!(obj instanceof ConnectNodeInfo)) { + return false; + } + ConnectNodeInfo other = (ConnectNodeInfo) obj; + return Objects.equals(country, other.country) && Objects.equals(firmwareVersion, other.firmwareVersion) + && Objects.equals(ifName, other.ifName) && Objects.equals(ifType, other.ifType) + && Objects.equals(ipV4Address, other.ipV4Address) && Objects.equals(lanIfName, other.lanIfName) + && Objects.equals(lanIfType, other.lanIfType) && Objects.equals(lanIpV4Address, other.lanIpV4Address) + && Objects.equals(lanMacAddress, other.lanMacAddress) && Objects.equals(macAddress, other.macAddress) + && Objects.equals(managerAddr, other.managerAddr) && Objects.equals(model, other.model) + && Objects.equals(mqttSettings, other.mqttSettings) + && Objects.equals(platformVersion, other.platformVersion) + && Objects.equals(redirectorAddr, other.redirectorAddr) && Objects.equals(revision, other.revision) + && Objects.equals(serialNumber, other.serialNumber) && Objects.equals(skuNumber, other.skuNumber) + && Objects.equals(versionMatrix, other.versionMatrix) + && Objects.equals(wifiRadioStates, other.wifiRadioStates); + } + + @Override + public String toString() { + return "ConnectNodeInfo [mqttSettings=" + mqttSettings + ", versionMatrix=" + versionMatrix + + ", wifiRadioStates=" + wifiRadioStates + ", redirectorAddr=" + redirectorAddr + ", managerAddr=" + + managerAddr + ", skuNumber=" + skuNumber + ", serialNumber=" + serialNumber + ", macAddress=" + + macAddress + ", ipV4Address=" + ipV4Address + ", platformVersion=" + platformVersion + + ", firmwareVersion=" + firmwareVersion + ", revision=" + revision + ", model=" + model + ", ifName=" + + ifName + ", ifType=" + ifType + ", country=" + country + ", lanIpV4Address=" + lanIpV4Address + + ", lanIfName=" + lanIfName + ", lanIfType=" + lanIfType + ", lanMacAddress=" + lanMacAddress + "]"; + } + + } diff --git a/opensync-ext-static/src/main/java/com/telecominfraproject/wlan/opensync/external/integration/OpensyncExternalIntegrationSimple.java b/opensync-ext-static/src/main/java/com/telecominfraproject/wlan/opensync/external/integration/OpensyncExternalIntegrationSimple.java index 7e6e8a1..1b71a4f 100644 --- a/opensync-ext-static/src/main/java/com/telecominfraproject/wlan/opensync/external/integration/OpensyncExternalIntegrationSimple.java +++ b/opensync-ext-static/src/main/java/com/telecominfraproject/wlan/opensync/external/integration/OpensyncExternalIntegrationSimple.java @@ -2,8 +2,10 @@ package com.telecominfraproject.wlan.opensync.external.integration; import java.io.File; import java.io.IOException; +import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Set; import javax.annotation.PostConstruct; @@ -17,6 +19,7 @@ import com.telecominfraproject.wlan.equipment.models.Equipment; import com.telecominfraproject.wlan.location.models.Location; import com.telecominfraproject.wlan.opensync.external.integration.models.ConnectNodeInfo; import com.telecominfraproject.wlan.opensync.external.integration.models.OpensyncAPConfig; +import com.telecominfraproject.wlan.opensync.external.integration.models.OpensyncAPHotspot20Config; 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; @@ -31,208 +34,237 @@ import wc.stats.IpDnsTelemetry.WCStatsReport; @Component public class OpensyncExternalIntegrationSimple implements OpensyncExternalIntegrationInterface { - private static final Logger LOG = LoggerFactory.getLogger(OpensyncExternalIntegrationSimple.class); + private static final Logger LOG = LoggerFactory.getLogger(OpensyncExternalIntegrationSimple.class); - @Value("${tip.wlan.ovsdb.customerEquipmentFileName:/app/config/EquipmentExample.json}") - private String customerEquipmentFileName; + @Value("${tip.wlan.ovsdb.customerEquipmentFileName:/app/config/EquipmentExample.json}") + private String customerEquipmentFileName; - @Value("${tip.wlan.ovsdb.apProfileFileName:/app/config/ProfileAPExample.json}") - private String apProfileFileName; - - @Value("${tip.wlan.ovsdb.rfProfileFileName:/app/config/ProfileRf.json}") - private String rfProfileFileName; + @Value("${tip.wlan.ovsdb.apProfileFileName:/app/config/ProfileAPExample.json}") + private String apProfileFileName; - @Value("${tip.wlan.ovsdb.ssidProfileFileName:/app/config/ProfileSsid.json}") - private String ssidProfileFileName; + @Value("${tip.wlan.ovsdb.rfProfileFileName:/app/config/ProfileRf.json}") + private String rfProfileFileName; - @Value("${tip.wlan.ovsdb.metricsProfileFileName:/app/config/ProfileMetrics.json}") - private String metricsProfileFileName; + @Value("${tip.wlan.ovsdb.ssidProfileFileName:/app/config/ProfileSsid.json}") + private String ssidProfileFileName; - @Value("${tip.wlan.ovsdb.radiusProfileFileName:/app/config/ProfileRadius.json}") - private String radiusProfileFileName; - - @Value("${tip.wlan.ovsdb.captiveProfileFileName:/app/config/ProfileCaptive.json}") - private String captiveProfileFileName; - - @Value("${tip.wlan.ovsdb.bonjourProfileFileName:/app/config/ProfileBonjour.json}") - private String bonjourProfileFileName; - - @Value("${tip.wlan.ovsdb.locationFileName:/app/config/LocationBuildingExample.json}") - private String locationFileName; + @Value("${tip.wlan.ovsdb.metricsProfileFileName:/app/config/ProfileMetrics.json}") + private String metricsProfileFileName; - private String serialNumber = ""; + @Value("${tip.wlan.ovsdb.venueProfileFileName:/app/config/ProfileVenue.json}") + private String venueProfileFileName; - @PostConstruct - private void postCreate() { - LOG.info("Using Static integration"); - } + @Value("${tip.wlan.ovsdb.operatorProfileFileName:/app/config/ProfileOperator.json}") + private String operatorProfileFileName; - public void apConnected(String apId, ConnectNodeInfo connectNodeInfo) { - serialNumber = connectNodeInfo.serialNumber; - LOG.info("AP {} got connected to the gateway", apId); - LOG.info("ConnectNodeInfo {}", connectNodeInfo); + @Value("${tip.wlan.ovsdb.hotspot20ProfileFileName:/app/config/ProfileHotspot20.json}") + private String hotspot20ProfileFileName; - } + @Value("${tip.wlan.ovsdb.radiusProfileFileName:/app/config/ProfileRadius.json}") + private String radiusProfileFileName; - public void apDisconnected(String apId) { - LOG.info("AP {} got disconnected from the gateway", apId); - } + @Value("${tip.wlan.ovsdb.captiveProfileFileName:/app/config/ProfileCaptive.json}") + private String captiveProfileFileName; - public OpensyncAPConfig getApConfig(String apId) { - LOG.info("Retrieving config for AP {}", apId); - OpensyncAPConfig ret = null; + @Value("${tip.wlan.ovsdb.bonjourProfileFileName:/app/config/ProfileBonjour.json}") + private String bonjourProfileFileName; - try { + @Value("${tip.wlan.ovsdb.locationFileName:/app/config/LocationBuildingExample.json}") + private String locationFileName; - Equipment equipment = Equipment.fromFile(customerEquipmentFileName, Equipment.class); - equipment.setInventoryId(apId); - equipment.setName(apId); + private String serialNumber = ""; - equipment.setSerial(serialNumber); + @PostConstruct + private void postCreate() { + LOG.info("Using Static integration"); + } - com.telecominfraproject.wlan.profile.models.Profile apProfile = com.telecominfraproject.wlan.profile.models.Profile - .fromFile(apProfileFileName, com.telecominfraproject.wlan.profile.models.Profile.class); - - com.telecominfraproject.wlan.profile.models.Profile rfProfile = com.telecominfraproject.wlan.profile.models.Profile - .fromFile(rfProfileFileName, com.telecominfraproject.wlan.profile.models.Profile.class); - - apProfile.getChildProfileIds().add(rfProfile.getId()); + public void apConnected(String apId, ConnectNodeInfo connectNodeInfo) { + serialNumber = connectNodeInfo.serialNumber; + LOG.info("AP {} got connected to the gateway", apId); + LOG.info("ConnectNodeInfo {}", connectNodeInfo); - List ssidProfiles = com.telecominfraproject.wlan.profile.models.Profile - .listFromFile(ssidProfileFileName, com.telecominfraproject.wlan.profile.models.Profile.class); + } - ssidProfiles.stream().forEach(p -> apProfile.getChildProfileIds().add(p.getId())); - - List metricsProfiles = com.telecominfraproject.wlan.profile.models.Profile + public void apDisconnected(String apId) { + LOG.info("AP {} got disconnected from the gateway", apId); + } + + public OpensyncAPConfig getApConfig(String apId) { + LOG.info("Retrieving config for AP {}", apId); + OpensyncAPConfig ret = null; + + try { + + Equipment equipment = Equipment.fromFile(customerEquipmentFileName, Equipment.class); + equipment.setInventoryId(apId); + equipment.setName(apId); + equipment.setSerial(serialNumber); + + com.telecominfraproject.wlan.profile.models.Profile apProfile = com.telecominfraproject.wlan.profile.models.Profile + .fromFile(apProfileFileName, com.telecominfraproject.wlan.profile.models.Profile.class); + + com.telecominfraproject.wlan.profile.models.Profile rfProfile = com.telecominfraproject.wlan.profile.models.Profile + .fromFile(rfProfileFileName, com.telecominfraproject.wlan.profile.models.Profile.class); + + apProfile.getChildProfileIds().add(rfProfile.getId()); + + List ssidProfiles = com.telecominfraproject.wlan.profile.models.Profile + .listFromFile(ssidProfileFileName, com.telecominfraproject.wlan.profile.models.Profile.class); + + List hotspot20Profiles = com.telecominfraproject.wlan.profile.models.Profile + .listFromFile(hotspot20ProfileFileName, com.telecominfraproject.wlan.profile.models.Profile.class); + List operatorProfiles = com.telecominfraproject.wlan.profile.models.Profile + .listFromFile(operatorProfileFileName, com.telecominfraproject.wlan.profile.models.Profile.class); + List venueProfiles = com.telecominfraproject.wlan.profile.models.Profile + .listFromFile(venueProfileFileName, com.telecominfraproject.wlan.profile.models.Profile.class); + + + ssidProfiles.stream().forEach(p -> apProfile.getChildProfileIds().add(p.getId())); + + List metricsProfiles = com.telecominfraproject.wlan.profile.models.Profile .listFromFile(metricsProfileFileName, com.telecominfraproject.wlan.profile.models.Profile.class); - List radiusProfiles = com.telecominfraproject.wlan.profile.models.Profile - .listFromFile(radiusProfileFileName, com.telecominfraproject.wlan.profile.models.Profile.class); - - - List captiveProfiles = null; - File captiveFile = new File(captiveProfileFileName); - if (captiveFile.exists()) { - captiveProfiles = com.telecominfraproject.wlan.profile.models.Profile - .listFromFile(captiveProfileFileName, com.telecominfraproject.wlan.profile.models.Profile.class); - } else { - LOG.info("Captive file is not provided"); - } - - List bonjourProfiles = null; - File bonjourFile = new File(bonjourProfileFileName); - if (bonjourFile.exists()) { - bonjourProfiles = com.telecominfraproject.wlan.profile.models.Profile - .listFromFile(bonjourProfileFileName, com.telecominfraproject.wlan.profile.models.Profile.class); - } else { - LOG.info("Bonjour file is not provided"); - } + List radiusProfiles = com.telecominfraproject.wlan.profile.models.Profile + .listFromFile(radiusProfileFileName, com.telecominfraproject.wlan.profile.models.Profile.class); - equipment.setProfileId(apProfile.getId()); - Location location = Location.fromFile(locationFileName, Location.class); + List captiveProfiles = null; + File captiveFile = new File(captiveProfileFileName); + if (captiveFile.exists()) { + captiveProfiles = com.telecominfraproject.wlan.profile.models.Profile.listFromFile( + captiveProfileFileName, com.telecominfraproject.wlan.profile.models.Profile.class); + } else { + LOG.info("Captive file is not provided"); + } - equipment.setLocationId(location.getId()); + List bonjourProfiles = null; + File bonjourFile = new File(bonjourProfileFileName); + if (bonjourFile.exists()) { + bonjourProfiles = com.telecominfraproject.wlan.profile.models.Profile.listFromFile( + bonjourProfileFileName, com.telecominfraproject.wlan.profile.models.Profile.class); + } else { + LOG.info("Bonjour file is not provided"); + } - ret = new OpensyncAPConfig(); - ret.setCustomerEquipment(equipment); - ret.setApProfile(apProfile); - ret.setRfProfile(rfProfile); - ret.setMetricsProfiles(metricsProfiles); - ret.setSsidProfile(ssidProfiles); - ret.setRadiusProfiles(radiusProfiles); - ret.setEquipmentLocation(location); - ret.setCaptiveProfiles(captiveProfiles); + equipment.setProfileId(apProfile.getId()); + + Location location = Location.fromFile(locationFileName, Location.class); + + equipment.setLocationId(location.getId()); + + OpensyncAPHotspot20Config hotspotConfig = new OpensyncAPHotspot20Config(); + + hotspotConfig.setHotspot20ProfileSet( + new HashSet(hotspot20Profiles)); + hotspotConfig.setHotspot20OperatorSet( + new HashSet(operatorProfiles)); + hotspotConfig.setHotspot20VenueSet( + new HashSet(venueProfiles)); + + + ret = new OpensyncAPConfig(); + ret.setCustomerEquipment(equipment); + ret.setApProfile(apProfile); + ret.setRfProfile(rfProfile); + ret.setMetricsProfiles(metricsProfiles); + ret.setSsidProfile(ssidProfiles); + ret.setRadiusProfiles(radiusProfiles); + ret.setEquipmentLocation(location); + ret.setCaptiveProfiles(captiveProfiles); ret.setBonjourGatewayProfiles(bonjourProfiles); + ret.setHotspotConfig(hotspotConfig); - } catch (IOException e) { - LOG.error("Cannot read config file", e); - } + } catch (IOException e) { + LOG.error("Cannot read config file", e); + } - LOG.debug("Config content : {}", ret); + LOG.debug("Config content : {}", ret); - return ret; - } + return ret; + } - public void processMqttMessage(String topic, Report report) { - LOG.info("Received OpensyncStatsReport on topic {} for ap {}\n{}", topic, report.getNodeID(), report); + public void processMqttMessage(String topic, Report report) { + LOG.info("Received OpensyncStatsReport on topic {} for ap {}\n{}", topic, report.getNodeID(), report); - report.getEventReportList().stream().forEach(e -> { - LOG.info("Received EventReport {}", e); - }); - - - } + report.getEventReportList().stream().forEach(e -> { + LOG.info("Received EventReport {}", e); + }); - public void processMqttMessage(String topic, FlowReport flowReport) { - LOG.info("Received FlowReport on topic {} for ap {}", topic, flowReport.getObservationPoint().getNodeId()); - } - public void processMqttMessage(String topic, WCStatsReport wcStatsReport) { - LOG.info("Received WCStatsReport on topic {} for ap {}", topic, - wcStatsReport.getObservationPoint().getNodeId()); - } + } - @Override - public void wifiVIFStateDbTableUpdate(List vifStateTables, String apId) { - LOG.info("Received table state update {} for ap {}", vifStateTables, apId); - } + public void processMqttMessage(String topic, FlowReport flowReport) { + LOG.info("Received FlowReport on topic {} for ap {}", topic, flowReport.getObservationPoint().getNodeId()); + } - @Override - public void wifiRadioStatusDbTableUpdate(List radioStateTable, String apId) { - LOG.info("Received table state update {} for ap {}", radioStateTable, apId); + public void processMqttMessage(String topic, WCStatsReport wcStatsReport) { + LOG.info("Received WCStatsReport on topic {} for ap {}", topic, + wcStatsReport.getObservationPoint().getNodeId()); + } - } + @Override + public void wifiVIFStateDbTableUpdate(List vifStateTables, String apId) { + LOG.info("Received table state update {} for ap {}", vifStateTables, apId); + } - @Override - public void wifiInetStateDbTableUpdate(List inetStateTable, String apId) { - LOG.info("Received table state update {} for ap {}", inetStateTable, apId); + @Override + public void wifiRadioStatusDbTableUpdate(List radioStateTable, String apId) { + LOG.info("Received table state update {} for ap {}", radioStateTable, apId); - } + } - @Override - public void wifiAssociatedClientsDbTableUpdate(List wifiAssociatedClients, - String apId) { - LOG.info("Received table state update {} for ap {}", wifiAssociatedClients, apId); + @Override + public void wifiInetStateDbTableUpdate(List inetStateTable, String apId) { + LOG.info("Received table state update {} for ap {}", inetStateTable, apId); - } + } - @Override - public void awlanNodeDbTableUpdate(OpensyncAWLANNode opensyncAPState, String apId) { - LOG.info("Received table state update {} for ap {}", opensyncAPState, apId); + @Override + public void wifiAssociatedClientsDbTableUpdate(List wifiAssociatedClients, + String apId) { + LOG.info("Received table state update {} for ap {}", wifiAssociatedClients, apId); - } + } - @Override - public void wifiVIFStateDbTableDelete(List vifStateTables, String apId) { - LOG.info("Received table delete {} for ap {}", vifStateTables, apId); + @Override + public void awlanNodeDbTableUpdate(OpensyncAWLANNode opensyncAPState, String apId) { + LOG.info("Received table state update {} for ap {}", opensyncAPState, apId); - } + } - @Override - public void wifiAssociatedClientsDbTableDelete(String deletedClientMac, String apId) { - LOG.info("Received Wifi_Associated_Clients row delete {} for ap {}", deletedClientMac, apId); + @Override + public void wifiVIFStateDbTableDelete(List vifStateTables, String apId) { + LOG.info("Received table delete {} for ap {}", vifStateTables, apId); - } + } + + @Override + public void wifiAssociatedClientsDbTableDelete(String deletedClientMac, String apId) { + LOG.info("Received Wifi_Associated_Clients row delete {} for ap {}", deletedClientMac, apId); + + } @Override public void wifiInetStateDbTableDelete(List inetStateTables, String apId) { LOG.info("Received Wifi_VIF_State row(s) delete {} for ap {}", inetStateTables, apId); - + } @Override public void dhcpLeasedIpDbTableUpdate(List> dhcpAttributes, String apId, RowUpdateOperation rowUpdateOperation) { - LOG.info("Received DHCP_Leased_IP row(s) {} rowUpdateOperation {} for ap {}", dhcpAttributes, rowUpdateOperation,apId); - + LOG.info("Received DHCP_Leased_IP row(s) {} rowUpdateOperation {} for ap {}", dhcpAttributes, + rowUpdateOperation, apId); + } @Override public void commandStateDbTableUpdate(List> commandStateAttributes, String apId, RowUpdateOperation rowUpdateOperation) { - LOG.info("Received Command_State row(s) {} rowUpdateOperation {} for ap {}", commandStateAttributes, rowUpdateOperation,apId); - + LOG.info("Received Command_State row(s) {} rowUpdateOperation {} for ap {}", commandStateAttributes, + rowUpdateOperation, apId); + } } diff --git a/opensync-ext-static/src/main/resources/ProfileHotspot20.json b/opensync-ext-static/src/main/resources/ProfileHotspot20.json new file mode 100644 index 0000000..f8953c3 --- /dev/null +++ b/opensync-ext-static/src/main/resources/ProfileHotspot20.json @@ -0,0 +1,55 @@ +[ +{ + "model_type": "Profile", + "id": 7777, + "customerId": 2, + "profileType": "hotspot_2pt0", + "name": "TipWlan-Hotspot20-Config", + "details": { + "model_type": "Hotspot2Profile", + "enableInterworkingAndHs20": true, + "hessid": null, + "accessNetworkType": "free_public_network", + "networkAuthenticationType": "acceptance_of_terms_and_conditions", + "additionalStepsRequiredForAccess": 0, + "deauthRequestTimeout": 0, + "operatingClass": 0, + "termsAndConditionsFile": { + "model_type": "ManagedFileInfo", + "md5checksum": null, + "lastModifiedTimestamp": null, + "apExportUrl": "https://localhost:9091/filestore/termsAndConditions", + "fileCategory": "ExternalPolicyConfiguration", + "fileType": "TEXT", + "altSlot": false + }, + "whitelistDomain": null, + "emergencyServicesReachable": true, + "unauthenticatedEmergencyServiceAccessible": false, + "internetConnectivity": true, + "connectionCapabilitySet": [ + { + "model_type": "ConnectionCapability", + "connectionCapabilitiesPortNumber": 8888, + "connectionCapabilitiesIpProtocol": "TCP", + "connectionCapabilitiesStatus": "open" + } + ], + "ipAddressTypeAvailability": "public_IPv4_address_available", + "qosMapSetConfiguration": null, + "apGeospatialLocation": null, + "apCivicLocation": null, + "apPublicLocationIdUri": null, + "gasAddr3Behaviour": "p2pSpecWorkaroundFromRequest", + "anqpDomainId": 1234, + "disableDownstreamGroupAddressedForwarding": false, + "profileType": "hotspot_2pt0" + }, + "createdTimestamp": 1601595307355, + "lastModifiedTimestamp": 1601595307355, + "childProfileIds": [ + 5555, + 6666 + ] +} +] \ No newline at end of file diff --git a/opensync-ext-static/src/main/resources/ProfileOperator.json b/opensync-ext-static/src/main/resources/ProfileOperator.json new file mode 100644 index 0000000..36f7fb2 --- /dev/null +++ b/opensync-ext-static/src/main/resources/ProfileOperator.json @@ -0,0 +1,35 @@ +[ +{ + "model_type": "Profile", + "id": 5555, + "customerId": 2, + "profileType": "operator", + "name": "TipWlan-Hotspot20-Operator", + "details": { + "model_type": "OperatorProfile", + "domainName": "telecominfraproject.atlassian.net", + "serverOnlyAuthenticatedL2EncryptionNetwork": false, + "x509CertificateLocation": "/etc/ca.pem", + "operatorFriendlyName": [ + { + "model_type": "Hotspot20Duple", + "locale": "en_CA", + "language": "eng", + "friendlyName": "default Friendly Operator Name", + "formattedFriendlyName": "eng:default Friendly Operator Name" + }, + { + "model_type": "Hotspot20Duple", + "locale": "fr_CA", + "language": "fra", + "friendlyName": "Nom de l'opérateur convivial par défaut", + "formattedFriendlyName": "fra:Nom de l'opérateur convivial par défaut" + } + ], + "profileType": "operator" + }, + "createdTimestamp": 1601595306885, + "lastModifiedTimestamp": 1601595306885, + "childProfileIds": [] +} +] \ No newline at end of file diff --git a/opensync-ext-static/src/main/resources/ProfileVenue.json b/opensync-ext-static/src/main/resources/ProfileVenue.json new file mode 100644 index 0000000..c79f0d8 --- /dev/null +++ b/opensync-ext-static/src/main/resources/ProfileVenue.json @@ -0,0 +1,40 @@ +[ +{ + "model_type": "Profile", + "id": 6666, + "customerId": 2, + "profileType": "venue", + "name": "TipWlan-Hotspot20-Venue", + "details": { + "model_type": "VenueProfile", + "venueNameSet": [ + { + "model_type": "VenueName", + "locale": "en_CA", + "language": "eng", + "venueName": "Example venue", + "venueUrl": "http://www.example.com/info-eng", + "formattedVenueName": "eng:Example venue" + }, + { + "model_type": "VenueName", + "locale": "fr_CA", + "language": "fra", + "venueName": "Exemple de lieu", + "venueUrl": "http://www.example.com/info-fra", + "formattedVenueName": "fra:Exemple de lieu" + } + ], + "venueTypeAssignment": { + "model_type": "VenueTypeAssignment", + "venueDescription": "Research and Development Facility", + "venueGroupId": 2, + "venueTypeId": 8 + }, + "profileType": "venue" + }, + "createdTimestamp": 1601595306891, + "lastModifiedTimestamp": 1601595306891, + "childProfileIds": [] +} +] \ No newline at end of file diff --git a/opensync-gateway-cloud-process/src/main/resources/launchers/OpenSyncProcess (local, KDC certs) cloud.launch b/opensync-gateway-cloud-process/src/main/resources/launchers/OpenSyncProcess (local, KDC certs) cloud.launch index 98786b8..f8912da 100644 --- a/opensync-gateway-cloud-process/src/main/resources/launchers/OpenSyncProcess (local, KDC certs) cloud.launch +++ b/opensync-gateway-cloud-process/src/main/resources/launchers/OpenSyncProcess (local, KDC certs) cloud.launch @@ -21,5 +21,5 @@ - + diff --git a/opensync-gateway-static-docker/src/main/docker-opensync-gateway-and-mqtt/Dockerfile b/opensync-gateway-static-docker/src/main/docker-opensync-gateway-and-mqtt/Dockerfile index 9120167..c7cdb46 100644 --- a/opensync-gateway-static-docker/src/main/docker-opensync-gateway-and-mqtt/Dockerfile +++ b/opensync-gateway-static-docker/src/main/docker-opensync-gateway-and-mqtt/Dockerfile @@ -28,7 +28,9 @@ COPY app/opensync/ProfileSsid.json /app/opensync/ProfileSsid.json COPY app/opensync/LocationBuildingExample.json /app/opensync/LocationBuildingExample.json COPY app/opensync/ProfileMetrics.json /app/opensync/ProfileMetrics.json COPY app/opensync/ProfileRf.json /app/opensync/ProfileRf.json - +COPY app/opensync/ProfileHotspot20.json /app/opensync/ProfileHotspot20.json +COPY app/opensync/ProfileOperator.json /app/opensync/ProfileOperator.json +COPY app/opensync/ProfileVenue.json /app/opensync/ProfileVenue.json VOLUME ["/app/logs", "/app/config"] RUN chmod +x /app/run.sh diff --git a/opensync-gateway-static-docker/src/main/docker-opensync-gateway-and-mqtt/app/opensync/ProfileHotspot20.json b/opensync-gateway-static-docker/src/main/docker-opensync-gateway-and-mqtt/app/opensync/ProfileHotspot20.json new file mode 100644 index 0000000..f8953c3 --- /dev/null +++ b/opensync-gateway-static-docker/src/main/docker-opensync-gateway-and-mqtt/app/opensync/ProfileHotspot20.json @@ -0,0 +1,55 @@ +[ +{ + "model_type": "Profile", + "id": 7777, + "customerId": 2, + "profileType": "hotspot_2pt0", + "name": "TipWlan-Hotspot20-Config", + "details": { + "model_type": "Hotspot2Profile", + "enableInterworkingAndHs20": true, + "hessid": null, + "accessNetworkType": "free_public_network", + "networkAuthenticationType": "acceptance_of_terms_and_conditions", + "additionalStepsRequiredForAccess": 0, + "deauthRequestTimeout": 0, + "operatingClass": 0, + "termsAndConditionsFile": { + "model_type": "ManagedFileInfo", + "md5checksum": null, + "lastModifiedTimestamp": null, + "apExportUrl": "https://localhost:9091/filestore/termsAndConditions", + "fileCategory": "ExternalPolicyConfiguration", + "fileType": "TEXT", + "altSlot": false + }, + "whitelistDomain": null, + "emergencyServicesReachable": true, + "unauthenticatedEmergencyServiceAccessible": false, + "internetConnectivity": true, + "connectionCapabilitySet": [ + { + "model_type": "ConnectionCapability", + "connectionCapabilitiesPortNumber": 8888, + "connectionCapabilitiesIpProtocol": "TCP", + "connectionCapabilitiesStatus": "open" + } + ], + "ipAddressTypeAvailability": "public_IPv4_address_available", + "qosMapSetConfiguration": null, + "apGeospatialLocation": null, + "apCivicLocation": null, + "apPublicLocationIdUri": null, + "gasAddr3Behaviour": "p2pSpecWorkaroundFromRequest", + "anqpDomainId": 1234, + "disableDownstreamGroupAddressedForwarding": false, + "profileType": "hotspot_2pt0" + }, + "createdTimestamp": 1601595307355, + "lastModifiedTimestamp": 1601595307355, + "childProfileIds": [ + 5555, + 6666 + ] +} +] \ No newline at end of file diff --git a/opensync-gateway-static-docker/src/main/docker-opensync-gateway-and-mqtt/app/opensync/ProfileOperator.json b/opensync-gateway-static-docker/src/main/docker-opensync-gateway-and-mqtt/app/opensync/ProfileOperator.json new file mode 100644 index 0000000..36f7fb2 --- /dev/null +++ b/opensync-gateway-static-docker/src/main/docker-opensync-gateway-and-mqtt/app/opensync/ProfileOperator.json @@ -0,0 +1,35 @@ +[ +{ + "model_type": "Profile", + "id": 5555, + "customerId": 2, + "profileType": "operator", + "name": "TipWlan-Hotspot20-Operator", + "details": { + "model_type": "OperatorProfile", + "domainName": "telecominfraproject.atlassian.net", + "serverOnlyAuthenticatedL2EncryptionNetwork": false, + "x509CertificateLocation": "/etc/ca.pem", + "operatorFriendlyName": [ + { + "model_type": "Hotspot20Duple", + "locale": "en_CA", + "language": "eng", + "friendlyName": "default Friendly Operator Name", + "formattedFriendlyName": "eng:default Friendly Operator Name" + }, + { + "model_type": "Hotspot20Duple", + "locale": "fr_CA", + "language": "fra", + "friendlyName": "Nom de l'opérateur convivial par défaut", + "formattedFriendlyName": "fra:Nom de l'opérateur convivial par défaut" + } + ], + "profileType": "operator" + }, + "createdTimestamp": 1601595306885, + "lastModifiedTimestamp": 1601595306885, + "childProfileIds": [] +} +] \ No newline at end of file diff --git a/opensync-gateway-static-docker/src/main/docker-opensync-gateway-and-mqtt/app/opensync/ProfileVenue.json b/opensync-gateway-static-docker/src/main/docker-opensync-gateway-and-mqtt/app/opensync/ProfileVenue.json new file mode 100644 index 0000000..c79f0d8 --- /dev/null +++ b/opensync-gateway-static-docker/src/main/docker-opensync-gateway-and-mqtt/app/opensync/ProfileVenue.json @@ -0,0 +1,40 @@ +[ +{ + "model_type": "Profile", + "id": 6666, + "customerId": 2, + "profileType": "venue", + "name": "TipWlan-Hotspot20-Venue", + "details": { + "model_type": "VenueProfile", + "venueNameSet": [ + { + "model_type": "VenueName", + "locale": "en_CA", + "language": "eng", + "venueName": "Example venue", + "venueUrl": "http://www.example.com/info-eng", + "formattedVenueName": "eng:Example venue" + }, + { + "model_type": "VenueName", + "locale": "fr_CA", + "language": "fra", + "venueName": "Exemple de lieu", + "venueUrl": "http://www.example.com/info-fra", + "formattedVenueName": "fra:Exemple de lieu" + } + ], + "venueTypeAssignment": { + "model_type": "VenueTypeAssignment", + "venueDescription": "Research and Development Facility", + "venueGroupId": 2, + "venueTypeId": 8 + }, + "profileType": "venue" + }, + "createdTimestamp": 1601595306891, + "lastModifiedTimestamp": 1601595306891, + "childProfileIds": [] +} +] \ No newline at end of file diff --git a/opensync-gateway-static-docker/src/main/docker-opensync-gateway-and-mqtt/app/run.sh b/opensync-gateway-static-docker/src/main/docker-opensync-gateway-and-mqtt/app/run.sh index d372f6d..82eab3e 100755 --- a/opensync-gateway-static-docker/src/main/docker-opensync-gateway-and-mqtt/app/run.sh +++ b/opensync-gateway-static-docker/src/main/docker-opensync-gateway-and-mqtt/app/run.sh @@ -34,6 +34,9 @@ OVSDB_SERVER_TRUSTSTORE_PASSWORD="${OVSDB_SERVER_TRUSTSTORE_PASSWORD:=mypassword OVSDB_EQUIPMENT_CONFIG_FILE="${OVSDB_EQUIPMENT_CONFIG_FILE:=/app/opensync/EquipmentExample.json}" OVSDB_APPROFILE_CONFIG_FILE="${OVSDB_AP_PROFILE_CONFIG_FILE:=/app/opensync/ProfileAPExample.json}" OVSDB_METRICSPROFILE_CONFIG_FILE="${OVSDB_METRICSPROFILE_CONFIG_FILE:=/app/opensync/ProfileMetrics.json}" +OVSDB_HOTSPOT20SPROFILE_CONFIG_FILE="${OVSDB_HOTSPOT20PROFILE_CONFIG_FILE:=/app/opensync/ProfileHotspot20.json}" +OVSDB_OPERATORPROFILE_CONFIG_FILE="${OVSDB_OPERATORPROFILE_CONFIG_FILE:=/app/opensync/ProfileOperator.json}" +OVSDB_VENUEPROFILE_CONFIG_FILE="${OVSDB_VENUESPROFILE_CONFIG_FILE:=/app/opensync/ProfileVenue.json}" OVSDB_RFPROFILE_CONFIG_FILE="${OVSDB_RF_PROFILE_CONFIG_FILE:=/app/opensync/ProfileRf.json}" OVSDB_SSIDPROFILE_CONFIG_FILE="${OVSDB_SSIDPROFILE_CONFIG_FILE:=/app/opensync/ProfileSsid.json}" OVSDB_LOCATION_CONFIG_FILE="${OVSDB_LOCATION_CONFIG_FILE:=/app/opensync/LocationBuildingExample.json}" @@ -132,6 +135,9 @@ OVSDB_PROPS="$OVSDB_PROPS -Dtip.wlan.ovsdb.keyStorePassword=$OVSDB_SERVER_KEYSTO OVSDB_PROPS="$OVSDB_PROPS -Dtip.wlan.ovsdb.customerEquipmentFileName=$OVSDB_EQUIPMENT_CONFIG_FILE" OVSDB_PROPS="$OVSDB_PROPS -Dtip.wlan.ovsdb.apProfileFileName=$OVSDB_APPROFILE_CONFIG_FILE" OVSDB_PROPS="$OVSDB_PROPS -Dtip.wlan.ovsdb.metricsProfileFileName=$OVSDB_METRICSPROFILE_CONFIG_FILE" +OVSDB_PROPS="$OVSDB_PROPS -Dtip.wlan.ovsdb.hotspot20ProfileFileName=$OVSDB_HOTSPOT20PROFILE_CONFIG_FILE" +OVSDB_PROPS="$OVSDB_PROPS -Dtip.wlan.ovsdb.operatorProfileFileName=$OVSDB_OPERATORPROFILE_CONFIG_FILE" +OVSDB_PROPS="$OVSDB_PROPS -Dtip.wlan.ovsdb.venueProfileFileName=$OVSDB_VENUEPROFILE_CONFIG_FILE" OVSDB_PROPS="$OVSDB_PROPS -Dtip.wlan.ovsdb.rfProfileFileName=$OVSDB_RFPROFILE_CONFIG_FILE" OVSDB_PROPS="$OVSDB_PROPS -Dtip.wlan.ovsdb.ssidProfileFileName=$OVSDB_SSIDPROFILE_CONFIG_FILE" OVSDB_PROPS="$OVSDB_PROPS -Dtip.wlan.ovsdb.radiusProfileFileName=$OVSDB_RADIUSPROFILE_CONFIG_FILE" diff --git a/opensync-gateway-static-docker/src/main/docker/Dockerfile b/opensync-gateway-static-docker/src/main/docker/Dockerfile index 67d40da..1e5c6ef 100644 --- a/opensync-gateway-static-docker/src/main/docker/Dockerfile +++ b/opensync-gateway-static-docker/src/main/docker/Dockerfile @@ -15,6 +15,9 @@ COPY app/opensync/ProfileSsid.json /app/opensync/ProfileSsid.json COPY app/opensync/LocationBuildingExample.json /app/opensync/LocationBuildingExample.json COPY app/opensync/ProfileMetrics.json /app/opensync/ProfileMetrics.json COPY app/opensync/ProfileRf.json /app/opensync/ProfileRf.json +COPY app/opensync/ProfileHotspot20.json /app/opensync/ProfileHotspot20.json +COPY app/opensync/ProfileOperator.json /app/opensync/ProfileOperator.json +COPY app/opensync/ProfileVenue.json /app/opensync/ProfileVenue.json RUN chmod +x /app/run.sh diff --git a/opensync-gateway-static-docker/src/main/docker/app/opensync/ProfileHotspot20.json b/opensync-gateway-static-docker/src/main/docker/app/opensync/ProfileHotspot20.json new file mode 100644 index 0000000..f8953c3 --- /dev/null +++ b/opensync-gateway-static-docker/src/main/docker/app/opensync/ProfileHotspot20.json @@ -0,0 +1,55 @@ +[ +{ + "model_type": "Profile", + "id": 7777, + "customerId": 2, + "profileType": "hotspot_2pt0", + "name": "TipWlan-Hotspot20-Config", + "details": { + "model_type": "Hotspot2Profile", + "enableInterworkingAndHs20": true, + "hessid": null, + "accessNetworkType": "free_public_network", + "networkAuthenticationType": "acceptance_of_terms_and_conditions", + "additionalStepsRequiredForAccess": 0, + "deauthRequestTimeout": 0, + "operatingClass": 0, + "termsAndConditionsFile": { + "model_type": "ManagedFileInfo", + "md5checksum": null, + "lastModifiedTimestamp": null, + "apExportUrl": "https://localhost:9091/filestore/termsAndConditions", + "fileCategory": "ExternalPolicyConfiguration", + "fileType": "TEXT", + "altSlot": false + }, + "whitelistDomain": null, + "emergencyServicesReachable": true, + "unauthenticatedEmergencyServiceAccessible": false, + "internetConnectivity": true, + "connectionCapabilitySet": [ + { + "model_type": "ConnectionCapability", + "connectionCapabilitiesPortNumber": 8888, + "connectionCapabilitiesIpProtocol": "TCP", + "connectionCapabilitiesStatus": "open" + } + ], + "ipAddressTypeAvailability": "public_IPv4_address_available", + "qosMapSetConfiguration": null, + "apGeospatialLocation": null, + "apCivicLocation": null, + "apPublicLocationIdUri": null, + "gasAddr3Behaviour": "p2pSpecWorkaroundFromRequest", + "anqpDomainId": 1234, + "disableDownstreamGroupAddressedForwarding": false, + "profileType": "hotspot_2pt0" + }, + "createdTimestamp": 1601595307355, + "lastModifiedTimestamp": 1601595307355, + "childProfileIds": [ + 5555, + 6666 + ] +} +] \ No newline at end of file diff --git a/opensync-gateway-static-docker/src/main/docker/app/opensync/ProfileOperator.json b/opensync-gateway-static-docker/src/main/docker/app/opensync/ProfileOperator.json new file mode 100644 index 0000000..36f7fb2 --- /dev/null +++ b/opensync-gateway-static-docker/src/main/docker/app/opensync/ProfileOperator.json @@ -0,0 +1,35 @@ +[ +{ + "model_type": "Profile", + "id": 5555, + "customerId": 2, + "profileType": "operator", + "name": "TipWlan-Hotspot20-Operator", + "details": { + "model_type": "OperatorProfile", + "domainName": "telecominfraproject.atlassian.net", + "serverOnlyAuthenticatedL2EncryptionNetwork": false, + "x509CertificateLocation": "/etc/ca.pem", + "operatorFriendlyName": [ + { + "model_type": "Hotspot20Duple", + "locale": "en_CA", + "language": "eng", + "friendlyName": "default Friendly Operator Name", + "formattedFriendlyName": "eng:default Friendly Operator Name" + }, + { + "model_type": "Hotspot20Duple", + "locale": "fr_CA", + "language": "fra", + "friendlyName": "Nom de l'opérateur convivial par défaut", + "formattedFriendlyName": "fra:Nom de l'opérateur convivial par défaut" + } + ], + "profileType": "operator" + }, + "createdTimestamp": 1601595306885, + "lastModifiedTimestamp": 1601595306885, + "childProfileIds": [] +} +] \ No newline at end of file diff --git a/opensync-gateway-static-docker/src/main/docker/app/opensync/ProfileVenue.json b/opensync-gateway-static-docker/src/main/docker/app/opensync/ProfileVenue.json new file mode 100644 index 0000000..c79f0d8 --- /dev/null +++ b/opensync-gateway-static-docker/src/main/docker/app/opensync/ProfileVenue.json @@ -0,0 +1,40 @@ +[ +{ + "model_type": "Profile", + "id": 6666, + "customerId": 2, + "profileType": "venue", + "name": "TipWlan-Hotspot20-Venue", + "details": { + "model_type": "VenueProfile", + "venueNameSet": [ + { + "model_type": "VenueName", + "locale": "en_CA", + "language": "eng", + "venueName": "Example venue", + "venueUrl": "http://www.example.com/info-eng", + "formattedVenueName": "eng:Example venue" + }, + { + "model_type": "VenueName", + "locale": "fr_CA", + "language": "fra", + "venueName": "Exemple de lieu", + "venueUrl": "http://www.example.com/info-fra", + "formattedVenueName": "fra:Exemple de lieu" + } + ], + "venueTypeAssignment": { + "model_type": "VenueTypeAssignment", + "venueDescription": "Research and Development Facility", + "venueGroupId": 2, + "venueTypeId": 8 + }, + "profileType": "venue" + }, + "createdTimestamp": 1601595306891, + "lastModifiedTimestamp": 1601595306891, + "childProfileIds": [] +} +] \ No newline at end of file diff --git a/opensync-gateway-static-docker/src/main/docker/app/run.sh b/opensync-gateway-static-docker/src/main/docker/app/run.sh index be9c945..01e998f 100755 --- a/opensync-gateway-static-docker/src/main/docker/app/run.sh +++ b/opensync-gateway-static-docker/src/main/docker/app/run.sh @@ -22,6 +22,9 @@ OVSDB_PROPS+=" -Dtip.wlan.ovsdb.keyStore=/opt/tip-wlan/certs/server.pkcs12" OVSDB_PROPS+=" -Dtip.wlan.ovsdb.customerEquipmentFileName=$OVSDB_EQUIPMENT_CONFIG_FILE" OVSDB_PROPS+=" -Dtip.wlan.ovsdb.apProfileFileName=$OVSDB_APPROFILE_CONFIG_FILE" OVSDB_PROPS+=" -Dtip.wlan.ovsdb.metricsProfileFileName=$OVSDB_METRICSPROFILE_CONFIG_FILE" +OVSDB_PROPS+=" -Dtip.wlan.ovsdb.hotspot20ProfileFileName=$OVSDB_HOTSPOT20PROFILE_CONFIG_FILE" +OVSDB_PROPS+=" -Dtip.wlan.ovsdb.operatorProfileFileName=$OVSDB_OPERATORPROFILE_CONFIG_FILE" +OVSDB_PROPS+=" -Dtip.wlan.ovsdb.venueProfileFileName=$OVSDB_VENUEPROFILE_CONFIG_FILE" OVSDB_PROPS+=" -Dtip.wlan.ovsdb.rfProfileFileName=$OVSDB_RFPROFILE_CONFIG_FILE" OVSDB_PROPS+=" -Dtip.wlan.ovsdb.ssidProfileFileName=$OVSDB_SSIDPROFILE_CONFIG_FILE" OVSDB_PROPS+=" -Dtip.wlan.ovsdb.radiusProfileFileName=$OVSDB_RADIUSPROFILE_CONFIG_FILE" diff --git a/opensync-gateway-static-process/src/main/resources/app/opensync/ProfileHotspot20.json b/opensync-gateway-static-process/src/main/resources/app/opensync/ProfileHotspot20.json new file mode 100644 index 0000000..f8953c3 --- /dev/null +++ b/opensync-gateway-static-process/src/main/resources/app/opensync/ProfileHotspot20.json @@ -0,0 +1,55 @@ +[ +{ + "model_type": "Profile", + "id": 7777, + "customerId": 2, + "profileType": "hotspot_2pt0", + "name": "TipWlan-Hotspot20-Config", + "details": { + "model_type": "Hotspot2Profile", + "enableInterworkingAndHs20": true, + "hessid": null, + "accessNetworkType": "free_public_network", + "networkAuthenticationType": "acceptance_of_terms_and_conditions", + "additionalStepsRequiredForAccess": 0, + "deauthRequestTimeout": 0, + "operatingClass": 0, + "termsAndConditionsFile": { + "model_type": "ManagedFileInfo", + "md5checksum": null, + "lastModifiedTimestamp": null, + "apExportUrl": "https://localhost:9091/filestore/termsAndConditions", + "fileCategory": "ExternalPolicyConfiguration", + "fileType": "TEXT", + "altSlot": false + }, + "whitelistDomain": null, + "emergencyServicesReachable": true, + "unauthenticatedEmergencyServiceAccessible": false, + "internetConnectivity": true, + "connectionCapabilitySet": [ + { + "model_type": "ConnectionCapability", + "connectionCapabilitiesPortNumber": 8888, + "connectionCapabilitiesIpProtocol": "TCP", + "connectionCapabilitiesStatus": "open" + } + ], + "ipAddressTypeAvailability": "public_IPv4_address_available", + "qosMapSetConfiguration": null, + "apGeospatialLocation": null, + "apCivicLocation": null, + "apPublicLocationIdUri": null, + "gasAddr3Behaviour": "p2pSpecWorkaroundFromRequest", + "anqpDomainId": 1234, + "disableDownstreamGroupAddressedForwarding": false, + "profileType": "hotspot_2pt0" + }, + "createdTimestamp": 1601595307355, + "lastModifiedTimestamp": 1601595307355, + "childProfileIds": [ + 5555, + 6666 + ] +} +] \ No newline at end of file diff --git a/opensync-gateway-static-process/src/main/resources/app/opensync/ProfileOperator.json b/opensync-gateway-static-process/src/main/resources/app/opensync/ProfileOperator.json new file mode 100644 index 0000000..36f7fb2 --- /dev/null +++ b/opensync-gateway-static-process/src/main/resources/app/opensync/ProfileOperator.json @@ -0,0 +1,35 @@ +[ +{ + "model_type": "Profile", + "id": 5555, + "customerId": 2, + "profileType": "operator", + "name": "TipWlan-Hotspot20-Operator", + "details": { + "model_type": "OperatorProfile", + "domainName": "telecominfraproject.atlassian.net", + "serverOnlyAuthenticatedL2EncryptionNetwork": false, + "x509CertificateLocation": "/etc/ca.pem", + "operatorFriendlyName": [ + { + "model_type": "Hotspot20Duple", + "locale": "en_CA", + "language": "eng", + "friendlyName": "default Friendly Operator Name", + "formattedFriendlyName": "eng:default Friendly Operator Name" + }, + { + "model_type": "Hotspot20Duple", + "locale": "fr_CA", + "language": "fra", + "friendlyName": "Nom de l'opérateur convivial par défaut", + "formattedFriendlyName": "fra:Nom de l'opérateur convivial par défaut" + } + ], + "profileType": "operator" + }, + "createdTimestamp": 1601595306885, + "lastModifiedTimestamp": 1601595306885, + "childProfileIds": [] +} +] \ No newline at end of file diff --git a/opensync-gateway-static-process/src/main/resources/app/opensync/ProfileVenue.json b/opensync-gateway-static-process/src/main/resources/app/opensync/ProfileVenue.json new file mode 100644 index 0000000..c79f0d8 --- /dev/null +++ b/opensync-gateway-static-process/src/main/resources/app/opensync/ProfileVenue.json @@ -0,0 +1,40 @@ +[ +{ + "model_type": "Profile", + "id": 6666, + "customerId": 2, + "profileType": "venue", + "name": "TipWlan-Hotspot20-Venue", + "details": { + "model_type": "VenueProfile", + "venueNameSet": [ + { + "model_type": "VenueName", + "locale": "en_CA", + "language": "eng", + "venueName": "Example venue", + "venueUrl": "http://www.example.com/info-eng", + "formattedVenueName": "eng:Example venue" + }, + { + "model_type": "VenueName", + "locale": "fr_CA", + "language": "fra", + "venueName": "Exemple de lieu", + "venueUrl": "http://www.example.com/info-fra", + "formattedVenueName": "fra:Exemple de lieu" + } + ], + "venueTypeAssignment": { + "model_type": "VenueTypeAssignment", + "venueDescription": "Research and Development Facility", + "venueGroupId": 2, + "venueTypeId": 8 + }, + "profileType": "venue" + }, + "createdTimestamp": 1601595306891, + "lastModifiedTimestamp": 1601595306891, + "childProfileIds": [] +} +] \ No newline at end of file diff --git a/opensync-gateway-static-process/src/main/resources/launchers/OpenSyncProcess (local, KDC certs) static.launch b/opensync-gateway-static-process/src/main/resources/launchers/OpenSyncProcess (local, KDC certs) static.launch index dc9b246..bad0fdf 100644 --- a/opensync-gateway-static-process/src/main/resources/launchers/OpenSyncProcess (local, KDC certs) static.launch +++ b/opensync-gateway-static-process/src/main/resources/launchers/OpenSyncProcess (local, KDC certs) static.launch @@ -14,5 +14,5 @@ - + diff --git a/opensync-gateway/src/main/java/com/telecominfraproject/wlan/opensync/ovsdb/TipWlanOvsdbClient.java b/opensync-gateway/src/main/java/com/telecominfraproject/wlan/opensync/ovsdb/TipWlanOvsdbClient.java index 46937ed..d2dfad7 100644 --- a/opensync-gateway/src/main/java/com/telecominfraproject/wlan/opensync/ovsdb/TipWlanOvsdbClient.java +++ b/opensync-gateway/src/main/java/com/telecominfraproject/wlan/opensync/ovsdb/TipWlanOvsdbClient.java @@ -107,7 +107,10 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface { // we are augmenting it // with the serialNumber and using it as a key (equivalent // of KDC unique qrCode) - String key = clientCn + "_" + connectNodeInfo.serialNumber; + String key = clientCn; + if (!preventClientCnAlteration) { + key = clientCn + "_" + connectNodeInfo.serialNumber; + } ovsdbSessionMapInterface.newSession(key, ovsdbClient); extIntegrationInterface.apConnected(key, connectNodeInfo); @@ -188,7 +191,10 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface { LOG.debug("Starting Client connect"); connectNodeInfo = ovsdbDao.updateConnectNodeInfoOnConnect(ovsdbClient, clientCn, connectNodeInfo); - String apId = clientCn + "_" + connectNodeInfo.serialNumber; + String apId = clientCn; + if (!preventClientCnAlteration) { + apId = clientCn + "_" + connectNodeInfo.serialNumber; + } LOG.debug("Client connect for AP {}", apId); @@ -214,21 +220,6 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface { } } - - // Check if device stats is configured in Wifi_Stats_Config table, - // provision it - // if needed - // if (ovsdbDao.getDeviceStatsReportingInterval(ovsdbClient) != - // collectionIntervalSecDeviceStats) { - // ovsdbDao.updateDeviceStatsReportingInterval(ovsdbClient, - // collectionIntervalSecDeviceStats); - // } - - if (((ApNetworkConfiguration) opensyncAPConfig.getApProfile().getDetails()).getSyntheticClientEnabled()) { - ovsdbDao.enableNetworkProbeForSyntheticClient(ovsdbClient); - } - // ovsdbDao.configureWifiInet(ovsdbClient); - LOG.debug("Client connect Done"); return connectNodeInfo; }