Revert placementInfo to placement in SniroHoming 99/47999/2
authorMarcus G K Williams <marcus.williams@intel.com>
Thu, 17 May 2018 06:59:49 +0000 (23:59 -0700)
committerMarcus G K Williams <marcus.williams@intel.com>
Thu, 17 May 2018 07:37:06 +0000 (00:37 -0700)
Issue-ID: SO-628
Change-Id: I6e9e44d453a72b4e9ec1a0abe99eb8028aa5ba1a
Signed-off-by: Marcus G K Williams <marcus.williams@intel.com>
bpmn/MSOCommonBPMN/src/main/groovy/org/openecomp/mso/bpmn/common/scripts/SniroHoming.groovy
bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowTest.java
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/json/JsonUtilsTest.java
bpmn/MSOCoreBPMN/src/test/resources/json-examples/SNIROExample.json

index 3f53437..0fdd790 100755 (executable)
@@ -182,7 +182,7 @@ class SniroHoming extends AbstractServiceTaskProcessor {
             utils.logAudit("Sniro Async Callback Response is: " + response)
 
             sniroUtils.validateCallbackResponse(execution, response)
-            String placements = jsonUtil.getJsonValue(response, "solutionInfo.placementInfo")
+            String placements = jsonUtil.getJsonValue(response, "solutionInfo.placement")
 
             ServiceDecomposition decomposition = execution.getVariable("serviceDecomposition")
             utils.log("DEBUG", "Service Decomposition: " + decomposition, isDebugEnabled)
index 9b8a249..de25107 100644 (file)
@@ -1526,7 +1526,7 @@ public class WorkflowTest {
                                }\r
                                else {\r
                                        try {\r
-                                               String homingList = getJsonValue(content, "solutionInfo.placementInfo");\r
+                                               String homingList = getJsonValue(content, "solutionInfo.placement");\r
                                                String licenseInfoList = getJsonValue(content, "solutionInfo.licenseInfo");\r
                                                JSONArray placementArr = new JSONArray(homingList);\r
                                                JSONArray licenseArr = new JSONArray(licenseInfoList);\r
@@ -1558,7 +1558,7 @@ public class WorkflowTest {
                                                }\r
                                                String newPlacementInfos = placementArr.toString();\r
                                                String newLicenseInfos = licenseArr.toString();\r
-                                               content = updJsonValue(content, "solutionInfo.placementInfo", newPlacementInfos);\r
+                                               content = updJsonValue(content, "solutionInfo.placement", newPlacementInfos);\r
                                                content = updJsonValue(content, "solutionInfo.licenseInfo", newLicenseInfos);\r
                                        }\r
                                        catch(Exception e) {\r
index 7bb1000..644f983 100644 (file)
@@ -52,7 +52,7 @@ public class JsonUtilsTest {
        public void entryArrayToMapTest() throws IOException {
                JsonUtils utils = new JsonUtils();
                String response = this.getJson("SNIROExample.json");
-               String entry = utils.getJsonValue(response, "solutionInfo.placementInfo");
+               String entry = utils.getJsonValue(response, "solutionInfo.placement");
                JSONArray arr = new JSONArray(entry);
                JSONObject homingDataJson = arr.getJSONObject(0);
                JSONArray assignmentInfo = homingDataJson.getJSONArray("assignmentInfo");
index 838bcd8..7e56b1a 100644 (file)
@@ -11,7 +11,7 @@
                                ]
                        }
                ],
-               "placementInfo": [
+               "placement": [
                        {
                                "assignmentInfo": [
                                        {