diff options
author | Determe, Sebastien (sd378r) <sd378r@intl.att.com> | 2018-04-06 11:48:07 +0200 |
---|---|---|
committer | Determe, Sebastien (sd378r) <sd378r@intl.att.com> | 2018-04-06 11:48:07 +0200 |
commit | dd2d790dd97ec4260531bc1fdce5766bf85797d8 (patch) | |
tree | e63b1e68ce28cc2a956d762e9321310558691542 /src/main/java/org/onap | |
parent | e1f91b9e7de0b53e69cefdeebd0a0afc69ea2a5b (diff) |
Update SDC library
Upgrade SDC library to latest and remove the message bus condition, it's
now a mandatory parameter as well
Issue-ID: CLAMP-149
Change-Id: I4c7ddcca6ac176380821bd8f1e4e3ef3d9fcea30
Signed-off-by: Determe, Sebastien (sd378r) <sd378r@intl.att.com>
Diffstat (limited to 'src/main/java/org/onap')
4 files changed, 27 insertions, 27 deletions
diff --git a/src/main/java/org/onap/clamp/clds/config/sdc/SdcSingleControllerConfiguration.java b/src/main/java/org/onap/clamp/clds/config/sdc/SdcSingleControllerConfiguration.java index e2aac55f1..bc3d1b986 100644 --- a/src/main/java/org/onap/clamp/clds/config/sdc/SdcSingleControllerConfiguration.java +++ b/src/main/java/org/onap/clamp/clds/config/sdc/SdcSingleControllerConfiguration.java @@ -36,7 +36,7 @@ import java.util.List; import org.apache.commons.codec.DecoderException; import org.onap.clamp.clds.exception.sdc.controller.SdcParametersException; import org.onap.clamp.clds.util.CryptoUtils; -import org.openecomp.sdc.api.consumer.IConfiguration; +import org.onap.sdc.api.consumer.IConfiguration; /** * This class maps the SDC config JSON for one controller. @@ -129,8 +129,8 @@ public class SdcSingleControllerConfiguration implements IConfiguration { private String getEncryptedStringConfig(String key) throws GeneralSecurityException, DecoderException { if (jsonRootNode != null && jsonRootNode.get(key) != null) { - String config = CryptoUtils.decrypt(jsonRootNode.get(key).asText()); - return config.isEmpty() ? null : config; + return jsonRootNode.get(key).asText().isEmpty() ? null + : CryptoUtils.decrypt(jsonRootNode.get(key).asText()); } return null; } @@ -241,10 +241,10 @@ public class SdcSingleControllerConfiguration implements IConfiguration { throw new SdcParametersException(ENVIRONMENT_NAME_ATTRIBUTE_NAME + errorMessageKeyNotFound); } if (this.getAsdcAddress() == null || this.getAsdcAddress().isEmpty()) { - if (this.getMsgBusAddress() == null || this.getMsgBusAddress().isEmpty()) { - throw new SdcParametersException(SDC_ADDRESS_ATTRIBUTE_NAME + " and " + MESSAGE_BUS_ADDRESSES - + " are not set, one of them should be set for SDC client" + errorMessageKeyNotFound); - } + throw new SdcParametersException(SDC_ADDRESS_ATTRIBUTE_NAME + errorMessageKeyNotFound); + } + if (this.getMsgBusAddress() == null || this.getMsgBusAddress().isEmpty()) { + throw new SdcParametersException(MESSAGE_BUS_ADDRESSES + errorMessageKeyNotFound); } if (this.getPassword() == null || this.getPassword().isEmpty()) { throw new SdcParametersException(SDC_KEY_ATTRIBUTE_NAME + errorMessageKeyNotFound); diff --git a/src/main/java/org/onap/clamp/clds/sdc/controller/DistributionStatusMessage.java b/src/main/java/org/onap/clamp/clds/sdc/controller/DistributionStatusMessage.java index db5d271b0..ca4f97b1d 100644 --- a/src/main/java/org/onap/clamp/clds/sdc/controller/DistributionStatusMessage.java +++ b/src/main/java/org/onap/clamp/clds/sdc/controller/DistributionStatusMessage.java @@ -23,8 +23,8 @@ package org.onap.clamp.clds.sdc.controller; -import org.openecomp.sdc.api.consumer.IDistributionStatusMessage; -import org.openecomp.sdc.utils.DistributionStatusEnum; +import org.onap.sdc.api.consumer.IDistributionStatusMessage; +import org.onap.sdc.utils.DistributionStatusEnum; public class DistributionStatusMessage implements IDistributionStatusMessage { 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 c02edbbf9..2744ef7ae 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 @@ -38,17 +38,17 @@ import org.onap.clamp.clds.exception.sdc.controller.SdcParametersException; import org.onap.clamp.clds.sdc.controller.installer.CsarHandler;
import org.onap.clamp.clds.sdc.controller.installer.CsarInstaller;
import org.onap.clamp.clds.util.LoggingUtils;
-import org.openecomp.sdc.api.IDistributionClient;
-import org.openecomp.sdc.api.consumer.IDistributionStatusMessage;
-import org.openecomp.sdc.api.consumer.INotificationCallback;
-import org.openecomp.sdc.api.notification.IArtifactInfo;
-import org.openecomp.sdc.api.notification.INotificationData;
-import org.openecomp.sdc.api.results.IDistributionClientDownloadResult;
-import org.openecomp.sdc.api.results.IDistributionClientResult;
-import org.openecomp.sdc.impl.DistributionClientFactory;
-import org.openecomp.sdc.tosca.parser.exceptions.SdcToscaParserException;
-import org.openecomp.sdc.utils.DistributionActionResultEnum;
-import org.openecomp.sdc.utils.DistributionStatusEnum;
+import org.onap.sdc.api.IDistributionClient;
+import org.onap.sdc.api.consumer.IDistributionStatusMessage;
+import org.onap.sdc.api.consumer.INotificationCallback;
+import org.onap.sdc.api.notification.IArtifactInfo;
+import org.onap.sdc.api.notification.INotificationData;
+import org.onap.sdc.api.results.IDistributionClientDownloadResult;
+import org.onap.sdc.api.results.IDistributionClientResult;
+import org.onap.sdc.impl.DistributionClientFactory;
+import org.onap.sdc.tosca.parser.exceptions.SdcToscaParserException;
+import org.onap.sdc.utils.DistributionActionResultEnum;
+import org.onap.sdc.utils.DistributionStatusEnum;
/**
* This class handles one sdc controller defined in the config.
diff --git a/src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarHandler.java b/src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarHandler.java index 97ab05868..2b83905a8 100644 --- a/src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarHandler.java +++ b/src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarHandler.java @@ -41,13 +41,13 @@ import java.util.zip.ZipFile; import org.onap.clamp.clds.exception.sdc.controller.CsarHandlerException; import org.onap.clamp.clds.exception.sdc.controller.SdcArtifactInstallerException; -import org.openecomp.sdc.api.notification.IArtifactInfo; -import org.openecomp.sdc.api.notification.INotificationData; -import org.openecomp.sdc.api.notification.IResourceInstance; -import org.openecomp.sdc.api.results.IDistributionClientDownloadResult; -import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; -import org.openecomp.sdc.tosca.parser.exceptions.SdcToscaParserException; -import org.openecomp.sdc.tosca.parser.impl.SdcToscaParserFactory; +import org.onap.sdc.api.notification.IArtifactInfo; +import org.onap.sdc.api.notification.INotificationData; +import org.onap.sdc.api.notification.IResourceInstance; +import org.onap.sdc.api.results.IDistributionClientDownloadResult; +import org.onap.sdc.tosca.parser.api.ISdcCsarHelper; +import org.onap.sdc.tosca.parser.exceptions.SdcToscaParserException; +import org.onap.sdc.tosca.parser.impl.SdcToscaParserFactory; /** * CsarDescriptor that will be used to deploy file in CLAMP file system. Some |