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 | |
parent | 5c6d23852ea949335eb7f85d787eb24ac6dbab2a (diff) | |
parent | 3121b5bee2e70b1f753f9988344d41f3132edf69 (diff) |
Merge "CLAMP-CDS integration to display all CDS actions for blueprint in CL"
Diffstat (limited to 'src/test')
11 files changed, 489 insertions, 44 deletions
diff --git a/src/test/resources/application.properties b/src/test/resources/application.properties index e842abd4c..54ba0900c 100644 --- a/src/test/resources/application.properties +++ b/src/test/resources/application.properties @@ -160,4 +160,9 @@ clamp.config.security.permission.type.template=permission-type-template clamp.config.security.permission.type.tosca=permission-type-tosca #This one indicates the type of instances (dev|prod|perf...), this must be set accordingly in clds-users.properties clamp.config.security.permission.instance=dev -clamp.config.security.authentication.class=org.onap.aaf.cadi.principal.X509Principal
\ No newline at end of file +clamp.config.security.authentication.class=org.onap.aaf.cadi.principal.X509Principal + +# Configuration settings for CDS +clamp.config.cds.url=http4://localhost:${docker.http-cache.port.host} +clamp.config.cds.userName=ccsdkapps +clamp.config.cds.password=ccsdkapps
\ No newline at end of file diff --git a/src/test/resources/example/sdc/service_Vloadbalancerms_csar.csar b/src/test/resources/example/sdc/service_Vloadbalancerms_csar.csar Binary files differindex 3330dd1e8..ff337993a 100644 --- a/src/test/resources/example/sdc/service_Vloadbalancerms_csar.csar +++ b/src/test/resources/example/sdc/service_Vloadbalancerms_csar.csar diff --git a/src/test/resources/http-cache/example/api/v1/blueprint-model/workflow-spec?connectionTimeToLive=5000/.file b/src/test/resources/http-cache/example/api/v1/blueprint-model/workflow-spec?connectionTimeToLive=5000/.file new file mode 100644 index 000000000..13d3feaaf --- /dev/null +++ b/src/test/resources/http-cache/example/api/v1/blueprint-model/workflow-spec?connectionTimeToLive=5000/.file @@ -0,0 +1,68 @@ +{ + "blueprintName": "baseconfiguration", + "version": "1.0.0", + "workFlowData": { + "workFlowName": "resource-assignment", + "inputs": { + "resource-assignment-properties": { + "required": true, + "type": "dt-resource-assignment-properties" + } + }, + "outputs": { + "response-property": { + "type": "string", + "value": "executed" + }, + "template-properties": { + "type": "json", + "value": { + "get_attribute": [ + "resource-assignment", + "assignment-params" + ] + } + } + } + }, + "dataTypes": { + "dt-resource-assignment-properties": { + "description": "This is Dynamically generated data type for workflow activate", + "version": "1.0.0", + "metadata": null, + "attributes": null, + "properties": { + "request-id": { + "required": true, + "type": "string" + }, + "service-instance-id": { + "required": true, + "type": "string" + }, + "vnf-id": { + "required": true, + "type": "string" + }, + "action-name": { + "required": true, + "type": "string" + }, + "scope-type": { + "required": true, + "type": "string" + }, + "hostname": { + "required": true, + "type": "string" + }, + "vnf_name": { + "required": true, + "type": "string" + } + }, + "constraints": null, + "derived_from": "tosca.datatypes.Dynamic" + } + } +}
\ No newline at end of file diff --git a/src/test/resources/http-cache/example/api/v1/blueprint-model/workflow-spec?connectionTimeToLive=5000/.header b/src/test/resources/http-cache/example/api/v1/blueprint-model/workflow-spec?connectionTimeToLive=5000/.header new file mode 100644 index 000000000..6a280d972 --- /dev/null +++ b/src/test/resources/http-cache/example/api/v1/blueprint-model/workflow-spec?connectionTimeToLive=5000/.header @@ -0,0 +1 @@ +{"Transfer-Encoding": "chunked", "Set-Cookie": "JSESSIONID=158qxkdtdobkd1umr3ikkgrmlx;Path=/", "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", "Server": "Jetty(9.3.21.v20170918)", "Content-Type": "application/json", "X-ECOMP-RequestID": "e2ddb3c8-994f-47df-b4dc-097d4fb55c08"}
\ No newline at end of file diff --git a/src/test/resources/http-cache/example/api/v1/blueprint-model/workflows/blueprint-name/baseconfiguration/version/1.0.0?connectionTimeToLive=5000/.file b/src/test/resources/http-cache/example/api/v1/blueprint-model/workflows/blueprint-name/baseconfiguration/version/1.0.0?connectionTimeToLive=5000/.file new file mode 100644 index 000000000..58975d86a --- /dev/null +++ b/src/test/resources/http-cache/example/api/v1/blueprint-model/workflows/blueprint-name/baseconfiguration/version/1.0.0?connectionTimeToLive=5000/.file @@ -0,0 +1,12 @@ +{ + "blueprintName": "baseconfiguration", + "version": "1.0.0", + "workflows": [ + "resource-assignment", + "activate", + "activate-restconf", + "activate-cli", + "assign-activate", + "imperative-test-wf" + ] +}
\ No newline at end of file diff --git a/src/test/resources/http-cache/example/api/v1/blueprint-model/workflows/blueprint-name/baseconfiguration/version/1.0.0?connectionTimeToLive=5000/.header b/src/test/resources/http-cache/example/api/v1/blueprint-model/workflows/blueprint-name/baseconfiguration/version/1.0.0?connectionTimeToLive=5000/.header new file mode 100644 index 000000000..6a280d972 --- /dev/null +++ b/src/test/resources/http-cache/example/api/v1/blueprint-model/workflows/blueprint-name/baseconfiguration/version/1.0.0?connectionTimeToLive=5000/.header @@ -0,0 +1 @@ +{"Transfer-Encoding": "chunked", "Set-Cookie": "JSESSIONID=158qxkdtdobkd1umr3ikkgrmlx;Path=/", "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", "Server": "Jetty(9.3.21.v20170918)", "Content-Type": "application/json", "X-ECOMP-RequestID": "e2ddb3c8-994f-47df-b4dc-097d4fb55c08"}
\ No newline at end of file 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": { |