summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib
diff options
context:
space:
mode:
authorandre.schmid <andre.schmid@est.tech>2022-03-25 19:30:14 +0000
committerandre.schmid <andre.schmid@est.tech>2022-03-31 18:19:04 +0100
commit115b2ef065fa652b380093e4f2571e53c3f0bc19 (patch)
treec325e09c003f2d8d55b09692ffbd4e79e53da3aa /openecomp-be/lib/openecomp-sdc-vendor-software-product-lib
parent6cffd9e3eecb10281d880ea7d217f0ecddf8fb5a (diff)
Fix package storage and reducer config reload
The package storage configuration was not being reloaded when a configuration file change was made. Increases OrchestrationTemplateCandidateImpl coverage by testing the upload to the artifact storage. Issue-ID: SDC-3934 Change-Id: I533b3c3a92cdadb60a375890da85ee053364e8af Signed-off-by: andre.schmid <andre.schmid@est.tech>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-vendor-software-product-lib')
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/OrchestrationTemplateCandidateDaoZusammenImpl.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/OrchestrationTemplateCandidateDaoZusammenImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/OrchestrationTemplateCandidateDaoZusammenImpl.java
index fbb25de0da..f18e15efb7 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/OrchestrationTemplateCandidateDaoZusammenImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/OrchestrationTemplateCandidateDaoZusammenImpl.java
@@ -54,12 +54,12 @@ public class OrchestrationTemplateCandidateDaoZusammenImpl implements Orchestrat
private static final Logger LOGGER = LoggerFactory.getLogger(OrchestrationTemplateCandidateDaoZusammenImpl.class);
private static final String EMPTY_DATA = "{}";
private final ZusammenAdaptor zusammenAdaptor;
- private final ArtifactStorageManager artifactStorageManager;
+ private final StorageFactory storageFactory;
public OrchestrationTemplateCandidateDaoZusammenImpl(final ZusammenAdaptor zusammenAdaptor) {
this.zusammenAdaptor = zusammenAdaptor;
LOGGER.info("Instantiating artifactStorageManager");
- this.artifactStorageManager = new StorageFactory().createArtifactStorageManager();
+ this.storageFactory = new StorageFactory();
}
@Override
@@ -158,6 +158,7 @@ public class OrchestrationTemplateCandidateDaoZusammenImpl implements Orchestrat
final String originalFileSuffix = candidateData.getOriginalFileSuffix();
originalPackageElement.getInfo().addProperty(InfoPropertyName.ORIGINAL_FILE_NAME.getVal(), originalFileName);
originalPackageElement.getInfo().addProperty(InfoPropertyName.ORIGINAL_FILE_SUFFIX.getVal(), originalFileSuffix);
+ final ArtifactStorageManager artifactStorageManager = storageFactory.createArtifactStorageManager();
originalPackageElement.getInfo().addProperty("storeCsarsExternally", artifactStorageManager.isEnabled());
if (artifactStorageManager.isEnabled()) {
final ArtifactInfo candidateArtifactInfo = candidateData.getArtifactInfo();