diff options
author | Eddy Hautot <eh552t@intl.att.com> | 2018-04-06 10:21:02 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-04-06 10:21:02 +0000 |
commit | 2eb4268fa4a3245989ac348a51715cbb74153e77 (patch) | |
tree | f0db37603d2917dd37fcc0cbb13b86e5e0fcc974 | |
parent | d709bd7188912710e680b8befcd18bbb4fdf817d (diff) | |
parent | ecb70d4efc6e1d0d664cf5d8af8b4634be76ba6b (diff) |
Merge "Fix Sonar issue"
-rw-r--r-- | src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarInstallerImpl.java | 8 | ||||
-rw-r--r-- | src/test/java/org/onap/clamp/clds/it/sdc/controller/installer/CsarInstallerItCase.java | 6 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarInstallerImpl.java b/src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarInstallerImpl.java index 4c6ed7fc..b7acbcc3 100644 --- a/src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarInstallerImpl.java +++ b/src/main/java/org/onap/clamp/clds/sdc/controller/installer/CsarInstallerImpl.java @@ -58,6 +58,7 @@ public class CsarInstallerImpl implements CsarInstaller { private Map<String, BlueprintParserFilesConfiguration> bpmnMapping = new HashMap<>(); public static final String TEMPLATE_NAME_PREFIX = "DCAE-Designer-ClosedLoopTemplate-"; public static final String MODEL_NAME_PREFIX = "ClosedLoop-"; + public static final String GET_INPUT_BLUEPRINT_PARAM = "get_input"; /** * The file name that will be loaded by Spring. */ @@ -132,9 +133,9 @@ public class CsarInstallerImpl implements CsarInstaller { policyNameList.add(filteredPolicyName); } else { String inputPolicyName = (String) ((Map<String, Object>) ((Map<String, Object>) ((Map<String, Object>) ef - .getValue()).get("properties")).get("policy_id")).get("get_input"); + .getValue()).get("properties")).get("policy_id")).get(GET_INPUT_BLUEPRINT_PARAM); if (inputPolicyName != null) { - policyNameList.add("get_input"); + policyNameList.add(GET_INPUT_BLUEPRINT_PARAM); } } }); @@ -184,7 +185,8 @@ public class CsarInstallerImpl implements CsarInstaller { cldsModel.setPropText("{\"global\":[{\"name\":\"service\",\"value\":[\"" + csar.getBlueprintInvariantServiceUuid() + "\"]},{\"name\":\"vf\",\"value\":[\"" + csar.getBlueprintInvariantResourceUuid() - + "\"]},{\"name\":\"actionSet\",\"value\":[\"vnfRecipe\"]},{\"name\":\"location\",\"value\":[\"DC1\"]}]}"); + + "\"]},{\"name\":\"actionSet\",\"value\":[\"vnfRecipe\"]},{\"name\":\"location\",\"value\":[\"DC1\"]},{\"name\":\"deployParameters\",\"value\":{\n" + + " \"policy_id\": \"" + "test" + "\"" + " }}]}"); cldsModel.setBpmnText(cldsTemplate.getBpmnText()); cldsModel.setTypeId(serviceTypeId); cldsModel.save(cldsDao, null); diff --git a/src/test/java/org/onap/clamp/clds/it/sdc/controller/installer/CsarInstallerItCase.java b/src/test/java/org/onap/clamp/clds/it/sdc/controller/installer/CsarInstallerItCase.java index 3a8e03f4..b0035a64 100644 --- a/src/test/java/org/onap/clamp/clds/it/sdc/controller/installer/CsarInstallerItCase.java +++ b/src/test/java/org/onap/clamp/clds/it/sdc/controller/installer/CsarInstallerItCase.java @@ -45,9 +45,9 @@ import org.onap.clamp.clds.sdc.controller.installer.CsarHandler; import org.onap.clamp.clds.sdc.controller.installer.CsarInstaller; import org.onap.clamp.clds.sdc.controller.installer.CsarInstallerImpl; import org.onap.clamp.clds.util.ResourceFileUtil; -import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper; -import org.openecomp.sdc.tosca.parser.exceptions.SdcToscaParserException; -import org.openecomp.sdc.toscaparser.api.elements.Metadata; +import org.onap.sdc.tosca.parser.api.ISdcCsarHelper; +import org.onap.sdc.tosca.parser.exceptions.SdcToscaParserException; +import org.onap.sdc.toscaparser.api.elements.Metadata; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; |