CDS attributes are not shown properly in UI 56/105756/2
authorVidyashree-Huawei <vidyashree.rama@huawei.com>
Fri, 10 Apr 2020 12:06:09 +0000 (17:36 +0530)
committerSébastien Determe <sebastien.determe@intl.att.com>
Tue, 14 Apr 2020 08:13:46 +0000 (08:13 +0000)
Handled for legacy and operational policy

Change-Id: I504c4aa2531b19b09965ad1dbc03c9944931f77b
Issue-ID: CLAMP-809
Signed-off-by: Vidyashree-Huawei <vidyashree.rama@huawei.com>
13 files changed:
src/main/java/org/onap/clamp/clds/client/CdsServices.java
src/main/java/org/onap/clamp/clds/tosca/update/execution/cds/ToscaMetadataCdsProcess.java
src/main/java/org/onap/clamp/policy/operational/LegacyOperationalPolicy.java
src/main/java/org/onap/clamp/policy/operational/OperationalPolicyRepresentationBuilder.java
src/main/resources/clds/json-schema/operational_policies/operational_policy.json
src/test/resources/tosca/model-properties.json
src/test/resources/tosca/new-converter/tosca_apex_with_metadata.json
src/test/resources/tosca/operational-policy-json-schema.json
src/test/resources/tosca/operational-policy-payload-legacy.yaml
src/test/resources/tosca/operational-policy-payload.json
src/test/resources/tosca/operational-policy-payload.yaml
src/test/resources/tosca/operational-policy-properties.json
src/test/resources/tosca/resource-details.json

index fe1937a..f25e8b8 100644 (file)
@@ -136,7 +136,7 @@ public class CdsServices {
             if (isComplexType(type, dataTypes)) {\r
                 inputObject.add(key, handleComplexType(type, dataTypes));\r
             } else {\r
-                inputObject.addProperty(key, "");\r
+                inputObject.add(key, entry.getValue());\r
             }\r
         }\r
         return inputObject;\r
index 81e30cf..ce1f946 100644 (file)
@@ -26,7 +26,10 @@ package org.onap.clamp.clds.tosca.update.execution.cds;
 import com.google.gson.JsonArray;
 import com.google.gson.JsonElement;
 import com.google.gson.JsonObject;
+
 import java.util.Map;
+import java.util.Set;
+
 import org.onap.clamp.clds.tosca.update.execution.ToscaMetadataProcess;
 import org.onap.clamp.loop.service.Service;
 import org.onap.clamp.tosca.DictionaryService;
@@ -58,9 +61,11 @@ public class ToscaMetadataCdsProcess extends ToscaMetadataProcess {
     }
 
     private static void generatePayload(JsonObject childObject, Service serviceModel) {
-        generatePayloadPerResource(childObject, "VF", serviceModel);
-        generatePayloadPerResource(childObject, "PNF", serviceModel);
-        addToJsonArray(childObject, "anyOf", createBlankEntry());
+        JsonArray schemaAnyOf = new JsonArray();
+        schemaAnyOf.addAll(createBlankEntry());
+        schemaAnyOf.addAll(generatePayloadPerResource("VF", serviceModel));
+        schemaAnyOf.addAll(generatePayloadPerResource("PNF", serviceModel));
+        addToJsonArray(childObject, "anyOf", schemaAnyOf);
     }
 
     private static void generateOperation(JsonObject childObject, Service serviceModel) {
@@ -92,8 +97,8 @@ public class ToscaMetadataCdsProcess extends ToscaMetadataProcess {
 
     }
 
-    private static void generatePayloadPerResource(JsonObject childObject, String resourceName,
-                                                   Service serviceModel) {
+    private static JsonArray generatePayloadPerResource(String resourceName,
+                                                        Service serviceModel) {
         JsonArray schemaAnyOf = new JsonArray();
 
         for (Map.Entry<String, JsonElement> entry : serviceModel.getResourceDetails().getAsJsonObject(resourceName)
@@ -105,13 +110,14 @@ public class ToscaMetadataCdsProcess extends ToscaMetadataProcess {
                         .entrySet()) {
                     JsonObject obj = new JsonObject();
                     obj.addProperty("title", workflowsEntry.getKey());
-                    obj.add("properties", createPayloadProperty(workflowsEntry.getValue().getAsJsonObject(),
-                            controllerProperties));
+                    obj.add("properties",
+                            createInputPropertiesForPayload(workflowsEntry.getValue().getAsJsonObject(),
+                                                            controllerProperties));
                     schemaAnyOf.add(obj);
                 }
             }
         }
-        addToJsonArray(childObject, "anyOf", schemaAnyOf);
+        return schemaAnyOf;
     }
 
     private static JsonArray createBlankEntry() {
@@ -123,20 +129,6 @@ public class ToscaMetadataCdsProcess extends ToscaMetadataProcess {
         return result;
     }
 
-    private static JsonObject createPayloadProperty(JsonObject workFlow, JsonObject controllerProperties) {
-        JsonObject payloadResult = new JsonObject();
-
-        payloadResult.add("artifact_name",
-                createAnyOfJsonProperty("artifact_name", controllerProperties.get("sdnc_model_name").getAsString()));
-        payloadResult.add("artifact_version",
-                createAnyOfJsonProperty("artifact_version",
-                        controllerProperties.get("sdnc_model_version").getAsString()));
-        payloadResult.add("mode", createAnyOfJsonProperty("mode", "async"));
-
-        payloadResult.add("data", createAnyOfJsonObject("data", workFlow.getAsJsonObject("inputs")));
-        return payloadResult;
-    }
-
     private static JsonObject createAnyOfJsonProperty(String name, String defaultValue) {
         JsonObject result = new JsonObject();
         result.addProperty("title", name);
@@ -157,9 +149,73 @@ public class ToscaMetadataCdsProcess extends ToscaMetadataProcess {
     private static void addToJsonArray(JsonObject childObject, String section, JsonArray value) {
         if (childObject.getAsJsonArray(section) != null) {
             childObject.getAsJsonArray(section).addAll(value);
-        }
-        else {
+        } else {
             childObject.add(section, value);
         }
     }
+
+    /**
+     * Returns the properties of payload based on the cds work flows.
+     *
+     * @param workFlow cds work flows to update payload
+     * @param controllerProperties cds properties to get blueprint name and
+     *                            version
+     * @return returns the properties of payload
+     */
+    public static JsonObject createInputPropertiesForPayload(JsonObject workFlow,
+                                                             JsonObject controllerProperties) {
+        String artifactName = controllerProperties.get("sdnc_model_name").getAsString();
+        String artifactVersion = controllerProperties.get("sdnc_model_version").getAsString();
+        JsonObject inputs = workFlow.getAsJsonObject("inputs");
+        JsonObject jsonObject = new JsonObject();
+        jsonObject.add("artifact_name", createAnyOfJsonProperty(
+                "artifact name", artifactName));
+        jsonObject.add("artifact_version", createAnyOfJsonProperty(
+                "artifact version", artifactVersion));
+        jsonObject.add("mode", createCdsInputProperty(
+                "mode", "string", "async"));
+        jsonObject.add("data", createDataProperty(inputs));
+
+        return jsonObject;
+    }
+
+    private static JsonObject createDataProperty(JsonObject inputs) {
+        JsonObject data = new JsonObject();
+        data.addProperty("title", "data");
+        data.add("properties", addDataFields(inputs));
+        return data;
+    }
+
+    private static JsonObject addDataFields(JsonObject inputs) {
+        JsonObject jsonObject = new JsonObject();
+        Set<Map.Entry<String, JsonElement>> entrySet = inputs.entrySet();
+        for (Map.Entry<String, JsonElement> entry : entrySet) {
+            String key = entry.getKey();
+            JsonObject inputProperty = inputs.getAsJsonObject(key);
+            if (inputProperty.get("type") == null) {
+                jsonObject.add(entry.getKey(),
+                               createAnyOfJsonObject(key,
+                                                     addDataFields(entry.getValue().getAsJsonObject())));
+            } else {
+                jsonObject.add(entry.getKey(),
+                               createCdsInputProperty(key,
+                                                      inputProperty.get("type").getAsString(),
+                                                      null));
+            }
+        }
+        return jsonObject;
+    }
+
+    private static JsonObject createCdsInputProperty(String title,
+                                                     String type,
+                                                     String defaultValue) {
+        JsonObject property = new JsonObject();
+        property.addProperty("title", title);
+        property.addProperty("type", type);
+        if (defaultValue != null) {
+            property.addProperty("default", defaultValue);
+        }
+        property.addProperty("format", "textarea");
+        return property;
+    }
 }
index 033f2ce..3765277 100644 (file)
@@ -201,11 +201,13 @@ public class LegacyOperationalPolicy {
             policy.getAsJsonObject().remove(ACTOR);
             String actorStr = actor.getAsJsonObject().get(ACTOR).getAsString();
             policy.getAsJsonObject().addProperty(ACTOR, actorStr);
-            policy.getAsJsonObject().addProperty(RECIPE, getRecipe(actor));
 
             if ("CDS".equalsIgnoreCase(actorStr)) {
-                addPayloadAttributes(actor.getAsJsonObject(ACTOR).getAsJsonObject(RECIPE), policy);
+                policy.getAsJsonObject().addProperty(RECIPE, getRecipe(actor));
+                addCdsPayloadAttributes(actor.getAsJsonObject(RECIPE), policy);
             } else {
+                policy.getAsJsonObject().addProperty(RECIPE,
+                                                     actor.getAsJsonObject().get(RECIPE).getAsString());
                 addPayloadAttributes(actor, policy);
             }
         }
@@ -226,7 +228,20 @@ public class LegacyOperationalPolicy {
         }
     }
 
+    private static void addCdsPayloadAttributes(JsonObject jsonObject,
+                                             JsonElement policy) {
+        JsonElement payloadElem = jsonObject.getAsJsonObject().get(PAYLOAD);
+        JsonObject payloadObject = payloadElem != null ?
+                payloadElem.getAsJsonObject() : null;
+        if (payloadObject != null) {
+            policy.getAsJsonObject().add(PAYLOAD,
+                                         payloadObject);
+        } else {
+            policy.getAsJsonObject().addProperty(PAYLOAD, "");
+        }
+    }
+
     private static String getRecipe(JsonObject actor) {
-        return actor.getAsJsonObject().get("type").getAsString();
+        return actor.getAsJsonObject().get("recipe").getAsJsonObject().get("recipe").getAsString();
     }
 }
index 44ee119..4e362d8 100644 (file)
 
 package org.onap.clamp.policy.operational;
 
+import static org.onap.clamp.clds.tosca.update.execution.cds.ToscaMetadataCdsProcess.createInputPropertiesForPayload;
+
 import com.att.eelf.configuration.EELFLogger;
 import com.att.eelf.configuration.EELFManager;
 import com.google.gson.JsonArray;
 import com.google.gson.JsonElement;
 import com.google.gson.JsonObject;
+
 import java.io.IOException;
 import java.util.Map.Entry;
+
 import org.onap.clamp.clds.util.JsonUtils;
 import org.onap.clamp.clds.util.ResourceFileUtil;
 import org.onap.clamp.loop.service.Service;
@@ -70,7 +74,7 @@ public class OperationalPolicyRepresentationBuilder {
 
             for (JsonElement actor : actors) {
                 if ("CDS".equalsIgnoreCase(actor.getAsJsonObject().get("title").getAsString())) {
-                    actor.getAsJsonObject().get("properties").getAsJsonObject().get("type").getAsJsonObject()
+                    actor.getAsJsonObject().get("properties").getAsJsonObject().get("recipe").getAsJsonObject()
                             .get("anyOf").getAsJsonArray()
                             .addAll(createAnyOfArrayForCdsRecipe(modelJson));
                 }
@@ -195,8 +199,9 @@ public class OperationalPolicyRepresentationBuilder {
                 for (Entry<String, JsonElement> workflowsEntry : workflows.entrySet()) {
                     JsonObject obj = new JsonObject();
                     obj.addProperty("title", workflowsEntry.getKey());
+                    obj.addProperty("type", "object");
                     obj.add("properties", createPayloadProperty(workflowsEntry.getValue().getAsJsonObject(),
-                            controllerProperties));
+                            controllerProperties, workflowsEntry.getKey()));
                     schemaArray.add(obj);
                 }
 
@@ -205,26 +210,27 @@ public class OperationalPolicyRepresentationBuilder {
         return schemaArray;
     }
 
-    private static JsonObject createPayloadProperty(JsonObject workFlow, JsonObject controllerProperties) {
-        JsonObject type = new JsonObject();
-        type.addProperty("title", "Payload (YAML)");
-        type.addProperty("type", "string");
-        type.addProperty("default", createDefaultStringForPayload(workFlow, controllerProperties));
-        type.addProperty("format", "textarea");
+    private static JsonObject createPayloadProperty(JsonObject workFlow,
+                                                    JsonObject controllerProperties, String workFlowName) {
+        JsonObject payload = new JsonObject();
+        payload.addProperty("title", "Payload (YAML)");
+        payload.addProperty("type", "object");
+        payload.add("properties", createInputPropertiesForPayload(workFlow,
+                                                                  controllerProperties));
         JsonObject properties = new JsonObject();
-        properties.add("type", type);
+        properties.add("recipe", createRecipeForCdsWorkflow(workFlowName));
+        properties.add("payload", payload);
         return properties;
     }
 
-    private static String createDefaultStringForPayload(JsonObject workFlow, JsonObject controllerProperties) {
-        String artifactName = controllerProperties.get("sdnc_model_name").toString();
-        String artifactVersion = controllerProperties.get("sdnc_model_version").toString();
-        String data = workFlow.getAsJsonObject("inputs").toString();
-        StringBuilder builder = new StringBuilder("'").append("artifact_name : ").append(artifactName).append("\n")
-                .append("artifact_version : ").append(artifactVersion).append("\n")
-                .append("mode : async").append("\n")
-                .append("data : ").append("'").append("\\").append("'").append(data).append("\\").append("'")
-                .append("'");
-        return builder.toString();
+    private static JsonObject createRecipeForCdsWorkflow(String workflow) {
+        JsonObject recipe = new JsonObject();
+        recipe.addProperty("title", "recipe");
+        recipe.addProperty("type", "string");
+        recipe.addProperty("default", workflow);
+        JsonObject options = new JsonObject();
+        options.addProperty("hidden", true);
+        recipe.add("options", options);
+        return recipe;
     }
 }
index 49d7878..7214b02 100644 (file)
@@ -99,6 +99,7 @@
                 "anyOf": [
                   {
                     "title": "APPC",
+                    "type": "object",
                     "properties": {
                       "actor": {
                         "title": "actor",
                           "hidden": true
                         }
                       },
-                      "type": {
+                      "recipe": {
                         "title": "recipe",
                         "type": "string",
                         "default": "",
                   },
                   {
                     "title": "SO",
+                    "type": "object",
                     "properties": {
                       "actor": {
                         "title": "actor",
                           "hidden": true
                         }
                       },
-                      "type": {
+                      "recipe": {
                         "title": "recipe",
                         "type": "string",
                         "default": "",
                   },
                   {
                     "title": "SDNC",
+                    "type": "object",
                     "properties": {
                       "actor": {
                         "title": "actor",
                           "hidden": true
                         }
                       },
-                      "type": {
+                      "recipe": {
                         "title": "recipe",
                         "type": "string",
                         "default": "",
                   },
                   {
                     "title": "VFC",
+                    "type": "object",
                     "properties": {
                       "actor": {
                         "title": "actor",
                           "hidden": true
                         }
                       },
-                      "type": {
+                      "recipe": {
                         "title": "recipe",
                         "type": "string",
-                        "required": [
-                          "payload"
-                        ],
                         "default": "",
                         "enum": [
                           "ModifyConfig"
                   },
                   {
                     "title": "CDS",
+                    "type": "object",
                     "properties": {
                       "actor": {
                         "title": "actor",
                           "hidden": true
                         }
                       },
-                      "type": {
+                      "recipe": {
                         "title": "recipe",
                         "type": "object",
-                        "required": [
-                          "payload"
-                        ],
                         "anyOf": [
                           {
                             "title": "user-defined",
+                            "type": "object",
                             "properties": {
-                              "type": {
+                              "recipe": {
+                                "title": "recipe",
+                                "type": "string",
+                                "default": "user-defined",
+                                "format": "textarea"
+                              },
+                              "payload": {
                                 "title": "Payload (YAML)",
                                 "type": "string",
                                 "default": "",
index c405964..688a09a 100644 (file)
                                                "resource-assignment": {
                                                        "inputs": {
                                                                "resource-assignment-properties": {
-                                                                       "request-id": "",
-                                                                       "service-instance-id": "",
-                                                                       "vnf-id": "",
-                                                                       "action-name": "",
-                                                                       "scope-type": "",
-                                                                       "hostname": "",
-                                                                       "vnf_name": ""
+                                                                       "request-id": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "service-instance-id": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "vnf-id": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "action-name": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "scope-type": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "hostname": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "vnf_name": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       }
                                                                }
                                                        }
                                                },
                                                "activate": {
                                                        "inputs": {
                                                                "resource-assignment-properties": {
-                                                                       "request-id": "",
-                                                                       "service-instance-id": "",
-                                                                       "vnf-id": "",
-                                                                       "action-name": "",
-                                                                       "scope-type": "",
-                                                                       "hostname": "",
-                                                                       "vnf_name": ""
+                                                                       "request-id": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "service-instance-id": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "vnf-id": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "action-name": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "scope-type": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "hostname": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "vnf_name": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       }
                                                                }
                                                        }
                                                },
                                                "activate-restconf": {
                                                        "inputs": {
                                                                "resource-assignment-properties": {
-                                                                       "request-id": "",
-                                                                       "service-instance-id": "",
-                                                                       "vnf-id": "",
-                                                                       "action-name": "",
-                                                                       "scope-type": "",
-                                                                       "hostname": "",
-                                                                       "vnf_name": ""
+                                                                       "request-id": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "service-instance-id": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "vnf-id": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "action-name": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "scope-type": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "hostname": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "vnf_name": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       }
                                                                }
                                                        }
                                                },
                                                "activate-cli": {
                                                        "inputs": {
                                                                "resource-assignment-properties": {
-                                                                       "request-id": "",
-                                                                       "service-instance-id": "",
-                                                                       "vnf-id": "",
-                                                                       "action-name": "",
-                                                                       "scope-type": "",
-                                                                       "hostname": "",
-                                                                       "vnf_name": ""
+                                                                       "request-id": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "service-instance-id": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "vnf-id": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "action-name": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "scope-type": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "hostname": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "vnf_name": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       }
                                                                }
                                                        }
                                                },
                                                "assign-activate": {
                                                        "inputs": {
                                                                "resource-assignment-properties": {
-                                                                       "request-id": "",
-                                                                       "service-instance-id": "",
-                                                                       "vnf-id": "",
-                                                                       "action-name": "",
-                                                                       "scope-type": "",
-                                                                       "hostname": "",
-                                                                       "vnf_name": ""
+                                                                       "request-id": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "service-instance-id": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "vnf-id": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "action-name": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "scope-type": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "hostname": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "vnf_name": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       }
                                                                }
                                                        }
                                                },
                                                "imperative-test-wf": {
                                                        "inputs": {
                                                                "resource-assignment-properties": {
-                                                                       "request-id": "",
-                                                                       "service-instance-id": "",
-                                                                       "vnf-id": "",
-                                                                       "action-name": "",
-                                                                       "scope-type": "",
-                                                                       "hostname": "",
-                                                                       "vnf_name": ""
+                                                                       "request-id": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "service-instance-id": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "vnf-id": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "action-name": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "scope-type": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "hostname": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "vnf_name": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       }
                                                                }
                                                        }
                                                } 
index 58dff23..12edd77 100644 (file)
                 "type": "object",
                 "description": "Name/value pairs of payload information passed by Policy to the actor",
                 "anyOf": [
+                  {
+                    "title": "User defined",
+                    "properties": {}
+                  },
                   {
                     "title": "resource-assignment",
                     "properties": {
                       "artifact_name": {
-                        "title": "artifact_name",
+                        "title": "artifact name",
                         "type": "string",
                         "default": "baseconfiguration",
                         "readOnly": "True"
                       },
                       "artifact_version": {
-                        "title": "artifact_version",
+                        "title": "artifact version",
                         "type": "string",
                         "default": "1.0.0",
                         "readOnly": "True"
                         "title": "mode",
                         "type": "string",
                         "default": "async",
-                        "readOnly": "True"
+                        "format": "textarea"
                       },
                       "data": {
                         "title": "data",
-                        "type": "object",
                         "properties": {
                           "resource-assignment-properties": {
-                            "request-id": "",
-                            "service-instance-id": "",
-                            "vnf-id": "",
-                            "action-name": "",
-                            "scope-type": "",
-                            "hostname": "",
-                            "vnf_name": ""
+                            "title": "resource-assignment-properties",
+                            "type": "object",
+                            "properties": {
+                              "request-id": {
+                                "title": "request-id",
+                                "type": "string",
+                                "format": "textarea"
+                              },
+                              "service-instance-id": {
+                                "title": "service-instance-id",
+                                "type": "string",
+                                "format": "textarea"
+                              },
+                              "vnf-id": {
+                                "title": "vnf-id",
+                                "type": "string",
+                                "format": "textarea"
+                              },
+                              "action-name": {
+                                "title": "action-name",
+                                "type": "string",
+                                "format": "textarea"
+                              },
+                              "scope-type": {
+                                "title": "scope-type",
+                                "type": "string",
+                                "format": "textarea"
+                              },
+                              "hostname": {
+                                "title": "hostname",
+                                "type": "string",
+                                "format": "textarea"
+                              },
+                              "vnf_name": {
+                                "title": "vnf_name",
+                                "type": "string",
+                                "format": "textarea"
+                              }
+                            }
                           }
                         }
                       }
                     "title": "activate",
                     "properties": {
                       "artifact_name": {
-                        "title": "artifact_name",
+                        "title": "artifact name",
                         "type": "string",
                         "default": "baseconfiguration",
                         "readOnly": "True"
                       },
                       "artifact_version": {
-                        "title": "artifact_version",
+                        "title": "artifact version",
                         "type": "string",
                         "default": "1.0.0",
                         "readOnly": "True"
                         "title": "mode",
                         "type": "string",
                         "default": "async",
-                        "readOnly": "True"
+                        "format": "textarea"
                       },
                       "data": {
                         "title": "data",
-                        "type": "object",
                         "properties": {
                           "resource-assignment-properties": {
-                            "request-id": "",
-                            "service-instance-id": "",
-                            "vnf-id": "",
-                            "action-name": "",
-                            "scope-type": "",
-                            "hostname": "",
-                            "vnf_name": ""
+                            "title": "resource-assignment-properties",
+                            "type": "object",
+                            "properties": {
+                              "request-id": {
+                                "title": "request-id",
+                                "type": "string",
+                                "format": "textarea"
+                              },
+                              "service-instance-id": {
+                                "title": "service-instance-id",
+                                "type": "string",
+                                "format": "textarea"
+                              },
+                              "vnf-id": {
+                                "title": "vnf-id",
+                                "type": "string",
+                                "format": "textarea"
+                              },
+                              "action-name": {
+                                "title": "action-name",
+                                "type": "string",
+                                "format": "textarea"
+                              },
+                              "scope-type": {
+                                "title": "scope-type",
+                                "type": "string",
+                                "format": "textarea"
+                              },
+                              "hostname": {
+                                "title": "hostname",
+                                "type": "string",
+                                "format": "textarea"
+                              },
+                              "vnf_name": {
+                                "title": "vnf_name",
+                                "type": "string",
+                                "format": "textarea"
+                              }
+                            }
                           }
                         }
                       }
                     "title": "activate-restconf",
                     "properties": {
                       "artifact_name": {
-                        "title": "artifact_name",
+                        "title": "artifact name",
                         "type": "string",
                         "default": "baseconfiguration",
                         "readOnly": "True"
                       },
                       "artifact_version": {
-                        "title": "artifact_version",
+                        "title": "artifact version",
                         "type": "string",
                         "default": "1.0.0",
                         "readOnly": "True"
                         "title": "mode",
                         "type": "string",
                         "default": "async",
-                        "readOnly": "True"
+                        "format": "textarea"
                       },
                       "data": {
                         "title": "data",
-                        "type": "object",
                         "properties": {
                           "resource-assignment-properties": {
-                            "request-id": "",
-                            "service-instance-id": "",
-                            "vnf-id": "",
-                            "action-name": "",
-                            "scope-type": "",
-                            "hostname": "",
-                            "vnf_name": ""
+                            "title": "resource-assignment-properties",
+                            "type": "object",
+                            "properties": {
+                              "request-id": {
+                                "title": "request-id",
+                                "type": "string",
+                                "format": "textarea"
+                              },
+                              "service-instance-id": {
+                                "title": "service-instance-id",
+                                "type": "string",
+                                "format": "textarea"
+                              },
+                              "vnf-id": {
+                                "title": "vnf-id",
+                                "type": "string",
+                                "format": "textarea"
+                              },
+                              "action-name": {
+                                "title": "action-name",
+                                "type": "string",
+                                "format": "textarea"
+                              },
+                              "scope-type": {
+                                "title": "scope-type",
+                                "type": "string",
+                                "format": "textarea"
+                              },
+                              "hostname": {
+                                "title": "hostname",
+                                "type": "string",
+                                "format": "textarea"
+                              },
+                              "vnf_name": {
+                                "title": "vnf_name",
+                                "type": "string",
+                                "format": "textarea"
+                              }
+                            }
                           }
                         }
                       }
                     "title": "activate-cli",
                     "properties": {
                       "artifact_name": {
-                        "title": "artifact_name",
+                        "title": "artifact name",
                         "type": "string",
                         "default": "baseconfiguration",
                         "readOnly": "True"
                       },
                       "artifact_version": {
-                        "title": "artifact_version",
+                        "title": "artifact version",
                         "type": "string",
                         "default": "1.0.0",
                         "readOnly": "True"
                         "title": "mode",
                         "type": "string",
                         "default": "async",
-                        "readOnly": "True"
+                        "format": "textarea"
                       },
                       "data": {
                         "title": "data",
-                        "type": "object",
                         "properties": {
                           "resource-assignment-properties": {
-                            "request-id": "",
-                            "service-instance-id": "",
-                            "vnf-id": "",
-                            "action-name": "",
-                            "scope-type": "",
-                            "hostname": "",
-                            "vnf_name": ""
+                            "title": "resource-assignment-properties",
+                            "type": "object",
+                            "properties": {
+                              "request-id": {
+                                "title": "request-id",
+                                "type": "string",
+                                "format": "textarea"
+                              },
+                              "service-instance-id": {
+                                "title": "service-instance-id",
+                                "type": "string",
+                                "format": "textarea"
+                              },
+                              "vnf-id": {
+                                "title": "vnf-id",
+                                "type": "string",
+                                "format": "textarea"
+                              },
+                              "action-name": {
+                                "title": "action-name",
+                                "type": "string",
+                                "format": "textarea"
+                              },
+                              "scope-type": {
+                                "title": "scope-type",
+                                "type": "string",
+                                "format": "textarea"
+                              },
+                              "hostname": {
+                                "title": "hostname",
+                                "type": "string",
+                                "format": "textarea"
+                              },
+                              "vnf_name": {
+                                "title": "vnf_name",
+                                "type": "string",
+                                "format": "textarea"
+                              }
+                            }
                           }
                         }
                       }
                     "title": "assign-activate",
                     "properties": {
                       "artifact_name": {
-                        "title": "artifact_name",
+                        "title": "artifact name",
                         "type": "string",
                         "default": "baseconfiguration",
                         "readOnly": "True"
                       },
                       "artifact_version": {
-                        "title": "artifact_version",
+                        "title": "artifact version",
                         "type": "string",
                         "default": "1.0.0",
                         "readOnly": "True"
                         "title": "mode",
                         "type": "string",
                         "default": "async",
-                        "readOnly": "True"
+                        "format": "textarea"
                       },
                       "data": {
                         "title": "data",
-                        "type": "object",
                         "properties": {
                           "resource-assignment-properties": {
-                            "request-id": "",
-                            "service-instance-id": "",
-                            "vnf-id": "",
-                            "action-name": "",
-                            "scope-type": "",
-                            "hostname": "",
-                            "vnf_name": ""
+                            "title": "resource-assignment-properties",
+                            "type": "object",
+                            "properties": {
+                              "request-id": {
+                                "title": "request-id",
+                                "type": "string",
+                                "format": "textarea"
+                              },
+                              "service-instance-id": {
+                                "title": "service-instance-id",
+                                "type": "string",
+                                "format": "textarea"
+                              },
+                              "vnf-id": {
+                                "title": "vnf-id",
+                                "type": "string",
+                                "format": "textarea"
+                              },
+                              "action-name": {
+                                "title": "action-name",
+                                "type": "string",
+                                "format": "textarea"
+                              },
+                              "scope-type": {
+                                "title": "scope-type",
+                                "type": "string",
+                                "format": "textarea"
+                              },
+                              "hostname": {
+                                "title": "hostname",
+                                "type": "string",
+                                "format": "textarea"
+                              },
+                              "vnf_name": {
+                                "title": "vnf_name",
+                                "type": "string",
+                                "format": "textarea"
+                              }
+                            }
                           }
                         }
                       }
                     "title": "imperative-test-wf",
                     "properties": {
                       "artifact_name": {
-                        "title": "artifact_name",
+                        "title": "artifact name",
                         "type": "string",
                         "default": "baseconfiguration",
                         "readOnly": "True"
                       },
                       "artifact_version": {
-                        "title": "artifact_version",
+                        "title": "artifact version",
                         "type": "string",
                         "default": "1.0.0",
                         "readOnly": "True"
                         "title": "mode",
                         "type": "string",
                         "default": "async",
-                        "readOnly": "True"
+                        "format": "textarea"
                       },
                       "data": {
                         "title": "data",
-                        "type": "object",
                         "properties": {
                           "resource-assignment-properties": {
-                            "request-id": "",
-                            "service-instance-id": "",
-                            "vnf-id": "",
-                            "action-name": "",
-                            "scope-type": "",
-                            "hostname": "",
-                            "vnf_name": ""
+                            "title": "resource-assignment-properties",
+                            "type": "object",
+                            "properties": {
+                              "request-id": {
+                                "title": "request-id",
+                                "type": "string",
+                                "format": "textarea"
+                              },
+                              "service-instance-id": {
+                                "title": "service-instance-id",
+                                "type": "string",
+                                "format": "textarea"
+                              },
+                              "vnf-id": {
+                                "title": "vnf-id",
+                                "type": "string",
+                                "format": "textarea"
+                              },
+                              "action-name": {
+                                "title": "action-name",
+                                "type": "string",
+                                "format": "textarea"
+                              },
+                              "scope-type": {
+                                "title": "scope-type",
+                                "type": "string",
+                                "format": "textarea"
+                              },
+                              "hostname": {
+                                "title": "hostname",
+                                "type": "string",
+                                "format": "textarea"
+                              },
+                              "vnf_name": {
+                                "title": "vnf_name",
+                                "type": "string",
+                                "format": "textarea"
+                              }
+                            }
                           }
                         }
                       }
                     }
-                  },
-                  {
-                    "title": "User defined",
-                    "properties": {}
                   }
                 ]
               },
index 6ab84a8..ffa88ec 100644 (file)
@@ -99,6 +99,7 @@
                 "anyOf": [
                   {
                     "title": "APPC",
+                    "type": "object",
                     "properties": {
                       "actor": {
                         "title": "actor",
                           "hidden": true
                         }
                       },
-                      "type": {
+                      "recipe": {
                         "title": "recipe",
                         "type": "string",
                         "default": "",
                   },
                   {
                     "title": "SO",
+                    "type": "object",
                     "properties": {
                       "actor": {
                         "title": "actor",
                           "hidden": true
                         }
                       },
-                      "type": {
+                      "recipe": {
                         "title": "recipe",
                         "type": "string",
                         "default": "",
                   },
                   {
                     "title": "SDNC",
+                    "type": "object",
                     "properties": {
                       "actor": {
                         "title": "actor",
                           "hidden": true
                         }
                       },
-                      "type": {
+                      "recipe": {
                         "title": "recipe",
                         "type": "string",
                         "default": "",
                   },
                   {
                     "title": "VFC",
+                    "type": "object",
                     "properties": {
                       "actor": {
                         "title": "actor",
                           "hidden": true
                         }
                       },
-                      "type": {
+                      "recipe": {
                         "title": "recipe",
                         "type": "string",
-                        "required": [
-                          "payload"
-                        ],
                         "default": "",
                         "enum": [
                           "ModifyConfig"
                   },
                   {
                     "title": "CDS",
+                    "type": "object",
                     "properties": {
                       "actor": {
                         "title": "actor",
                           "hidden": true
                         }
                       },
-                      "type": {
+                      "recipe": {
                         "title": "recipe",
                         "type": "object",
-                        "required": [
-                          "payload"
-                        ],
                         "anyOf": [
                           {
                             "title": "user-defined",
+                            "type": "object",
                             "properties": {
-                              "type": {
+                              "recipe": {
+                                "title": "recipe",
+                                "type": "string",
+                                "default": "user-defined",
+                                "format": "textarea"
+                              },
+                              "payload": {
                                 "title": "Payload (YAML)",
                                 "type": "string",
                                 "default": "",
                           },
                           {
                             "title": "resource-assignment",
+                            "type": "object",
                             "properties": {
-                              "type": {
-                                "title": "Payload (YAML)",
+                              "recipe": {
+                                "title": "recipe",
                                 "type": "string",
-                                "default": "\u0027artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : \u0027\\\u0027{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\\u0027\u0027",
-                                "format": "textarea"
+                                "default": "resource-assignment",
+                                "options": {
+                                  "hidden": true
+                                }
+                              },
+                              "payload": {
+                                "title": "Payload (YAML)",
+                                "type": "object",
+                                "properties": {
+                                  "artifact_name": {
+                                    "title": "artifact name",
+                                    "type": "string",
+                                    "default": "baseconfiguration",
+                                    "readOnly": "True"
+                                  },
+                                  "artifact_version": {
+                                    "title": "artifact version",
+                                    "type": "string",
+                                    "default": "1.0.0",
+                                    "readOnly": "True"
+                                  },
+                                  "mode": {
+                                    "title": "mode",
+                                    "type": "string",
+                                    "default": "async",
+                                    "format": "textarea"
+                                  },
+                                  "data": {
+                                    "title": "data",
+                                    "properties": {
+                                      "resource-assignment-properties": {
+                                        "title": "resource-assignment-properties",
+                                        "type": "object",
+                                        "properties": {
+                                          "request-id": {
+                                            "title": "request-id",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "service-instance-id": {
+                                            "title": "service-instance-id",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "vnf-id": {
+                                            "title": "vnf-id",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "action-name": {
+                                            "title": "action-name",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "scope-type": {
+                                            "title": "scope-type",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "hostname": {
+                                            "title": "hostname",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "vnf_name": {
+                                            "title": "vnf_name",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          }
+                                        }
+                                      }
+                                    }
+                                  }
+                                }
                               }
                             }
                           },
                           {
                             "title": "activate",
+                            "type": "object",
                             "properties": {
-                              "type": {
-                                "title": "Payload (YAML)",
+                              "recipe": {
+                                "title": "recipe",
                                 "type": "string",
-                                "default": "\u0027artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : \u0027\\\u0027{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\\u0027\u0027",
-                                "format": "textarea"
+                                "default": "activate",
+                                "options": {
+                                  "hidden": true
+                                }
+                              },
+                              "payload": {
+                                "title": "Payload (YAML)",
+                                "type": "object",
+                                "properties": {
+                                  "artifact_name": {
+                                    "title": "artifact name",
+                                    "type": "string",
+                                    "default": "baseconfiguration",
+                                    "readOnly": "True"
+                                  },
+                                  "artifact_version": {
+                                    "title": "artifact version",
+                                    "type": "string",
+                                    "default": "1.0.0",
+                                    "readOnly": "True"
+                                  },
+                                  "mode": {
+                                    "title": "mode",
+                                    "type": "string",
+                                    "default": "async",
+                                    "format": "textarea"
+                                  },
+                                  "data": {
+                                    "title": "data",
+                                    "properties": {
+                                      "resource-assignment-properties": {
+                                        "title": "resource-assignment-properties",
+                                        "type": "object",
+                                        "properties": {
+                                          "request-id": {
+                                            "title": "request-id",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "service-instance-id": {
+                                            "title": "service-instance-id",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "vnf-id": {
+                                            "title": "vnf-id",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "action-name": {
+                                            "title": "action-name",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "scope-type": {
+                                            "title": "scope-type",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "hostname": {
+                                            "title": "hostname",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "vnf_name": {
+                                            "title": "vnf_name",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          }
+                                        }
+                                      }
+                                    }
+                                  }
+                                }
                               }
                             }
                           },
                           {
                             "title": "activate-restconf",
+                            "type": "object",
                             "properties": {
-                              "type": {
-                                "title": "Payload (YAML)",
+                              "recipe": {
+                                "title": "recipe",
                                 "type": "string",
-                                "default": "\u0027artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : \u0027\\\u0027{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\\u0027\u0027",
-                                "format": "textarea"
+                                "default": "activate-restconf",
+                                "options": {
+                                  "hidden": true
+                                }
+                              },
+                              "payload": {
+                                "title": "Payload (YAML)",
+                                "type": "object",
+                                "properties": {
+                                  "artifact_name": {
+                                    "title": "artifact name",
+                                    "type": "string",
+                                    "default": "baseconfiguration",
+                                    "readOnly": "True"
+                                  },
+                                  "artifact_version": {
+                                    "title": "artifact version",
+                                    "type": "string",
+                                    "default": "1.0.0",
+                                    "readOnly": "True"
+                                  },
+                                  "mode": {
+                                    "title": "mode",
+                                    "type": "string",
+                                    "default": "async",
+                                    "format": "textarea"
+                                  },
+                                  "data": {
+                                    "title": "data",
+                                    "properties": {
+                                      "resource-assignment-properties": {
+                                        "title": "resource-assignment-properties",
+                                        "type": "object",
+                                        "properties": {
+                                          "request-id": {
+                                            "title": "request-id",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "service-instance-id": {
+                                            "title": "service-instance-id",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "vnf-id": {
+                                            "title": "vnf-id",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "action-name": {
+                                            "title": "action-name",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "scope-type": {
+                                            "title": "scope-type",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "hostname": {
+                                            "title": "hostname",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "vnf_name": {
+                                            "title": "vnf_name",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          }
+                                        }
+                                      }
+                                    }
+                                  }
+                                }
                               }
                             }
                           },
                           {
                             "title": "activate-cli",
+                            "type": "object",
                             "properties": {
-                              "type": {
-                                "title": "Payload (YAML)",
+                              "recipe": {
+                                "title": "recipe",
                                 "type": "string",
-                                "default": "\u0027artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : \u0027\\\u0027{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\\u0027\u0027",
-                                "format": "textarea"
+                                "default": "activate-cli",
+                                "options": {
+                                  "hidden": true
+                                }
+                              },
+                              "payload": {
+                                "title": "Payload (YAML)",
+                                "type": "object",
+                                "properties": {
+                                  "artifact_name": {
+                                    "title": "artifact name",
+                                    "type": "string",
+                                    "default": "baseconfiguration",
+                                    "readOnly": "True"
+                                  },
+                                  "artifact_version": {
+                                    "title": "artifact version",
+                                    "type": "string",
+                                    "default": "1.0.0",
+                                    "readOnly": "True"
+                                  },
+                                  "mode": {
+                                    "title": "mode",
+                                    "type": "string",
+                                    "default": "async",
+                                    "format": "textarea"
+                                  },
+                                  "data": {
+                                    "title": "data",
+                                    "properties": {
+                                      "resource-assignment-properties": {
+                                        "title": "resource-assignment-properties",
+                                        "type": "object",
+                                        "properties": {
+                                          "request-id": {
+                                            "title": "request-id",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "service-instance-id": {
+                                            "title": "service-instance-id",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "vnf-id": {
+                                            "title": "vnf-id",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "action-name": {
+                                            "title": "action-name",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "scope-type": {
+                                            "title": "scope-type",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "hostname": {
+                                            "title": "hostname",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "vnf_name": {
+                                            "title": "vnf_name",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          }
+                                        }
+                                      }
+                                    }
+                                  }
+                                }
                               }
                             }
                           },
                           {
                             "title": "assign-activate",
+                            "type": "object",
                             "properties": {
-                              "type": {
-                                "title": "Payload (YAML)",
+                              "recipe": {
+                                "title": "recipe",
                                 "type": "string",
-                                "default": "\u0027artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : \u0027\\\u0027{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\\u0027\u0027",
-                                "format": "textarea"
+                                "default": "assign-activate",
+                                "options": {
+                                  "hidden": true
+                                }
+                              },
+                              "payload": {
+                                "title": "Payload (YAML)",
+                                "type": "object",
+                                "properties": {
+                                  "artifact_name": {
+                                    "title": "artifact name",
+                                    "type": "string",
+                                    "default": "baseconfiguration",
+                                    "readOnly": "True"
+                                  },
+                                  "artifact_version": {
+                                    "title": "artifact version",
+                                    "type": "string",
+                                    "default": "1.0.0",
+                                    "readOnly": "True"
+                                  },
+                                  "mode": {
+                                    "title": "mode",
+                                    "type": "string",
+                                    "default": "async",
+                                    "format": "textarea"
+                                  },
+                                  "data": {
+                                    "title": "data",
+                                    "properties": {
+                                      "resource-assignment-properties": {
+                                        "title": "resource-assignment-properties",
+                                        "type": "object",
+                                        "properties": {
+                                          "request-id": {
+                                            "title": "request-id",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "service-instance-id": {
+                                            "title": "service-instance-id",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "vnf-id": {
+                                            "title": "vnf-id",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "action-name": {
+                                            "title": "action-name",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "scope-type": {
+                                            "title": "scope-type",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "hostname": {
+                                            "title": "hostname",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "vnf_name": {
+                                            "title": "vnf_name",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          }
+                                        }
+                                      }
+                                    }
+                                  }
+                                }
                               }
                             }
                           },
                           {
                             "title": "imperative-test-wf",
+                            "type": "object",
                             "properties": {
-                              "type": {
-                                "title": "Payload (YAML)",
+                              "recipe": {
+                                "title": "recipe",
                                 "type": "string",
-                                "default": "\u0027artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : \u0027\\\u0027{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\\u0027\u0027",
-                                "format": "textarea"
+                                "default": "imperative-test-wf",
+                                "options": {
+                                  "hidden": true
+                                }
+                              },
+                              "payload": {
+                                "title": "Payload (YAML)",
+                                "type": "object",
+                                "properties": {
+                                  "artifact_name": {
+                                    "title": "artifact name",
+                                    "type": "string",
+                                    "default": "baseconfiguration",
+                                    "readOnly": "True"
+                                  },
+                                  "artifact_version": {
+                                    "title": "artifact version",
+                                    "type": "string",
+                                    "default": "1.0.0",
+                                    "readOnly": "True"
+                                  },
+                                  "mode": {
+                                    "title": "mode",
+                                    "type": "string",
+                                    "default": "async",
+                                    "format": "textarea"
+                                  },
+                                  "data": {
+                                    "title": "data",
+                                    "properties": {
+                                      "resource-assignment-properties": {
+                                        "title": "resource-assignment-properties",
+                                        "type": "object",
+                                        "properties": {
+                                          "request-id": {
+                                            "title": "request-id",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "service-instance-id": {
+                                            "title": "service-instance-id",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "vnf-id": {
+                                            "title": "vnf-id",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "action-name": {
+                                            "title": "action-name",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "scope-type": {
+                                            "title": "scope-type",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "hostname": {
+                                            "title": "hostname",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          },
+                                          "vnf_name": {
+                                            "title": "vnf_name",
+                                            "type": "string",
+                                            "format": "textarea"
+                                          }
+                                        }
+                                      }
+                                    }
+                                  }
+                                }
                               }
                             }
                           }
       }
     }
   }
-}
\ No newline at end of file
+}
index f4708eb..72bbf9b 100644 (file)
@@ -40,3 +40,35 @@ policies:
     resourceID: Vloadbalancerms..vpkg..module-1
     type: VFMODULE
   timeout: 0
+- actor: CDS
+  failure: final_failure
+  failure_exception: final_failure_exception
+  failure_guard: final_failure_guard
+  failure_retries: final_failure_retries
+  failure_timeout: final_failure_timeout
+  id: policy3
+  payload:
+    artifact_name: baseconfiguration
+    artifact_version: 1.0.0
+    data:
+      resource-assignment-properties:
+        action-name: action-name
+        hostname: hostname
+        request-id: request-id
+        scope-type: scope-type
+        service-instance-id: service-instance-id
+        vnf-id: vnf-id
+        vnf_name: vnf_name
+    mode: async
+  recipe: resource-assignment
+  retry: 0
+  success: final_success
+  target:
+    modelCustomizationId: 1bffdc31-a37d-4dee-b65c-dde623a76e52
+    modelInvariantId: ca052563-eb92-4b5b-ad41-9111768ce043
+    modelName: Vloadbalancerms..vpkg..module-1
+    modelVersion: 1
+    modelVersionId: 1e725ccc-b823-4f67-82b9-4f4367070dbc
+    resourceID: Vloadbalancerms..vpkg..module-1
+    type: VFMODULE
+  timeout: 0
index 033eecd..e53950a 100644 (file)
@@ -1,4 +1,4 @@
 {
   "policy-id": "testPolicy.legacy",
-  "content": "controlLoop%3A%0A++abatement%3A+true%0A++controlLoopName%3A+LOOP_ASJOy_v1_0_ResourceInstanceName1_tca%0A++timeout%3A+0%0A++trigger_policy%3A+policy1%0Apolicies%3A%0A-+actor%3A+APPC%0A++failure%3A+policy2%0A++failure_exception%3A+final_failure_exception%0A++failure_guard%3A+final_failure_guard%0A++failure_retries%3A+final_failure_retries%0A++failure_timeout%3A+final_failure_timeout%0A++id%3A+policy1%0A++payload%3A%0A++++configurationParameters%3A+%27%5B%7B%22ip-addr%22%3A%22%24.vf-module-topology.vf-module-parameters.param%5B10%5D.value%22%2C%22oam-ip-addr%22%3A%22%24.vf-module-topology.vf-module-parameters.param%5B15%5D.value%22%2C%22enabled%22%3A%22%24.vf-module-topology.vf-module-parameters.param%5B22%5D.value%22%7D%5D%27%0A++++requestParameters%3A+%27%7B%22usePreload%22%3Atrue%2C%22userParams%22%3A%5B%5D%7D%27%0A++recipe%3A+Restart%0A++retry%3A+0%0A++success%3A+final_success%0A++target%3A%0A++++resourceID%3A+vLoadBalancerMS%0A++++type%3A+VNF%0A++timeout%3A+0%0A-+actor%3A+SO%0A++failure%3A+final_failure%0A++failure_exception%3A+final_failure_exception%0A++failure_guard%3A+final_failure_guard%0A++failure_retries%3A+final_failure_retries%0A++failure_timeout%3A+final_failure_timeout%0A++id%3A+policy2%0A++recipe%3A+VF+Module+Create%0A++retry%3A+0%0A++success%3A+final_success%0A++target%3A%0A++++modelCustomizationId%3A+1bffdc31-a37d-4dee-b65c-dde623a76e52%0A++++modelInvariantId%3A+ca052563-eb92-4b5b-ad41-9111768ce043%0A++++modelName%3A+Vloadbalancerms..vpkg..module-1%0A++++modelVersion%3A+1%0A++++modelVersionId%3A+1e725ccc-b823-4f67-82b9-4f4367070dbc%0A++++resourceID%3A+Vloadbalancerms..vpkg..module-1%0A++++type%3A+VFMODULE%0A++timeout%3A+0%0A"
+  "content": "controlLoop%3A%0A++abatement%3A+true%0A++controlLoopName%3A+LOOP_ASJOy_v1_0_ResourceInstanceName1_tca%0A++timeout%3A+0%0A++trigger_policy%3A+policy1%0Apolicies%3A%0A-+actor%3A+APPC%0A++failure%3A+policy2%0A++failure_exception%3A+final_failure_exception%0A++failure_guard%3A+final_failure_guard%0A++failure_retries%3A+final_failure_retries%0A++failure_timeout%3A+final_failure_timeout%0A++id%3A+policy1%0A++payload%3A%0A++++configurationParameters%3A+%27%5B%7B%22ip-addr%22%3A%22%24.vf-module-topology.vf-module-parameters.param%5B10%5D.value%22%2C%22oam-ip-addr%22%3A%22%24.vf-module-topology.vf-module-parameters.param%5B15%5D.value%22%2C%22enabled%22%3A%22%24.vf-module-topology.vf-module-parameters.param%5B22%5D.value%22%7D%5D%27%0A++++requestParameters%3A+%27%7B%22usePreload%22%3Atrue%2C%22userParams%22%3A%5B%5D%7D%27%0A++recipe%3A+Restart%0A++retry%3A+0%0A++success%3A+final_success%0A++target%3A%0A++++resourceID%3A+vLoadBalancerMS%0A++++type%3A+VNF%0A++timeout%3A+0%0A-+actor%3A+SO%0A++failure%3A+final_failure%0A++failure_exception%3A+final_failure_exception%0A++failure_guard%3A+final_failure_guard%0A++failure_retries%3A+final_failure_retries%0A++failure_timeout%3A+final_failure_timeout%0A++id%3A+policy2%0A++recipe%3A+VF+Module+Create%0A++retry%3A+0%0A++success%3A+final_success%0A++target%3A%0A++++modelCustomizationId%3A+1bffdc31-a37d-4dee-b65c-dde623a76e52%0A++++modelInvariantId%3A+ca052563-eb92-4b5b-ad41-9111768ce043%0A++++modelName%3A+Vloadbalancerms..vpkg..module-1%0A++++modelVersion%3A+1%0A++++modelVersionId%3A+1e725ccc-b823-4f67-82b9-4f4367070dbc%0A++++resourceID%3A+Vloadbalancerms..vpkg..module-1%0A++++type%3A+VFMODULE%0A++timeout%3A+0%0A-+actor%3A+CDS%0A++failure%3A+final_failure%0A++failure_exception%3A+final_failure_exception%0A++failure_guard%3A+final_failure_guard%0A++failure_retries%3A+final_failure_retries%0A++failure_timeout%3A+final_failure_timeout%0A++id%3A+policy3%0A++payload%3A%0A++++artifact_name%3A+baseconfiguration%0A++++artifact_version%3A+1.0.0%0A++++data%3A%0A++++++resource-assignment-properties%3A%0A++++++++action-name%3A+action-name%0A++++++++hostname%3A+hostname%0A++++++++request-id%3A+request-id%0A++++++++scope-type%3A+scope-type%0A++++++++service-instance-id%3A+service-instance-id%0A++++++++vnf-id%3A+vnf-id%0A++++++++vnf_name%3A+vnf_name%0A++++mode%3A+async%0A++recipe%3A+resource-assignment%0A++retry%3A+0%0A++success%3A+final_success%0A++target%3A%0A++++modelCustomizationId%3A+1bffdc31-a37d-4dee-b65c-dde623a76e52%0A++++modelInvariantId%3A+ca052563-eb92-4b5b-ad41-9111768ce043%0A++++modelName%3A+Vloadbalancerms..vpkg..module-1%0A++++modelVersion%3A+1%0A++++modelVersionId%3A+1e725ccc-b823-4f67-82b9-4f4367070dbc%0A++++resourceID%3A+Vloadbalancerms..vpkg..module-1%0A++++type%3A+VFMODULE%0A++timeout%3A+0%0A"
 }
\ No newline at end of file
index 69c86cc..aaa9627 100644 (file)
@@ -50,3 +50,35 @@ topology_template:
           actor: SO
           recipe: VF Module Create
           payload: ''
+        - id: policy3
+          retry: '0'
+          timeout: '0'
+          success: final_success
+          failure: final_failure
+          failure_timeout: final_failure_timeout
+          failure_retries: final_failure_retries
+          failure_exception: final_failure_exception
+          failure_guard: final_failure_guard
+          target:
+            type: VFMODULE
+            resourceID: Vloadbalancerms..vpkg..module-1
+            modelInvariantId: ca052563-eb92-4b5b-ad41-9111768ce043
+            modelVersionId: 1e725ccc-b823-4f67-82b9-4f4367070dbc
+            modelName: Vloadbalancerms..vpkg..module-1
+            modelVersion: '1'
+            modelCustomizationId: 1bffdc31-a37d-4dee-b65c-dde623a76e52
+          actor: CDS
+          recipe: resource-assignment
+          payload:
+            artifact_name: baseconfiguration
+            artifact_version: 1.0.0
+            mode: async
+            data:
+              resource-assignment-properties:
+                request-id: request-id
+                service-instance-id: service-instance-id
+                vnf-id: vnf-id
+                action-name: action-name
+                scope-type: scope-type
+                hostname: hostname
+                vnf_name: vnf_name
index a2de76a..2777a15 100644 (file)
@@ -10,7 +10,7 @@
       {
         "actor": {
           "actor": "APPC",
-          "type": "Restart",
+          "recipe": "Restart",
           "payload": "requestParameters: '{\"usePreload\":true,\"userParams\":[]}'\r\nconfigurationParameters: '[{\"ip-addr\":\"$.vf-module-topology.vf-module-parameters.param[10].value\",\"oam-ip-addr\":\"$.vf-module-topology.vf-module-parameters.param[15].value\",\"enabled\":\"$.vf-module-topology.vf-module-parameters.param[22].value\"}]'"
         },
         "id": "policy1",
           "resourceID": "vLoadBalancerMS"
         }
       },
-    {
+      {
         "actor": {
-         "actor": "SO",
-         "type": "VF Module Create",
-         "payload": ""
+          "actor": "SO",
+          "recipe": "VF Module Create",
+          "payload": ""
         },
         "id": "policy2",
         "retry": "0",
           "modelVersion": "1",
           "modelCustomizationId": "1bffdc31-a37d-4dee-b65c-dde623a76e52"
         }
+      },
+      {
+        "actor": {
+          "actor": "CDS",
+          "recipe": {
+            "recipe": "resource-assignment",
+            "payload": {
+              "artifact_name": "baseconfiguration",
+              "artifact_version": "1.0.0",
+              "mode": "async",
+              "data": {
+                "resource-assignment-properties": {
+                  "request-id": "request-id",
+                  "service-instance-id": "service-instance-id",
+                  "vnf-id": "vnf-id",
+                  "action-name": "action-name",
+                  "scope-type": "scope-type",
+                  "hostname": "hostname",
+                  "vnf_name": "vnf_name"
+                }
+              }
+            }
+          }
+        },
+        "id": "policy3",
+        "retry": "0",
+        "timeout": "0",
+        "success": "final_success",
+        "failure": "final_failure",
+        "failure_timeout": "final_failure_timeout",
+        "failure_retries": "final_failure_retries",
+        "failure_exception": "final_failure_exception",
+        "failure_guard": "final_failure_guard",
+        "target": {
+          "type": "VFMODULE",
+          "resourceID": "Vloadbalancerms..vpkg..module-1",
+          "modelInvariantId": "ca052563-eb92-4b5b-ad41-9111768ce043",
+          "modelVersionId": "1e725ccc-b823-4f67-82b9-4f4367070dbc",
+          "modelName": "Vloadbalancerms..vpkg..module-1",
+          "modelVersion": "1",
+          "modelCustomizationId": "1bffdc31-a37d-4dee-b65c-dde623a76e52"
+        }
       }
     ]
   },
index a638c35..dc47b44 100644 (file)
                                                "resource-assignment": {
                                                        "inputs": {
                                                                "resource-assignment-properties": {
-                                                                       "request-id": "",
-                                                                       "service-instance-id": "",
-                                                                       "vnf-id": "",
-                                                                       "action-name": "",
-                                                                       "scope-type": "",
-                                                                       "hostname": "",
-                                                                       "vnf_name": ""
+                                                                       "request-id": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "service-instance-id": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "vnf-id": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "action-name": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "scope-type": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "hostname": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "vnf_name": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       }
                                                                }
                                                        }
                                                },
                                                "activate": {
                                                        "inputs": {
                                                                "resource-assignment-properties": {
-                                                                       "request-id": "",
-                                                                       "service-instance-id": "",
-                                                                       "vnf-id": "",
-                                                                       "action-name": "",
-                                                                       "scope-type": "",
-                                                                       "hostname": "",
-                                                                       "vnf_name": ""
+                                                                       "request-id": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "service-instance-id": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "vnf-id": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "action-name": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "scope-type": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "hostname": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "vnf_name": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       }
                                                                }
                                                        }
                                                },
                                                "activate-restconf": {
                                                        "inputs": {
                                                                "resource-assignment-properties": {
-                                                                       "request-id": "",
-                                                                       "service-instance-id": "",
-                                                                       "vnf-id": "",
-                                                                       "action-name": "",
-                                                                       "scope-type": "",
-                                                                       "hostname": "",
-                                                                       "vnf_name": ""
+                                                                       "request-id": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "service-instance-id": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "vnf-id": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "action-name": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "scope-type": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "hostname": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "vnf_name": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       }
                                                                }
                                                        }
                                                },
                                                "activate-cli": {
                                                        "inputs": {
                                                                "resource-assignment-properties": {
-                                                                       "request-id": "",
-                                                                       "service-instance-id": "",
-                                                                       "vnf-id": "",
-                                                                       "action-name": "",
-                                                                       "scope-type": "",
-                                                                       "hostname": "",
-                                                                       "vnf_name": ""
+                                                                       "request-id": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "service-instance-id": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "vnf-id": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "action-name": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "scope-type": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "hostname": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "vnf_name": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       }
                                                                }
                                                        }
                                                },
                                                "assign-activate": {
                                                        "inputs": {
                                                                "resource-assignment-properties": {
-                                                                       "request-id": "",
-                                                                       "service-instance-id": "",
-                                                                       "vnf-id": "",
-                                                                       "action-name": "",
-                                                                       "scope-type": "",
-                                                                       "hostname": "",
-                                                                       "vnf_name": ""
+                                                                       "request-id": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "service-instance-id": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "vnf-id": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "action-name": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "scope-type": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "hostname": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "vnf_name": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       }
                                                                }
                                                        }
                                                },
                                                "imperative-test-wf": {
                                                        "inputs": {
                                                                "resource-assignment-properties": {
-                                                                       "request-id": "",
-                                                                       "service-instance-id": "",
-                                                                       "vnf-id": "",
-                                                                       "action-name": "",
-                                                                       "scope-type": "",
-                                                                       "hostname": "",
-                                                                       "vnf_name": ""
+                                                                       "request-id": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "service-instance-id": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "vnf-id": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "action-name": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "scope-type": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "hostname": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       },
+                                                                       "vnf_name": {
+                                                                               "type": "string",
+                                                                               "required": true
+                                                                       }
                                                                }
                                                        }
                                                }