From d0c6a81191271a05928dcb83096c22fa3deff2fe Mon Sep 17 00:00:00 2001 From: Lynn Shi Date: Tue, 21 Jul 2020 21:55:02 -0400 Subject: [PATCH] GW supports captive portal profile --- .../integration/OpensyncExternalIntegrationCloud.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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 6fea22d..f515803 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 @@ -626,7 +626,7 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra fwImageName = connectNodeInfo.versionMatrix.get("FW_IMAGE_NAME"); } - if (fwVersionName != null && !fwVersionName.equals(fwImageName)) { + if (fwImageName != null && fwVersionName != null && !fwVersionName.equals(fwImageName)) { fwUpgradeStatusData.setTargetSwVersion(fwImageName); fwUpgradeStatusData.setUpgradeState(EquipmentUpgradeState.out_of_date); statusRecord.setDetails(fwUpgradeStatusData); @@ -739,12 +739,19 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra profileContainer.getChildrenOfType(equipmentConfig.getProfileId(), ProfileType.ssid)); Set radiusSet = new HashSet<>(); + Set captiveProfileIds = new HashSet<>(); for (Profile ssidProfile : ret.getSsidProfile()) { radiusSet.addAll(profileContainer.getChildrenOfType(ssidProfile.getId(), ProfileType.radius)); - + if (ssidProfile.getDetails() != null) { + Long captivePortId = ((SsidConfiguration)ssidProfile.getDetails()).getCaptivePortalId(); + if (captivePortId != null) { + captiveProfileIds.add(captivePortId); + } + } } ret.setRadiusProfiles(new ArrayList<>(radiusSet)); + ret.setCaptiveProfiles(profileServiceInterface.get(captiveProfileIds)); LOG.debug("ApConfig {}", ret.toString()); } else {