Add blueprint input 59/39159/1
authorDeterme, Sebastien (sd378r) <sd378r@intl.att.com>
Tue, 27 Mar 2018 16:19:32 +0000 (18:19 +0200)
committerDeterme, Sebastien (sd378r) <sd378r@intl.att.com>
Tue, 27 Mar 2018 16:22:54 +0000 (18:22 +0200)
Add blueprint json input support for DCAE call

Issue-ID: CLAMP-142
Change-Id: I52657ff7ead38681eae2744a30271f0a1b825bb6
Signed-off-by: Determe, Sebastien (sd378r) <sd378r@intl.att.com>
src/main/java/org/onap/clamp/clds/client/DcaeDispatcherServices.java
src/main/java/org/onap/clamp/clds/model/properties/AbstractModelElement.java
src/main/java/org/onap/clamp/clds/model/properties/Global.java
src/main/java/org/onap/clamp/clds/service/CldsService.java
src/test/java/org/onap/clamp/clds/model/prop/ModelPropertiesTest.java
src/test/resources/example/model-properties/holmes/modelBpmnProperties.json
src/test/resources/example/model-properties/tca/modelBpmnProperties.json

index f20668e..26281da 100644 (file)
@@ -25,6 +25,7 @@ package org.onap.clamp.clds.client;
 \r
 import com.att.eelf.configuration.EELFLogger;\r
 import com.att.eelf.configuration.EELFManager;\r
+import com.fasterxml.jackson.databind.JsonNode;\r
 import com.fasterxml.jackson.databind.node.ObjectNode;\r
 \r
 import java.util.Date;\r
@@ -152,16 +153,19 @@ public class DcaeDispatcherServices {
      *            The deployment ID\r
      * @param serviceTypeId\r
      *            Service type ID\r
-     * @param blueprintInput\r
+     * @param blueprintInputJson\r
      *            The value for each blueprint parameters in a flat JSON\r
      * @return The status URL\r
      */\r
-    public String createNewDeployment(String deploymentId, String serviceTypeId) {\r
+    public String createNewDeployment(String deploymentId, String serviceTypeId, JsonNode blueprintInputJson) {\r
         Date startTime = new Date();\r
         LoggingUtils.setTargetContext("DCAE", "createNewDeployment");\r
         try {\r
             ObjectNode rootNode = (ObjectNode) refProp.getJsonTemplate("dcae.deployment.template");\r
             rootNode.put("serviceTypeId", serviceTypeId);\r
+            if (blueprintInputJson != null) {\r
+                rootNode.put("inputs", blueprintInputJson);\r
+            }\r
             String apiBodyString = rootNode.toString();\r
             logger.info("Dcae api Body String - " + apiBodyString);\r
             String url = refProp.getStringValue(DCAE_URL_PROPERTY_NAME) + DCAE_URL_PREFIX + deploymentId;\r
index 9b8d9d9..118059d 100644 (file)
@@ -26,29 +26,26 @@ package org.onap.clamp.clds.model.properties;
 import com.att.eelf.configuration.EELFLogger;
 import com.att.eelf.configuration.EELFManager;
 import com.fasterxml.jackson.databind.JsonNode;
+
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
 /**
  * Provide base ModelElement functionality. Perform base parsing of properties
- * for a ModelElement (such as, VesCollector, Policy, Tca, Holmes,
- * ...)
+ * for a ModelElement (such as, VesCollector, Policy, Tca, Holmes, ...)
  */
 public abstract class AbstractModelElement {
 
     protected static final EELFLogger logger = EELFManager.getInstance().getLogger(AbstractModelElement.class);
     protected static final EELFLogger auditLogger = EELFManager.getInstance().getAuditLogger();
-
     private final String type;
     private final ModelBpmn modelBpmn;
     private final String id;
     protected String topicPublishes;
     protected final JsonNode modelElementJsonNode;
     private boolean isFound;
-
     private final ModelProperties modelProp;
-
     private static final String LOG_ELEMENT_NOT_FOUND = "Value '{}' for key 'name' not found in JSON";
     private static final String LOG_ELEMENT_NOT_FOUND_IN_JSON = "Value '{}' for key 'name' not found in JSON {}";
 
@@ -117,6 +114,27 @@ public abstract class AbstractModelElement {
         return value;
     }
 
+    /**
+     * Return the Json value field of the json node element that has a name
+     * field equals to the given name.
+     */
+    public static JsonNode getJsonNodeByName(JsonNode nodeIn, String name) {
+        JsonNode vnode = null;
+        if (nodeIn != null) {
+            for (JsonNode node : nodeIn) {
+                if (node.path("name").asText().equals(name)) {
+                    vnode = node.path("value");
+                }
+            }
+        }
+        if (vnode == null) {
+            logger.warn(LOG_ELEMENT_NOT_FOUND, name);
+        } else {
+            logger.debug(LOG_ELEMENT_NOT_FOUND_IN_JSON, name, nodeIn.toString());
+        }
+        return vnode;
+    }
+
     /**
      * Return the value field of the json node element that has a name field
      * that equals the given name.
index ef36fef..c4532b2 100644 (file)
 
 package org.onap.clamp.clds.model.properties;
 
-import java.util.List;
-
 import com.att.eelf.configuration.EELFLogger;
 import com.att.eelf.configuration.EELFManager;
 import com.fasterxml.jackson.databind.JsonNode;
 
+import java.util.List;
+
 /**
  * Parse global json properties.
  * <p>
@@ -38,14 +38,15 @@ import com.fasterxml.jackson.databind.JsonNode;
  * ,"kings_mountain","Secaucus","lisle","concord","houston","akron"]}]
  */
 public class Global {
-    protected static final EELFLogger       logger      = EELFManager.getInstance().getLogger(Global.class);
-    protected static final EELFLogger auditLogger = EELFManager.getInstance().getAuditLogger();
 
-    private String                  service;
-    private String                  actionSet;
-    private List<String>            resourceVf;
-    private List<String>            resourceVfc;
-    private List<String>            location;
+    protected static final EELFLogger logger = EELFManager.getInstance().getLogger(Global.class);
+    protected static final EELFLogger auditLogger = EELFManager.getInstance().getAuditLogger();
+    private String service;
+    private String actionSet;
+    private List<String> resourceVf;
+    private List<String> resourceVfc;
+    private JsonNode deployParameters;
+    private List<String> location;
 
     /**
      * Parse global given json node.
@@ -58,6 +59,7 @@ public class Global {
         actionSet = AbstractModelElement.getValueByName(globalNode, "actionSet");
         resourceVf = AbstractModelElement.getValuesByName(globalNode, "vf");
         resourceVfc = AbstractModelElement.getValuesByName(globalNode, "vfc");
+        deployParameters = AbstractModelElement.getJsonNodeByName(globalNode, "deployParameters");
         location = AbstractModelElement.getValuesByName(globalNode, "location");
     }
 
@@ -83,6 +85,10 @@ public class Global {
         return actionSet;
     }
 
+    public void setActionSet(String actionSet) {
+        this.actionSet = actionSet;
+    }
+
     /**
      * @return the resourceVf
      */
@@ -128,4 +134,11 @@ public class Global {
         this.location = location;
     }
 
+    public JsonNode getDeployParameters() {
+        return deployParameters;
+    }
+
+    public void setDeployParameters(JsonNode deployParameters) {
+        this.deployParameters = deployParameters;
+    }
 }
index e828f84..2b6862d 100644 (file)
@@ -377,6 +377,20 @@ public class CldsService extends SecureServiceBase {
         return names;
     }
 
+    private void fillInCldsModel(CldsModel model) {
+        if (model.getTemplateName() != null) {
+            CldsTemplate template = cldsDao.getTemplate(model.getTemplateName());
+            if (template != null) {
+                model.setTemplateId(template.getId());
+                model.setDocText(template.getPropText());
+                // This is to provide the Bpmn XML when Template part in UI
+                // is
+                // disabled
+                model.setBpmnText(template.getBpmnText());
+            }
+        }
+    }
+
     /**
      * REST service that saves and processes an action for a CLDS model by name.
      *
@@ -400,7 +414,7 @@ public class CldsService extends SecureServiceBase {
     @Produces(MediaType.APPLICATION_JSON)
     public Response putModelAndProcessAction(@PathParam("action") String action,
             @PathParam("modelName") String modelName, @QueryParam("test") String test, CldsModel model)
-            throws TransformerException, ParseException, GeneralSecurityException, DecoderException {
+            throws TransformerException, ParseException {
         Date startTime = new Date();
         CldsModel retrievedModel = null;
         Boolean errorCase = false;
@@ -412,9 +426,7 @@ public class CldsService extends SecureServiceBase {
             isAuthorized(permisionManage);
             isAuthorizedForVf(model);
             String userId = getUserId();
-            String actionStateCd = CldsEvent.ACTION_STATE_INITIATED;
             logger.info("PUT actionCd={}", actionCd);
-            logger.info("PUT actionStateCd={}", actionStateCd);
             logger.info("PUT modelName={}", modelName);
             logger.info("PUT test={}", test);
             logger.info("PUT bpmnText={}", model.getBpmnText());
@@ -422,17 +434,7 @@ public class CldsService extends SecureServiceBase {
             logger.info("PUT userId={}", userId);
             logger.info("PUT getTypeId={}", model.getTypeId());
             logger.info("PUT deploymentId={}", model.getDeploymentId());
-            if (model.getTemplateName() != null) {
-                CldsTemplate template = cldsDao.getTemplate(model.getTemplateName());
-                if (template != null) {
-                    model.setTemplateId(template.getId());
-                    model.setDocText(template.getPropText());
-                    // This is to provide the Bpmn XML when Template part in UI
-                    // is
-                    // disabled
-                    model.setBpmnText(template.getBpmnText());
-                }
-            }
+            this.fillInCldsModel(model);
             // save model to db
             model.setName(modelName);
             model.save(cldsDao, getUserId());
@@ -568,9 +570,8 @@ public class CldsService extends SecureServiceBase {
         Date startTime = new Date();
         LoggingUtils.setRequestContext("CldsService: GET sdc services", getPrincipalName());
         String retStr;
-        String responseStr = sdcCatalogServices.getSdcServicesInformation(null);
         try {
-            retStr = createUiServiceFormatJson(responseStr);
+            retStr = createUiServiceFormatJson(sdcCatalogServices.getSdcServicesInformation(null));
         } catch (IOException e) {
             logger.error("IOException during SDC communication", e);
             throw new SdcCommunicationException("IOException during SDC communication", e);
@@ -814,12 +815,12 @@ public class CldsService extends SecureServiceBase {
         LoggingUtils.setRequestContext("CldsService: Deploy model", getPrincipalName());
         Boolean errorCase = false;
         try {
-            try {
-                checkForDuplicateServiceVf(modelName, model.getPropText());
-            } catch (IOException | BadRequestException e) {
-                errorCase = true;
-                logger.error("Exception occured during duplicate check for service and VF", e);
-            }
+            fillInCldsModel(model);
+            String bpmnJson = cldsBpmnTransformer.doXslTransformToString(model.getBpmnText());
+            logger.info("PUT bpmnJson={}", bpmnJson);
+            ModelProperties modelProp = new ModelProperties(modelName, model.getControlName(), CldsEvent.ACTION_DEPLOY,
+                    false, bpmnJson, model.getPropText());
+            checkForDuplicateServiceVf(modelName, model.getPropText());
             String deploymentId = "";
             // If model is already deployed then pass same deployment id
             if (model.getDeploymentId() != null && !model.getDeploymentId().isEmpty()) {
@@ -828,7 +829,7 @@ public class CldsService extends SecureServiceBase {
                 deploymentId = "closedLoop_" + UUID.randomUUID() + "_deploymentId";
             }
             String createNewDeploymentStatusUrl = dcaeDispatcherServices.createNewDeployment(deploymentId,
-                    model.getTypeId());
+                    model.getTypeId(), modelProp.getGlobal().getDeployParameters());
             String operationStatus = "processing";
             long waitingTime = System.nanoTime() + TimeUnit.MINUTES.toNanos(10);
             while ("processing".equalsIgnoreCase(operationStatus)) {
@@ -930,7 +931,8 @@ public class CldsService extends SecureServiceBase {
         if (service != null && resourceVf != null && !resourceVf.isEmpty()) {
             List<CldsModelProp> cldsModelPropList = cldsDao.getDeployedModelProperties();
             for (CldsModelProp cldsModelProp : cldsModelPropList) {
-                JsonNode currentNode = JacksonUtils.getObjectMapperInstance().readTree(cldsModelProp.getPropText()).get("global");
+                JsonNode currentNode = JacksonUtils.getObjectMapperInstance().readTree(cldsModelProp.getPropText())
+                        .get("global");
                 String currentService = AbstractModelElement.getValueByName(currentNode, "service");
                 List<String> currentVf = AbstractModelElement.getValuesByName(currentNode, "vf");
                 if (currentVf != null && !currentVf.isEmpty()) {
index a7ab94c..25daf01 100644 (file)
@@ -28,6 +28,7 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
 import java.io.IOException;
+import java.util.Arrays;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -84,6 +85,17 @@ public class ModelPropertiesTest {
                 tca.getTcaItem().getTcaThresholds().get(1).getFieldPath());
         assertEquals("GREATER_OR_EQUAL", tca.getTcaItem().getTcaThresholds().get(1).getOperator());
         assertEquals(Integer.valueOf(123), tca.getTcaItem().getTcaThresholds().get(1).getThreshold());
+        // Test global prop
+        assertEquals("vnfRecipe", prop.getGlobal().getActionSet());
+        assertEquals("4cc5b45a-1f63-4194-8100-cd8e14248c92", prop.getGlobal().getService());
+        assertTrue(Arrays.equals(new String[] {
+                "023a3f0d-1161-45ff-b4cf-8918a8ccf3ad"
+        }, prop.getGlobal().getResourceVf().toArray()));
+        assertTrue(Arrays.equals(new String[] {
+                "SNDGCA64", "ALPRGAED", "LSLEILAA", "MDTWNJC1"
+        }, prop.getGlobal().getLocation().toArray()));
+        assertEquals("value1", prop.getGlobal().getDeployParameters().get("input1").asText());
+        assertEquals("value2", prop.getGlobal().getDeployParameters().get("input2").asText());
     }
 
     @Test
@@ -108,6 +120,17 @@ public class ModelPropertiesTest {
         assertTrue(holmes.isFound());
         assertEquals("configPolicy1", holmes.getConfigPolicyName());
         assertEquals("blabla", holmes.getCorrelationLogic());
+        // Test global prop
+        assertEquals("vnfRecipe", prop.getGlobal().getActionSet());
+        assertEquals("4cc5b45a-1f63-4194-8100-cd8e14248c92", prop.getGlobal().getService());
+        assertTrue(Arrays.equals(new String[] {
+                "f5213e3a-9191-4362-93b5-b67f8d770e44"
+        }, prop.getGlobal().getResourceVf().toArray()));
+        assertTrue(Arrays.equals(new String[] {
+                "SNDGCA64", "ALPRGAED", "LSLEILAA", "MDTWNJC1"
+        }, prop.getGlobal().getLocation().toArray()));
+        assertEquals("value1", prop.getGlobal().getDeployParameters().get("input1").asText());
+        assertEquals("value2", prop.getGlobal().getDeployParameters().get("input2").asText());
     }
 
     @Test
index 43fecc9..6ac97ec 100644 (file)
 {
-  "Holmes_0i4n2mm": [
-    {
-      "name": "correlationalLogic",
-      "value": "blabla"
-    },
-    {
-      "name": "configPolicyName",
-      "value": "configPolicy1"
-    }
-  ],
-  "Policy_0honxgv": {
-    "policy1": [
-      {
-        "name": "pname",
-        "value": "policy1"
-      },
-      {
-        "name": "pid",
-        "value": "0"
-      },
-      {
-        "name": "timeout",
-        "value": "345"
-      },
-      {
-        "policyConfigurations": [
-          [
-            {
-              "name": "maxRetries",
-              "value": [
-                "3"
-              ]
-            },
-            {
-              "name": "retryTimeLimit",
-              "value": [
-                "180"
-              ]
-            },
-            {
-              "name": "_id",
-              "value": [
-                "dGLuNqg"
-              ]
-            },
-            {
-              "name": "parentPolicy",
-              "value": [
-                ""
-              ]
-            },
-            {
-              "name": "targetResourceId",
-              "value": [
-                "resourceid"
-              ]
-            }
-          ]
-        ]
-      }
-    ]
-  },
-  "global": [
-    {
-      "name": "actionSet",
-      "value": [
-        "vnfRecipe"
-      ]
-    },
-    {
-      "name": "vf",
-      "value": [
-        "f5213e3a-9191-4362-93b5-b67f8d770e44"
-      ]
-    },
-    {
-      "name": "location",
-      "value": [
-        "SNDGCA64",
-        "ALPRGAED",
-        "LSLEILAA",
-        "MDTWNJC1"
-      ]
-    }
-  ],
-  "shared": {
-    "byService": {
-      "": {
-        "vf": {
-          "": ""
-        },
-        "location": {
-          "": ""
-        },
-        "alarmCondition": {
-          "": ""
-        }
-      }
-    },
-    "byVf": {
-      "": {
-        "vfc": {
-          "": ""
-        }
-      }
-    }
-  }
+       "Holmes_0i4n2mm": [
+               {
+                       "name": "correlationalLogic",
+                       "value": "blabla"
+               },
+               {
+                       "name": "configPolicyName",
+                       "value": "configPolicy1"
+               }
+       ],
+       "Policy_0honxgv": {
+               "policy1": [
+                       {
+                               "name": "pname",
+                               "value": "policy1"
+                       },
+                       {
+                               "name": "pid",
+                               "value": "0"
+                       },
+                       {
+                               "name": "timeout",
+                               "value": "345"
+                       },
+                       {
+                               "policyConfigurations": [
+                                       [
+                                               {
+                                                       "name": "maxRetries",
+                                                       "value": [
+                                                               "3"
+                                                       ]
+                                               },
+                                               {
+                                                       "name": "retryTimeLimit",
+                                                       "value": [
+                                                               "180"
+                                                       ]
+                                               },
+                                               {
+                                                       "name": "_id",
+                                                       "value": [
+                                                               "dGLuNqg"
+                                                       ]
+                                               },
+                                               {
+                                                       "name": "parentPolicy",
+                                                       "value": [
+                                                               ""
+                                                       ]
+                                               },
+                                               {
+                                                       "name": "targetResourceId",
+                                                       "value": [
+                                                               "resourceid"
+                                                       ]
+                                               }
+                                       ]
+                               ]
+                       }
+               ]
+       },
+       "global": [
+               {
+                       "name": "actionSet",
+                       "value": [
+                               "vnfRecipe"
+                       ]
+               },
+               {
+                       "name": "service",
+                       "value": [
+                               "4cc5b45a-1f63-4194-8100-cd8e14248c92"
+                       ]
+               },
+               {
+                       "name": "vf",
+                       "value": [
+                               "f5213e3a-9191-4362-93b5-b67f8d770e44"
+                       ]
+               },
+               {
+                       "name": "location",
+                       "value": [
+                               "SNDGCA64",
+                               "ALPRGAED",
+                               "LSLEILAA",
+                               "MDTWNJC1"
+                       ]
+               },
+               {
+                       "name": "deployParameters",
+                       "value": {
+                               "input1": "value1",
+                               "input2": "value2"
+                       }
+               }
+       ],
+       "shared": {
+               "byService": {
+                       "": {
+                               "vf": {
+                                       "": ""
+                               },
+                               "location": {
+                                       "": ""
+                               },
+                               "alarmCondition": {
+                                       "": ""
+                               }
+                       }
+               },
+               "byVf": {
+                       "": {
+                               "vfc": {
+                                       "": ""
+                               }
+                       }
+               }
+       }
 }
index 8e2780c..ce0f317 100644 (file)
 {
-  "TCA_1jy9to4": {
-    "group1": [
-      {
-        "name": "tname",
-        "value": "group1"
-      },
-      {
-        "name": "tuuid",
-        "value": "f734f031-10aa-t8fb-330f-04dde2886325"
-      },
-      {
-        "name": "tcaPolId",
-        "value": "policy1"
-      },
-      {
-        "name": "eventName",
-        "value": "vFirewallBroadcastPackets"
-      },
-      {
-        "name": "controlLoopSchemaType",
-        "value": "VNF"
-      },
-      {
-        "serviceConfigurations": [
-          [
-            "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
-            "LESS_OR_EQUAL",
-            "123",
-            "ABATED"
-          ],
-          [
-            "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta",
-            "GREATER_OR_EQUAL",
-            "123",
-            "ONSET"
-          ]
-        ]
-      }
-    ]
-  },
-  "Policy_0honxgv": {
-    "policy1": [
-      {
-        "name": "pname",
-        "value": "policy1"
-      },
-      {
-        "name": "pid",
-        "value": "0"
-      },
-      {
-        "name": "timeout",
-        "value": "345"
-      },
-      {
-        "policyConfigurations": [
-          [
-            {
-              "name": "maxRetries",
-              "value": [
-                "3"
-              ]
-            },
-            {
-              "name": "retryTimeLimit",
-              "value": [
-                "180"
-              ]
-            },
-            {
-              "name": "_id",
-              "value": [
-                "dGLuNqg"
-              ]
-            },
-            {
-              "name": "parentPolicy",
-              "value": [
-                ""
-              ]
-            },
-            {
-              "name": "targetResourceId",
-              "value": [
-                "resourceid"
-              ]
-            }
-          ]
-        ]
-      }
-    ]
-  },
-  "global": [
-    {
-      "name": "actionSet",
-      "value": [
-        "vnfRecipe"
-      ]
-    },
-    {
-      "name": "service",
-      "value": [
-        "4cc5b45a-1f63-4194-8100-cd8e14248c92"
-      ]
-    },
-    {
-      "name": "vf",
-      "value": [
-        "023a3f0d-1161-45ff-b4cf-8918a8ccf3ad"
-      ]
-    },
-    {
-      "name": "location",
-      "value": [
-        "SNDGCA64",
-        "ALPRGAED",
-        "LSLEILAA",
-        "MDTWNJC1"
-      ]
-    }
-  ],
-  "shared": {
-    "byService": {
-      "": {
-        "vf": {
-          "": ""
-        },
-        "location": {
-          "": ""
-        },
-        "alarmCondition": {
-          "": ""
-        }
-      }
-    },
-    "byVf": {
-      "": {
-        "vfc": {
-          "": ""
-        }
-      }
-    }
-  }
+       "TCA_1jy9to4": {
+               "group1": [
+                       {
+                               "name": "tname",
+                               "value": "group1"
+                       },
+                       {
+                               "name": "tuuid",
+                               "value": "f734f031-10aa-t8fb-330f-04dde2886325"
+                       },
+                       {
+                               "name": "tcaPolId",
+                               "value": "policy1"
+                       },
+                       {
+                               "name": "eventName",
+                               "value": "vFirewallBroadcastPackets"
+                       },
+                       {
+                               "name": "controlLoopSchemaType",
+                               "value": "VNF"
+                       },
+                       {
+                               "serviceConfigurations": [
+                                       [
+                                               "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
+                                               "LESS_OR_EQUAL",
+                                               "123",
+                                               "ABATED"
+                                       ],
+                                       [
+                                               "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta",
+                                               "GREATER_OR_EQUAL",
+                                               "123",
+                                               "ONSET"
+                                       ]
+                               ]
+                       }
+               ]
+       },
+       "Policy_0honxgv": {
+               "policy1": [
+                       {
+                               "name": "pname",
+                               "value": "policy1"
+                       },
+                       {
+                               "name": "pid",
+                               "value": "0"
+                       },
+                       {
+                               "name": "timeout",
+                               "value": "345"
+                       },
+                       {
+                               "policyConfigurations": [
+                                       [
+                                               {
+                                                       "name": "maxRetries",
+                                                       "value": [
+                                                               "3"
+                                                       ]
+                                               },
+                                               {
+                                                       "name": "retryTimeLimit",
+                                                       "value": [
+                                                               "180"
+                                                       ]
+                                               },
+                                               {
+                                                       "name": "_id",
+                                                       "value": [
+                                                               "dGLuNqg"
+                                                       ]
+                                               },
+                                               {
+                                                       "name": "parentPolicy",
+                                                       "value": [
+                                                               ""
+                                                       ]
+                                               },
+                                               {
+                                                       "name": "targetResourceId",
+                                                       "value": [
+                                                               "resourceid"
+                                                       ]
+                                               }
+                                       ]
+                               ]
+                       }
+               ]
+       },
+       "global": [
+               {
+                       "name": "actionSet",
+                       "value": [
+                               "vnfRecipe"
+                       ]
+               },
+               {
+                       "name": "service",
+                       "value": [
+                               "4cc5b45a-1f63-4194-8100-cd8e14248c92"
+                       ]
+               },
+               {
+                       "name": "vf",
+                       "value": [
+                               "023a3f0d-1161-45ff-b4cf-8918a8ccf3ad"
+                       ]
+               },
+               {
+                       "name": "location",
+                       "value": [
+                               "SNDGCA64",
+                               "ALPRGAED",
+                               "LSLEILAA",
+                               "MDTWNJC1"
+                       ]
+               },
+               {
+                       "name": "deployParameters",
+                       "value": {
+                               "input1": "value1",
+                               "input2": "value2"
+                       }
+               }
+       ],
+       "shared": {
+               "byService": {
+                       "": {
+                               "vf": {
+                                       "": ""
+                               },
+                               "location": {
+                                       "": ""
+                               },
+                               "alarmCondition": {
+                                       "": ""
+                               }
+                       }
+               },
+               "byVf": {
+                       "": {
+                               "vfc": {
+                                       "": ""
+                               }
+                       }
+               }
+       }
 }