From 5d4f34c49eece70dc46633da5d978a5774ddc467 Mon Sep 17 00:00:00 2001 From: tragait Date: Wed, 16 Sep 2020 12:51:21 +0100 Subject: software-version fix In this commit software_versions added to the pnf customization table. A test case is also written to verify if the software_versions of type string is added to the pnfcustomization. Signed-off-by: tragait Change-Id: Id07fe79e67ac96e71e6fe3775cce801edd81a42a Signed-off-by: tragait Issue-ID: SO-3119 Signed-off-by: tragait --- .../java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'asdc-controller/src/main/java/org') diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java index 7efc397e30..73b825dc78 100644 --- a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java +++ b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java @@ -46,6 +46,7 @@ import org.onap.sdc.api.notification.IResourceInstance; import org.onap.sdc.api.notification.IStatusData; import org.onap.sdc.tosca.parser.api.IEntityDetails; import org.onap.sdc.tosca.parser.api.ISdcCsarHelper; +import org.onap.sdc.tosca.parser.elements.EntityDetails; import org.onap.sdc.tosca.parser.elements.queries.EntityQuery; import org.onap.sdc.tosca.parser.elements.queries.EntityQuery.EntityQueryBuilder; import org.onap.sdc.tosca.parser.elements.queries.TopologyTemplateQuery; @@ -133,6 +134,8 @@ public class ToscaResourceInstaller { private static final String CDS_MODEL_VERSION = "cds_model_version"; + private static final String DEFAULT_SOFTWARE_VERSION = "default_software_version"; + @Autowired protected ServiceRepository serviceRepo; @@ -932,6 +935,7 @@ public class ToscaResourceInstaller { pnfResourceCustomization.setBlueprintVersion(getStringValue(properties.get(SDNC_MODEL_VERSION))); pnfResourceCustomization.setSkipPostInstConf(getBooleanValue(properties.get(SKIP_POST_INST_CONF))); pnfResourceCustomization.setControllerActor(getStringValue(properties.get(CONTROLLER_ACTOR))); + pnfResourceCustomization.setDefaultSoftwareVersion(getStringValue(properties.get(DEFAULT_SOFTWARE_VERSION))); pnfResourceCustomization.setPnfResources(pnfResource); return pnfResourceCustomization; } -- cgit 1.2.3-korg