aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be/src/main
diff options
context:
space:
mode:
authorMichaelMorris <michael.morris@est.tech>2022-04-14 15:19:07 +0100
committerVasyl Razinkov <vasyl.razinkov@est.tech>2022-04-21 11:50:55 +0000
commit18950cf448def2f5b8493724c1b01b1292672c1d (patch)
tree2aa34998f96d23b6d47d2bcaed2404ccfba7d54b /catalog-be/src/main
parent117fb0e50d4b83f2f3faa7c372458ef539c63664 (diff)
Enable identification of system deployed VFCs
Signed-off-by: MichaelMorris <michael.morris@est.tech> Issue-ID: SDC-3972 Change-Id: Ia3513020f508275827b34111c6eb2921204d9320
Diffstat (limited to 'catalog-be/src/main')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceImportManager.java3
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AbstractValidationsServlet.java1
2 files changed, 3 insertions, 1 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceImportManager.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceImportManager.java
index 8c6e9cb2a2..0681dd495e 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceImportManager.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceImportManager.java
@@ -148,7 +148,7 @@ public class ResourceImportManager {
lifecycleChangeInfo.setUserRemarks("certification on import");
Function<Resource, Boolean> validator = resource -> resourceBusinessLogic.validatePropertiesDefaultValues(resource);
return importCertifiedResource(resourceYml, resourceMetaData, creator, validator, lifecycleChangeInfo, isInTransaction, createNewVersion,
- needLock, null, null, false, null, null, false);
+ needLock, null, null, false, null, null, false);
}
public void importAllNormativeResource(final String resourcesYaml, final NodeTypesMetadataList nodeTypesMetadataList, final User user,
@@ -215,6 +215,7 @@ public class ResourceImportManager {
setMetaDataFromJson(resourceMetaData, resource);
populateResourceFromYaml(resourceYml, resource);
validationFunction.apply(resource);
+ resource.getComponentMetadataDefinition().getMetadataDataDefinition().setNormative(resourceMetaData.isNormative());
checkResourceExists(createNewVersion, csarInfo, resource);
resource = resourceBusinessLogic
.createOrUpdateResourceByImport(resource, creator, true, isInTransaction, needLock, csarInfo, nodeName, isNested).left;
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AbstractValidationsServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AbstractValidationsServlet.java
index 02f96ad09e..7c300b310d 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AbstractValidationsServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/servlets/AbstractValidationsServlet.java
@@ -292,6 +292,7 @@ public abstract class AbstractValidationsServlet extends BeGenericServlet {
if (resourceInfoObject == null) {
isValid = false;
} else {
+ resourceInfoObject.setNormative(!resourceAuthorityEnum.isUserTypeResource());
if (!resourceAuthorityEnum.isBackEndImport()) {
isValid = resourceInfoObject.getPayloadName() != null && !resourceInfoObject.getPayloadName().isEmpty();
//only resource name is checked