mirror of
https://github.com/Telecominfraproject/wlan-cloud-opensync-controller.git
synced 2025-11-03 20:17:53 +00:00
WIFI-816: OSGW add retrieval of FW_IMAGE_ACTIVE and FW_IMAGE_INACTIVE and update cloud database via Status
This commit is contained in:
@@ -68,6 +68,7 @@ import com.telecominfraproject.wlan.opensync.external.integration.models.Opensyn
|
|||||||
import com.telecominfraproject.wlan.opensync.external.integration.models.OpensyncAWLANNode;
|
import com.telecominfraproject.wlan.opensync.external.integration.models.OpensyncAWLANNode;
|
||||||
import com.telecominfraproject.wlan.opensync.external.integration.models.OpensyncWifiAssociatedClients;
|
import com.telecominfraproject.wlan.opensync.external.integration.models.OpensyncWifiAssociatedClients;
|
||||||
import com.telecominfraproject.wlan.opensync.ovsdb.dao.models.enumerations.DhcpFpDeviceType;
|
import com.telecominfraproject.wlan.opensync.ovsdb.dao.models.enumerations.DhcpFpDeviceType;
|
||||||
|
import com.telecominfraproject.wlan.opensync.ovsdb.dao.utilities.OvsdbStringConstants;
|
||||||
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;
|
||||||
@@ -129,7 +130,7 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private OpensyncCloudGatewayController gatewayController;
|
private OpensyncCloudGatewayController gatewayController;
|
||||||
private String fwImageNameKey = "FW_IMAGE_NAME";
|
|
||||||
@Value("${tip.wlan.ovsdb.autoProvisionedCustomerId:1970}")
|
@Value("${tip.wlan.ovsdb.autoProvisionedCustomerId:1970}")
|
||||||
private int autoProvisionedCustomerId;
|
private int autoProvisionedCustomerId;
|
||||||
@Value("${tip.wlan.ovsdb.autoProvisionedLocationId:8}")
|
@Value("${tip.wlan.ovsdb.autoProvisionedLocationId:8}")
|
||||||
@@ -336,8 +337,8 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
LOG.info("AP {} got connected to the gateway", apId);
|
LOG.info("AP {} got connected to the gateway", apId);
|
||||||
LOG.info("ConnectNodeInfo {}", connectNodeInfo);
|
LOG.info("ConnectNodeInfo {}", connectNodeInfo);
|
||||||
|
|
||||||
if (connectNodeInfo.versionMatrix.containsKey(fwImageNameKey)) {
|
if (connectNodeInfo.versionMatrix.containsKey(OvsdbStringConstants.FW_IMAGE_ACTIVE_KEY)) {
|
||||||
reconcileFwVersionToTrack(ce, connectNodeInfo.versionMatrix.get(fwImageNameKey), connectNodeInfo.model);
|
reconcileFwVersionToTrack(ce, connectNodeInfo.versionMatrix.get(OvsdbStringConstants.FW_IMAGE_ACTIVE_KEY), connectNodeInfo.model);
|
||||||
} else {
|
} else {
|
||||||
LOG.info("Cloud based firmware upgrade is not supported for this AP");
|
LOG.info("Cloud based firmware upgrade is not supported for this AP");
|
||||||
}
|
}
|
||||||
@@ -460,9 +461,19 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
protocolStatusData.setCountryCode("CA");
|
protocolStatusData.setCountryCode("CA");
|
||||||
protocolStatusData.setReportedCC(CountryCode.ca);
|
protocolStatusData.setReportedCC(CountryCode.ca);
|
||||||
protocolStatusData.setReportedHwVersion(connectNodeInfo.platformVersion);
|
protocolStatusData.setReportedHwVersion(connectNodeInfo.platformVersion);
|
||||||
if (connectNodeInfo.versionMatrix.containsKey(fwImageNameKey)) {
|
if (connectNodeInfo.versionMatrix.containsKey(OvsdbStringConstants.FW_IMAGE_ACTIVE_KEY)) {
|
||||||
protocolStatusData.setReportedSwVersion(connectNodeInfo.versionMatrix.get(fwImageNameKey));
|
protocolStatusData.setReportedSwVersion(connectNodeInfo.versionMatrix.get(OvsdbStringConstants.FW_IMAGE_ACTIVE_KEY));
|
||||||
protocolStatusData.setReportedSwAltVersion(connectNodeInfo.versionMatrix.get(fwImageNameKey));
|
} else if (connectNodeInfo.versionMatrix.containsKey(OvsdbStringConstants.FW_IMAGE_NAME_KEY)){
|
||||||
|
protocolStatusData.setReportedSwVersion(connectNodeInfo.versionMatrix.get(OvsdbStringConstants.FW_IMAGE_NAME_KEY));
|
||||||
|
} else {
|
||||||
|
protocolStatusData.setReportedSwVersion("Unknown");
|
||||||
|
}
|
||||||
|
if (connectNodeInfo.versionMatrix.containsKey(OvsdbStringConstants.FW_IMAGE_INACTIVE_KEY)) {
|
||||||
|
protocolStatusData.setReportedSwAltVersion(connectNodeInfo.versionMatrix.get(OvsdbStringConstants.FW_IMAGE_INACTIVE_KEY));
|
||||||
|
}else if (connectNodeInfo.versionMatrix.containsKey(OvsdbStringConstants.FW_IMAGE_NAME_KEY)){
|
||||||
|
protocolStatusData.setReportedSwVersion(connectNodeInfo.versionMatrix.get(OvsdbStringConstants.FW_IMAGE_NAME_KEY));
|
||||||
|
} else {
|
||||||
|
protocolStatusData.setReportedSwVersion("Unknown");
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
protocolStatusData.setReportedIpV4Addr(InetAddress.getByName(connectNodeInfo.ipV4Address));
|
protocolStatusData.setReportedIpV4Addr(InetAddress.getByName(connectNodeInfo.ipV4Address));
|
||||||
@@ -488,11 +499,27 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
}
|
}
|
||||||
|
|
||||||
EquipmentUpgradeStatusData fwUpgradeStatusData = (EquipmentUpgradeStatusData) statusRecord.getDetails();
|
EquipmentUpgradeStatusData fwUpgradeStatusData = (EquipmentUpgradeStatusData) statusRecord.getDetails();
|
||||||
if (connectNodeInfo.versionMatrix.containsKey(fwImageNameKey)) {
|
if (connectNodeInfo.versionMatrix.containsKey(OvsdbStringConstants.FW_IMAGE_ACTIVE_KEY)) {
|
||||||
fwUpgradeStatusData.setActiveSwVersion(connectNodeInfo.versionMatrix.get(fwImageNameKey));
|
fwUpgradeStatusData.setActiveSwVersion(connectNodeInfo.versionMatrix.get(OvsdbStringConstants.FW_IMAGE_ACTIVE_KEY));
|
||||||
fwUpgradeStatusData.setAlternateSwVersion(connectNodeInfo.versionMatrix.get(fwImageNameKey));
|
} else if (connectNodeInfo.versionMatrix.containsKey(OvsdbStringConstants.FW_IMAGE_NAME_KEY)){
|
||||||
|
fwUpgradeStatusData.setActiveSwVersion(connectNodeInfo.versionMatrix.get(OvsdbStringConstants.FW_IMAGE_NAME_KEY));
|
||||||
|
} else {
|
||||||
|
fwUpgradeStatusData.setActiveSwVersion("Unknown");
|
||||||
}
|
}
|
||||||
|
if (connectNodeInfo.versionMatrix.containsKey(OvsdbStringConstants.FW_IMAGE_INACTIVE_KEY)) {
|
||||||
|
fwUpgradeStatusData.setAlternateSwVersion(connectNodeInfo.versionMatrix.get(OvsdbStringConstants.FW_IMAGE_INACTIVE_KEY));
|
||||||
|
} else if (connectNodeInfo.versionMatrix.containsKey(OvsdbStringConstants.FW_IMAGE_NAME_KEY)){
|
||||||
|
fwUpgradeStatusData.setAlternateSwVersion(connectNodeInfo.versionMatrix.get(OvsdbStringConstants.FW_IMAGE_NAME_KEY));
|
||||||
|
} else {
|
||||||
|
fwUpgradeStatusData.setAlternateSwVersion("Unknown");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fwUpgradeStatusData.getUpgradeState() == null) {
|
||||||
fwUpgradeStatusData.setUpgradeState(EquipmentUpgradeState.undefined);
|
fwUpgradeStatusData.setUpgradeState(EquipmentUpgradeState.undefined);
|
||||||
|
fwUpgradeStatusData.setUpgradeStartTime(null);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
statusRecord.setDetails(fwUpgradeStatusData);
|
statusRecord.setDetails(fwUpgradeStatusData);
|
||||||
statusServiceInterface.update(statusRecord);
|
statusServiceInterface.update(statusRecord);
|
||||||
|
|
||||||
@@ -1232,9 +1259,14 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
}
|
}
|
||||||
|
|
||||||
String reportedFwImageName = null;
|
String reportedFwImageName = null;
|
||||||
|
String reportedAltFwImageName = null;
|
||||||
|
|
||||||
if (opensyncAPState.getVersionMatrix().containsKey(fwImageNameKey)) {
|
if (opensyncAPState.getVersionMatrix().containsKey(OvsdbStringConstants.FW_IMAGE_ACTIVE_KEY)) {
|
||||||
reportedFwImageName = opensyncAPState.getVersionMatrix().get(fwImageNameKey);
|
reportedFwImageName = opensyncAPState.getVersionMatrix().get(OvsdbStringConstants.FW_IMAGE_ACTIVE_KEY);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (opensyncAPState.getVersionMatrix().containsKey(OvsdbStringConstants.FW_IMAGE_INACTIVE_KEY)) {
|
||||||
|
reportedAltFwImageName = opensyncAPState.getVersionMatrix().get(OvsdbStringConstants.FW_IMAGE_INACTIVE_KEY);
|
||||||
}
|
}
|
||||||
|
|
||||||
EquipmentProtocolStatusData protocolStatusData = (EquipmentProtocolStatusData) protocolStatus.getDetails();
|
EquipmentProtocolStatusData protocolStatusData = (EquipmentProtocolStatusData) protocolStatus.getDetails();
|
||||||
@@ -1242,7 +1274,7 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
if (reportedFwImageName != null) {
|
if (reportedFwImageName != null) {
|
||||||
protocolStatusData.setReportedSwVersion(reportedFwImageName);
|
protocolStatusData.setReportedSwVersion(reportedFwImageName);
|
||||||
}
|
}
|
||||||
protocolStatusData.setReportedSwAltVersion(reportedFwImageName);
|
protocolStatusData.setReportedSwAltVersion(reportedAltFwImageName);
|
||||||
protocolStatusData.setReportedHwVersion(opensyncAPState.getPlatformVersion());
|
protocolStatusData.setReportedHwVersion(opensyncAPState.getPlatformVersion());
|
||||||
protocolStatusData.setSystemName(opensyncAPState.getModel());
|
protocolStatusData.setSystemName(opensyncAPState.getModel());
|
||||||
|
|
||||||
@@ -1277,8 +1309,9 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
.getDetails();
|
.getDetails();
|
||||||
if (reportedFwImageName != null) {
|
if (reportedFwImageName != null) {
|
||||||
if (!firmwareStatusData.getActiveSwVersion().equals(reportedFwImageName)
|
if (!firmwareStatusData.getActiveSwVersion().equals(reportedFwImageName)
|
||||||
|| !firmwareStatusData.getUpgradeState().equals(fwUpgradeState)) {
|
|| !firmwareStatusData.getUpgradeState().equals(fwUpgradeState) || !firmwareStatusData.getAlternateSwVersion().equals(reportedAltFwImageName)) {
|
||||||
firmwareStatusData.setActiveSwVersion(reportedFwImageName);
|
firmwareStatusData.setActiveSwVersion(reportedFwImageName);
|
||||||
|
firmwareStatusData.setAlternateSwVersion(reportedAltFwImageName);
|
||||||
firmwareStatusData.setUpgradeState(fwUpgradeState, fwUpgradeFailureReason);
|
firmwareStatusData.setUpgradeState(fwUpgradeState, fwUpgradeFailureReason);
|
||||||
firmwareStatus.setDetails(firmwareStatusData);
|
firmwareStatus.setDetails(firmwareStatusData);
|
||||||
updates.add(firmwareStatus);
|
updates.add(firmwareStatus);
|
||||||
@@ -1306,8 +1339,9 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
.getDetails();
|
.getDetails();
|
||||||
if (reportedFwImageName != null) {
|
if (reportedFwImageName != null) {
|
||||||
if (!firmwareStatusData.getActiveSwVersion().equals(reportedFwImageName)
|
if (!firmwareStatusData.getActiveSwVersion().equals(reportedFwImageName)
|
||||||
|| !firmwareStatusData.getUpgradeState().equals(fwUpgradeState)) {
|
|| !firmwareStatusData.getUpgradeState().equals(fwUpgradeState) || !firmwareStatusData.getAlternateSwVersion().equals(reportedAltFwImageName)) {
|
||||||
firmwareStatusData.setActiveSwVersion(reportedFwImageName);
|
firmwareStatusData.setActiveSwVersion(reportedFwImageName);
|
||||||
|
firmwareStatusData.setAlternateSwVersion(reportedAltFwImageName);
|
||||||
firmwareStatusData.setUpgradeState(fwUpgradeState, fwUpgradeFailureReason);
|
firmwareStatusData.setUpgradeState(fwUpgradeState, fwUpgradeFailureReason);
|
||||||
if (fwUpgradeState.equals(EquipmentUpgradeState.apply_initiated)) {
|
if (fwUpgradeState.equals(EquipmentUpgradeState.apply_initiated)) {
|
||||||
firmwareStatusData.setUpgradeStartTime(System.currentTimeMillis());
|
firmwareStatusData.setUpgradeStartTime(System.currentTimeMillis());
|
||||||
@@ -1335,15 +1369,15 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
EquipmentUpgradeStatusData firmwareStatusData = (EquipmentUpgradeStatusData) firmwareStatus
|
EquipmentUpgradeStatusData firmwareStatusData = (EquipmentUpgradeStatusData) firmwareStatus
|
||||||
.getDetails();
|
.getDetails();
|
||||||
if (reportedFwImageName != null) {
|
if (reportedFwImageName != null) {
|
||||||
if (!firmwareStatusData.getActiveSwVersion().equals(reportedFwImageName)
|
if (!firmwareStatusData.getActiveSwVersion().equals(reportedFwImageName) || !firmwareStatusData.getAlternateSwVersion().equals(reportedAltFwImageName)
|
||||||
|| !firmwareStatusData.getUpgradeState().equals(fwUpgradeState)
|
|| !firmwareStatusData.getUpgradeState().equals(fwUpgradeState)
|
||||||
|| !firmwareStatusData.getReason().equals(fwUpgradeFailureReason)) {
|
|| !firmwareStatusData.getReason().equals(fwUpgradeFailureReason)) {
|
||||||
firmwareStatusData.setActiveSwVersion(reportedFwImageName);
|
firmwareStatusData.setActiveSwVersion(reportedFwImageName);
|
||||||
|
firmwareStatusData.setAlternateSwVersion(reportedAltFwImageName);
|
||||||
firmwareStatusData.setUpgradeState(fwUpgradeState, fwUpgradeFailureReason);
|
firmwareStatusData.setUpgradeState(fwUpgradeState, fwUpgradeFailureReason);
|
||||||
firmwareStatus.setDetails(firmwareStatusData);
|
firmwareStatus.setDetails(firmwareStatusData);
|
||||||
updates.add(firmwareStatus);
|
updates.add(firmwareStatus);
|
||||||
updates = statusServiceInterface.update(updates);
|
updates = statusServiceInterface.update(updates);
|
||||||
|
|
||||||
reconcileFwVersionToTrack(ce, reportedFwImageName, opensyncAPState.getModel());
|
reconcileFwVersionToTrack(ce, reportedFwImageName, opensyncAPState.getModel());
|
||||||
} else {
|
} else {
|
||||||
if (!updates.isEmpty()) {
|
if (!updates.isEmpty()) {
|
||||||
@@ -1831,6 +1865,14 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
clientDhcpDetails.setGatewayIp(InetAddress.getByName(dhcpLeasedIps.get("gateway")));
|
clientDhcpDetails.setGatewayIp(InetAddress.getByName(dhcpLeasedIps.get("gateway")));
|
||||||
} catch (UnknownHostException e) {
|
} catch (UnknownHostException e) {
|
||||||
LOG.error("Invalid Gateway IP", e);
|
LOG.error("Invalid Gateway IP", e);
|
||||||
|
|
||||||
|
try {
|
||||||
|
clientDhcpDetails.setGatewayIp(InetAddress.getByAddress(dhcpLeasedIps.get("gateway").getBytes()));
|
||||||
|
} catch (UnknownHostException e1) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
LOG.error("Invalid Gateway Address", e);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1839,7 +1881,12 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
clientDhcpDetails.setSubnetMask(InetAddress.getByName(dhcpLeasedIps.get("subnet_mask")));
|
clientDhcpDetails.setSubnetMask(InetAddress.getByName(dhcpLeasedIps.get("subnet_mask")));
|
||||||
} catch (UnknownHostException e) {
|
} catch (UnknownHostException e) {
|
||||||
LOG.error("Invalid Subnet Mask", e);
|
LOG.error("Invalid Subnet Mask", e);
|
||||||
|
try {
|
||||||
|
clientDhcpDetails.setGatewayIp(InetAddress.getByAddress(dhcpLeasedIps.get("subnet_mask").getBytes()));
|
||||||
|
} catch (UnknownHostException e1) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
LOG.error("Invalid Subnet Mask Address", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1848,6 +1895,12 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
clientDhcpDetails.setPrimaryDns(InetAddress.getByName(dhcpLeasedIps.get("primary_dns")));
|
clientDhcpDetails.setPrimaryDns(InetAddress.getByName(dhcpLeasedIps.get("primary_dns")));
|
||||||
} catch (UnknownHostException e) {
|
} catch (UnknownHostException e) {
|
||||||
LOG.error("Invalid Primary DNS", e);
|
LOG.error("Invalid Primary DNS", e);
|
||||||
|
try {
|
||||||
|
clientDhcpDetails.setGatewayIp(InetAddress.getByAddress(dhcpLeasedIps.get("primary_dns").getBytes()));
|
||||||
|
} catch (UnknownHostException e1) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
LOG.error("Invalid Primary DNS Address", e);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1857,7 +1910,12 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
clientDhcpDetails.setSecondaryDns(InetAddress.getByName(dhcpLeasedIps.get("secondary_dns")));
|
clientDhcpDetails.setSecondaryDns(InetAddress.getByName(dhcpLeasedIps.get("secondary_dns")));
|
||||||
} catch (UnknownHostException e) {
|
} catch (UnknownHostException e) {
|
||||||
LOG.error("Invalid Secondary DNS", e);
|
LOG.error("Invalid Secondary DNS", e);
|
||||||
|
try {
|
||||||
|
clientDhcpDetails.setGatewayIp(InetAddress.getByAddress(dhcpLeasedIps.get("secondary_dns").getBytes()));
|
||||||
|
} catch (UnknownHostException e1) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
LOG.error("Invalid Seconary DNS Address", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -287,8 +287,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
|
|
||||||
void processEventReport(Report report, int customerId, long equipmentId, String apId, long locationId) {
|
void processEventReport(Report report, int customerId, long equipmentId, String apId, long locationId) {
|
||||||
|
|
||||||
LOG.debug("Processing EventReport List {}", report.getEventReportList());
|
|
||||||
|
|
||||||
report.getEventReportList().stream().forEach(e -> {
|
report.getEventReportList().stream().forEach(e -> {
|
||||||
LOG.info("Received EventReport {}", e);
|
LOG.info("Received EventReport {}", e);
|
||||||
|
|
||||||
@@ -1608,7 +1606,7 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
|
|
||||||
void populateApClientMetrics(List<ServiceMetric> metricRecordList, Report report, int customerId, long equipmentId,
|
void populateApClientMetrics(List<ServiceMetric> metricRecordList, Report report, int customerId, long equipmentId,
|
||||||
long locationId) {
|
long locationId) {
|
||||||
LOG.debug("populateApClientMetrics {} for Customer {} Equipment {}", report.getClientsList(), customerId,
|
LOG.debug("populateApClientMetrics for Customer {} Equipment {}", customerId,
|
||||||
equipmentId);
|
equipmentId);
|
||||||
|
|
||||||
for (ClientReport clReport : report.getClientsList()) {
|
for (ClientReport clReport : report.getClientsList()) {
|
||||||
@@ -2100,8 +2098,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
ChannelInfo createChannelInfo(long equipmentId, RadioType radioType, List<SurveySample> surveySampleList,
|
ChannelInfo createChannelInfo(long equipmentId, RadioType radioType, List<SurveySample> surveySampleList,
|
||||||
ChannelBandwidth channelBandwidth) {
|
ChannelBandwidth channelBandwidth) {
|
||||||
|
|
||||||
LOG.debug("createChannelInfo::SurveySampleList {}", surveySampleList);
|
|
||||||
|
|
||||||
int busyTx = 0; /* Tx */
|
int busyTx = 0; /* Tx */
|
||||||
int busySelf = 0; /* Rx_self (derived from succesful Rx frames) */
|
int busySelf = 0; /* Rx_self (derived from succesful Rx frames) */
|
||||||
int busy = 0; /* Busy = Rx + Tx + Interference */
|
int busy = 0; /* Busy = Rx + Tx + Interference */
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.telecominfraproject.wlan.opensync.ovsdb.dao.utilities;
|
||||||
|
|
||||||
|
|
||||||
|
public class OvsdbStringConstants {
|
||||||
|
|
||||||
|
// freq_band
|
||||||
|
public static final String OVSDB_FREQ_BAND_5G = "5G";
|
||||||
|
public static final String OVSDB_FREQ_BAND_5GL = "5GL";
|
||||||
|
public static final String OVSDB_FREQ_BAND_5GU = "5GU";
|
||||||
|
public static final String OVSDB_FREQ_BAND_2pt4G = "2.4G";
|
||||||
|
|
||||||
|
// AWLAN_Node version_matrix
|
||||||
|
public static final String FW_IMAGE_NAME_KEY = "FW_IMAGE_NAME";
|
||||||
|
public static final String FW_IMAGE_ACTIVE_KEY = "FW_IMAGE_ACTIVE";
|
||||||
|
public static final String FW_IMAGE_INACTIVE_KEY = "FW_IMAGE_INACTIVE";
|
||||||
|
|
||||||
|
}
|
||||||
@@ -14,12 +14,6 @@ import sts.OpensyncStats.StateUpDown;
|
|||||||
|
|
||||||
public class OvsdbToWlanCloudTypeMappingUtility {
|
public class OvsdbToWlanCloudTypeMappingUtility {
|
||||||
|
|
||||||
|
|
||||||
public static final String OVSDB_FREQ_BAND_5G = "5G";
|
|
||||||
public static final String OVSDB_FREQ_BAND_5GL = "5GL";
|
|
||||||
public static final String OVSDB_FREQ_BAND_5GU = "5GU";
|
|
||||||
public static final String OVSDB_FREQ_BAND_2pt4G = "2.4G";
|
|
||||||
|
|
||||||
public static ClientType getClientTypeForDhcpFpDeviceType(DhcpFpDeviceType dhcpFpDeviceType) {
|
public static ClientType getClientTypeForDhcpFpDeviceType(DhcpFpDeviceType dhcpFpDeviceType) {
|
||||||
|
|
||||||
ClientType ret = ClientType.UNSUPPORTED;
|
ClientType ret = ClientType.UNSUPPORTED;
|
||||||
@@ -50,13 +44,13 @@ public class OvsdbToWlanCloudTypeMappingUtility {
|
|||||||
public static RadioType getRadioTypeForOvsdbRadioFreqBand(String ovsdbRadioFreqBand) {
|
public static RadioType getRadioTypeForOvsdbRadioFreqBand(String ovsdbRadioFreqBand) {
|
||||||
|
|
||||||
switch (ovsdbRadioFreqBand) {
|
switch (ovsdbRadioFreqBand) {
|
||||||
case OVSDB_FREQ_BAND_2pt4G:
|
case OvsdbStringConstants.OVSDB_FREQ_BAND_2pt4G:
|
||||||
return RadioType.is2dot4GHz;
|
return RadioType.is2dot4GHz;
|
||||||
case OVSDB_FREQ_BAND_5G:
|
case OvsdbStringConstants.OVSDB_FREQ_BAND_5G:
|
||||||
return RadioType.is5GHz;
|
return RadioType.is5GHz;
|
||||||
case OVSDB_FREQ_BAND_5GL:
|
case OvsdbStringConstants.OVSDB_FREQ_BAND_5GL:
|
||||||
return RadioType.is5GHzL;
|
return RadioType.is5GHzL;
|
||||||
case OVSDB_FREQ_BAND_5GU:
|
case OvsdbStringConstants.OVSDB_FREQ_BAND_5GU:
|
||||||
return RadioType.is5GHzU;
|
return RadioType.is5GHzU;
|
||||||
default:
|
default:
|
||||||
return RadioType.UNSUPPORTED;
|
return RadioType.UNSUPPORTED;
|
||||||
|
|||||||
Reference in New Issue
Block a user