mirror of
https://github.com/Telecominfraproject/wlan-cloud-services.git
synced 2026-03-20 19:39:19 +00:00
Compare commits
10 Commits
InventoryI
...
WIFI-7323
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f65370a0dd | ||
|
|
1502913097 | ||
|
|
27e7c0173a | ||
|
|
051458b9d4 | ||
|
|
d98d5a2ad3 | ||
|
|
dda25eac2e | ||
|
|
c8c3e85a55 | ||
|
|
d5df9485f6 | ||
|
|
83e4f3613a | ||
|
|
aa77c4a2d5 |
@@ -3422,6 +3422,16 @@ components:
|
||||
type: integer
|
||||
format: int64
|
||||
|
||||
ChannelBandwidthPerRadioTypeMap:
|
||||
properties:
|
||||
is5GHz:
|
||||
$ref: '#/components/schemas/ChannelBandwidth'
|
||||
is5GHzU:
|
||||
$ref: '#/components/schemas/ChannelBandwidth'
|
||||
is5GHzL:
|
||||
$ref: '#/components/schemas/ChannelBandwidth'
|
||||
is2dot4GHz:
|
||||
$ref: '#/components/schemas/ChannelBandwidth'
|
||||
|
||||
EquipmentAdminStatusData:
|
||||
type: object
|
||||
@@ -4381,6 +4391,8 @@ components:
|
||||
- RADIO_CHANNEL
|
||||
channelNumberStatusDataMap:
|
||||
$ref: '#/components/schemas/IntegerPerRadioTypeMap'
|
||||
channelBandwidthStatusDataMap:
|
||||
$ref: '#/components/schemas/ChannelBandwidthPerRadioTypeMap'
|
||||
txPowerDataMap:
|
||||
$ref: '#/components/schemas/IntegerPerRadioTypeMap'
|
||||
|
||||
@@ -5675,28 +5687,5 @@ paths:
|
||||
items:
|
||||
$ref: '#/components/schemas/GenericResponse'
|
||||
500:
|
||||
$ref: '#/components/responses/GenericApiError'
|
||||
|
||||
$ref: '#/components/responses/GenericApiError'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1804,6 +1804,8 @@ components:
|
||||
type: boolean
|
||||
equipmentDiscovery:
|
||||
type: boolean
|
||||
dynamicRadiusProxyEnabled:
|
||||
type: boolean
|
||||
greTunnelConfigurations:
|
||||
type: array
|
||||
items:
|
||||
@@ -1867,6 +1869,9 @@ components:
|
||||
sharedSecret:
|
||||
type: string
|
||||
format: password
|
||||
radiusProxySecret:
|
||||
type: string
|
||||
format: password
|
||||
dynamicDiscovery:
|
||||
description: Dynamic discovery of HSP and IdPs (home service and identity providers). Regardless of configured value, this will only be set 'true' on the AP if useRadSec is also true.
|
||||
type: boolean
|
||||
@@ -3330,7 +3335,17 @@ components:
|
||||
type: integer
|
||||
format: int64
|
||||
|
||||
|
||||
ChannelBandwidthPerRadioTypeMap:
|
||||
properties:
|
||||
is5GHz:
|
||||
$ref: '#/components/schemas/ChannelBandwidth'
|
||||
is5GHzU:
|
||||
$ref: '#/components/schemas/ChannelBandwidth'
|
||||
is5GHzL:
|
||||
$ref: '#/components/schemas/ChannelBandwidth'
|
||||
is2dot4GHz:
|
||||
$ref: '#/components/schemas/ChannelBandwidth'
|
||||
|
||||
EquipmentAdminStatusData:
|
||||
type: object
|
||||
properties:
|
||||
@@ -4318,6 +4333,8 @@ components:
|
||||
- RADIO_CHANNEL
|
||||
channelNumberStatusDataMap:
|
||||
$ref: '#/components/schemas/IntegerPerRadioTypeMap'
|
||||
channelBandwidthStatusDataMap:
|
||||
$ref: '#/components/schemas/ChannelBandwidthPerRadioTypeMap'
|
||||
txPowerDataMap:
|
||||
$ref: '#/components/schemas/IntegerPerRadioTypeMap'
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ public class ApNetworkConfiguration extends CommonNetworkConfiguration
|
||||
public static final Boolean DEFAULT_SYNTHETIC_CLIENT_ENABLED = Boolean.TRUE;
|
||||
public static final Boolean DEFAULT_LED_CONTROL_ENABLED = Boolean.TRUE;
|
||||
public static final Boolean DEFAULT_EQUIPMENT_DISCOVERY_ENABLED = Boolean.FALSE;
|
||||
public static final Boolean DEFAULT_DYNAMIC_RADIUS_PROXY_ENABLED = Boolean.FALSE;
|
||||
|
||||
/**
|
||||
* Added as a profile level setting that can be used to provide
|
||||
@@ -59,6 +60,7 @@ public class ApNetworkConfiguration extends CommonNetworkConfiguration
|
||||
setSyntheticClientEnabled(DEFAULT_SYNTHETIC_CLIENT_ENABLED);
|
||||
setLedControlEnabled(DEFAULT_LED_CONTROL_ENABLED);
|
||||
setEquipmentDiscovery(DEFAULT_EQUIPMENT_DISCOVERY_ENABLED);
|
||||
setDynamicRadiusProxyEnabled(DEFAULT_DYNAMIC_RADIUS_PROXY_ENABLED);
|
||||
|
||||
// initialize the profile level radio map settings parameter
|
||||
radioMap = new EnumMap<>(RadioType.class);
|
||||
|
||||
@@ -23,6 +23,7 @@ public abstract class CommonNetworkConfiguration extends ProfileDetails {
|
||||
private Boolean syntheticClientEnabled;
|
||||
private Boolean ledControlEnabled;
|
||||
private Boolean equipmentDiscovery;
|
||||
private Boolean dynamicRadiusProxyEnabled;
|
||||
|
||||
public CommonNetworkConfiguration() {
|
||||
}
|
||||
@@ -67,7 +68,6 @@ public abstract class CommonNetworkConfiguration extends ProfileDetails {
|
||||
this.vlanNative = bool;
|
||||
}
|
||||
|
||||
|
||||
public AutoOrManualString getNtpServer() {
|
||||
return ntpServer;
|
||||
}
|
||||
@@ -92,7 +92,6 @@ public abstract class CommonNetworkConfiguration extends ProfileDetails {
|
||||
this.syntheticClientEnabled = syntheticClientEnabled;
|
||||
}
|
||||
|
||||
|
||||
public Boolean isLedControlEnabled() {
|
||||
return ledControlEnabled;
|
||||
}
|
||||
@@ -108,6 +107,23 @@ public abstract class CommonNetworkConfiguration extends ProfileDetails {
|
||||
public void setRtlsSettings(RtlsSettings rtlsSettings) {
|
||||
this.rtlsSettings = rtlsSettings;
|
||||
}
|
||||
|
||||
public Boolean isDynamicRadiusProxyEnabled() {
|
||||
return dynamicRadiusProxyEnabled;
|
||||
}
|
||||
|
||||
public void setDynamicRadiusProxyEnabled(Boolean dynamicRadiusProxyEnabled) {
|
||||
this.dynamicRadiusProxyEnabled = dynamicRadiusProxyEnabled;
|
||||
}
|
||||
|
||||
public Boolean getEquipmentDiscovery() {
|
||||
return equipmentDiscovery;
|
||||
}
|
||||
|
||||
public void setEquipmentDiscovery(Boolean equipmentDiscovery) {
|
||||
this.equipmentDiscovery = equipmentDiscovery;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public CommonNetworkConfiguration clone() {
|
||||
@@ -124,7 +140,9 @@ public abstract class CommonNetworkConfiguration extends ProfileDetails {
|
||||
ret.setVlan(getVlan());
|
||||
ret.setVlanNative(isVlanNative());
|
||||
ret.setSyntheticClientEnabled(getSyntheticClientEnabled());
|
||||
|
||||
ret.setLedControlEnabled(isLedControlEnabled());
|
||||
ret.setEquipmentDiscovery(getEquipmentDiscovery());
|
||||
ret.setDynamicRadiusProxyEnabled(isDynamicRadiusProxyEnabled());
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -145,26 +163,10 @@ public abstract class CommonNetworkConfiguration extends ProfileDetails {
|
||||
return false;
|
||||
}
|
||||
|
||||
public Boolean getEquipmentDiscovery() {
|
||||
return equipmentDiscovery;
|
||||
}
|
||||
|
||||
public void setEquipmentDiscovery(Boolean equipmentDiscovery) {
|
||||
this.equipmentDiscovery = equipmentDiscovery;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public Boolean getVlanNative() {
|
||||
return vlanNative;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(equipmentDiscovery, equipmentType, ledControlEnabled, networkConfigVersion, ntpServer, rtlsSettings,
|
||||
syntheticClientEnabled, syslogRelay, vlan, vlanNative);
|
||||
syntheticClientEnabled, syslogRelay, vlan, vlanNative, dynamicRadiusProxyEnabled);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -183,7 +185,8 @@ public abstract class CommonNetworkConfiguration extends ProfileDetails {
|
||||
&& Objects.equals(ntpServer, other.ntpServer) && Objects.equals(rtlsSettings, other.rtlsSettings)
|
||||
&& Objects.equals(syntheticClientEnabled, other.syntheticClientEnabled)
|
||||
&& Objects.equals(syslogRelay, other.syslogRelay) && vlan == other.vlan
|
||||
&& Objects.equals(vlanNative, other.vlanNative);
|
||||
&& Objects.equals(vlanNative, other.vlanNative)
|
||||
&& Objects.equals(dynamicRadiusProxyEnabled, other.dynamicRadiusProxyEnabled);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ public class RadiusProxyConfiguration extends BaseJsonModel implements PushableC
|
||||
private Boolean useRadSec;
|
||||
private String sharedSecret; // if useRadSec is false
|
||||
private String acctSharedSecret; // if useRadSec is false
|
||||
private String radiusProxySecret;
|
||||
private Boolean dynamicDiscovery; // dynamic discovery of HSP and IdPs (home service and identity providers).
|
||||
// regardless of configured value, this will only be set 'true' on the AP if useRadSec is also true.
|
||||
|
||||
@@ -145,6 +146,14 @@ public class RadiusProxyConfiguration extends BaseJsonModel implements PushableC
|
||||
public void setAcctSharedSecret(String acctSharedSecret) {
|
||||
this.acctSharedSecret = acctSharedSecret;
|
||||
}
|
||||
|
||||
public String getRadiusProxySecret() {
|
||||
return radiusProxySecret;
|
||||
}
|
||||
|
||||
public void setRadiusProxySecret(String radiusProxySecret) {
|
||||
this.radiusProxySecret = radiusProxySecret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the dynamicDiscovery
|
||||
@@ -174,7 +183,7 @@ public class RadiusProxyConfiguration extends BaseJsonModel implements PushableC
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(acctPort, acctServer, acctSharedSecret, caCert, clientCert, clientKey, dynamicDiscovery, name, passphrase, port, realm, server,
|
||||
sharedSecret, useRadSec);
|
||||
sharedSecret, useRadSec, radiusProxySecret);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -191,7 +200,8 @@ public class RadiusProxyConfiguration extends BaseJsonModel implements PushableC
|
||||
&& Objects.equals(clientCert, other.clientCert) && Objects.equals(clientKey, other.clientKey)
|
||||
&& Objects.equals(dynamicDiscovery, other.dynamicDiscovery) && Objects.equals(name, other.name) && Objects.equals(passphrase, other.passphrase)
|
||||
&& Objects.equals(port, other.port) && Objects.equals(realm, other.realm) && Objects.equals(server, other.server)
|
||||
&& Objects.equals(sharedSecret, other.sharedSecret) && Objects.equals(useRadSec, other.useRadSec);
|
||||
&& Objects.equals(sharedSecret, other.sharedSecret) && Objects.equals(useRadSec, other.useRadSec)
|
||||
&& Objects.equals(radiusProxySecret, other.radiusProxySecret);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -327,17 +327,16 @@ public class RfElementConfiguration extends BaseJsonModel {
|
||||
this.minAutoCellSize = minAutoCellSize;
|
||||
}
|
||||
|
||||
//Always return default value
|
||||
public Integer getMaxAutoCellSize() {
|
||||
if (maxAutoCellSize == null) {
|
||||
if (MAX_CELL_SIZE_MAP.containsKey(this.radioType)) {
|
||||
return MAX_CELL_SIZE_MAP.get(this.radioType);
|
||||
} else {
|
||||
return MAX_CELL_SIZE_MAP.get(RadioType.is2dot4GHz);
|
||||
}
|
||||
if (MAX_CELL_SIZE_MAP.containsKey(this.radioType)) {
|
||||
return MAX_CELL_SIZE_MAP.get(this.radioType);
|
||||
} else {
|
||||
return MAX_CELL_SIZE_MAP.get(RadioType.is2dot4GHz);
|
||||
}
|
||||
return maxAutoCellSize;
|
||||
}
|
||||
|
||||
// not allow user to configure
|
||||
public void setMaxAutoCellSize(Integer maxAutoCellSize) {
|
||||
this.maxAutoCellSize = maxAutoCellSize;
|
||||
}
|
||||
|
||||
@@ -93,4 +93,16 @@ public class RfConfigurationTests {
|
||||
assertEquals(Integer.valueOf(23), list2.get(2));
|
||||
assertEquals(Integer.valueOf(45), list2.get(3));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMaxAutoCellSize() {
|
||||
RfElementConfiguration rfConfig = RfElementConfiguration.createWithDefaults(RadioType.is5GHz);
|
||||
assertNotNull(rfConfig.getMaxAutoCellSize());
|
||||
|
||||
assertEquals(RfElementConfiguration.DEFAULT_MAX_CELL_SIZE_DB, rfConfig.getMaxAutoCellSize().intValue());
|
||||
|
||||
rfConfig.setMaxAutoCellSize(-93);
|
||||
//getMaxAutoCellSize always return default MaxAutoCellSize
|
||||
assertEquals(RfElementConfiguration.DEFAULT_MAX_CELL_SIZE_DB, rfConfig.getMaxAutoCellSize().intValue());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ import com.telecominfraproject.wlan.profile.models.ProfileType;
|
||||
import com.telecominfraproject.wlan.profile.models.events.ProfileAddedEvent;
|
||||
import com.telecominfraproject.wlan.profile.models.events.ProfileChangedEvent;
|
||||
import com.telecominfraproject.wlan.profile.models.events.ProfileRemovedEvent;
|
||||
import com.telecominfraproject.wlan.profile.passpoint.models.PasspointProfile;
|
||||
|
||||
|
||||
/**
|
||||
@@ -209,6 +210,20 @@ public class ProfileController {
|
||||
LOG.error("Failed to update Profile, request contains unsupported value: {}", profile);
|
||||
throw new DsDataValidationException("Profile contains unsupported value");
|
||||
}
|
||||
|
||||
// WIFI-6855: To handle SSID-Passpoint association update when SSID profiles are updated
|
||||
// If the passpoint profile update is requested, but no change is made to the details, then skip the update
|
||||
if (profile.getProfileType().equals(ProfileType.passpoint)) {
|
||||
Profile existingProfile = profileDatastore.getOrNull(profile.getId());
|
||||
if (existingProfile != null) {
|
||||
PasspointProfile existingDetails = (PasspointProfile) existingProfile.getDetails();
|
||||
PasspointProfile newDetails = (PasspointProfile) profile.getDetails();
|
||||
if (existingDetails.equals(newDetails)) {
|
||||
LOG.info("No change was made to this profile, skip update on profile {}", profile.getId());
|
||||
return profile;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Profile ret = profileDatastore.update(profile);
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.util.EnumMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.telecominfraproject.wlan.core.model.equipment.ChannelBandwidth;
|
||||
import com.telecominfraproject.wlan.core.model.equipment.RadioType;
|
||||
import com.telecominfraproject.wlan.status.models.StatusDataType;
|
||||
import com.telecominfraproject.wlan.status.models.StatusDetails;
|
||||
@@ -12,6 +13,7 @@ public class EquipmentChannelStatusData extends StatusDetails {
|
||||
private static final long serialVersionUID = 470569467119609438L;
|
||||
|
||||
private Map<RadioType, Integer> channelNumberStatusDataMap = new EnumMap<>(RadioType.class);
|
||||
private Map<RadioType, ChannelBandwidth> channelBandwidthStatusDataMap = new EnumMap<>(RadioType.class);
|
||||
private Map<RadioType, Integer> txPowerDataMap = new EnumMap<>(RadioType.class);
|
||||
|
||||
|
||||
@@ -29,6 +31,7 @@ public class EquipmentChannelStatusData extends StatusDetails {
|
||||
{
|
||||
if (data !=null) {
|
||||
this.channelNumberStatusDataMap.putAll(data.channelNumberStatusDataMap);
|
||||
this.channelBandwidthStatusDataMap.putAll(data.channelBandwidthStatusDataMap);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +39,10 @@ public class EquipmentChannelStatusData extends StatusDetails {
|
||||
return channelNumberStatusDataMap;
|
||||
}
|
||||
|
||||
public Map<RadioType, ChannelBandwidth> getChannelBandwidthStatusDataMap() {
|
||||
return channelBandwidthStatusDataMap;
|
||||
}
|
||||
|
||||
public Map<RadioType, Integer> getTxPowerDataMap() {
|
||||
return txPowerDataMap;
|
||||
}
|
||||
@@ -44,6 +51,10 @@ public class EquipmentChannelStatusData extends StatusDetails {
|
||||
this.channelNumberStatusDataMap = channelNumberStatusDataMap;
|
||||
}
|
||||
|
||||
public void setChannelBandwidthStatusDataMap(Map<RadioType, ChannelBandwidth> channelBandwidthStatusDataMap) {
|
||||
this.channelBandwidthStatusDataMap = channelBandwidthStatusDataMap;
|
||||
}
|
||||
|
||||
public void setTxPowerDataMap(Map<RadioType, Integer> txPowerDataMap) {
|
||||
this.txPowerDataMap = txPowerDataMap;
|
||||
}
|
||||
@@ -59,6 +70,14 @@ public class EquipmentChannelStatusData extends StatusDetails {
|
||||
});
|
||||
}
|
||||
|
||||
if (getChannelBandwidthStatusDataMap() != null) {
|
||||
result.setChannelBandwidthStatusDataMap(new EnumMap<>(RadioType.class));
|
||||
|
||||
this.channelBandwidthStatusDataMap.forEach((k, v) -> {
|
||||
result.channelBandwidthStatusDataMap.put(k, v);
|
||||
});
|
||||
}
|
||||
|
||||
if (getTxPowerDataMap() != null) {
|
||||
result.setTxPowerDataMap(new EnumMap<>(RadioType.class));
|
||||
|
||||
@@ -71,7 +90,7 @@ public class EquipmentChannelStatusData extends StatusDetails {
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(channelNumberStatusDataMap, txPowerDataMap);
|
||||
return Objects.hash(channelNumberStatusDataMap, channelBandwidthStatusDataMap, txPowerDataMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -84,6 +103,7 @@ public class EquipmentChannelStatusData extends StatusDetails {
|
||||
return false;
|
||||
EquipmentChannelStatusData other = (EquipmentChannelStatusData) obj;
|
||||
return Objects.equals(channelNumberStatusDataMap, other.channelNumberStatusDataMap)
|
||||
&& Objects.equals(channelBandwidthStatusDataMap, other.channelBandwidthStatusDataMap)
|
||||
&& Objects.equals(txPowerDataMap, other.txPowerDataMap);
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,11 @@ public class StatusDataType implements EnumWithId {
|
||||
/**
|
||||
* Protocol status
|
||||
*/
|
||||
PROTOCOL = new StatusDataType(4, "PROTOCOL", Set.of(StatusTrait.DeleteOnEquipmentDisconnect)) ,
|
||||
PROTOCOL = new StatusDataType(4, "PROTOCOL"
|
||||
// some of the properties of this status need to be preserved across equipment connections
|
||||
// example - reportedCfgDataVersion
|
||||
//, Set.of(StatusTrait.DeleteOnEquipmentDisconnect)
|
||||
) ,
|
||||
/**
|
||||
* Firmware upgrade status
|
||||
*/
|
||||
|
||||
@@ -3435,7 +3435,17 @@ components:
|
||||
type: integer
|
||||
format: int64
|
||||
|
||||
|
||||
ChannelBandwidthPerRadioTypeMap:
|
||||
properties:
|
||||
is5GHz:
|
||||
$ref: '#/components/schemas/ChannelBandwidth'
|
||||
is5GHzU:
|
||||
$ref: '#/components/schemas/ChannelBandwidth'
|
||||
is5GHzL:
|
||||
$ref: '#/components/schemas/ChannelBandwidth'
|
||||
is2dot4GHz:
|
||||
$ref: '#/components/schemas/ChannelBandwidth'
|
||||
|
||||
EquipmentAdminStatusData:
|
||||
type: object
|
||||
properties:
|
||||
@@ -4395,6 +4405,8 @@ components:
|
||||
- RADIO_CHANNEL
|
||||
channelNumberStatusDataMap:
|
||||
$ref: '#/components/schemas/IntegerPerRadioTypeMap'
|
||||
channelBandwidthStatusDataMap:
|
||||
$ref: '#/components/schemas/ChannelBandwidthPerRadioTypeMap'
|
||||
txPowerDataMap:
|
||||
$ref: '#/components/schemas/IntegerPerRadioTypeMap'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user