mirror of
https://github.com/Telecominfraproject/wlan-cloud-opensync-controller.git
synced 2025-11-02 03:28:00 +00:00
WIFI-814: OSGW add support reboot, switch, and factory reset
Adding support for Ap reboot, switch, and factory reset commands to opensync gateway controller and ovsdb dao.
This commit is contained in:
@@ -339,7 +339,9 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
LOG.info("ConnectNodeInfo {}", connectNodeInfo);
|
LOG.info("ConnectNodeInfo {}", connectNodeInfo);
|
||||||
|
|
||||||
if (connectNodeInfo.versionMatrix.containsKey(OvsdbStringConstants.FW_IMAGE_ACTIVE_KEY)) {
|
if (connectNodeInfo.versionMatrix.containsKey(OvsdbStringConstants.FW_IMAGE_ACTIVE_KEY)) {
|
||||||
reconcileFwVersionToTrack(ce, connectNodeInfo.versionMatrix.get(OvsdbStringConstants.FW_IMAGE_ACTIVE_KEY), 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");
|
||||||
}
|
}
|
||||||
@@ -381,7 +383,7 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
Set<RadioType> radioTypes = radioProfileMap.keySet();
|
Set<RadioType> radioTypes = radioProfileMap.keySet();
|
||||||
|
|
||||||
for (RadioType radioType : radioTypes) {
|
for (RadioType radioType : radioTypes) {
|
||||||
// SSID Profile set in AP Profile
|
// SSID Profile set in AP Profile
|
||||||
Profile ssidProfile = new Profile();
|
Profile ssidProfile = new Profile();
|
||||||
ssidProfile.setCustomerId(ce.getCustomerId());
|
ssidProfile.setCustomerId(ce.getCustomerId());
|
||||||
ssidProfile.setName(autoProvisionedSsid + radioType.name() + " for " + ce.getName());
|
ssidProfile.setName(autoProvisionedSsid + radioType.name() + " for " + ce.getName());
|
||||||
@@ -400,11 +402,11 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
ssidProfile = profileServiceInterface.create(ssidProfile);
|
ssidProfile = profileServiceInterface.create(ssidProfile);
|
||||||
|
|
||||||
apProfile.getChildProfileIds().add(ssidProfile.getId());
|
apProfile.getChildProfileIds().add(ssidProfile.getId());
|
||||||
|
|
||||||
// Update AP Profile with ssidProfile and rfProfile
|
// Update AP Profile with ssidProfile and rfProfile
|
||||||
apProfile = profileServiceInterface.update(apProfile);
|
apProfile = profileServiceInterface.update(apProfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
// RF Profile set in AP Profile
|
// RF Profile set in AP Profile
|
||||||
Profile rfProfile = new Profile();
|
Profile rfProfile = new Profile();
|
||||||
rfProfile.setCustomerId(ce.getCustomerId());
|
rfProfile.setCustomerId(ce.getCustomerId());
|
||||||
@@ -412,15 +414,15 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
RfConfiguration rfConfig = RfConfiguration.createWithDefaults();
|
RfConfiguration rfConfig = RfConfiguration.createWithDefaults();
|
||||||
|
|
||||||
// Override default values
|
// Override default values
|
||||||
for (RadioType radioType: radioTypes) {
|
for (RadioType radioType : radioTypes) {
|
||||||
rfConfig.getRfConfig(radioType).setRf(rfProfile.getName());
|
rfConfig.getRfConfig(radioType).setRf(rfProfile.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
rfProfile.setDetails(rfConfig);
|
rfProfile.setDetails(rfConfig);
|
||||||
rfProfile = profileServiceInterface.create(rfProfile);
|
rfProfile = profileServiceInterface.create(rfProfile);
|
||||||
|
|
||||||
apProfile.getChildProfileIds().add(rfProfile.getId());
|
apProfile.getChildProfileIds().add(rfProfile.getId());
|
||||||
|
|
||||||
// Update AP Profile with ssidProfile and rfProfile
|
// Update AP Profile with ssidProfile and rfProfile
|
||||||
apProfile = profileServiceInterface.update(apProfile);
|
apProfile = profileServiceInterface.update(apProfile);
|
||||||
|
|
||||||
@@ -484,16 +486,20 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
protocolStatusData.setReportedCC(CountryCode.ca);
|
protocolStatusData.setReportedCC(CountryCode.ca);
|
||||||
protocolStatusData.setReportedHwVersion(connectNodeInfo.platformVersion);
|
protocolStatusData.setReportedHwVersion(connectNodeInfo.platformVersion);
|
||||||
if (connectNodeInfo.versionMatrix.containsKey(OvsdbStringConstants.FW_IMAGE_ACTIVE_KEY)) {
|
if (connectNodeInfo.versionMatrix.containsKey(OvsdbStringConstants.FW_IMAGE_ACTIVE_KEY)) {
|
||||||
protocolStatusData.setReportedSwVersion(connectNodeInfo.versionMatrix.get(OvsdbStringConstants.FW_IMAGE_ACTIVE_KEY));
|
protocolStatusData.setReportedSwVersion(
|
||||||
} else if (connectNodeInfo.versionMatrix.containsKey(OvsdbStringConstants.FW_IMAGE_NAME_KEY)){
|
connectNodeInfo.versionMatrix.get(OvsdbStringConstants.FW_IMAGE_ACTIVE_KEY));
|
||||||
protocolStatusData.setReportedSwVersion(connectNodeInfo.versionMatrix.get(OvsdbStringConstants.FW_IMAGE_NAME_KEY));
|
} else if (connectNodeInfo.versionMatrix.containsKey(OvsdbStringConstants.FW_IMAGE_NAME_KEY)) {
|
||||||
|
protocolStatusData.setReportedSwVersion(
|
||||||
|
connectNodeInfo.versionMatrix.get(OvsdbStringConstants.FW_IMAGE_NAME_KEY));
|
||||||
} else {
|
} else {
|
||||||
protocolStatusData.setReportedSwVersion("Unknown");
|
protocolStatusData.setReportedSwVersion("Unknown");
|
||||||
}
|
}
|
||||||
if (connectNodeInfo.versionMatrix.containsKey(OvsdbStringConstants.FW_IMAGE_INACTIVE_KEY)) {
|
if (connectNodeInfo.versionMatrix.containsKey(OvsdbStringConstants.FW_IMAGE_INACTIVE_KEY)) {
|
||||||
protocolStatusData.setReportedSwAltVersion(connectNodeInfo.versionMatrix.get(OvsdbStringConstants.FW_IMAGE_INACTIVE_KEY));
|
protocolStatusData.setReportedSwAltVersion(
|
||||||
}else if (connectNodeInfo.versionMatrix.containsKey(OvsdbStringConstants.FW_IMAGE_NAME_KEY)){
|
connectNodeInfo.versionMatrix.get(OvsdbStringConstants.FW_IMAGE_INACTIVE_KEY));
|
||||||
protocolStatusData.setReportedSwVersion(connectNodeInfo.versionMatrix.get(OvsdbStringConstants.FW_IMAGE_NAME_KEY));
|
} else if (connectNodeInfo.versionMatrix.containsKey(OvsdbStringConstants.FW_IMAGE_NAME_KEY)) {
|
||||||
|
protocolStatusData.setReportedSwVersion(
|
||||||
|
connectNodeInfo.versionMatrix.get(OvsdbStringConstants.FW_IMAGE_NAME_KEY));
|
||||||
} else {
|
} else {
|
||||||
protocolStatusData.setReportedSwVersion("Unknown");
|
protocolStatusData.setReportedSwVersion("Unknown");
|
||||||
}
|
}
|
||||||
@@ -522,26 +528,30 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
|
|
||||||
EquipmentUpgradeStatusData fwUpgradeStatusData = (EquipmentUpgradeStatusData) statusRecord.getDetails();
|
EquipmentUpgradeStatusData fwUpgradeStatusData = (EquipmentUpgradeStatusData) statusRecord.getDetails();
|
||||||
if (connectNodeInfo.versionMatrix.containsKey(OvsdbStringConstants.FW_IMAGE_ACTIVE_KEY)) {
|
if (connectNodeInfo.versionMatrix.containsKey(OvsdbStringConstants.FW_IMAGE_ACTIVE_KEY)) {
|
||||||
fwUpgradeStatusData.setActiveSwVersion(connectNodeInfo.versionMatrix.get(OvsdbStringConstants.FW_IMAGE_ACTIVE_KEY));
|
fwUpgradeStatusData.setActiveSwVersion(
|
||||||
} else if (connectNodeInfo.versionMatrix.containsKey(OvsdbStringConstants.FW_IMAGE_NAME_KEY)){
|
connectNodeInfo.versionMatrix.get(OvsdbStringConstants.FW_IMAGE_ACTIVE_KEY));
|
||||||
fwUpgradeStatusData.setActiveSwVersion(connectNodeInfo.versionMatrix.get(OvsdbStringConstants.FW_IMAGE_NAME_KEY));
|
} else if (connectNodeInfo.versionMatrix.containsKey(OvsdbStringConstants.FW_IMAGE_NAME_KEY)) {
|
||||||
|
fwUpgradeStatusData
|
||||||
|
.setActiveSwVersion(connectNodeInfo.versionMatrix.get(OvsdbStringConstants.FW_IMAGE_NAME_KEY));
|
||||||
} else {
|
} else {
|
||||||
fwUpgradeStatusData.setActiveSwVersion("Unknown");
|
fwUpgradeStatusData.setActiveSwVersion("Unknown");
|
||||||
}
|
}
|
||||||
if (connectNodeInfo.versionMatrix.containsKey(OvsdbStringConstants.FW_IMAGE_INACTIVE_KEY)) {
|
if (connectNodeInfo.versionMatrix.containsKey(OvsdbStringConstants.FW_IMAGE_INACTIVE_KEY)) {
|
||||||
fwUpgradeStatusData.setAlternateSwVersion(connectNodeInfo.versionMatrix.get(OvsdbStringConstants.FW_IMAGE_INACTIVE_KEY));
|
fwUpgradeStatusData.setAlternateSwVersion(
|
||||||
} else if (connectNodeInfo.versionMatrix.containsKey(OvsdbStringConstants.FW_IMAGE_NAME_KEY)){
|
connectNodeInfo.versionMatrix.get(OvsdbStringConstants.FW_IMAGE_INACTIVE_KEY));
|
||||||
fwUpgradeStatusData.setAlternateSwVersion(connectNodeInfo.versionMatrix.get(OvsdbStringConstants.FW_IMAGE_NAME_KEY));
|
} else if (connectNodeInfo.versionMatrix.containsKey(OvsdbStringConstants.FW_IMAGE_NAME_KEY)) {
|
||||||
|
fwUpgradeStatusData.setAlternateSwVersion(
|
||||||
|
connectNodeInfo.versionMatrix.get(OvsdbStringConstants.FW_IMAGE_NAME_KEY));
|
||||||
} else {
|
} else {
|
||||||
fwUpgradeStatusData.setAlternateSwVersion("Unknown");
|
fwUpgradeStatusData.setAlternateSwVersion("Unknown");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fwUpgradeStatusData.getUpgradeState() == null) {
|
if (fwUpgradeStatusData.getUpgradeState() == null) {
|
||||||
fwUpgradeStatusData.setUpgradeState(EquipmentUpgradeState.undefined);
|
fwUpgradeStatusData.setUpgradeState(EquipmentUpgradeState.undefined);
|
||||||
fwUpgradeStatusData.setUpgradeStartTime(null);
|
fwUpgradeStatusData.setUpgradeStartTime(null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
statusRecord.setDetails(fwUpgradeStatusData);
|
statusRecord.setDetails(fwUpgradeStatusData);
|
||||||
statusServiceInterface.update(statusRecord);
|
statusServiceInterface.update(statusRecord);
|
||||||
|
|
||||||
@@ -772,9 +782,8 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
profileServiceInterface.getProfileWithChildren(equipmentConfig.getProfileId()));
|
profileServiceInterface.getProfileWithChildren(equipmentConfig.getProfileId()));
|
||||||
|
|
||||||
ret.setApProfile(profileContainer.getOrNull(equipmentConfig.getProfileId()));
|
ret.setApProfile(profileContainer.getOrNull(equipmentConfig.getProfileId()));
|
||||||
|
|
||||||
ret.setRfProfile(
|
ret.setRfProfile(profileContainer.getChildOfTypeOrNull(equipmentConfig.getProfileId(), ProfileType.rf));
|
||||||
profileContainer.getChildOfTypeOrNull(equipmentConfig.getProfileId(), ProfileType.rf));
|
|
||||||
|
|
||||||
ret.setSsidProfile(
|
ret.setSsidProfile(
|
||||||
profileContainer.getChildrenOfType(equipmentConfig.getProfileId(), ProfileType.ssid));
|
profileContainer.getChildrenOfType(equipmentConfig.getProfileId(), ProfileType.ssid));
|
||||||
@@ -1260,16 +1269,27 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
}
|
}
|
||||||
|
|
||||||
int upgradeStatusFromAp = opensyncAPState.getUpgradeStatus();
|
int upgradeStatusFromAp = opensyncAPState.getUpgradeStatus();
|
||||||
|
EquipmentUpgradeState fwUpgradeState = null;
|
||||||
EquipmentUpgradeState fwUpgradeState = OvsdbToWlanCloudTypeMappingUtility
|
|
||||||
.getCloudEquipmentUpgradeStateFromOpensyncUpgradeStatus(upgradeStatusFromAp);
|
|
||||||
FailureReason fwUpgradeFailureReason = null;
|
FailureReason fwUpgradeFailureReason = null;
|
||||||
|
|
||||||
if (upgradeStatusFromAp < 0) {
|
if (opensyncAPState.getFirmwareUrl().equals(OvsdbStringConstants.OVSDB_AWLAN_AP_FACTORY_RESET)
|
||||||
fwUpgradeFailureReason = OvsdbToWlanCloudTypeMappingUtility
|
|| opensyncAPState.getFirmwareUrl().equals(OvsdbStringConstants.OVSDB_AWLAN_AP_FACTORY_RESET)
|
||||||
.getCloudEquipmentUpgradeFailureReasonFromOpensyncUpgradeStatus(upgradeStatusFromAp);
|
|| opensyncAPState.getFirmwareUrl().equals(OvsdbStringConstants.OVSDB_AWLAN_AP_FACTORY_RESET)
|
||||||
|
|| opensyncAPState.getFirmwareUrl().equals("")) {
|
||||||
|
|
||||||
|
fwUpgradeState = EquipmentUpgradeState.undefined;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
fwUpgradeState = OvsdbToWlanCloudTypeMappingUtility
|
||||||
|
.getCloudEquipmentUpgradeStateFromOpensyncUpgradeStatus(upgradeStatusFromAp);
|
||||||
|
|
||||||
|
if (upgradeStatusFromAp < 0) {
|
||||||
|
fwUpgradeFailureReason = OvsdbToWlanCloudTypeMappingUtility
|
||||||
|
.getCloudEquipmentUpgradeFailureReasonFromOpensyncUpgradeStatus(upgradeStatusFromAp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Status protocolStatus = statusServiceInterface.getOrNull(customerId, equipmentId, StatusDataType.PROTOCOL);
|
Status protocolStatus = statusServiceInterface.getOrNull(customerId, equipmentId, StatusDataType.PROTOCOL);
|
||||||
if (protocolStatus == null) {
|
if (protocolStatus == null) {
|
||||||
protocolStatus = new Status();
|
protocolStatus = new Status();
|
||||||
@@ -1288,10 +1308,16 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
|
|
||||||
if (opensyncAPState.getVersionMatrix().containsKey(OvsdbStringConstants.FW_IMAGE_ACTIVE_KEY)) {
|
if (opensyncAPState.getVersionMatrix().containsKey(OvsdbStringConstants.FW_IMAGE_ACTIVE_KEY)) {
|
||||||
reportedFwImageName = opensyncAPState.getVersionMatrix().get(OvsdbStringConstants.FW_IMAGE_ACTIVE_KEY);
|
reportedFwImageName = opensyncAPState.getVersionMatrix().get(OvsdbStringConstants.FW_IMAGE_ACTIVE_KEY);
|
||||||
|
} else {
|
||||||
|
reportedFwImageName = opensyncAPState.getVersionMatrix().get(OvsdbStringConstants.FW_IMAGE_NAME_KEY);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (opensyncAPState.getVersionMatrix().containsKey(OvsdbStringConstants.FW_IMAGE_INACTIVE_KEY)) {
|
if (opensyncAPState.getVersionMatrix().containsKey(OvsdbStringConstants.FW_IMAGE_INACTIVE_KEY)) {
|
||||||
reportedAltFwImageName = opensyncAPState.getVersionMatrix().get(OvsdbStringConstants.FW_IMAGE_INACTIVE_KEY);
|
reportedAltFwImageName = opensyncAPState.getVersionMatrix().get(OvsdbStringConstants.FW_IMAGE_INACTIVE_KEY);
|
||||||
|
} else {
|
||||||
|
reportedAltFwImageName = opensyncAPState.getVersionMatrix().get(OvsdbStringConstants.FW_IMAGE_NAME_KEY);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EquipmentProtocolStatusData protocolStatusData = (EquipmentProtocolStatusData) protocolStatus.getDetails();
|
EquipmentProtocolStatusData protocolStatusData = (EquipmentProtocolStatusData) protocolStatus.getDetails();
|
||||||
@@ -1334,7 +1360,8 @@ 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.getAlternateSwVersion().equals(reportedAltFwImageName)) {
|
|| !firmwareStatusData.getUpgradeState().equals(fwUpgradeState)
|
||||||
|
|| !firmwareStatusData.getAlternateSwVersion().equals(reportedAltFwImageName)) {
|
||||||
firmwareStatusData.setActiveSwVersion(reportedFwImageName);
|
firmwareStatusData.setActiveSwVersion(reportedFwImageName);
|
||||||
firmwareStatusData.setAlternateSwVersion(reportedAltFwImageName);
|
firmwareStatusData.setAlternateSwVersion(reportedAltFwImageName);
|
||||||
firmwareStatusData.setUpgradeState(fwUpgradeState, fwUpgradeFailureReason);
|
firmwareStatusData.setUpgradeState(fwUpgradeState, fwUpgradeFailureReason);
|
||||||
@@ -1364,7 +1391,8 @@ 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.getAlternateSwVersion().equals(reportedAltFwImageName)) {
|
|| !firmwareStatusData.getUpgradeState().equals(fwUpgradeState)
|
||||||
|
|| !firmwareStatusData.getAlternateSwVersion().equals(reportedAltFwImageName)) {
|
||||||
firmwareStatusData.setActiveSwVersion(reportedFwImageName);
|
firmwareStatusData.setActiveSwVersion(reportedFwImageName);
|
||||||
firmwareStatusData.setAlternateSwVersion(reportedAltFwImageName);
|
firmwareStatusData.setAlternateSwVersion(reportedAltFwImageName);
|
||||||
firmwareStatusData.setUpgradeState(fwUpgradeState, fwUpgradeFailureReason);
|
firmwareStatusData.setUpgradeState(fwUpgradeState, fwUpgradeFailureReason);
|
||||||
@@ -1394,7 +1422,8 @@ 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) || !firmwareStatusData.getAlternateSwVersion().equals(reportedAltFwImageName)
|
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);
|
||||||
@@ -1424,8 +1453,10 @@ 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);
|
||||||
@@ -1861,7 +1892,7 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (dhcpLeasedIps.containsKey("hostname")) {
|
if (dhcpLeasedIps.containsKey("hostname")) {
|
||||||
|
|
||||||
@@ -1890,7 +1921,7 @@ 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 {
|
try {
|
||||||
clientDhcpDetails.setGatewayIp(InetAddress.getByAddress(dhcpLeasedIps.get("gateway").getBytes()));
|
clientDhcpDetails.setGatewayIp(InetAddress.getByAddress(dhcpLeasedIps.get("gateway").getBytes()));
|
||||||
} catch (UnknownHostException e1) {
|
} catch (UnknownHostException e1) {
|
||||||
@@ -1907,7 +1938,8 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
} catch (UnknownHostException e) {
|
} catch (UnknownHostException e) {
|
||||||
LOG.error("Invalid Subnet Mask", e);
|
LOG.error("Invalid Subnet Mask", e);
|
||||||
try {
|
try {
|
||||||
clientDhcpDetails.setGatewayIp(InetAddress.getByAddress(dhcpLeasedIps.get("subnet_mask").getBytes()));
|
clientDhcpDetails
|
||||||
|
.setGatewayIp(InetAddress.getByAddress(dhcpLeasedIps.get("subnet_mask").getBytes()));
|
||||||
} catch (UnknownHostException e1) {
|
} catch (UnknownHostException e1) {
|
||||||
// TODO Auto-generated catch block
|
// TODO Auto-generated catch block
|
||||||
LOG.error("Invalid Subnet Mask Address", e);
|
LOG.error("Invalid Subnet Mask Address", e);
|
||||||
@@ -1921,7 +1953,8 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
} catch (UnknownHostException e) {
|
} catch (UnknownHostException e) {
|
||||||
LOG.error("Invalid Primary DNS", e);
|
LOG.error("Invalid Primary DNS", e);
|
||||||
try {
|
try {
|
||||||
clientDhcpDetails.setGatewayIp(InetAddress.getByAddress(dhcpLeasedIps.get("primary_dns").getBytes()));
|
clientDhcpDetails
|
||||||
|
.setGatewayIp(InetAddress.getByAddress(dhcpLeasedIps.get("primary_dns").getBytes()));
|
||||||
} catch (UnknownHostException e1) {
|
} catch (UnknownHostException e1) {
|
||||||
// TODO Auto-generated catch block
|
// TODO Auto-generated catch block
|
||||||
LOG.error("Invalid Primary DNS Address", e);
|
LOG.error("Invalid Primary DNS Address", e);
|
||||||
@@ -1936,7 +1969,8 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
|
|||||||
} catch (UnknownHostException e) {
|
} catch (UnknownHostException e) {
|
||||||
LOG.error("Invalid Secondary DNS", e);
|
LOG.error("Invalid Secondary DNS", e);
|
||||||
try {
|
try {
|
||||||
clientDhcpDetails.setGatewayIp(InetAddress.getByAddress(dhcpLeasedIps.get("secondary_dns").getBytes()));
|
clientDhcpDetails
|
||||||
|
.setGatewayIp(InetAddress.getByAddress(dhcpLeasedIps.get("secondary_dns").getBytes()));
|
||||||
} catch (UnknownHostException e1) {
|
} catch (UnknownHostException e1) {
|
||||||
// TODO Auto-generated catch block
|
// TODO Auto-generated catch block
|
||||||
LOG.error("Invalid Seconary DNS Address", e);
|
LOG.error("Invalid Seconary DNS Address", e);
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import java.util.function.Consumer;
|
|||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
|
import com.telecominfraproject.wlan.core.model.role.PortalUserRole;
|
||||||
import com.telecominfraproject.wlan.core.model.service.GatewayType;
|
import com.telecominfraproject.wlan.core.model.service.GatewayType;
|
||||||
import com.telecominfraproject.wlan.core.client.PingClient;
|
import com.telecominfraproject.wlan.core.client.PingClient;
|
||||||
import com.telecominfraproject.wlan.datastore.exceptions.DsEntityNotFoundException;
|
import com.telecominfraproject.wlan.datastore.exceptions.DsEntityNotFoundException;
|
||||||
@@ -41,6 +42,7 @@ import com.telecominfraproject.wlan.equipmentgateway.models.CEGWConfigChangeNoti
|
|||||||
import com.telecominfraproject.wlan.equipmentgateway.models.CEGWFirmwareDownloadRequest;
|
import com.telecominfraproject.wlan.equipmentgateway.models.CEGWFirmwareDownloadRequest;
|
||||||
import com.telecominfraproject.wlan.equipmentgateway.models.CEGWFirmwareFlashRequest;
|
import com.telecominfraproject.wlan.equipmentgateway.models.CEGWFirmwareFlashRequest;
|
||||||
import com.telecominfraproject.wlan.equipmentgateway.models.CEGWRadioResetRequest;
|
import com.telecominfraproject.wlan.equipmentgateway.models.CEGWRadioResetRequest;
|
||||||
|
import com.telecominfraproject.wlan.equipmentgateway.models.CEGWRebootRequest;
|
||||||
import com.telecominfraproject.wlan.equipmentgateway.models.CEGWRouteCheck;
|
import com.telecominfraproject.wlan.equipmentgateway.models.CEGWRouteCheck;
|
||||||
import com.telecominfraproject.wlan.equipmentgateway.models.CEGWStartDebugEngine;
|
import com.telecominfraproject.wlan.equipmentgateway.models.CEGWStartDebugEngine;
|
||||||
import com.telecominfraproject.wlan.equipmentgateway.models.CEGWStopDebugEngine;
|
import com.telecominfraproject.wlan.equipmentgateway.models.CEGWStopDebugEngine;
|
||||||
@@ -54,6 +56,7 @@ import com.telecominfraproject.wlan.routing.RoutingServiceInterface;
|
|||||||
import com.telecominfraproject.wlan.routing.models.EquipmentGatewayRecord;
|
import com.telecominfraproject.wlan.routing.models.EquipmentGatewayRecord;
|
||||||
import com.telecominfraproject.wlan.routing.models.EquipmentRoutingRecord;
|
import com.telecominfraproject.wlan.routing.models.EquipmentRoutingRecord;
|
||||||
import com.telecominfraproject.wlan.server.exceptions.ConfigurationException;
|
import com.telecominfraproject.wlan.server.exceptions.ConfigurationException;
|
||||||
|
import com.telecominfraproject.wlan.status.equipment.models.EquipmentResetMethod;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Opensync Gateway Controller - integration code for cloud deployment
|
* Opensync Gateway Controller - integration code for cloud deployment
|
||||||
@@ -191,6 +194,9 @@ public class OpensyncCloudGatewayController {
|
|||||||
case RadioReset:
|
case RadioReset:
|
||||||
ret.add(processRadioReset(session, (CEGWRadioResetRequest) command));
|
ret.add(processRadioReset(session, (CEGWRadioResetRequest) command));
|
||||||
break;
|
break;
|
||||||
|
case RebootRequest:
|
||||||
|
ret.add(processRadioReboot(session, (CEGWRebootRequest) command));
|
||||||
|
break;
|
||||||
case ClientBlocklistChangeNotification:
|
case ClientBlocklistChangeNotification:
|
||||||
ret.add(sendClientBlocklistChangeNotification(session,
|
ret.add(sendClientBlocklistChangeNotification(session,
|
||||||
(CEGWClientBlocklistChangeNotification) command));
|
(CEGWClientBlocklistChangeNotification) command));
|
||||||
@@ -224,6 +230,10 @@ public class OpensyncCloudGatewayController {
|
|||||||
return sendMessage(session, command.getInventoryId(), command);
|
return sendMessage(session, command.getInventoryId(), command);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private EquipmentCommandResponse processRadioReboot(OvsdbSession session, CEGWRebootRequest command) {
|
||||||
|
return sendMessage(session, command.getInventoryId(), command);
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/defaults", method = RequestMethod.GET)
|
@RequestMapping(value = "/defaults", method = RequestMethod.GET)
|
||||||
public GatewayDefaults retrieveGatewayDefaults() {
|
public GatewayDefaults retrieveGatewayDefaults() {
|
||||||
return new GatewayDefaults();
|
return new GatewayDefaults();
|
||||||
@@ -339,6 +349,33 @@ public class OpensyncCloudGatewayController {
|
|||||||
response = new EquipmentCommandResponse(CEGWCommandResultCode.UnsupportedCommand,
|
response = new EquipmentCommandResponse(CEGWCommandResultCode.UnsupportedCommand,
|
||||||
"Received Command " + command.getCommandType() + " for " + inventoryId, command,
|
"Received Command " + command.getCommandType() + " for " + inventoryId, command,
|
||||||
registeredGateway.getHostname(), registeredGateway.getPort());
|
registeredGateway.getHostname(), registeredGateway.getPort());
|
||||||
|
} else if (command instanceof CEGWRebootRequest) {
|
||||||
|
|
||||||
|
CEGWRebootRequest rebootRequest = (CEGWRebootRequest) command;
|
||||||
|
// Reboot the AP, Reset method specifies what kind of reboot, i.e.
|
||||||
|
// Factory reset, reboot without changes, etc.
|
||||||
|
EquipmentResetMethod resetMethod = rebootRequest.getPerformReset();
|
||||||
|
switch (resetMethod) {
|
||||||
|
case FactoryReset:
|
||||||
|
response.setResultDetail(tipwlanOvsdbClient.processFactoryResetRequest(inventoryId));
|
||||||
|
break;
|
||||||
|
case NoReset:
|
||||||
|
if (rebootRequest.isUseInactiveBank()) {
|
||||||
|
response.setResultDetail(tipwlanOvsdbClient.processRebootRequest(inventoryId, true));
|
||||||
|
} else {
|
||||||
|
response.setResultDetail(tipwlanOvsdbClient.processRebootRequest(inventoryId, false));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case ConfigReset:
|
||||||
|
case UNSUPPORTED: // for UNSUPPORTED or default just respond
|
||||||
|
// with Unsupported Command
|
||||||
|
default:
|
||||||
|
response = new EquipmentCommandResponse(CEGWCommandResultCode.UnsupportedCommand,
|
||||||
|
"Received Command " + command.getCommandType() + " for " + inventoryId, command,
|
||||||
|
registeredGateway.getHostname(), registeredGateway.getPort());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return response;
|
return response;
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ public interface OvsdbClientInterface {
|
|||||||
Set<String> getConnectedClientIds();
|
Set<String> getConnectedClientIds();
|
||||||
|
|
||||||
String changeRedirectorHost(String apId, String newRedirectorHost);
|
String changeRedirectorHost(String apId, String newRedirectorHost);
|
||||||
|
|
||||||
String startDebugEngine(String apId, String gatewayHostname, Integer gatewayPort);
|
String startDebugEngine(String apId, String gatewayHostname, Integer gatewayPort);
|
||||||
|
|
||||||
String stopDebugEngine(String apId);
|
String stopDebugEngine(String apId);
|
||||||
|
|
||||||
void processConfigChanged(String apId);
|
void processConfigChanged(String apId);
|
||||||
@@ -25,4 +25,9 @@ public interface OvsdbClientInterface {
|
|||||||
String closeSession(String apId);
|
String closeSession(String apId);
|
||||||
|
|
||||||
String processFirmwareFlash(String apId, String firmwareVersion, String username);
|
String processFirmwareFlash(String apId, String firmwareVersion, String username);
|
||||||
|
|
||||||
|
String processRebootRequest(String apId, boolean switchBanks);
|
||||||
|
|
||||||
|
String processFactoryResetRequest(String apId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import com.telecominfraproject.wlan.opensync.external.integration.models.Opensyn
|
|||||||
import com.telecominfraproject.wlan.opensync.external.integration.models.OpensyncAPVIFState;
|
import com.telecominfraproject.wlan.opensync.external.integration.models.OpensyncAPVIFState;
|
||||||
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.OvsdbDao;
|
import com.telecominfraproject.wlan.opensync.ovsdb.dao.OvsdbDao;
|
||||||
|
import com.telecominfraproject.wlan.opensync.ovsdb.dao.utilities.OvsdbStringConstants;
|
||||||
import com.telecominfraproject.wlan.opensync.util.SslUtil;
|
import com.telecominfraproject.wlan.opensync.util.SslUtil;
|
||||||
import com.telecominfraproject.wlan.profile.network.models.ApNetworkConfiguration;
|
import com.telecominfraproject.wlan.profile.network.models.ApNetworkConfiguration;
|
||||||
import com.vmware.ovsdb.callback.ConnectionCallback;
|
import com.vmware.ovsdb.callback.ConnectionCallback;
|
||||||
@@ -752,37 +753,103 @@ public class TipWlanOvsdbClient implements OvsdbClientInterface {
|
|||||||
LOG.debug("TipWlanOvsdbClient::startDebugEngine apId {} gatewayHostname {} gatewayPort {}", apId,
|
LOG.debug("TipWlanOvsdbClient::startDebugEngine apId {} gatewayHostname {} gatewayPort {}", apId,
|
||||||
gatewayHostname, gatewayPort);
|
gatewayHostname, gatewayPort);
|
||||||
|
|
||||||
OvsdbSession session = ovsdbSessionMapInterface.getSession(apId);
|
try {
|
||||||
OvsdbClient ovsdbClient = session.getOvsdbClient();
|
OvsdbSession session = ovsdbSessionMapInterface.getSession(apId);
|
||||||
|
OvsdbClient ovsdbClient = session.getOvsdbClient();
|
||||||
|
|
||||||
// TODO: need to establish what the command will be to start debug
|
// TODO: need to establish what the command will be to start debug
|
||||||
// logging, on the AP side
|
// logging, on the AP side
|
||||||
// For now, use start_debug_engine
|
// For now, use start_debug_engine
|
||||||
// Map will have gateway_host and gateway_port for now
|
// Map will have gateway_host and gateway_port for now
|
||||||
// Delay/Duration TBD, just use 0s for now
|
// Delay/Duration TBD, just use 0s for now
|
||||||
Map<String, String> payload = new HashMap<>();
|
Map<String, String> payload = new HashMap<>();
|
||||||
payload.put("gateway_hostname", gatewayHostname);
|
payload.put("gateway_hostname", gatewayHostname);
|
||||||
payload.put("gateway_port", gatewayPort.toString());
|
payload.put("gateway_port", gatewayPort.toString());
|
||||||
ovsdbDao.configureCommands(ovsdbClient, OvsdbDao.StartDebugEngineApCommand, payload, Long.valueOf(0L),
|
ovsdbDao.configureCommands(ovsdbClient, OvsdbDao.StartDebugEngineApCommand, payload, Long.valueOf(0L),
|
||||||
Long.valueOf(0L));
|
Long.valueOf(0L));
|
||||||
|
|
||||||
LOG.debug("Started debug engine on AP {} with gateway {} port {}", apId, gatewayHostname, gatewayPort);
|
LOG.debug("Started debug engine on AP {} with gateway {} port {}", apId, gatewayHostname, gatewayPort);
|
||||||
return "Started debug engine on AP " + apId + " with gateway " + gatewayHostname + " port " + gatewayPort;
|
return "Started debug engine on AP " + apId + " with gateway " + gatewayHostname + " port " + gatewayPort;
|
||||||
|
} catch (Exception e) {
|
||||||
|
LOG.error(
|
||||||
|
"TipWlanOvsdbClient::startDebugEngine Failed to start debug engine on AP {} with gateway {} port {}",
|
||||||
|
apId, gatewayHostname, gatewayPort, e);
|
||||||
|
return "Failed to start debug engine on AP " + apId + " with gateway " + gatewayHostname + " port "
|
||||||
|
+ gatewayPort;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String stopDebugEngine(String apId) {
|
public String stopDebugEngine(String apId) {
|
||||||
LOG.debug("TipWlanOvsdbClient::stopDebugEngine apId {}", apId);
|
LOG.debug("TipWlanOvsdbClient::stopDebugEngine apId {}", apId);
|
||||||
|
|
||||||
OvsdbSession session = ovsdbSessionMapInterface.getSession(apId);
|
try {
|
||||||
OvsdbClient ovsdbClient = session.getOvsdbClient();
|
OvsdbSession session = ovsdbSessionMapInterface.getSession(apId);
|
||||||
|
OvsdbClient ovsdbClient = session.getOvsdbClient();
|
||||||
|
|
||||||
|
Map<String, String> payload = new HashMap<>();
|
||||||
|
ovsdbDao.configureCommands(ovsdbClient, OvsdbDao.StopDebugEngineApCommand, payload, Long.valueOf(0L),
|
||||||
|
Long.valueOf(0L));
|
||||||
|
|
||||||
|
LOG.debug("TipWlanOvsdbClient::stopDebugEngine Stop debug engine on AP {}", apId);
|
||||||
|
return "Stop debug engine on AP " + apId;
|
||||||
|
} catch (Exception e) {
|
||||||
|
LOG.error("TipWlanOvsdbClient::stopDebugEngine Failed to request stop debug engine on AP {}", apId, e);
|
||||||
|
return "Failed to request stop debug engine on AP " + apId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String processRebootRequest(String apId, boolean switchBanks) {
|
||||||
|
try {
|
||||||
|
OvsdbSession session = ovsdbSessionMapInterface.getSession(apId);
|
||||||
|
OvsdbClient ovsdbClient = session.getOvsdbClient();
|
||||||
|
|
||||||
|
if (switchBanks) {
|
||||||
|
LOG.debug("TipWlanOvsdbClient::processRebootRequest Switch software bank on AP {}", apId);
|
||||||
|
|
||||||
|
ovsdbDao.rebootOrResetAp(ovsdbClient, OvsdbStringConstants.OVSDB_AWLAN_AP_SWITCH_SOFTWARE_BANK);
|
||||||
|
LOG.debug("TipWlanOvsdbClient::processRebootRequest triggered switch software bank on AP {}", apId);
|
||||||
|
return "Switch software bank on AP " + apId;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
LOG.debug("TipWlanOvsdbClient::processRebootRequest Reboot AP {}", apId);
|
||||||
|
|
||||||
|
ovsdbDao.rebootOrResetAp(ovsdbClient, OvsdbStringConstants.OVSDB_AWLAN_AP_REBOOT);
|
||||||
|
LOG.debug("TipWlanOvsdbClient::processRebootRequest triggered reboot of AP {}", apId);
|
||||||
|
return "Reboot AP " + apId;
|
||||||
|
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
if (switchBanks) {
|
||||||
|
LOG.debug("TipWlanOvsdbClient::processRebootRequest failed to trigger switch software bank on AP {}",
|
||||||
|
apId, e);
|
||||||
|
return "failed to trigger switch software bank on AP " + apId;
|
||||||
|
} else {
|
||||||
|
LOG.error("TipWlanOvsdbClient::processRebootRequest failed to trigger reboot of AP {}", apId, e);
|
||||||
|
return "Failed to trigger reboot of AP " + apId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String processFactoryResetRequest(String apId) {
|
||||||
|
|
||||||
|
LOG.debug("TipWlanOvsdbClient::processFactoryResetRequest for AP {}", apId);
|
||||||
|
|
||||||
|
try {
|
||||||
|
OvsdbSession session = ovsdbSessionMapInterface.getSession(apId);
|
||||||
|
OvsdbClient ovsdbClient = session.getOvsdbClient();
|
||||||
|
ovsdbDao.rebootOrResetAp(ovsdbClient, OvsdbStringConstants.OVSDB_AWLAN_AP_FACTORY_RESET);
|
||||||
|
LOG.debug("TipWlanOvsdbClient::processRebootRequest Triggered a factory reset of AP {}", apId);
|
||||||
|
return "Triggered a factory reset of AP " + apId;
|
||||||
|
} catch (Exception e) {
|
||||||
|
LOG.error("TipWlanOvsdbClient::processRebootRequest failed to trigger a factory reset of AP {}", apId, e);
|
||||||
|
return "failed to trigger a factory reset of AP " + apId;
|
||||||
|
}
|
||||||
|
|
||||||
Map<String, String> payload = new HashMap<>();
|
|
||||||
ovsdbDao.configureCommands(ovsdbClient, OvsdbDao.StopDebugEngineApCommand, payload, Long.valueOf(0L),
|
|
||||||
Long.valueOf(0L));
|
|
||||||
|
|
||||||
LOG.debug("Stop debug engine on AP {}", apId);
|
|
||||||
return "Stop debug engine on AP " + apId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1711,7 +1711,7 @@ public class OvsdbDao {
|
|||||||
// ;-)
|
// ;-)
|
||||||
|
|
||||||
RfConfiguration rfConfig = (RfConfiguration) opensyncAPConfig.getRfProfile().getDetails();
|
RfConfiguration rfConfig = (RfConfiguration) opensyncAPConfig.getRfProfile().getDetails();
|
||||||
|
|
||||||
ApElementConfiguration apElementConfiguration = (ApElementConfiguration) opensyncAPConfig.getCustomerEquipment()
|
ApElementConfiguration apElementConfiguration = (ApElementConfiguration) opensyncAPConfig.getCustomerEquipment()
|
||||||
.getDetails();
|
.getDetails();
|
||||||
|
|
||||||
@@ -3648,6 +3648,29 @@ public class OvsdbDao {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void rebootOrResetAp(OvsdbClient ovsdbClient, String desiredApAction) {
|
||||||
|
try {
|
||||||
|
LOG.debug("rebootOrResetAp on AP perform {}.", desiredApAction, upgradeTimerSeconds);
|
||||||
|
List<Operation> operations = new ArrayList<>();
|
||||||
|
Map<String, Value> updateColumns = new HashMap<>();
|
||||||
|
updateColumns.put("firmware_url", new Atom<>(desiredApAction));
|
||||||
|
Row row = new Row(updateColumns);
|
||||||
|
operations.add(new Update(awlanNodeDbTable, row));
|
||||||
|
CompletableFuture<OperationResult[]> fResult = ovsdbClient.transact(ovsdbName, operations);
|
||||||
|
|
||||||
|
OperationResult[] result = fResult.join();
|
||||||
|
for (OperationResult r : result) {
|
||||||
|
LOG.debug("Op Result {}", r);
|
||||||
|
}
|
||||||
|
} catch (OvsdbClientException e) {
|
||||||
|
LOG.error("Could not trigger {}", desiredApAction, e);
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public void removeAllStatsConfigs(OvsdbClient ovsdbClient) {
|
public void removeAllStatsConfigs(OvsdbClient ovsdbClient) {
|
||||||
|
|
||||||
LOG.info("Remove existing Wifi_Stats_Config table entries");
|
LOG.info("Remove existing Wifi_Stats_Config table entries");
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package com.telecominfraproject.wlan.opensync.ovsdb.dao.utilities;
|
|||||||
|
|
||||||
|
|
||||||
public class OvsdbStringConstants {
|
public class OvsdbStringConstants {
|
||||||
|
|
||||||
// freq_band
|
// freq_band
|
||||||
public static final String OVSDB_FREQ_BAND_5G = "5G";
|
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_5GL = "5GL";
|
||||||
@@ -13,5 +13,13 @@ public class OvsdbStringConstants {
|
|||||||
public static final String FW_IMAGE_NAME_KEY = "FW_IMAGE_NAME";
|
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_ACTIVE_KEY = "FW_IMAGE_ACTIVE";
|
||||||
public static final String FW_IMAGE_INACTIVE_KEY = "FW_IMAGE_INACTIVE";
|
public static final String FW_IMAGE_INACTIVE_KEY = "FW_IMAGE_INACTIVE";
|
||||||
|
|
||||||
|
// AWLAN_Node values which can be placed in firmware_url column to trigger
|
||||||
|
// behavior other than firmware download/flash
|
||||||
|
public static final String OVSDB_AWLAN_AP_REBOOT = "reboot";
|
||||||
|
public static final String OVSDB_AWLAN_AP_FACTORY_RESET = "factory";
|
||||||
|
public static final String OVSDB_AWLAN_AP_SWITCH_SOFTWARE_BANK = "switch";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user