Revert "Adding RF Profile changes and updating static"

This reverts commit 71c41bb892.
This commit is contained in:
ralphlee
2020-09-22 17:01:32 -04:00
parent 6ea19d9cbf
commit 9cc3b96436
8 changed files with 52 additions and 150 deletions

View File

@@ -76,7 +76,6 @@ import com.telecominfraproject.wlan.profile.models.ProfileContainer;
import com.telecominfraproject.wlan.profile.models.ProfileType; import com.telecominfraproject.wlan.profile.models.ProfileType;
import com.telecominfraproject.wlan.profile.network.models.ApNetworkConfiguration; import com.telecominfraproject.wlan.profile.network.models.ApNetworkConfiguration;
import com.telecominfraproject.wlan.profile.network.models.RadioProfileConfiguration; 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;
import com.telecominfraproject.wlan.profile.ssid.models.SsidConfiguration.SecureMode; import com.telecominfraproject.wlan.profile.ssid.models.SsidConfiguration.SecureMode;
import com.telecominfraproject.wlan.routing.RoutingServiceInterface; import com.telecominfraproject.wlan.routing.RoutingServiceInterface;
@@ -250,11 +249,11 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
} }
if (!radioType.equals(RadioType.UNSUPPORTED)) { if (!radioType.equals(RadioType.UNSUPPORTED)) {
advancedRadioConfiguration = RadioConfiguration.createWithDefaults(radioType); advancedRadioConfiguration = RadioConfiguration.createWithDefaults(radioType);
// advancedRadioConfiguration.setAutoChannelSelection(StateSetting.disabled); advancedRadioConfiguration.setAutoChannelSelection(StateSetting.disabled);
advancedRadioMap.put(radioType, advancedRadioConfiguration); advancedRadioMap.put(radioType, advancedRadioConfiguration);
radioConfiguration = ElementRadioConfiguration.createWithDefaults(radioType); radioConfiguration = ElementRadioConfiguration.createWithDefaults(radioType);
// radioConfiguration.setAutoChannelSelection(false); radioConfiguration.setAutoChannelSelection(false);
radioMap.put(radioType, radioConfiguration); radioMap.put(radioType, radioConfiguration);
} }
} }
@@ -403,29 +402,9 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
apProfile.getChildProfileIds().add(ssidProfile.getId()); apProfile.getChildProfileIds().add(ssidProfile.getId());
// Update AP Profile with ssidProfile and rfProfile
apProfile = profileServiceInterface.update(apProfile); 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; return apProfile;
} }
@@ -783,8 +762,6 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
ret.setApProfile(profileContainer.getOrNull(equipmentConfig.getProfileId())); ret.setApProfile(profileContainer.getOrNull(equipmentConfig.getProfileId()));
ret.setRfProfile(profileContainer.getChildOfTypeOrNull(equipmentConfig.getProfileId(), ProfileType.rf));
ret.setSsidProfile( ret.setSsidProfile(
profileContainer.getChildrenOfType(equipmentConfig.getProfileId(), ProfileType.ssid)); profileContainer.getChildrenOfType(equipmentConfig.getProfileId(), ProfileType.ssid));

View File

@@ -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.equipment.WiFiSessionUtility;
import com.telecominfraproject.wlan.core.model.utils.DecibelUtils; import com.telecominfraproject.wlan.core.model.utils.DecibelUtils;
import com.telecominfraproject.wlan.equipment.EquipmentServiceInterface; import com.telecominfraproject.wlan.equipment.EquipmentServiceInterface;
import com.telecominfraproject.wlan.equipment.models.ApElementConfiguration;
import com.telecominfraproject.wlan.equipment.models.Equipment; import com.telecominfraproject.wlan.equipment.models.Equipment;
import com.telecominfraproject.wlan.opensync.ovsdb.dao.utilities.OvsdbToWlanCloudTypeMappingUtility; import com.telecominfraproject.wlan.opensync.ovsdb.dao.utilities.OvsdbToWlanCloudTypeMappingUtility;
import com.telecominfraproject.wlan.profile.ProfileServiceInterface; import com.telecominfraproject.wlan.profile.ProfileServiceInterface;
import com.telecominfraproject.wlan.profile.models.Profile; import com.telecominfraproject.wlan.profile.models.Profile;
import com.telecominfraproject.wlan.profile.models.ProfileContainer; import com.telecominfraproject.wlan.profile.models.ProfileContainer;
import com.telecominfraproject.wlan.profile.models.ProfileType; 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.RadioBasedSsidConfiguration;
import com.telecominfraproject.wlan.profile.ssid.models.SsidConfiguration; import com.telecominfraproject.wlan.profile.ssid.models.SsidConfiguration;
import com.telecominfraproject.wlan.profile.ssid.models.SsidConfiguration.SecureMode; import com.telecominfraproject.wlan.profile.ssid.models.SsidConfiguration.SecureMode;
@@ -2294,14 +2294,8 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
continue; continue;
} }
ProfileContainer profileContainer = new ProfileContainer(profileServiceInterface ChannelBandwidth channelBandwidth = ((ApElementConfiguration) equipmentServiceInterface.get(equipmentId)
.getProfileWithChildren(equipmentServiceInterface.get(equipmentId).getProfileId())); .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<>(); Map<Integer, List<SurveySample>> sampleByChannelMap = new HashMap<>();

View File

@@ -29,7 +29,6 @@ public class OpensyncAPConfig extends BaseJsonModel {
private Equipment customerEquipment; private Equipment customerEquipment;
private Profile apProfile; private Profile apProfile;
private Profile rfProfile;
private List<Profile> ssidProfile; private List<Profile> ssidProfile;
private List<Profile> radiusProfiles; private List<Profile> radiusProfiles;
private Location equipmentLocation; private Location equipmentLocation;
@@ -139,14 +138,6 @@ public class OpensyncAPConfig extends BaseJsonModel {
public void setApProfile(Profile apProfile) { public void setApProfile(Profile apProfile) {
this.apProfile = apProfile; this.apProfile = apProfile;
} }
public Profile getRfProfile() {
return rfProfile;
}
public void setRfProfile(Profile rfProfile) {
this.rfProfile = rfProfile;
}
public List<Profile> getSsidProfile() { public List<Profile> getSsidProfile() {
return ssidProfile; return ssidProfile;
@@ -204,8 +195,6 @@ public class OpensyncAPConfig extends BaseJsonModel {
} }
if (apProfile != null) if (apProfile != null)
ret.apProfile = apProfile.clone(); ret.apProfile = apProfile.clone();
if (rfProfile != null)
ret.rfProfile = rfProfile.clone();
if (equipmentRouting != null) if (equipmentRouting != null)
ret.equipmentRouting = equipmentRouting.clone(); ret.equipmentRouting = equipmentRouting.clone();
if (equipmentGateway != null) if (equipmentGateway != null)

View File

@@ -41,9 +41,6 @@ public class OpensyncExternalIntegrationSimple implements OpensyncExternalIntegr
@Value("${tip.wlan.ovsdb.ssidProfileFileName:/app/config/ProfileSsid.json}") @Value("${tip.wlan.ovsdb.ssidProfileFileName:/app/config/ProfileSsid.json}")
private String ssidProfileFileName; private String ssidProfileFileName;
@Value("${tip.wlan.ovsdb.ssidProfileFileName:/app/config/ProfileRf.json}")
private String rfProfileFileName;
@Value("${tip.wlan.ovsdb.radiusProfileFileName:/app/config/ProfileRadius.json}") @Value("${tip.wlan.ovsdb.radiusProfileFileName:/app/config/ProfileRadius.json}")
private String radiusProfileFileName; 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 com.telecominfraproject.wlan.profile.models.Profile apProfile = com.telecominfraproject.wlan.profile.models.Profile
.fromFile(apProfileFileName, com.telecominfraproject.wlan.profile.models.Profile.class); .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<com.telecominfraproject.wlan.profile.models.Profile> ssidProfiles = com.telecominfraproject.wlan.profile.models.Profile List<com.telecominfraproject.wlan.profile.models.Profile> ssidProfiles = com.telecominfraproject.wlan.profile.models.Profile
.listFromFile(ssidProfileFileName, com.telecominfraproject.wlan.profile.models.Profile.class); .listFromFile(ssidProfileFileName, com.telecominfraproject.wlan.profile.models.Profile.class);
@@ -132,7 +124,6 @@ public class OpensyncExternalIntegrationSimple implements OpensyncExternalIntegr
ret.setCustomerEquipment(equipment); ret.setCustomerEquipment(equipment);
ret.setApProfile(apProfile); ret.setApProfile(apProfile);
ret.setSsidProfile(ssidProfiles); ret.setSsidProfile(ssidProfiles);
ret.setRfProfile(rfProfile);
ret.setRadiusProfiles(radiusProfiles); ret.setRadiusProfiles(radiusProfiles);
ret.setEquipmentLocation(location); ret.setEquipmentLocation(location);
ret.setCaptiveProfiles(captiveProfiles); ret.setCaptiveProfiles(captiveProfiles);

View File

@@ -38,6 +38,8 @@
"channelNumber": 6, "channelNumber": 6,
"manualChannelNumber": 6, "manualChannelNumber": 6,
"backupChannelNumber": 11, "backupChannelNumber": 11,
"autoChannelSelection": false,
"channelBandwidth": "is20MHz",
"bannedChannels": [], "bannedChannels": [],
"allowedChannels": [], "allowedChannels": [],
"rxCellSizeDb": { "rxCellSizeDb": {
@@ -79,6 +81,8 @@
"channelNumber": 149, "channelNumber": 149,
"manualChannelNumber": 149, "manualChannelNumber": 149,
"backupChannelNumber": 154, "backupChannelNumber": 154,
"autoChannelSelection": false,
"channelBandwidth": "is80MHz",
"bannedChannels": [], "bannedChannels": [],
"allowedChannels": [], "allowedChannels": [],
"rxCellSizeDb": { "rxCellSizeDb": {
@@ -120,6 +124,8 @@
"channelNumber": 36, "channelNumber": 36,
"manualChannelNumber": 36, "manualChannelNumber": 36,
"backupChannelNumber": 44, "backupChannelNumber": 44,
"autoChannelSelection": false,
"channelBandwidth": "is80MHz",
"bannedChannels": [], "bannedChannels": [],
"allowedChannels": [], "allowedChannels": [],
"rxCellSizeDb": { "rxCellSizeDb": {
@@ -162,11 +168,22 @@
"radioType": "is2dot4GHz", "radioType": "is2dot4GHz",
"radioAdminState": "enabled", "radioAdminState": "enabled",
"fragmentationThresholdBytes": 2346, "fragmentationThresholdBytes": 2346,
"rtsCtsThreshold": 65535,
"autoChannelSelection": "disabled",
"radioMode": "modeN", "radioMode": "modeN",
"mimoMode": "twoByTwo",
"wmmState": "enabled", "wmmState": "enabled",
"uapsdState": "enabled", "uapsdState": "enabled",
"maxNumClients": 100,
"stationIsolation": "disabled", "stationIsolation": "disabled",
"multicastRate": "auto",
"managementRate": "auto", "managementRate": "auto",
"activeScanSettings": {
"model_type": "ActiveScanSettings",
"enabled": true,
"scanFrequencySeconds": 10,
"scanDurationMillis": 65
},
"channelHopSettings": { "channelHopSettings": {
"model_type": "ChannelHopSettings", "model_type": "ChannelHopSettings",
"noiseFloorThresholdInDB": -75, "noiseFloorThresholdInDB": -75,
@@ -183,6 +200,7 @@
}, },
"forceScanDuringVoice": "disabled", "forceScanDuringVoice": "disabled",
"legacyBSSRate": "enabled", "legacyBSSRate": "enabled",
"beaconInterval": 100,
"deauthAttackDetection": null "deauthAttackDetection": null
}, },
"is5GHzU": { "is5GHzU": {
@@ -190,11 +208,22 @@
"radioType": "is5GHzU", "radioType": "is5GHzU",
"radioAdminState": "enabled", "radioAdminState": "enabled",
"fragmentationThresholdBytes": 2346, "fragmentationThresholdBytes": 2346,
"rtsCtsThreshold": 65535,
"autoChannelSelection": "disabled",
"radioMode": "modeAC", "radioMode": "modeAC",
"mimoMode": "twoByTwo",
"wmmState": "enabled", "wmmState": "enabled",
"uapsdState": "enabled", "uapsdState": "enabled",
"maxNumClients": 100,
"stationIsolation": "disabled", "stationIsolation": "disabled",
"multicastRate": "auto",
"managementRate": "auto", "managementRate": "auto",
"activeScanSettings": {
"model_type": "ActiveScanSettings",
"enabled": true,
"scanFrequencySeconds": 10,
"scanDurationMillis": 65
},
"channelHopSettings": { "channelHopSettings": {
"model_type": "ChannelHopSettings", "model_type": "ChannelHopSettings",
"noiseFloorThresholdInDB": -75, "noiseFloorThresholdInDB": -75,
@@ -211,6 +240,7 @@
}, },
"forceScanDuringVoice": "disabled", "forceScanDuringVoice": "disabled",
"legacyBSSRate": "enabled", "legacyBSSRate": "enabled",
"beaconInterval": 100,
"deauthAttackDetection": null "deauthAttackDetection": null
}, },
"is5GHzL": { "is5GHzL": {
@@ -218,11 +248,22 @@
"radioType": "is5GHzL", "radioType": "is5GHzL",
"radioAdminState": "enabled", "radioAdminState": "enabled",
"fragmentationThresholdBytes": 2346, "fragmentationThresholdBytes": 2346,
"rtsCtsThreshold": 65535,
"autoChannelSelection": "disabled",
"radioMode": "modeAC", "radioMode": "modeAC",
"mimoMode": "twoByTwo",
"wmmState": "enabled", "wmmState": "enabled",
"uapsdState": "enabled", "uapsdState": "enabled",
"maxNumClients": 100,
"stationIsolation": "disabled", "stationIsolation": "disabled",
"multicastRate": "auto",
"managementRate": "auto", "managementRate": "auto",
"activeScanSettings": {
"model_type": "ActiveScanSettings",
"enabled": true,
"scanFrequencySeconds": 10,
"scanDurationMillis": 65
},
"channelHopSettings": { "channelHopSettings": {
"model_type": "ChannelHopSettings", "model_type": "ChannelHopSettings",
"noiseFloorThresholdInDB": -75, "noiseFloorThresholdInDB": -75,
@@ -239,6 +280,7 @@
}, },
"forceScanDuringVoice": "disabled", "forceScanDuringVoice": "disabled",
"legacyBSSRate": "enabled", "legacyBSSRate": "enabled",
"beaconInterval": 100,
"deauthAttackDetection": null "deauthAttackDetection": null
} }
} }

View File

@@ -49,7 +49,6 @@
"childProfileIds": [ "childProfileIds": [
6, 6,
7, 7,
8, 8
9
] ]
} }

View File

@@ -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": [
]
}
}

View File

@@ -22,6 +22,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component; 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.AutoOrManualValue;
import com.telecominfraproject.wlan.core.model.equipment.ChannelBandwidth; import com.telecominfraproject.wlan.core.model.equipment.ChannelBandwidth;
import com.telecominfraproject.wlan.core.model.equipment.MacAddress; 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.CaptivePortalConfiguration;
import com.telecominfraproject.wlan.profile.captiveportal.models.ManagedFileInfo; import com.telecominfraproject.wlan.profile.captiveportal.models.ManagedFileInfo;
import com.telecominfraproject.wlan.profile.models.Profile; 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.RadiusProfile;
import com.telecominfraproject.wlan.profile.radius.models.RadiusServer; import com.telecominfraproject.wlan.profile.radius.models.RadiusServer;
import com.telecominfraproject.wlan.profile.radius.models.RadiusServiceRegion; import com.telecominfraproject.wlan.profile.radius.models.RadiusServiceRegion;
@@ -1710,18 +1709,15 @@ public class OvsdbDao {
// radios on this AP // radios on this AP
// ;-) // ;-)
RfConfiguration rfConfig = (RfConfiguration) opensyncAPConfig.getRfProfile().getDetails();
ApElementConfiguration apElementConfiguration = (ApElementConfiguration) opensyncAPConfig.getCustomerEquipment() ApElementConfiguration apElementConfiguration = (ApElementConfiguration) opensyncAPConfig.getCustomerEquipment()
.getDetails(); .getDetails();
for (RadioType radioType : apElementConfiguration.getRadioMap().keySet()) { for (RadioType radioType : apElementConfiguration.getRadioMap().keySet()) {
Map<String, String> hwConfig = new HashMap<>(); Map<String, String> hwConfig = new HashMap<>();
RfElementConfiguration rfElementConfig = rfConfig.getRfConfig(radioType);
ElementRadioConfiguration elementRadioConfig = apElementConfiguration.getRadioMap().get(radioType); ElementRadioConfiguration elementRadioConfig = apElementConfiguration.getRadioMap().get(radioType);
int channel = elementRadioConfig.getChannelNumber(); int channel = elementRadioConfig.getChannelNumber();
ChannelBandwidth bandwidth = rfElementConfig.getChannelBandwidth(); ChannelBandwidth bandwidth = elementRadioConfig.getChannelBandwidth();
String ht_mode = null; String ht_mode = null;
switch (bandwidth) { switch (bandwidth) {
case is20MHz: case is20MHz:
@@ -1742,10 +1738,10 @@ public class OvsdbDao {
default: default:
ht_mode = null; ht_mode = null;
} }
rfElementConfig.getAutoChannelSelection(); elementRadioConfig.getAutoChannelSelection();
RadioConfiguration radioConfig = apElementConfiguration.getAdvancedRadioMap().get(radioType); RadioConfiguration radioConfig = apElementConfiguration.getAdvancedRadioMap().get(radioType);
int beaconInterval = rfElementConfig.getBeaconInterval(); int beaconInterval = radioConfig.getBeaconInterval();
boolean enabled = radioConfig.getRadioAdminState().equals(StateSetting.enabled); boolean enabled = radioConfig.getRadioAdminState().equals(StateSetting.enabled);
int txPower = 0; int txPower = 0;