From 6c32cbc7343bd56f62007451071c4b26c875382f Mon Sep 17 00:00:00 2001 From: vasraz Date: Fri, 26 Nov 2021 14:40:29 +0000 Subject: Add VNFD to NSD when using S3 storage Change-Id: I8eb810fadfe54b335647e71e21115514963b4be7 Signed-off-by: Vasyl Razinkov Issue-ID: SDC-3792 --- .../org/openecomp/sdc/be/config/Configuration.java | 36 ++++++++++++++++++++-- .../be/csar/storage/ArtifactStorageManager.java | 4 +++ 2 files changed, 38 insertions(+), 2 deletions(-) (limited to 'common-app-api/src/main') diff --git a/common-app-api/src/main/java/org/openecomp/sdc/be/config/Configuration.java b/common-app-api/src/main/java/org/openecomp/sdc/be/config/Configuration.java index 6ac82a547d..cabda08ce7 100644 --- a/common-app-api/src/main/java/org/openecomp/sdc/be/config/Configuration.java +++ b/common-app-api/src/main/java/org/openecomp/sdc/be/config/Configuration.java @@ -144,6 +144,7 @@ public class Configuration extends BasicConfiguration { private EcompPortalConfig ecompPortal; private List artifacts; private Map>> componentAllowedInstanceTypes; + private ExternalCsarStore externalCsarStore; @SuppressWarnings("unchecked") private Map safeGetCapsInsensitiveMap(Map map) { @@ -165,8 +166,8 @@ public class Configuration extends BasicConfiguration { public Map> getExcludedGroupTypesMapping() { return safeGetCapsInsensitiveMap(excludedGroupTypesMapping); } - - public List>> getDefaultImports(){ + + public List>> getDefaultImports() { return Collections.unmodifiableList(defaultImports); } @@ -483,4 +484,35 @@ public class Configuration extends BasicConfiguration { private String artifactType; private List pathsAndNamesDefinitions; } + + @Getter + @Setter + @NoArgsConstructor + public static class ExternalCsarStore { + + private String storageType; + private Endpoint endpoint; + private Credentials credentials; + private String tempPath; + + @Getter + @Setter + @NoArgsConstructor + public static class Endpoint { + + private String host; + private int port; + private boolean secure; + } + + @Getter + @Setter + @NoArgsConstructor + public static class Credentials { + + private String accessKey; + private String secretKey; + } + } + } diff --git a/common-app-api/src/main/java/org/openecomp/sdc/be/csar/storage/ArtifactStorageManager.java b/common-app-api/src/main/java/org/openecomp/sdc/be/csar/storage/ArtifactStorageManager.java index 0a4f355642..f7d611b717 100644 --- a/common-app-api/src/main/java/org/openecomp/sdc/be/csar/storage/ArtifactStorageManager.java +++ b/common-app-api/src/main/java/org/openecomp/sdc/be/csar/storage/ArtifactStorageManager.java @@ -47,6 +47,8 @@ public interface ArtifactStorageManager { */ ArtifactInfo upload(String vspId, String versionId, InputStream fileToUpload); + void put(String vspId, String name, InputStream fileToUpload); + /** * Checks if the Artifact Storage is enabled. * @@ -63,5 +65,7 @@ public interface ArtifactStorageManager { InputStream get(final ArtifactInfo artifactInfo); + InputStream get(final String vspId, final String versionId); + void delete(ArtifactInfo artifactInfo); } -- cgit 1.2.3-korg