mirror of
https://github.com/Telecominfraproject/wlan-cloud-opensync-controller.git
synced 2025-11-02 03:28:00 +00:00
Support for Metrics Profile
Added to OpensyncAPConfig Added Profiles for Static. Added handler in OvsdbClient to process. Currently not applying the values, uses the defaults still, but remaining functionality will come in subsequent updates.
This commit is contained in:
@@ -764,6 +764,8 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
|
|
||||||
ret.setSsidProfile(
|
ret.setSsidProfile(
|
||||||
profileContainer.getChildrenOfType(equipmentConfig.getProfileId(), ProfileType.ssid));
|
profileContainer.getChildrenOfType(equipmentConfig.getProfileId(), ProfileType.ssid));
|
||||||
|
|
||||||
|
ret.setMetricsProfiles(profileContainer.getChildrenOfType(equipmentConfig.getProfileId(), ProfileType.metrics));
|
||||||
|
|
||||||
Set<Profile> radiusSet = new HashSet<>();
|
Set<Profile> radiusSet = new HashSet<>();
|
||||||
Set<Long> captiveProfileIds = new HashSet<>();
|
Set<Long> captiveProfileIds = new HashSet<>();
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ public class OpensyncAPConfig extends BaseJsonModel {
|
|||||||
private Profile apProfile;
|
private Profile apProfile;
|
||||||
private Profile rfProfile;
|
private Profile rfProfile;
|
||||||
private List<Profile> ssidProfile;
|
private List<Profile> ssidProfile;
|
||||||
|
private List<Profile> metricsProfile;
|
||||||
private List<Profile> radiusProfiles;
|
private List<Profile> radiusProfiles;
|
||||||
private Location equipmentLocation;
|
private Location equipmentLocation;
|
||||||
private EquipmentRoutingRecord equipmentRouting;
|
private EquipmentRoutingRecord equipmentRouting;
|
||||||
@@ -195,6 +196,13 @@ public class OpensyncAPConfig extends BaseJsonModel {
|
|||||||
}
|
}
|
||||||
ret.ssidProfile = ssidList;
|
ret.ssidProfile = ssidList;
|
||||||
}
|
}
|
||||||
|
if (metricsProfile != null) {
|
||||||
|
List<Profile> metricsList = new ArrayList<Profile>();
|
||||||
|
for (Profile profile : metricsProfile) {
|
||||||
|
metricsList.add(profile.clone());
|
||||||
|
}
|
||||||
|
ret.metricsProfile = metricsList;
|
||||||
|
}
|
||||||
if (bonjourGatewayProfiles != null) {
|
if (bonjourGatewayProfiles != null) {
|
||||||
List<Profile> bonjourGatewayProfilesList = new ArrayList<Profile>();
|
List<Profile> bonjourGatewayProfilesList = new ArrayList<Profile>();
|
||||||
for (Profile profile : bonjourGatewayProfiles) {
|
for (Profile profile : bonjourGatewayProfiles) {
|
||||||
@@ -255,4 +263,12 @@ public class OpensyncAPConfig extends BaseJsonModel {
|
|||||||
public void setBlockedClients(List<MacAddress> blockedClients) {
|
public void setBlockedClients(List<MacAddress> blockedClients) {
|
||||||
this.blockedClients = blockedClients;
|
this.blockedClients = blockedClients;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setMetricsProfiles(List<Profile> metricsProfileList) {
|
||||||
|
metricsProfile = metricsProfileList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Profile> getMetricsProfiles() {
|
||||||
|
return metricsProfile;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,6 +45,9 @@ 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/ProfileMetrics.json}")
|
||||||
|
private String metricsProfileFileName;
|
||||||
|
|
||||||
@Value("${tip.wlan.ovsdb.radiusProfileFileName:/app/config/ProfileRadius.json}")
|
@Value("${tip.wlan.ovsdb.radiusProfileFileName:/app/config/ProfileRadius.json}")
|
||||||
private String radiusProfileFileName;
|
private String radiusProfileFileName;
|
||||||
|
|
||||||
@@ -99,6 +102,9 @@ public class OpensyncExternalIntegrationSimple implements OpensyncExternalIntegr
|
|||||||
.listFromFile(ssidProfileFileName, com.telecominfraproject.wlan.profile.models.Profile.class);
|
.listFromFile(ssidProfileFileName, com.telecominfraproject.wlan.profile.models.Profile.class);
|
||||||
|
|
||||||
ssidProfiles.stream().forEach(p -> apProfile.getChildProfileIds().add(p.getId()));
|
ssidProfiles.stream().forEach(p -> apProfile.getChildProfileIds().add(p.getId()));
|
||||||
|
|
||||||
|
List<com.telecominfraproject.wlan.profile.models.Profile> metricsProfiles = com.telecominfraproject.wlan.profile.models.Profile
|
||||||
|
.listFromFile(metricsProfileFileName, com.telecominfraproject.wlan.profile.models.Profile.class);
|
||||||
|
|
||||||
List<com.telecominfraproject.wlan.profile.models.Profile> radiusProfiles = com.telecominfraproject.wlan.profile.models.Profile
|
List<com.telecominfraproject.wlan.profile.models.Profile> radiusProfiles = com.telecominfraproject.wlan.profile.models.Profile
|
||||||
.listFromFile(radiusProfileFileName, com.telecominfraproject.wlan.profile.models.Profile.class);
|
.listFromFile(radiusProfileFileName, com.telecominfraproject.wlan.profile.models.Profile.class);
|
||||||
@@ -132,6 +138,7 @@ public class OpensyncExternalIntegrationSimple implements OpensyncExternalIntegr
|
|||||||
ret.setCustomerEquipment(equipment);
|
ret.setCustomerEquipment(equipment);
|
||||||
ret.setApProfile(apProfile);
|
ret.setApProfile(apProfile);
|
||||||
ret.setRfProfile(rfProfile);
|
ret.setRfProfile(rfProfile);
|
||||||
|
ret.setMetricsProfiles(metricsProfiles);
|
||||||
ret.setSsidProfile(ssidProfiles);
|
ret.setSsidProfile(ssidProfiles);
|
||||||
ret.setRadiusProfiles(radiusProfiles);
|
ret.setRadiusProfiles(radiusProfiles);
|
||||||
ret.setEquipmentLocation(location);
|
ret.setEquipmentLocation(location);
|
||||||
|
|||||||
53
opensync-ext-static/src/main/resources/ProfileMetrics.json
Normal file
53
opensync-ext-static/src/main/resources/ProfileMetrics.json
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"model_type": "Profile",
|
||||||
|
"id": 222,
|
||||||
|
"customerId": 2,
|
||||||
|
"profileType": "metrics",
|
||||||
|
"name": "Metrics-Profile-3-radios",
|
||||||
|
"details": {
|
||||||
|
"model_type": "ServiceMetricsCollectionConfigProfile",
|
||||||
|
"radioTypeList": [
|
||||||
|
"is2dot4GHz",
|
||||||
|
"is5GHzL",
|
||||||
|
"is5GHzU"
|
||||||
|
],
|
||||||
|
"metricConfigParameterMap": {
|
||||||
|
"Neighbour": {
|
||||||
|
"model_type": "ServiceMetricConfigParameters",
|
||||||
|
"serviceMetricDataType": "Neighbour",
|
||||||
|
"samplingInterval": 30,
|
||||||
|
"reportingIntervalSeconds": 60
|
||||||
|
},
|
||||||
|
"ApSsid": {
|
||||||
|
"model_type": "ServiceMetricConfigParameters",
|
||||||
|
"serviceMetricDataType": "ApSsid",
|
||||||
|
"samplingInterval": 30,
|
||||||
|
"reportingIntervalSeconds": 60
|
||||||
|
},
|
||||||
|
"Channel": {
|
||||||
|
"model_type": "ServiceMetricConfigParameters",
|
||||||
|
"serviceMetricDataType": "Channel",
|
||||||
|
"samplingInterval": 30,
|
||||||
|
"reportingIntervalSeconds": 60
|
||||||
|
},
|
||||||
|
"ApNode": {
|
||||||
|
"model_type": "ServiceMetricConfigParameters",
|
||||||
|
"serviceMetricDataType": "ApNode",
|
||||||
|
"samplingInterval": 30,
|
||||||
|
"reportingIntervalSeconds": 60
|
||||||
|
},
|
||||||
|
"Client": {
|
||||||
|
"model_type": "ServiceMetricConfigParameters",
|
||||||
|
"serviceMetricDataType": "Client",
|
||||||
|
"samplingInterval": 30,
|
||||||
|
"reportingIntervalSeconds": 60
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"profileType": "metrics"
|
||||||
|
},
|
||||||
|
"createdTimestamp": 1601066846980,
|
||||||
|
"lastModifiedTimestamp": 1601066846980,
|
||||||
|
"childProfileIds": []
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -201,6 +201,7 @@
|
|||||||
"forceScanDuringVoice": "disabled",
|
"forceScanDuringVoice": "disabled",
|
||||||
"legacyBSSRate": "enabled",
|
"legacyBSSRate": "enabled",
|
||||||
"beaconInterval": 100,
|
"beaconInterval": 100,
|
||||||
|
"dtimPeriod": 2,
|
||||||
"deauthAttackDetection": null
|
"deauthAttackDetection": null
|
||||||
},
|
},
|
||||||
"is5GHzU": {
|
"is5GHzU": {
|
||||||
@@ -241,6 +242,7 @@
|
|||||||
"forceScanDuringVoice": "disabled",
|
"forceScanDuringVoice": "disabled",
|
||||||
"legacyBSSRate": "enabled",
|
"legacyBSSRate": "enabled",
|
||||||
"beaconInterval": 100,
|
"beaconInterval": 100,
|
||||||
|
"dtimPeriod": 2,
|
||||||
"deauthAttackDetection": null
|
"deauthAttackDetection": null
|
||||||
},
|
},
|
||||||
"is5GHzL": {
|
"is5GHzL": {
|
||||||
@@ -281,6 +283,7 @@
|
|||||||
"forceScanDuringVoice": "disabled",
|
"forceScanDuringVoice": "disabled",
|
||||||
"legacyBSSRate": "enabled",
|
"legacyBSSRate": "enabled",
|
||||||
"beaconInterval": 100,
|
"beaconInterval": 100,
|
||||||
|
"dtimPeriod": 2,
|
||||||
"deauthAttackDetection": null
|
"deauthAttackDetection": null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"model_type": "Profile",
|
||||||
|
"id": 222,
|
||||||
|
"customerId": 2,
|
||||||
|
"profileType": "metrics",
|
||||||
|
"name": "Metrics-Profile-3-radios",
|
||||||
|
"details": {
|
||||||
|
"model_type": "ServiceMetricsCollectionConfigProfile",
|
||||||
|
"radioTypeList": [
|
||||||
|
"is2dot4GHz",
|
||||||
|
"is5GHzL",
|
||||||
|
"is5GHzU"
|
||||||
|
],
|
||||||
|
"metricConfigParameterMap": {
|
||||||
|
"Neighbour": {
|
||||||
|
"model_type": "ServiceMetricConfigParameters",
|
||||||
|
"serviceMetricDataType": "Neighbour",
|
||||||
|
"samplingInterval": 30,
|
||||||
|
"reportingIntervalSeconds": 60
|
||||||
|
},
|
||||||
|
"ApSsid": {
|
||||||
|
"model_type": "ServiceMetricConfigParameters",
|
||||||
|
"serviceMetricDataType": "ApSsid",
|
||||||
|
"samplingInterval": 30,
|
||||||
|
"reportingIntervalSeconds": 60
|
||||||
|
},
|
||||||
|
"Channel": {
|
||||||
|
"model_type": "ServiceMetricConfigParameters",
|
||||||
|
"serviceMetricDataType": "Channel",
|
||||||
|
"samplingInterval": 30,
|
||||||
|
"reportingIntervalSeconds": 60
|
||||||
|
},
|
||||||
|
"ApNode": {
|
||||||
|
"model_type": "ServiceMetricConfigParameters",
|
||||||
|
"serviceMetricDataType": "ApNode",
|
||||||
|
"samplingInterval": 30,
|
||||||
|
"reportingIntervalSeconds": 60
|
||||||
|
},
|
||||||
|
"Client": {
|
||||||
|
"model_type": "ServiceMetricConfigParameters",
|
||||||
|
"serviceMetricDataType": "Client",
|
||||||
|
"samplingInterval": 30,
|
||||||
|
"reportingIntervalSeconds": 60
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"profileType": "metrics"
|
||||||
|
},
|
||||||
|
"createdTimestamp": 1601066846980,
|
||||||
|
"lastModifiedTimestamp": 1601066846980,
|
||||||
|
"childProfileIds": []
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -201,6 +201,7 @@
|
|||||||
"forceScanDuringVoice": "disabled",
|
"forceScanDuringVoice": "disabled",
|
||||||
"legacyBSSRate": "enabled",
|
"legacyBSSRate": "enabled",
|
||||||
"beaconInterval": 100,
|
"beaconInterval": 100,
|
||||||
|
"dtimPeriod": 2,
|
||||||
"deauthAttackDetection": null
|
"deauthAttackDetection": null
|
||||||
},
|
},
|
||||||
"is5GHzU": {
|
"is5GHzU": {
|
||||||
@@ -241,6 +242,7 @@
|
|||||||
"forceScanDuringVoice": "disabled",
|
"forceScanDuringVoice": "disabled",
|
||||||
"legacyBSSRate": "enabled",
|
"legacyBSSRate": "enabled",
|
||||||
"beaconInterval": 100,
|
"beaconInterval": 100,
|
||||||
|
"dtimPeriod": 2,
|
||||||
"deauthAttackDetection": null
|
"deauthAttackDetection": null
|
||||||
},
|
},
|
||||||
"is5GHzL": {
|
"is5GHzL": {
|
||||||
@@ -281,6 +283,7 @@
|
|||||||
"forceScanDuringVoice": "disabled",
|
"forceScanDuringVoice": "disabled",
|
||||||
"legacyBSSRate": "enabled",
|
"legacyBSSRate": "enabled",
|
||||||
"beaconInterval": 100,
|
"beaconInterval": 100,
|
||||||
|
"dtimPeriod": 2,
|
||||||
"deauthAttackDetection": null
|
"deauthAttackDetection": null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"model_type": "Profile",
|
||||||
|
"id": 222,
|
||||||
|
"customerId": 2,
|
||||||
|
"profileType": "metrics",
|
||||||
|
"name": "Metrics-Profile-3-radios",
|
||||||
|
"details": {
|
||||||
|
"model_type": "ServiceMetricsCollectionConfigProfile",
|
||||||
|
"radioTypeList": [
|
||||||
|
"is2dot4GHz",
|
||||||
|
"is5GHzL",
|
||||||
|
"is5GHzU"
|
||||||
|
],
|
||||||
|
"metricConfigParameterMap": {
|
||||||
|
"Neighbour": {
|
||||||
|
"model_type": "ServiceMetricConfigParameters",
|
||||||
|
"serviceMetricDataType": "Neighbour",
|
||||||
|
"samplingInterval": 30,
|
||||||
|
"reportingIntervalSeconds": 60
|
||||||
|
},
|
||||||
|
"ApSsid": {
|
||||||
|
"model_type": "ServiceMetricConfigParameters",
|
||||||
|
"serviceMetricDataType": "ApSsid",
|
||||||
|
"samplingInterval": 30,
|
||||||
|
"reportingIntervalSeconds": 60
|
||||||
|
},
|
||||||
|
"Channel": {
|
||||||
|
"model_type": "ServiceMetricConfigParameters",
|
||||||
|
"serviceMetricDataType": "Channel",
|
||||||
|
"samplingInterval": 30,
|
||||||
|
"reportingIntervalSeconds": 60
|
||||||
|
},
|
||||||
|
"ApNode": {
|
||||||
|
"model_type": "ServiceMetricConfigParameters",
|
||||||
|
"serviceMetricDataType": "ApNode",
|
||||||
|
"samplingInterval": 30,
|
||||||
|
"reportingIntervalSeconds": 60
|
||||||
|
},
|
||||||
|
"Client": {
|
||||||
|
"model_type": "ServiceMetricConfigParameters",
|
||||||
|
"serviceMetricDataType": "Client",
|
||||||
|
"samplingInterval": 30,
|
||||||
|
"reportingIntervalSeconds": 60
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"profileType": "metrics"
|
||||||
|
},
|
||||||
|
"createdTimestamp": 1601066846980,
|
||||||
|
"lastModifiedTimestamp": 1601066846980,
|
||||||
|
"childProfileIds": []
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -201,6 +201,7 @@
|
|||||||
"forceScanDuringVoice": "disabled",
|
"forceScanDuringVoice": "disabled",
|
||||||
"legacyBSSRate": "enabled",
|
"legacyBSSRate": "enabled",
|
||||||
"beaconInterval": 100,
|
"beaconInterval": 100,
|
||||||
|
"dtimPeriod": 2,
|
||||||
"deauthAttackDetection": null
|
"deauthAttackDetection": null
|
||||||
},
|
},
|
||||||
"is5GHzU": {
|
"is5GHzU": {
|
||||||
@@ -241,6 +242,7 @@
|
|||||||
"forceScanDuringVoice": "disabled",
|
"forceScanDuringVoice": "disabled",
|
||||||
"legacyBSSRate": "enabled",
|
"legacyBSSRate": "enabled",
|
||||||
"beaconInterval": 100,
|
"beaconInterval": 100,
|
||||||
|
"dtimPeriod": 2,
|
||||||
"deauthAttackDetection": null
|
"deauthAttackDetection": null
|
||||||
},
|
},
|
||||||
"is5GHzL": {
|
"is5GHzL": {
|
||||||
@@ -281,6 +283,7 @@
|
|||||||
"forceScanDuringVoice": "disabled",
|
"forceScanDuringVoice": "disabled",
|
||||||
"legacyBSSRate": "enabled",
|
"legacyBSSRate": "enabled",
|
||||||
"beaconInterval": 100,
|
"beaconInterval": 100,
|
||||||
|
"dtimPeriod": 2,
|
||||||
"deauthAttackDetection": null
|
"deauthAttackDetection": null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ovsdbDao.removeAllStatsConfigs(ovsdbClient); // always
|
ovsdbDao.removeAllStatsConfigs(ovsdbClient); // always
|
||||||
ovsdbDao.configureStats(ovsdbClient);
|
ovsdbDao.configureStatsFromProfile(ovsdbClient, opensyncAPConfig);
|
||||||
|
|
||||||
// Check if device stats is configured in Wifi_Stats_Config table,
|
// Check if device stats is configured in Wifi_Stats_Config table,
|
||||||
// provision it
|
// provision it
|
||||||
@@ -273,7 +273,7 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
|
|||||||
ovsdbDao.configureInterfaces(ovsdbClient);
|
ovsdbDao.configureInterfaces(ovsdbClient);
|
||||||
ovsdbDao.configureSsids(ovsdbClient, opensyncAPConfig);
|
ovsdbDao.configureSsids(ovsdbClient, opensyncAPConfig);
|
||||||
ovsdbDao.configureWifiRrm(ovsdbClient, opensyncAPConfig);
|
ovsdbDao.configureWifiRrm(ovsdbClient, opensyncAPConfig);
|
||||||
ovsdbDao.configureStats(ovsdbClient);
|
ovsdbDao.configureStatsFromProfile(ovsdbClient,opensyncAPConfig);
|
||||||
|
|
||||||
// Check if device stats is configured in Wifi_Stats_Config table,
|
// Check if device stats is configured in Wifi_Stats_Config table,
|
||||||
// provision it
|
// provision it
|
||||||
|
|||||||
@@ -60,6 +60,8 @@ import com.telecominfraproject.wlan.profile.bonjour.models.BonjourServiceSet;
|
|||||||
import com.telecominfraproject.wlan.profile.captiveportal.models.CaptivePortalAuthenticationType;
|
import com.telecominfraproject.wlan.profile.captiveportal.models.CaptivePortalAuthenticationType;
|
||||||
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.metrics.ServiceMetricConfigParameters;
|
||||||
|
import com.telecominfraproject.wlan.profile.metrics.ServiceMetricsCollectionConfigProfile;
|
||||||
import com.telecominfraproject.wlan.profile.models.Profile;
|
import com.telecominfraproject.wlan.profile.models.Profile;
|
||||||
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;
|
||||||
@@ -2383,8 +2385,8 @@ public class OvsdbDao {
|
|||||||
int keyRefresh, boolean uapsdEnabled, boolean apBridge, NetworkForwardMode networkForwardMode,
|
int keyRefresh, boolean uapsdEnabled, boolean apBridge, NetworkForwardMode networkForwardMode,
|
||||||
String gateway, String inet, Map<String, String> dns, String ipAssignScheme, List<MacAddress> macBlockList,
|
String gateway, String inet, Map<String, String> dns, String ipAssignScheme, List<MacAddress> macBlockList,
|
||||||
boolean rateLimitEnable, int ssidDlLimit, int ssidUlLimit, int clientDlLimit, int clientUlLimit,
|
boolean rateLimitEnable, int ssidDlLimit, int ssidUlLimit, int clientDlLimit, int clientUlLimit,
|
||||||
int rtsCtsThreshold, int fragThresholdBytes, int dtimPeriod, Map<String, String> captiveMap, List<String> walledGardenAllowlist,
|
int rtsCtsThreshold, int fragThresholdBytes, int dtimPeriod, Map<String, String> captiveMap,
|
||||||
Map<Short, Set<String>> bonjourServiceMap) {
|
List<String> walledGardenAllowlist, Map<Short, Set<String>> bonjourServiceMap) {
|
||||||
|
|
||||||
List<Operation> operations = new ArrayList<>();
|
List<Operation> operations = new ArrayList<>();
|
||||||
Map<String, Value> updateColumns = new HashMap<>();
|
Map<String, Value> updateColumns = new HashMap<>();
|
||||||
@@ -2484,10 +2486,10 @@ public class OvsdbDao {
|
|||||||
customOptions.put("ssid_dl_limit", String.valueOf(ssidDlLimit * 1000));
|
customOptions.put("ssid_dl_limit", String.valueOf(ssidDlLimit * 1000));
|
||||||
customOptions.put("client_dl_limit", String.valueOf(clientDlLimit * 1000));
|
customOptions.put("client_dl_limit", String.valueOf(clientDlLimit * 1000));
|
||||||
customOptions.put("client_ul_limit", String.valueOf(clientUlLimit * 1000));
|
customOptions.put("client_ul_limit", String.valueOf(clientUlLimit * 1000));
|
||||||
customOptions.put("rts_threshold", String.valueOf(rtsCtsThreshold));
|
customOptions.put("rts_threshold", String.valueOf(rtsCtsThreshold));
|
||||||
customOptions.put("frag_threshold", String.valueOf(fragThresholdBytes));
|
customOptions.put("frag_threshold", String.valueOf(fragThresholdBytes));
|
||||||
customOptions.put("dtim_period", String.valueOf(dtimPeriod));
|
customOptions.put("dtim_period", String.valueOf(dtimPeriod));
|
||||||
|
|
||||||
|
|
||||||
if (enable80211k) {
|
if (enable80211k) {
|
||||||
customOptions.put("ieee80211k", String.valueOf(1));
|
customOptions.put("ieee80211k", String.valueOf(1));
|
||||||
@@ -2903,8 +2905,8 @@ public class OvsdbDao {
|
|||||||
ssidConfig.getVlanId(), rrmEnabled, enable80211r, mobilityDomain, enable80211v,
|
ssidConfig.getVlanId(), rrmEnabled, enable80211r, mobilityDomain, enable80211v,
|
||||||
enable80211k, minHwMode, enabled, keyRefresh, uapsdEnabled, apBridge,
|
enable80211k, minHwMode, enabled, keyRefresh, uapsdEnabled, apBridge,
|
||||||
ssidConfig.getForwardMode(), gateway, inet, dns, ipAssignScheme, macBlockList,
|
ssidConfig.getForwardMode(), gateway, inet, dns, ipAssignScheme, macBlockList,
|
||||||
rateLimitEnable, ssidDlLimit, ssidUlLimit, clientDlLimit, clientUlLimit, rtsCtsThreshold,fragThresholdBytes,dtimPeriod,
|
rateLimitEnable, ssidDlLimit, ssidUlLimit, clientDlLimit, clientUlLimit, rtsCtsThreshold,
|
||||||
captiveMap, walledGardenAllowlist, bonjourServiceMap);
|
fragThresholdBytes, dtimPeriod, captiveMap, walledGardenAllowlist, bonjourServiceMap);
|
||||||
|
|
||||||
} catch (IllegalStateException e) {
|
} catch (IllegalStateException e) {
|
||||||
// could not provision this SSID, but still can go on
|
// could not provision this SSID, but still can go on
|
||||||
@@ -3228,6 +3230,38 @@ public class OvsdbDao {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void configureStatsFromProfile(OvsdbClient ovsdbClient, OpensyncAPConfig opensyncApConfig) {
|
||||||
|
|
||||||
|
|
||||||
|
if (opensyncApConfig.getMetricsProfiles().isEmpty()) {
|
||||||
|
configureStats(ovsdbClient);
|
||||||
|
} else {
|
||||||
|
|
||||||
|
for (Profile metricsProfile : opensyncApConfig.getMetricsProfiles()) {
|
||||||
|
|
||||||
|
|
||||||
|
ServiceMetricsCollectionConfigProfile details = ((ServiceMetricsCollectionConfigProfile) metricsProfile
|
||||||
|
.getDetails());
|
||||||
|
|
||||||
|
for (Entry<String, ServiceMetricConfigParameters> entry : details.getMetricConfigParameterMap()
|
||||||
|
.entrySet()) {
|
||||||
|
|
||||||
|
//TODO: implement me
|
||||||
|
LOG.debug("Metrics Config Map Entry {}", entry);
|
||||||
|
configureStats(ovsdbClient); // replace with profile values
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public void configureStats(OvsdbClient ovsdbClient) {
|
public void configureStats(OvsdbClient ovsdbClient) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ public class OpensyncGatewayTipWlanOvsdbClientTest {
|
|||||||
Mockito.verify(ovsdbDao).removeAllStatsConfigs(ovsdbClient);
|
Mockito.verify(ovsdbDao).removeAllStatsConfigs(ovsdbClient);
|
||||||
Mockito.verify(ovsdbDao).configureWifiRadios(ovsdbClient, apConfig);
|
Mockito.verify(ovsdbDao).configureWifiRadios(ovsdbClient, apConfig);
|
||||||
Mockito.verify(ovsdbDao).configureSsids(ovsdbClient, apConfig);
|
Mockito.verify(ovsdbDao).configureSsids(ovsdbClient, apConfig);
|
||||||
Mockito.verify(ovsdbDao).configureStats(ovsdbClient);
|
Mockito.verify(ovsdbDao).configureStatsFromProfile(ovsdbClient, apConfig);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user