diff options
author | Sébastien Determe <sebastien.determe@intl.att.com> | 2020-03-09 09:22:24 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-03-09 09:22:24 +0000 |
commit | 5c3a825851bb1a345620c5c4951726c5b94a0341 (patch) | |
tree | a9df35d4aa1de7b46ddd18d4faa75d7a9bfcd7b2 /src/test/resources/tosca | |
parent | 5c6d23852ea949335eb7f85d787eb24ac6dbab2a (diff) | |
parent | 3121b5bee2e70b1f753f9988344d41f3132edf69 (diff) |
Merge "CLAMP-CDS integration to display all CDS actions for blueprint in CL"
Diffstat (limited to 'src/test/resources/tosca')
5 files changed, 401 insertions, 43 deletions
diff --git a/src/test/resources/tosca/model-properties.json b/src/test/resources/tosca/model-properties.json index e41471b16..c405964ee 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 d6870dc9d..b43f6f9d4 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 4e667e59b..69c86cc84 100644 --- a/src/test/resources/tosca/operational-policy-payload.yaml +++ b/src/test/resources/tosca/operational-policy-payload.yaml @@ -14,13 +14,8 @@ topology_template: 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 @@ topology_template: 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 @@ topology_template: 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 ac1314ecb..a2de76a98 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 7b53f3972..a638c350d 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": { |