From ac521191d60981c002ce9776901018c2d0264ae5 Mon Sep 17 00:00:00 2001 From: ralphlee Date: Thu, 24 Sep 2020 12:15:33 -0400 Subject: [PATCH] Adding RF profile structure --- .../integration/models/OpensyncAPConfig.java | 11 +++ .../OpensyncExternalIntegrationSimple.java | 9 ++ .../src/main/resources/ProfileAPExample.json | 3 +- .../src/main/resources/ProfileRf.json | 86 +++++++++++++++++++ 4 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 opensync-ext-static/src/main/resources/ProfileRf.json 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 8e812f5..3cb1a2f 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,6 +29,7 @@ public class OpensyncAPConfig extends BaseJsonModel { private Equipment customerEquipment; private Profile apProfile; + private Profile rfProfile; private List ssidProfile; private List radiusProfiles; private Location equipmentLocation; @@ -138,6 +139,14 @@ 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; @@ -195,6 +204,8 @@ 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 34b49e6..ecd6c3b 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 @@ -38,6 +38,9 @@ public class OpensyncExternalIntegrationSimple implements OpensyncExternalIntegr @Value("${tip.wlan.ovsdb.apProfileFileName:/app/config/ProfileAPExample.json}") private String apProfileFileName; + + @Value("${tip.wlan.ovsdb.apProfileFileName:/app/config/ProfileRf.json}") + private String rfProfileFileName; @Value("${tip.wlan.ovsdb.ssidProfileFileName:/app/config/ProfileSsid.json}") private String ssidProfileFileName; @@ -86,6 +89,11 @@ 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); @@ -123,6 +131,7 @@ public class OpensyncExternalIntegrationSimple implements OpensyncExternalIntegr ret = new OpensyncAPConfig(); ret.setCustomerEquipment(equipment); ret.setApProfile(apProfile); + ret.setRfProfile(rfProfile); ret.setSsidProfile(ssidProfiles); ret.setRadiusProfiles(radiusProfiles); ret.setEquipmentLocation(location); diff --git a/opensync-ext-static/src/main/resources/ProfileAPExample.json b/opensync-ext-static/src/main/resources/ProfileAPExample.json index 8420e24..fad16cd 100644 --- a/opensync-ext-static/src/main/resources/ProfileAPExample.json +++ b/opensync-ext-static/src/main/resources/ProfileAPExample.json @@ -49,6 +49,7 @@ "childProfileIds": [ 6, 7, - 8 + 8, + 9 ] } \ 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 new file mode 100644 index 0000000..7d0596b --- /dev/null +++ b/opensync-ext-static/src/main/resources/ProfileRf.json @@ -0,0 +1,86 @@ +{ + "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": [ + ] + } +}