aboutsummaryrefslogtreecommitdiffstats
path: root/asdc-controller/src/main
diff options
context:
space:
mode:
authoreeginux <henry.xie@est.tech>2019-04-02 14:11:08 +0100
committereeginux <henry.xie@est.tech>2019-04-03 10:52:15 +0100
commitfccb6eccf467f254a7b3df8a0c96ed7f6d38779e (patch)
treedb983d44cda7db90d41c7341b3611fd05b4e8840 /asdc-controller/src/main
parent0ea204d5d1db87a34be2581d8ea4790d0dfacb8b (diff)
skip post instantiation configuration
Update the schema to include new column Ingest the property from tosca to DB https://jira.onap.org/browse/SO-1671 Issue-ID: SO-1671 Change-Id: Ic6d8d2cfccaa24ba1f9320e4fc2f4255d532fb08 Signed-off-by: eeginux <henry.xie@est.tech>
Diffstat (limited to 'asdc-controller/src/main')
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java19
1 files changed, 18 insertions, 1 deletions
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 9f914c586e..04e3782bbe 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
@@ -174,6 +174,7 @@ public class ToscaResourceInstaller {
private static String CUSTOMIZATION_UUID = "customizationUUID";
+ protected static final String SKIP_POST_INST_CONF = "skip_post_instantiation_configuration";
@Autowired
protected ServiceRepository serviceRepo;
@@ -887,13 +888,24 @@ public class ToscaResourceInstaller {
pnfResourceCustomization.setMultiStageDesign(getStringValue(properties.get(MULTI_STAGE_DESIGN)));
pnfResourceCustomization.setBlueprintName(getStringValue(properties.get(SDNC_MODEL_NAME)));
pnfResourceCustomization.setBlueprintVersion(getStringValue(properties.get(SDNC_MODEL_VERSION)));
-
+ pnfResourceCustomization.setSkipPostInstConf(getBooleanValue(properties.get(SKIP_POST_INST_CONF)));
pnfResourceCustomization.setPnfResources(pnfResource);
return pnfResourceCustomization;
}
/**
+ * Get value from {@link Property} and cast to boolean value. Return true if property is null.
+ */
+ private boolean getBooleanValue(Property property) {
+ if (null == property) {
+ return true;
+ }
+ Object value = property.getValue();
+ return new Boolean(String.valueOf(value));
+ }
+
+ /**
* Get value from {@link Property} and cast to String value. Return empty String if property is null value.
*/
private String getStringValue(Property property) {
@@ -2151,6 +2163,11 @@ public class ToscaResourceInstaller {
vnfResourceCustomization.setBlueprintVersion(testNull(toscaResourceStructure.getSdcCsarHelper()
.getNodeTemplatePropertyLeafValue(vfNodeTemplate, SDNC_MODEL_VERSION)));
+ String skipPostInstConfText = toscaResourceStructure.getSdcCsarHelper().getNodeTemplatePropertyLeafValue(vfNodeTemplate, SKIP_POST_INST_CONF);
+ if (skipPostInstConfText != null){
+ vnfResourceCustomization.setSkipPostInstConf(Boolean.parseBoolean(skipPostInstConfText));
+ }
+
vnfResourceCustomization.setVnfResources(vnfResource);
vnfResourceCustomization.setAvailabilityZoneMaxCount(Integer.getInteger(
vfNodeTemplate.getMetaData().getValue(SdcPropertyNames.PROPERTY_NAME_AVAILABILITYZONECOUNT)));