aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
authorEddy Hautot <eh552t@intl.att.com>2018-05-16 12:47:14 +0000
committerGerrit Code Review <gerrit@onap.org>2018-05-16 12:47:14 +0000
commitf172e9d4656c960e81f72cc6d6e52770271df9c9 (patch)
treedfa0cc6ec41c0586d0a45fc49ad9641a2b16a519 /src/main/java/org
parentb0cb4d108c3428ca6c6809c110dc430438bbfc24 (diff)
parentf520d38414df03382d6af4f902e1d86ca67a0655 (diff)
Merge "Fix Sdc controller"
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/onap/clamp/clds/config/spring/CldsSdcControllerConfiguration.java9
-rw-r--r--src/main/java/org/onap/clamp/clds/sdc/controller/SdcSingleController.java5
-rw-r--r--src/main/java/org/onap/clamp/clds/service/CldsService.java2
3 files changed, 6 insertions, 10 deletions
diff --git a/src/main/java/org/onap/clamp/clds/config/spring/CldsSdcControllerConfiguration.java b/src/main/java/org/onap/clamp/clds/config/spring/CldsSdcControllerConfiguration.java
index 46c483f99..055847085 100644
--- a/src/main/java/org/onap/clamp/clds/config/spring/CldsSdcControllerConfiguration.java
+++ b/src/main/java/org/onap/clamp/clds/config/spring/CldsSdcControllerConfiguration.java
@@ -60,13 +60,8 @@ public class CldsSdcControllerConfiguration {
public void loadSdcControllers() {
SdcControllersConfiguration sdcControllersConfig = getSdcControllersConfiguration();
sdcControllersConfig.getAllDefinedControllers().forEach((k, v) -> {
- logger.info("Instantiating controller :" + k);
+ logger.info("Creating controller instance:" + k);
SdcSingleController sdcController = new SdcSingleController(clampProp, csarInstaller, v, true);
- try {
- sdcController.initSdc();
- } catch (SdcControllerException e) {
- logger.error("Exception caught when starting sdc controller", e);
- }
sdcControllersList.add(sdcController);
});
}
@@ -80,7 +75,7 @@ public class CldsSdcControllerConfiguration {
controller.initSdc();
}
} catch (SdcControllerException e) {
- logger.error("Exception caught when rebooting sdc controller", e);
+ logger.error("Exception caught when booting sdc controller", e);
}
}
logger.info("SDC Controllers check completed");
diff --git a/src/main/java/org/onap/clamp/clds/sdc/controller/SdcSingleController.java b/src/main/java/org/onap/clamp/clds/sdc/controller/SdcSingleController.java
index 3421ee9e8..9cad683af 100644
--- a/src/main/java/org/onap/clamp/clds/sdc/controller/SdcSingleController.java
+++ b/src/main/java/org/onap/clamp/clds/sdc/controller/SdcSingleController.java
@@ -145,7 +145,7 @@ public class SdcSingleController {
* If there is an issue with the parameters provided
*/
public void initSdc() throws SdcControllerException {
- logger.info("Attempt to initialize the SDC Controller");
+ logger.info("Attempt to initialize the SDC Controller: " + sdcConfig.getSdcControllerName());
if (this.getControllerStatus() != SdcSingleControllerStatus.STOPPED) {
throw new SdcControllerException("The controller is already initialized, call the closeSDC method first");
}
@@ -159,6 +159,8 @@ public class SdcSingleController {
throw new SdcControllerException("Initialization of the SDC Controller failed with reason: "
+ result.getDistributionMessageResult());
}
+ logger.info("SDC Controller successfully initialized: " + sdcConfig.getSdcControllerName());
+ logger.info("Attempt to start the SDC Controller: " + sdcConfig.getSdcControllerName());
result = this.distributionClient.start();
if (!result.getDistributionActionResult().equals(DistributionActionResultEnum.SUCCESS)) {
logger.error("SDC distribution client start failed with reason:" + result.getDistributionMessageResult());
@@ -166,6 +168,7 @@ public class SdcSingleController {
throw new SdcControllerException(
"Startup of the SDC Controller failed with reason: " + result.getDistributionMessageResult());
}
+ logger.info("SDC Controller successfully started: " + sdcConfig.getSdcControllerName());
this.changeControllerStatus(SdcSingleControllerStatus.IDLE);
}
diff --git a/src/main/java/org/onap/clamp/clds/service/CldsService.java b/src/main/java/org/onap/clamp/clds/service/CldsService.java
index 592a94575..888b782e1 100644
--- a/src/main/java/org/onap/clamp/clds/service/CldsService.java
+++ b/src/main/java/org/onap/clamp/clds/service/CldsService.java
@@ -36,7 +36,6 @@ import java.util.Date;
import java.util.List;
import java.util.Properties;
import java.util.UUID;
-import java.util.concurrent.TimeUnit;
import javax.annotation.PostConstruct;
import javax.ws.rs.BadRequestException;
@@ -121,7 +120,6 @@ public class CldsService extends SecureServiceBase {
private SecureServicePermission permissionUpdateCl;
private SecureServicePermission permissionReadTemplate;
private SecureServicePermission permissionUpdateTemplate;
- private static final long DCAE_DEPLOY_WAITING_TIME = TimeUnit.SECONDS.toNanos(30);
@PostConstruct
private final void afterConstruction() {