CLAMP-CDS integration to display all CDS actions for blueprint in CL

CLAMP-CDS integration to display all CDS actions for blueprint in CL

Change-Id: I18b972b8952e5de9ac8e39d6c9cc4ecba0ec9b02
Issue-ID: CLAMP-491
Signed-off-by: Vidyashree-Huawei <vidyashree.rama@huawei.com>
diff --git a/src/test/resources/tosca/model-properties.json b/src/test/resources/tosca/model-properties.json
index e41471b..c405964 100644
--- a/src/test/resources/tosca/model-properties.json
+++ b/src/test/resources/tosca/model-properties.json
@@ -32,7 +32,91 @@
 				"UUID": "b4c4f3d7-929e-4b6d-a1cd-57e952ddc3e6",
 				"version": "1.0",
 				"resourceVendorRelease": "1.0",
-				"customizationUUID": "465246dc-7748-45f4-a013-308d92922552"
+				"customizationUUID": "465246dc-7748-45f4-a013-308d92922552",
+				"controllerProperties": {
+					"sdnc_model_name": "baseconfiguration",
+					"sdnc_model_version": "1.0.0",
+					"workflows": {
+						"resource-assignment": {
+							"inputs": {
+								"resource-assignment-properties": {
+									"request-id": "",
+									"service-instance-id": "",
+									"vnf-id": "",
+									"action-name": "",
+									"scope-type": "",
+									"hostname": "",
+									"vnf_name": ""
+								}
+							}
+						},
+						"activate": {
+							"inputs": {
+								"resource-assignment-properties": {
+									"request-id": "",
+									"service-instance-id": "",
+									"vnf-id": "",
+									"action-name": "",
+									"scope-type": "",
+									"hostname": "",
+									"vnf_name": ""
+								}
+							}
+						},
+						"activate-restconf": {
+							"inputs": {
+								"resource-assignment-properties": {
+									"request-id": "",
+									"service-instance-id": "",
+									"vnf-id": "",
+									"action-name": "",
+									"scope-type": "",
+									"hostname": "",
+									"vnf_name": ""
+								}
+							}
+						},
+						"activate-cli": {
+							"inputs": {
+								"resource-assignment-properties": {
+									"request-id": "",
+									"service-instance-id": "",
+									"vnf-id": "",
+									"action-name": "",
+									"scope-type": "",
+									"hostname": "",
+									"vnf_name": ""
+								}
+							}
+						},
+						"assign-activate": {
+							"inputs": {
+								"resource-assignment-properties": {
+									"request-id": "",
+									"service-instance-id": "",
+									"vnf-id": "",
+									"action-name": "",
+									"scope-type": "",
+									"hostname": "",
+									"vnf_name": ""
+								}
+							}
+						},
+						"imperative-test-wf": {
+							"inputs": {
+								"resource-assignment-properties": {
+									"request-id": "",
+									"service-instance-id": "",
+									"vnf-id": "",
+									"action-name": "",
+									"scope-type": "",
+									"hostname": "",
+									"vnf_name": ""
+								}
+							}
+						} 
+				 	}
+				}
 			}
 		},
 		"CR": {
diff --git a/src/test/resources/tosca/operational-policy-json-schema.json b/src/test/resources/tosca/operational-policy-json-schema.json
index d6870dc..b43f6f9 100644
--- a/src/test/resources/tosca/operational-policy-json-schema.json
+++ b/src/test/resources/tosca/operational-policy-json-schema.json
@@ -87,7 +87,6 @@
 										"basicCategoryTitle": "recipe",
 										"required": [
 											"id",
-											"recipe",
 											"retry",
 											"timeout",
 											"actor",
@@ -105,20 +104,6 @@
 												"title": "Policy ID",
 												"type": "string"
 											},
-											"recipe": {
-												"title": "Recipe",
-												"type": "string",
-												"enum": [
-													"Restart",
-													"Rebuild",
-													"Migrate",
-													"Health-Check",
-													"ModifyConfig",
-													"VF Module Create",
-													"VF Module Delete",
-													"Reroute"
-												]
-											},
 											"retry": {
 												"default": "0",
 												"title": "Number of Retry",
@@ -132,21 +117,222 @@
 												"format": "number"
 											},
 											"actor": {
+												"type": "object",
 												"title": "Actor",
-												"type": "string",
-												"enum": [
-													"APPC",
-													"SO",
-													"VFC",
-													"SDNC",
-													"SDNR"
+												"anyOf": [
+													{
+														"title": "APPC",
+														"properties": {
+															"actor": {
+																"title": "actor",
+																"type": "string",
+																"default": "APPC",
+																"options": {
+																	"hidden": true
+																}
+															},
+															"type": {
+																"title": "recipe",
+																"type": "string",
+																"default": "",
+																"enum": [
+																	"Restart",
+																	"Rebuild",
+																	"Migrate",
+																	"Health-Check",
+																	"ModifyConfig"
+																]
+															},
+															"payload": {
+																"title": "Payload (YAML)",
+																"type": "string",
+																"format": "textarea"
+															}
+														}
+													},
+													{
+														"title": "SO",
+														"properties": {
+															"actor": {
+																"title": "actor",
+																"type": "string",
+																"default": "SO",
+																"options": {
+																	"hidden": true
+																}
+															},
+															"type": {
+																"title": "recipe",
+																"type": "string",
+																"default": "",
+																"enum": [
+																	"VF Module Create",
+																	"VF Module Delete"
+																]
+															},
+															"payload": {
+																"title": "Payload (YAML)",
+																"type": "string",
+																"format": "textarea"
+															}
+														}
+													},
+													{
+														"title": "SDNC",
+														"properties": {
+															"actor": {
+																"title": "actor",
+																"type": "string",
+																"default": "SDNC",
+																"options": {
+																	"hidden": true
+																}
+															},
+															"type": {
+																"title": "recipe",
+																"type": "string",
+																"default": "",
+																"enum": [
+																	"Reroute",
+																	"BandwidthOnDemand"
+																]
+															},
+															"payload": {
+																"title": "Payload (YAML)",
+																"type": "string",
+																"format": "textarea"
+															}
+														}
+													},
+													{
+														"title": "VFC",
+														"properties": {
+															"actor": {
+																"title": "actor",
+																"type": "string",
+																"default": "VFC",
+																"options": {
+																	"hidden": true
+																}
+															},
+															"type": {
+																"title": "recipe",
+																"type": "string",
+																"required": [
+																	"payload"
+																],
+																"default": "",
+																"enum": [
+																	"ModifyConfig"
+																]
+															},
+															"payload": {
+																"title": "Payload (YAML)",
+																"type": "string",
+																"format": "textarea"
+															}
+														}
+													},
+													{
+														"title": "CDS",
+														"properties": {
+															"actor": {
+																"title": "actor",
+																"type": "string",
+																"default": "CDS",
+																"options": {
+																	"hidden": true
+																}
+															},
+															"type": {
+																"title": "recipe",
+																"type": "object",
+																"required": [
+																	"payload"
+																],
+																"anyOf": [
+																	{
+																		"title": "user-defined",
+																		"properties": {
+																			"type": {
+																				"title": "Payload (YAML)",
+																				"type": "string",
+																				"format": "textarea"
+																			}
+																		}
+																	},
+																	{
+																		"title": "resource-assignment",
+																		"properties": {
+																			"type": {
+																				"title": "Payload (YAML)",
+																				"type": "string",
+																				"default": "'artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : '\\'{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\''",
+																				"format": "textarea"
+																			}
+																		}
+																	},
+																	{
+																		"title": "activate",
+																		"properties": {
+																			"type": {
+																				"title": "Payload (YAML)",
+																				"type": "string",
+																				"default": "'artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : '\\'{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\''",
+																				"format": "textarea"
+																			}
+																		}
+																	},
+																	{
+																		"title": "activate-restconf",
+																		"properties": {
+																			"type": {
+																				"title": "Payload (YAML)",
+																				"type": "string",
+																				"default": "'artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : '\\'{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\''",
+																				"format": "textarea"
+																			}
+																		}
+																	},
+																	{
+																		"title": "activate-cli",
+																		"properties": {
+																			"type": {
+																				"title": "Payload (YAML)",
+																				"type": "string",
+																				"default": "'artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : '\\'{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\''",
+																				"format": "textarea"
+																			}
+																		}
+																	},
+																	{
+																		"title": "assign-activate",
+																		"properties": {
+																			"type": {
+																				"title": "Payload (YAML)",
+																				"type": "string",
+																				"default": "'artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : '\\'{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\''",
+																				"format": "textarea"
+																			}
+																		}
+																	},
+																	{
+																		"title": "imperative-test-wf",
+																		"properties": {
+																			"type": {
+																				"title": "Payload (YAML)",
+																				"type": "string",
+																				"default": "'artifact_name : \"baseconfiguration\"\nartifact_version : \"1.0.0\"\nmode : async\ndata : '\\'{\"resource-assignment-properties\":{\"request-id\":\"\",\"service-instance-id\":\"\",\"vnf-id\":\"\",\"action-name\":\"\",\"scope-type\":\"\",\"hostname\":\"\",\"vnf_name\":\"\"}}\\''",
+																				"format": "textarea"
+																			}
+																		}
+																	}
+																]
+															}
+														}
+													}
 												]
 											},
-											"payload": {
-												"title": "Payload (YAML)",
-												"type": "string",
-												"format": "textarea"
-											},
 											"success": {
 												"default": "final_success",
 												"title": "When Success",
diff --git a/src/test/resources/tosca/operational-policy-payload.yaml b/src/test/resources/tosca/operational-policy-payload.yaml
index ed03842..553a8af 100644
--- a/src/test/resources/tosca/operational-policy-payload.yaml
+++ b/src/test/resources/tosca/operational-policy-payload.yaml
@@ -14,13 +14,8 @@
           controlLoopName: LOOP_ASJOy_v1_0_ResourceInstanceName1_tca
         policies:
         - id: policy1
-          recipe: Restart
           retry: '0'
           timeout: '0'
-          actor: APPC
-          payload:
-            requestParameters: '{"usePreload":true,"userParams":[]}'
-            configurationParameters: '[{"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"}]'
           success: final_success
           failure: policy2
           failure_timeout: final_failure_timeout
@@ -30,12 +25,14 @@
           target:
             type: VNF
             resourceID: vLoadBalancerMS
+          actor: APPC
+          recipe: Restart
+          payload:
+            requestParameters: '{"usePreload":true,"userParams":[]}'
+            configurationParameters: '[{"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: policy2
-          recipe: VF Module Create
           retry: '0'
           timeout: '0'
-          actor: SO
-          payload: ''
           success: final_success
           failure: final_failure
           failure_timeout: final_failure_timeout
@@ -50,3 +47,6 @@
             modelName: Vloadbalancerms..vpkg..module-1
             modelVersion: '1'
             modelCustomizationId: 1bffdc31-a37d-4dee-b65c-dde623a76e52
+          actor: SO
+          recipe: VF Module Create
+          payload: ''
diff --git a/src/test/resources/tosca/operational-policy-properties.json b/src/test/resources/tosca/operational-policy-properties.json
index ac1314e..a2de76a 100644
--- a/src/test/resources/tosca/operational-policy-properties.json
+++ b/src/test/resources/tosca/operational-policy-properties.json
@@ -8,12 +8,14 @@
     },
     "policies": [
       {
+        "actor": {
+          "actor": "APPC",
+          "type": "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",
-        "recipe": "Restart",
         "retry": "0",
         "timeout": "0",
-        "actor": "APPC",
-        "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\"}]'",
         "success": "final_success",
         "failure": "policy2",
         "failure_timeout": "final_failure_timeout",
@@ -26,12 +28,14 @@
         }
       },
     {
+        "actor": {
+         "actor": "SO",
+         "type": "VF Module Create",
+         "payload": ""
+        },
         "id": "policy2",
-        "recipe": "VF Module Create",
         "retry": "0",
         "timeout": "0",
-        "actor": "SO",
-        "payload": "",
         "success": "final_success",
         "failure": "final_failure",
         "failure_timeout": "final_failure_timeout",
diff --git a/src/test/resources/tosca/resource-details.json b/src/test/resources/tosca/resource-details.json
index 7b53f39..a638c35 100644
--- a/src/test/resources/tosca/resource-details.json
+++ b/src/test/resources/tosca/resource-details.json
@@ -16,7 +16,91 @@
 			"UUID": "b4c4f3d7-929e-4b6d-a1cd-57e952ddc3e6",
 			"version": "1.0",
 			"resourceVendorRelease": "1.0",
-			"customizationUUID": "465246dc-7748-45f4-a013-308d92922552"
+			"customizationUUID": "465246dc-7748-45f4-a013-308d92922552",
+				"controllerProperties": {
+					"sdnc_model_name": "baseconfiguration",
+					"sdnc_model_version": "1.0.0",
+					"workflows": {
+						"resource-assignment": {
+							"inputs": {
+								"resource-assignment-properties": {
+									"request-id": "",
+									"service-instance-id": "",
+									"vnf-id": "",
+									"action-name": "",
+									"scope-type": "",
+									"hostname": "",
+									"vnf_name": ""
+								}
+							}
+						},
+						"activate": {
+							"inputs": {
+								"resource-assignment-properties": {
+									"request-id": "",
+									"service-instance-id": "",
+									"vnf-id": "",
+									"action-name": "",
+									"scope-type": "",
+									"hostname": "",
+									"vnf_name": ""
+								}
+							}
+						},
+						"activate-restconf": {
+							"inputs": {
+								"resource-assignment-properties": {
+									"request-id": "",
+									"service-instance-id": "",
+									"vnf-id": "",
+									"action-name": "",
+									"scope-type": "",
+									"hostname": "",
+									"vnf_name": ""
+								}
+							}
+						},
+						"activate-cli": {
+							"inputs": {
+								"resource-assignment-properties": {
+									"request-id": "",
+									"service-instance-id": "",
+									"vnf-id": "",
+									"action-name": "",
+									"scope-type": "",
+									"hostname": "",
+									"vnf_name": ""
+								}
+							}
+						},
+						"assign-activate": {
+							"inputs": {
+								"resource-assignment-properties": {
+									"request-id": "",
+									"service-instance-id": "",
+									"vnf-id": "",
+									"action-name": "",
+									"scope-type": "",
+									"hostname": "",
+									"vnf_name": ""
+								}
+							}
+						},
+						"imperative-test-wf": {
+							"inputs": {
+								"resource-assignment-properties": {
+									"request-id": "",
+									"service-instance-id": "",
+									"vnf-id": "",
+									"action-name": "",
+									"scope-type": "",
+									"hostname": "",
+									"vnf_name": ""
+								}
+							}
+						} 
+				 }
+		}
 		}
 	},
 	"CR": {