aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Puzikov <d.puzikov2@partner.samsung.com>2020-03-04 18:30:00 +0100
committerKonrad Banka <k.banka@samsung.com>2020-05-05 08:08:53 +0000
commit5f11eb43b37b14cb6b5517d7e40fcf03f3196deb (patch)
tree01e7d2b6b4f79b7c06ad4873c3d1b842feed5ada
parent06b72689ad69107c35692f4b49577868e751f559 (diff)
Fix CBA artifact recognition by SDC
This patch fixes CBA artifact recogntion as 'OTHER' instead of 'CONTROLLER_BLUEPRINT_ARCHIVE'. Change-Id: I15d8ef62a57e4a0f627949e267209cba3cbe4c56 Issue-ID: SDC-2776 Signed-off-by: Dmitry Puzikov <d.puzikov2@partner.samsung.com> (cherry picked from commit f264cf6aa20a97b05a92d4dd3aa7ca4ee49db7f1)
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/manifest/FileData.java1
-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/services/impl/filedatastructuremodule/ManifestCreatorNamingConventionImpl.java9
2 files changed, 9 insertions, 1 deletions
diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/manifest/FileData.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/manifest/FileData.java
index 4fcf02c66a..264052386d 100644
--- a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/manifest/FileData.java
+++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/manifest/FileData.java
@@ -94,6 +94,7 @@ public class FileData {
VENDOR_LICENSE("VENDOR_LICENSE"),
VF_LICENSE("VF_LICENSE"),
CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT("CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT"),
+ CONTROLLER_BLUEPRINT_ARCHIVE("CONTROLLER_BLUEPRINT_ARCHIVE"),
OTHER("OTHER"),
PNF_SW_INFORMATION("PNF_SW_INFORMATION");
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/services/impl/filedatastructuremodule/ManifestCreatorNamingConventionImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/impl/filedatastructuremodule/ManifestCreatorNamingConventionImpl.java
index e1a47db9db..cac846294f 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/impl/filedatastructuremodule/ManifestCreatorNamingConventionImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/services/impl/filedatastructuremodule/ManifestCreatorNamingConventionImpl.java
@@ -40,6 +40,7 @@ public class ManifestCreatorNamingConventionImpl implements ManifestCreator {
private static final String CLOUD_SPECIFIC_FIXED_KEY_WORD = "cloudtech";
private static final String[][] CLOUD_SPECIFIC_KEY_WORDS = {{"k8s", "azure", "aws"}, /* cloud specific technology */
{"charts", "day0", "configtemplate"} /*cloud specific sub type*/};
+ private static final String CONTROLLER_BLUEPRINT_ARCHIVE_FIXED_KEY_WORD = "CBA";
@Override
public Optional<ManifestContent> createManifest(
@@ -150,6 +151,10 @@ public class ManifestCreatorNamingConventionImpl implements ManifestCreator {
}
}
+ private boolean isControllerBlueprintArchive(String artifact) {
+ return artifact.toUpperCase().contains(CONTROLLER_BLUEPRINT_ARCHIVE_FIXED_KEY_WORD);
+ }
+
private void addArtifactsToManifestFileDataList(
FilesDataStructure filesDataStructure, List<FileData> fileDataList) {
Collection<String> forArtifacts = CollectionUtils
@@ -158,8 +163,10 @@ public class ManifestCreatorNamingConventionImpl implements ManifestCreator {
for (String artifact : forArtifacts) {
if (isCloudSpecificArtifact(artifact)) {
fileDataList.add(createBaseFileData(FileData.Type.CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT, artifact));
+ } else if (isControllerBlueprintArchive(artifact)) {
+ fileDataList.add(createBaseFileData(FileData.Type.CONTROLLER_BLUEPRINT_ARCHIVE, artifact));
} else {
- fileDataList.add(createBaseFileData(FileData.Type.OTHER, artifact));
+ fileDataList.add(createBaseFileData(FileData.Type.OTHER, artifact));
}
}
}