WIFI-1170: Need to support Auto-Provisioning in disabled mode (#19)

This commit is contained in:
Mike Hansen
2020-12-08 19:16:21 -05:00
committed by GitHub
parent b8cd98017d
commit 8bc37f4a9a

View File

@@ -787,12 +787,8 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
throw new IllegalStateException("AP is not connected " + apId);
}
int customerId = ovsdbSession.getCustomerId();
Customer customer = customerServiceInterface.getOrNull(customerId);
if ((customer != null) && (customer.getDetails() != null)
&& (customer.getDetails().getAutoProvisioning() != null)
&& customer.getDetails().getAutoProvisioning().isEnabled()) {
Equipment equipmentConfig = equipmentServiceInterface.getByInventoryIdOrNull(apId);
Equipment equipmentConfig = equipmentServiceInterface.getByInventoryIdOrNull(apId);
if (equipmentConfig == null) {
throw new IllegalStateException("Cannot retrieve configuration for " + apId);
}
@@ -879,9 +875,7 @@ public class OpensyncExternalIntegrationCloud implements OpensyncExternalIntegra
ret.setBlockedClients(blockList);
LOG.debug("ApConfig {}", ret);
} else {
LOG.info("Autoconfig is not enabled for this AP {}", apId);
}
} catch (Exception e) {
LOG.error("Cannot read config for AP {}", apId, e);