mirror of
https://github.com/Telecominfraproject/wlan-cloud-opensync-controller.git
synced 2026-03-21 15:39:15 +00:00
Adding RF Profile changes and updating static
This commit is contained in:
@@ -75,6 +75,7 @@ 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;
|
||||
@@ -248,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);
|
||||
}
|
||||
}
|
||||
@@ -379,6 +380,7 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
Set<RadioType> radioTypes = radioProfileMap.keySet();
|
||||
|
||||
for (RadioType radioType : radioTypes) {
|
||||
// SSID Profile set in AP Profile
|
||||
Profile ssidProfile = new Profile();
|
||||
ssidProfile.setCustomerId(ce.getCustomerId());
|
||||
ssidProfile.setName(autoProvisionedSsid + radioType.name() + " for " + ce.getName());
|
||||
@@ -397,9 +399,29 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
ssidProfile = profileServiceInterface.create(ssidProfile);
|
||||
|
||||
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;
|
||||
}
|
||||
@@ -723,6 +745,9 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
||||
profileServiceInterface.getProfileWithChildren(equipmentConfig.getProfileId()));
|
||||
|
||||
ret.setApProfile(profileContainer.getOrNull(equipmentConfig.getProfileId()));
|
||||
|
||||
ret.setRfProfile(
|
||||
profileContainer.getChildOfTypeOrNull(equipmentConfig.getProfileId(), ProfileType.rf));
|
||||
|
||||
ret.setSsidProfile(
|
||||
profileContainer.getChildrenOfType(equipmentConfig.getProfileId(), ProfileType.ssid));
|
||||
|
||||
@@ -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;
|
||||
@@ -2159,9 +2159,14 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||
continue;
|
||||
}
|
||||
|
||||
ProfileContainer profileContainer = new ProfileContainer(
|
||||
profileServiceInterface.getProfileWithChildren(
|
||||
equipmentServiceInterface.get(equipmentId).getProfileId()));
|
||||
|
||||
ChannelBandwidth channelBandwidth = ((ApElementConfiguration) equipmentServiceInterface.get(equipmentId)
|
||||
.getDetails()).getRadioMap().get(radioType).getChannelBandwidth();
|
||||
RfConfiguration rfConfig = (RfConfiguration) profileContainer.getChildOfTypeOrNull(
|
||||
equipmentServiceInterface.get(equipmentId).getProfileId(), ProfileType.rf).getDetails();
|
||||
|
||||
ChannelBandwidth channelBandwidth = rfConfig.getRfConfig(radioType).getChannelBandwidth();
|
||||
|
||||
Map<Integer, List<SurveySample>> sampleByChannelMap = new HashMap<>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user