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 20da2b8..5500de4 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 @@ -76,7 +76,6 @@ import com.telecominfraproject.wlan.profile.models.ProfileContainer; import com.telecominfraproject.wlan.profile.models.ProfileType; import com.telecominfraproject.wlan.profile.network.models.ApNetworkConfiguration; import com.telecominfraproject.wlan.profile.network.models.RadioProfileConfiguration; -import com.telecominfraproject.wlan.profile.network.models.RfConfiguration; import com.telecominfraproject.wlan.profile.ssid.models.SsidConfiguration; import com.telecominfraproject.wlan.profile.ssid.models.SsidConfiguration.SecureMode; import com.telecominfraproject.wlan.routing.RoutingServiceInterface; @@ -250,11 +249,11 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra } if (!radioType.equals(RadioType.UNSUPPORTED)) { advancedRadioConfiguration = RadioConfiguration.createWithDefaults(radioType); - // advancedRadioConfiguration.setAutoChannelSelection(StateSetting.disabled); + advancedRadioConfiguration.setAutoChannelSelection(StateSetting.disabled); advancedRadioMap.put(radioType, advancedRadioConfiguration); radioConfiguration = ElementRadioConfiguration.createWithDefaults(radioType); - // radioConfiguration.setAutoChannelSelection(false); + radioConfiguration.setAutoChannelSelection(false); radioMap.put(radioType, radioConfiguration); } } @@ -403,29 +402,9 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra apProfile.getChildProfileIds().add(ssidProfile.getId()); - // Update AP Profile with ssidProfile and rfProfile apProfile = profileServiceInterface.update(apProfile); } - // RF Profile set in AP Profile - Profile rfProfile = new Profile(); - rfProfile.setCustomerId(ce.getCustomerId()); - rfProfile.setName("DefaultRf-" + " for " + ce.getName()); - RfConfiguration rfConfig = RfConfiguration.createWithDefaults(); - - // Override default values - for (RadioType radioType : radioTypes) { - rfConfig.getRfConfig(radioType).setRf(rfProfile.getName()); - } - - rfProfile.setDetails(rfConfig); - rfProfile = profileServiceInterface.create(rfProfile); - - apProfile.getChildProfileIds().add(rfProfile.getId()); - - // Update AP Profile with ssidProfile and rfProfile - apProfile = profileServiceInterface.update(apProfile); - return apProfile; } @@ -783,8 +762,6 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra ret.setApProfile(profileContainer.getOrNull(equipmentConfig.getProfileId())); - ret.setRfProfile(profileContainer.getChildOfTypeOrNull(equipmentConfig.getProfileId(), ProfileType.rf)); - ret.setSsidProfile( profileContainer.getChildrenOfType(equipmentConfig.getProfileId(), ProfileType.ssid)); 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 95b8831..3fcf644 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 @@ -39,13 +39,13 @@ import com.telecominfraproject.wlan.core.model.equipment.SecurityType; import com.telecominfraproject.wlan.core.model.equipment.WiFiSessionUtility; import com.telecominfraproject.wlan.core.model.utils.DecibelUtils; import com.telecominfraproject.wlan.equipment.EquipmentServiceInterface; +import com.telecominfraproject.wlan.equipment.models.ApElementConfiguration; import com.telecominfraproject.wlan.equipment.models.Equipment; import com.telecominfraproject.wlan.opensync.ovsdb.dao.utilities.OvsdbToWlanCloudTypeMappingUtility; import com.telecominfraproject.wlan.profile.ProfileServiceInterface; import com.telecominfraproject.wlan.profile.models.Profile; import com.telecominfraproject.wlan.profile.models.ProfileContainer; import com.telecominfraproject.wlan.profile.models.ProfileType; -import com.telecominfraproject.wlan.profile.network.models.RfConfiguration; import com.telecominfraproject.wlan.profile.ssid.models.RadioBasedSsidConfiguration; import com.telecominfraproject.wlan.profile.ssid.models.SsidConfiguration; import com.telecominfraproject.wlan.profile.ssid.models.SsidConfiguration.SecureMode; @@ -2294,14 +2294,8 @@ public class OpensyncExternalIntegrationMqttMessageProcessor { continue; } - ProfileContainer profileContainer = new ProfileContainer(profileServiceInterface - .getProfileWithChildren(equipmentServiceInterface.get(equipmentId).getProfileId())); - - RfConfiguration rfConfig = (RfConfiguration) profileContainer - .getChildOfTypeOrNull(equipmentServiceInterface.get(equipmentId).getProfileId(), ProfileType.rf) - .getDetails(); - - ChannelBandwidth channelBandwidth = rfConfig.getRfConfig(radioType).getChannelBandwidth(); + ChannelBandwidth channelBandwidth = ((ApElementConfiguration) equipmentServiceInterface.get(equipmentId) + .getDetails()).getRadioMap().get(radioType).getChannelBandwidth(); Map> sampleByChannelMap = new HashMap<>(); diff --git a/opensync-ext-interface/src/main/java/com/telecominfraproject/wlan/opensync/external/integration/models/OpensyncAPConfig.java b/opensync-ext-interface/src/main/java/com/telecominfraproject/wlan/opensync/external/integration/models/OpensyncAPConfig.java index 3cb1a2f..8e812f5 100644 --- a/opensync-ext-interface/src/main/java/com/telecominfraproject/wlan/opensync/external/integration/models/OpensyncAPConfig.java +++ b/opensync-ext-interface/src/main/java/com/telecominfraproject/wlan/opensync/external/integration/models/OpensyncAPConfig.java @@ -29,7 +29,6 @@ public class OpensyncAPConfig extends BaseJsonModel { private Equipment customerEquipment; private Profile apProfile; - private Profile rfProfile; private List ssidProfile; private List radiusProfiles; private Location equipmentLocation; @@ -139,14 +138,6 @@ public class OpensyncAPConfig extends BaseJsonModel { public void setApProfile(Profile apProfile) { this.apProfile = apProfile; } - - public Profile getRfProfile() { - return rfProfile; - } - - public void setRfProfile(Profile rfProfile) { - this.rfProfile = rfProfile; - } public List getSsidProfile() { return ssidProfile; @@ -204,8 +195,6 @@ public class OpensyncAPConfig extends BaseJsonModel { } if (apProfile != null) ret.apProfile = apProfile.clone(); - if (rfProfile != null) - ret.rfProfile = rfProfile.clone(); if (equipmentRouting != null) ret.equipmentRouting = equipmentRouting.clone(); if (equipmentGateway != null) 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 68f6e54..34b49e6 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 @@ -41,9 +41,6 @@ public class OpensyncExternalIntegrationSimple implements OpensyncExternalIntegr @Value("${tip.wlan.ovsdb.ssidProfileFileName:/app/config/ProfileSsid.json}") private String ssidProfileFileName; - - @Value("${tip.wlan.ovsdb.ssidProfileFileName:/app/config/ProfileRf.json}") - private String rfProfileFileName; @Value("${tip.wlan.ovsdb.radiusProfileFileName:/app/config/ProfileRadius.json}") private String radiusProfileFileName; @@ -89,11 +86,6 @@ public class OpensyncExternalIntegrationSimple implements OpensyncExternalIntegr 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); @@ -132,7 +124,6 @@ public class OpensyncExternalIntegrationSimple implements OpensyncExternalIntegr ret.setCustomerEquipment(equipment); ret.setApProfile(apProfile); ret.setSsidProfile(ssidProfiles); - ret.setRfProfile(rfProfile); ret.setRadiusProfiles(radiusProfiles); ret.setEquipmentLocation(location); ret.setCaptiveProfiles(captiveProfiles); diff --git a/opensync-ext-static/src/main/resources/EquipmentExample.json b/opensync-ext-static/src/main/resources/EquipmentExample.json index c27596e..5eb69c5 100644 --- a/opensync-ext-static/src/main/resources/EquipmentExample.json +++ b/opensync-ext-static/src/main/resources/EquipmentExample.json @@ -38,6 +38,8 @@ "channelNumber": 6, "manualChannelNumber": 6, "backupChannelNumber": 11, + "autoChannelSelection": false, + "channelBandwidth": "is20MHz", "bannedChannels": [], "allowedChannels": [], "rxCellSizeDb": { @@ -79,6 +81,8 @@ "channelNumber": 149, "manualChannelNumber": 149, "backupChannelNumber": 154, + "autoChannelSelection": false, + "channelBandwidth": "is80MHz", "bannedChannels": [], "allowedChannels": [], "rxCellSizeDb": { @@ -120,6 +124,8 @@ "channelNumber": 36, "manualChannelNumber": 36, "backupChannelNumber": 44, + "autoChannelSelection": false, + "channelBandwidth": "is80MHz", "bannedChannels": [], "allowedChannels": [], "rxCellSizeDb": { @@ -162,11 +168,22 @@ "radioType": "is2dot4GHz", "radioAdminState": "enabled", "fragmentationThresholdBytes": 2346, + "rtsCtsThreshold": 65535, + "autoChannelSelection": "disabled", "radioMode": "modeN", + "mimoMode": "twoByTwo", "wmmState": "enabled", "uapsdState": "enabled", + "maxNumClients": 100, "stationIsolation": "disabled", + "multicastRate": "auto", "managementRate": "auto", + "activeScanSettings": { + "model_type": "ActiveScanSettings", + "enabled": true, + "scanFrequencySeconds": 10, + "scanDurationMillis": 65 + }, "channelHopSettings": { "model_type": "ChannelHopSettings", "noiseFloorThresholdInDB": -75, @@ -183,6 +200,7 @@ }, "forceScanDuringVoice": "disabled", "legacyBSSRate": "enabled", + "beaconInterval": 100, "deauthAttackDetection": null }, "is5GHzU": { @@ -190,11 +208,22 @@ "radioType": "is5GHzU", "radioAdminState": "enabled", "fragmentationThresholdBytes": 2346, + "rtsCtsThreshold": 65535, + "autoChannelSelection": "disabled", "radioMode": "modeAC", + "mimoMode": "twoByTwo", "wmmState": "enabled", "uapsdState": "enabled", + "maxNumClients": 100, "stationIsolation": "disabled", + "multicastRate": "auto", "managementRate": "auto", + "activeScanSettings": { + "model_type": "ActiveScanSettings", + "enabled": true, + "scanFrequencySeconds": 10, + "scanDurationMillis": 65 + }, "channelHopSettings": { "model_type": "ChannelHopSettings", "noiseFloorThresholdInDB": -75, @@ -211,6 +240,7 @@ }, "forceScanDuringVoice": "disabled", "legacyBSSRate": "enabled", + "beaconInterval": 100, "deauthAttackDetection": null }, "is5GHzL": { @@ -218,11 +248,22 @@ "radioType": "is5GHzL", "radioAdminState": "enabled", "fragmentationThresholdBytes": 2346, + "rtsCtsThreshold": 65535, + "autoChannelSelection": "disabled", "radioMode": "modeAC", + "mimoMode": "twoByTwo", "wmmState": "enabled", "uapsdState": "enabled", + "maxNumClients": 100, "stationIsolation": "disabled", + "multicastRate": "auto", "managementRate": "auto", + "activeScanSettings": { + "model_type": "ActiveScanSettings", + "enabled": true, + "scanFrequencySeconds": 10, + "scanDurationMillis": 65 + }, "channelHopSettings": { "model_type": "ChannelHopSettings", "noiseFloorThresholdInDB": -75, @@ -239,6 +280,7 @@ }, "forceScanDuringVoice": "disabled", "legacyBSSRate": "enabled", + "beaconInterval": 100, "deauthAttackDetection": null } } diff --git a/opensync-ext-static/src/main/resources/ProfileAPExample.json b/opensync-ext-static/src/main/resources/ProfileAPExample.json index fad16cd..8420e24 100644 --- a/opensync-ext-static/src/main/resources/ProfileAPExample.json +++ b/opensync-ext-static/src/main/resources/ProfileAPExample.json @@ -49,7 +49,6 @@ "childProfileIds": [ 6, 7, - 8, - 9 + 8 ] } \ No newline at end of file diff --git a/opensync-ext-static/src/main/resources/ProfileRf.json b/opensync-ext-static/src/main/resources/ProfileRf.json deleted file mode 100644 index 7d0596b..0000000 --- a/opensync-ext-static/src/main/resources/ProfileRf.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "model_type": "Profile", - "id": 9, - "customerId": 2, - "profileType": "rf", - "name": "DefaultRf-2g", - "details": { - "model_type": "RfConfiguration", - "rf": "Default-RF-2g", - "profileType": "rf", - "rfConfigMap": { - "is2dot4GHz": { - "model_type": "RfElementConfiguration", - "beaconInterval": 100, - "forceScanDuringVoice": "disabled", - "rtsCtsThreshold": 65535, - "channelBandwidth": "is20MHz", - "mimoMode": "twoBytwo", - "maxNumClients": 100, - "multicastRate": "auto", - "autoChannelSelection": "disabled", - "activeScanSettings": { - "model_type": "ActiveScanSettings", - "enabled": true, - "scanFrequencySeconds": 10, - "scanDurationMillis": 65 - } - }, - "is5GHz": { - "model_type": "RfElementConfiguration", - "beaconInterval": 100, - "forceScanDuringVoice": "disabled", - "rtsCtsThreshold": 65535, - "channelBandwidth": "is80MHz", - "mimoMode": "twoBytwo", - "maxNumClients": 100, - "multicastRate": "auto", - "autoChannelSelection": "disabled", - "activeScanSettings": { - "model_type": "ActiveScanSettings", - "enabled": true, - "scanFrequencySeconds": 10, - "scanDurationMillis": 65 - } - }, - "is5GHzL": { - "model_type": "RfElementConfiguration", - "beaconInterval": 100, - "forceScanDuringVoice": "disabled", - "rtsCtsThreshold": 65535, - "channelBandwidth": "is80MHz", - "mimoMode": "twoBytwo", - "maxNumClients": 100, - "multicastRate": "auto", - "autoChannelSelection": "disabled", - "activeScanSettings": { - "model_type": "ActiveScanSettings", - "enabled": true, - "scanFrequencySeconds": 10, - "scanDurationMillis": 65 - } - }, - "is5GHzU": { - "model_type": "RfElementConfiguration", - "beaconInterval": 100, - "forceScanDuringVoice": "disabled", - "rtsCtsThreshold": 65535, - "channelBandwidth": "is80MHz", - "mimoMode": "twoBytwo", - "maxNumClients": 100, - "multicastRate": "auto", - "autoChannelSelection": "disabled", - "activeScanSettings": { - "model_type": "ActiveScanSettings", - "enabled": true, - "scanFrequencySeconds": 10, - "scanDurationMillis": 65 - } - } - }, - "createdTimestamp": 1591653239983, - "lastModifiedTimestamp": 1591653239983, - "childProfileIds": [ - ] - } -} 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 21b6685..dfca5cb 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 @@ -22,6 +22,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; +import com.telecominfraproject.wlan.client.models.ClientType; import com.telecominfraproject.wlan.core.model.equipment.AutoOrManualValue; import com.telecominfraproject.wlan.core.model.equipment.ChannelBandwidth; import com.telecominfraproject.wlan.core.model.equipment.MacAddress; @@ -60,8 +61,6 @@ import com.telecominfraproject.wlan.profile.captiveportal.models.CaptivePortalAu import com.telecominfraproject.wlan.profile.captiveportal.models.CaptivePortalConfiguration; import com.telecominfraproject.wlan.profile.captiveportal.models.ManagedFileInfo; import com.telecominfraproject.wlan.profile.models.Profile; -import com.telecominfraproject.wlan.profile.network.models.RfConfiguration; -import com.telecominfraproject.wlan.profile.network.models.RfElementConfiguration; import com.telecominfraproject.wlan.profile.radius.models.RadiusProfile; import com.telecominfraproject.wlan.profile.radius.models.RadiusServer; import com.telecominfraproject.wlan.profile.radius.models.RadiusServiceRegion; @@ -1710,18 +1709,15 @@ public class OvsdbDao { // radios on this AP // ;-) - RfConfiguration rfConfig = (RfConfiguration) opensyncAPConfig.getRfProfile().getDetails(); - ApElementConfiguration apElementConfiguration = (ApElementConfiguration) opensyncAPConfig.getCustomerEquipment() .getDetails(); for (RadioType radioType : apElementConfiguration.getRadioMap().keySet()) { Map hwConfig = new HashMap<>(); - RfElementConfiguration rfElementConfig = rfConfig.getRfConfig(radioType); ElementRadioConfiguration elementRadioConfig = apElementConfiguration.getRadioMap().get(radioType); int channel = elementRadioConfig.getChannelNumber(); - ChannelBandwidth bandwidth = rfElementConfig.getChannelBandwidth(); + ChannelBandwidth bandwidth = elementRadioConfig.getChannelBandwidth(); String ht_mode = null; switch (bandwidth) { case is20MHz: @@ -1742,10 +1738,10 @@ public class OvsdbDao { default: ht_mode = null; } - rfElementConfig.getAutoChannelSelection(); + elementRadioConfig.getAutoChannelSelection(); RadioConfiguration radioConfig = apElementConfiguration.getAdvancedRadioMap().get(radioType); - int beaconInterval = rfElementConfig.getBeaconInterval(); + int beaconInterval = radioConfig.getBeaconInterval(); boolean enabled = radioConfig.getRadioAdminState().equals(StateSetting.enabled); int txPower = 0;