diff options
Diffstat (limited to 'tests')
49 files changed, 1311 insertions, 703 deletions
diff --git a/tests/clamp/APIs/01__Test_CL_APIs.robot b/tests/clamp/APIs/01__Test_CL_APIs.robot new file mode 100644 index 00000000..1a874323 --- /dev/null +++ b/tests/clamp/APIs/01__Test_CL_APIs.robot @@ -0,0 +1,69 @@ +*** Settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json + +*** Variables *** +${login} admin +${passw} password + +*** Keywords *** +Create the sessions + ${auth}= Create List ${login} ${passw} + Create Session clamp https://localhost:8443 auth=${auth} disable_warnings=1 + Set Global Variable ${clamp_session} clamp + +*** Test Cases *** +Get Requests health check ok + Create the sessions + ${resp}= Get Request ${clamp_session} /restservices/clds/v1/healthcheck + Should Be Equal As Strings ${resp.status_code} 200 + +List TCAs + ${resp}= Get Request ${clamp_session} /restservices/clds/v2/loop/getAllNames + Should Contain Match ${resp} *LOOP_iYTIP_v1_0_ResourceInstanceName1_tca* + Should Contain Match ${resp} *tca_2* + Should Contain Match ${resp} *LOOP_iYTIP_v1_0_ResourceInstanceName1_tca_3* + +Open TCA1 + ${resp}= Get Request ${clamp_session} /restservices/clds/v2/loop/LOOP_iYTIP_v1_0_ResourceInstanceName1_tca + Should Contain Match ${resp} *LOOP_iYTIP_v1_0_ResourceInstanceName1_tca* + Should Contain Match ${resp} *GENERATED_POLICY_ID_AT_SUBMIT* + Should Contain Match ${resp} *onap.policy.monitoring.cdap.tca.hi.lo.app* + Should Contain Match ${resp} *TCA Policy Scope* + +Open TCA2 + ${resp}= Get Request ${clamp_session} /restservices/clds/v2/loop/LOOP_iYTIP_v1_0_ResourceInstanceName2_tca_2 + Should Contain Match ${resp} *LOOP_iYTIP_v1_0_ResourceInstanceName2_tca_2* + Should Contain Match ${resp} *GENERATED_POLICY_ID_AT_SUBMIT* + Should Contain Match ${resp} *dmaap.onap-message-router* + Should Contain Match ${resp} *TCA Policy Scope* + +Open TCA3 + ${resp}= Get Request ${clamp_session} /restservices/clds/v2/loop/LOOP_iYTIP_v1_0_ResourceInstanceName1_tca_3 + Should Contain Match ${resp} *LOOP_iYTIP_v1_0_ResourceInstanceName1_tca* + Should Contain Match ${resp} *GENERATED_POLICY_ID_AT_SUBMIT* + Should Contain Match ${resp} *onap.policy.monitoring.cdap.tca.hi.lo.app* + Should Contain Match ${resp} *TCA Policy Scope Version* + +Modify MicroService Policy TCA1 + ${data}= Get Binary File ${CURDIR}${/}data${/}microservicePolicyTca1.json + &{headers}= Create Dictionary Content-Type=application/json + ${resp}= POST Request ${clamp_session} /restservices/clds/v2/loop/updateMicroservicePolicy/LOOP_iYTIP_v1_0_ResourceInstanceName1_tca data=${data} headers=${headers} + Should Be Equal As Strings ${resp.status_code} 200 + +Verify Modification MicroService TCA1 + ${resp}= Get Request ${clamp_session} /restservices/clds/v2/loop/LOOP_iYTIP_v1_0_ResourceInstanceName1_tca + Should Contain Match ${resp} *version1.11* + +Modify Operational Policy TCA1 + ${data}= Get Binary File ${CURDIR}${/}data${/}operationalPolicyTca1.json + &{headers}= Create Dictionary Content-Type=application/json + ${resp}= POST Request ${clamp_session} /restservices/clds/v2/loop/updateOperationalPolicies/LOOP_iYTIP_v1_0_ResourceInstanceName1_tca data=${data} headers=${headers} + Should Be Equal As Strings ${resp.status_code} 200 + +Verify Modification Operational TCA1 + ${resp}= Get Request ${clamp_session} /restservices/clds/v2/loop/LOOP_iYTIP_v1_0_ResourceInstanceName1_tca + Should Contain Match ${resp} *Test_Field* + diff --git a/tests/clamp/APIs/data/createClHolmes1.json b/tests/clamp/APIs/data/createClHolmes1.json deleted file mode 100644 index 696145b8..00000000 --- a/tests/clamp/APIs/data/createClHolmes1.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name":"ClHolmes1", - "controlNamePrefix":"ClosedLoop-", - "bpmnText":"", - "propText":"{\"global\":[{\"name\":\"service\",\"value\":[\"4cc5b45a-1f63-4194-8100-cd8e14248c92\"]},{\"name\":\"vf\",\"value\":[\"07e266fc-49ab-4cd7-8378-ca4676f1b9ec\"]},{\"name\":\"actionSet\",\"value\":[\"vnfRecipe\"]},{\"name\":\"location\",\"value\":[\"DC1\",\"DC2\"]}],\"Holmes_1gxp0mm\":[{\"name\":\"correlationalLogic\",\"value\":\"correlational logic1\"},{\"name\":\"configPolicyName\",\"value\":\"Config Policy name1\"}],\"Policy_136qatf\":{\"Policy1\":[{\"name\":\"pname\",\"value\":\"Policy1\"},{\"name\":\"pid\",\"value\":\"0\"},{\"name\":\"timeout\",\"value\":\"345\"},{\"policyConfigurations\":[[{\"name\":\"recipe\",\"value\":[\"Restart\"]},{\"name\":\"maxRetries\",\"value\":[\"3\"]},{\"name\":\"retryTimeLimit\",\"value\":[\"180\"]},{\"name\":\"_id\",\"value\":[\"QxHBjiW\"]},{\"name\":\"parentPolicy\",\"value\":[\"\"]},{\"name\":\"targetResourceId\",\"value\":[\"\"]}]]}]}}", - "imageText":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\" viewbox=\"\" width=\"100%\" height=\"100%\"><defs><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"11\" refY=\"10\" id=\"markerSjdype4kmx\"><path d=\"M 1 5 L 11 10 L 1 15 Z\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#000000\"></path></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"20\" markerHeight=\"20\" orient=\"auto\" refX=\"6\" refY=\"6\" id=\"markerSjdype4kmz\"><circle cx=\"6\" cy=\"6\" r=\"3.5\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"></circle></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"20\" markerHeight=\"20\" orient=\"auto\" refX=\"8.5\" refY=\"5\" id=\"markerSjdype4km11\"><path d=\"m 1 5 l 0 -3 l 7 3 l -7 3 z\" style=\"stroke-width: 1; stroke-linecap: butt; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"></path></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"11\" refY=\"10\" id=\"markerSjdype4km13\"><path d=\"M 1 5 L 11 10 L 1 15\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"></path></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"-1\" refY=\"10\" id=\"markerSjdype4km15\"><path d=\"M 0 10 L 8 6 L 16 10 L 8 14 Z\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"></path></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"-5\" refY=\"10\" id=\"markerSjdype4km17\"><path d=\"M 1 4 L 5 16\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#000000\" stroke=\"#000000\"></path></marker></defs><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"StartEvent_1\" transform=\"matrix(1,0,0,1,50,162)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"48\" height=\"48\"></rect><g class=\"djs-visual\"><circle cx=\"18\" cy=\"18\" r=\"18\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></circle></g><rect x=\"0\" y=\"0\" width=\"36\" height=\"36\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"StartEvent_1_label\" transform=\"matrix(1,0,0,1,23,198)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"VesCollector_1arss4p\" transform=\"matrix(1,0,0,1,217,140)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"132\" height=\"92\"></rect><g class=\"djs-visual\"><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" rx=\"0\" ry=\"0\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></rect><polyline points=\"120,80 120,20 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><polyline points=\"20,0 20,80 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><text style=\"font-family: Arial,sans-serif; font-size: 12px;\"><tspan x=\"5\" y=\"14\">V</tspan></text><text style=\"font-family: Arial,sans-serif; font-size: 12px;\"><tspan x=\"5\" y=\"26\">E</tspan></text><text style=\"font-family: Arial,sans-serif; font-size: 12px;\"><tspan x=\"5\" y=\"38\">S</tspan></text><text style=\"font-family: Arial,sans-serif; font-size: 12px;\" class=\" djs-label\"><tspan x=\"25.5\" y=\"43.5\">VesCollector</tspan></text></g><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"Holmes_1gxp0mm\" transform=\"matrix(1,0,0,1,463,140)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"132\" height=\"92\"></rect><g class=\"djs-visual\"><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" rx=\"0\" ry=\"0\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></rect><circle cx=\"15\" cy=\"15\" r=\"10\" style=\"stroke-width: 1;\" stroke=\"#000000\" fill=\"#ffffff\"></circle><text style=\"font-family: Arial,sans-serif; font-size: 12px;\"><tspan x=\"11\" y=\"20\">H</tspan></text><text style=\"font-family: Arial,sans-serif; font-size: 12px;\" class=\" djs-label\"><tspan x=\"39\" y=\"43.5\">Holmes</tspan></text></g><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"Policy_136qatf\" transform=\"matrix(1,0,0,1,713,140)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"132\" height=\"92\"></rect><g class=\"djs-visual\"><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" rx=\"0\" ry=\"0\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></rect><polyline points=\"0,40 60,0 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><text style=\"font-family: Arial,sans-serif; font-size: 12px;\" class=\" djs-label\"><tspan x=\"43.5\" y=\"43.5\">Policy</tspan></text></g><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape selected\" data-element-id=\"EndEvent_034z36u\" transform=\"matrix(1,0,0,1,937,162)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"48\" height=\"48\"></rect><g class=\"djs-visual\"><circle cx=\"18\" cy=\"18\" r=\"18\" style=\"stroke-width: 4;\" stroke=\"#000000\" fill=\"#ffffff\"></circle></g><rect x=\"0\" y=\"0\" width=\"36\" height=\"36\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect><g class=\" djs-resizer djs-resizer-nw\" transform=\"matrix(1,0,0,1,0,0)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g><g class=\" djs-resizer djs-resizer-ne\" transform=\"matrix(0,1,-1,0,36,0)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g><g class=\" djs-resizer djs-resizer-se\" transform=\"matrix(-1,0,0,-1,36,36)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g><g class=\" djs-resizer djs-resizer-sw\" transform=\"matrix(0,-1,1,0,0,36)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"EndEvent_034z36u_label\" transform=\"matrix(1,0,0,1,910,198)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_1d9v6ya\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"80\" y=\"174\" width=\"143\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 86,180L217,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSjdype4kmx");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"86,180 217,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_1d9v6ya_label\" transform=\"matrix(1,0,0,1,106.5,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_01q83h9\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"331\" y=\"174\" width=\"138\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 337,180L463,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSjdype4kmx");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"337,180 463,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_01q83h9_label\" transform=\"matrix(1,0,0,1,355,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_1gw4hg3\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"577\" y=\"174\" width=\"142\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 583,180L713,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSjdype4kmx");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"583,180 713,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_1gw4hg3_label\" transform=\"matrix(1,0,0,1,603,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_07go3oi\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"827\" y=\"174\" width=\"116\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 833,180L937,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSjdype4kmx");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"833,180 937,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_07go3oi_label\" transform=\"matrix(1,0,0,1,840,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g></svg>", - "templateName":"templateHolmes1", - "typeId":null, - "deploymentId":null -}
\ No newline at end of file diff --git a/tests/clamp/APIs/data/createClHolmes2.json b/tests/clamp/APIs/data/createClHolmes2.json deleted file mode 100644 index 69055895..00000000 --- a/tests/clamp/APIs/data/createClHolmes2.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name":"ClHolmes2", - "controlNamePrefix":"ClosedLoop-", - "bpmnText":"", - "propText":"{\"Holmes_0bsv00m\":[{\"name\":\"correlationalLogic\",\"value\":\"correlation logic2\"},{\"name\":\"configPolicyName\",\"value\":\"Config Policy Name2\"}],\"global\":[{\"name\":\"service\",\"value\":[\"c95b0e7c-c1f0-4287-9928-7964c5377a46\"]},{\"name\":\"vf\",\"value\":[\"48504e0e-f3d3-411d-a52b-eda1b8fec073\"]},{\"name\":\"actionSet\",\"value\":[\"vnfRecipe\"]},{\"name\":\"location\",\"value\":[\"DC2\",\"DC3\"]}],\"Policy_114xo8j\":{\"Policy2\":[{\"name\":\"pname\",\"value\":\"Policy2\"},{\"name\":\"pid\",\"value\":\"0\"},{\"name\":\"timeout\",\"value\":\"345\"},{\"policyConfigurations\":[[{\"name\":\"recipe\",\"value\":[\"migrate\"]},{\"name\":\"maxRetries\",\"value\":[\"3\"]},{\"name\":\"retryTimeLimit\",\"value\":[\"360\"]},{\"name\":\"_id\",\"value\":[\"dHQXiOz\"]},{\"name\":\"parentPolicy\",\"value\":[\"\"]},{\"name\":\"targetResourceId\",\"value\":[\"\"]}]]}]}}", - "imageText":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\" viewbox=\"\" width=\"100%\" height=\"100%\"><defs><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"11\" refY=\"10\" id=\"markerSjdype4kmbu\"><path d=\"M 1 5 L 11 10 L 1 15 Z\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#000000\"></path></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"20\" markerHeight=\"20\" orient=\"auto\" refX=\"6\" refY=\"6\" id=\"markerSjdype4kmbw\"><circle cx=\"6\" cy=\"6\" r=\"3.5\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"></circle></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"20\" markerHeight=\"20\" orient=\"auto\" refX=\"8.5\" refY=\"5\" id=\"markerSjdype4kmby\"><path d=\"m 1 5 l 0 -3 l 7 3 l -7 3 z\" style=\"stroke-width: 1; stroke-linecap: butt; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"></path></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"11\" refY=\"10\" id=\"markerSjdype4kmc0\"><path d=\"M 1 5 L 11 10 L 1 15\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"></path></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"-1\" refY=\"10\" id=\"markerSjdype4kmc2\"><path d=\"M 0 10 L 8 6 L 16 10 L 8 14 Z\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"></path></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"-5\" refY=\"10\" id=\"markerSjdype4kmc4\"><path d=\"M 1 4 L 5 16\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#000000\" stroke=\"#000000\"></path></marker></defs><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"StartEvent_1\" transform=\"matrix(1,0,0,1,50,162)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"48\" height=\"48\"></rect><g class=\"djs-visual\"><circle cx=\"18\" cy=\"18\" r=\"18\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></circle></g><rect x=\"0\" y=\"0\" width=\"36\" height=\"36\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"StartEvent_1_label\" transform=\"matrix(1,0,0,1,23,198)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"Holmes_0bsv00m\" transform=\"matrix(1,0,0,1,438,140)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"132\" height=\"92\"></rect><g class=\"djs-visual\"><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" rx=\"0\" ry=\"0\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></rect><circle cx=\"15\" cy=\"15\" r=\"10\" style=\"stroke-width: 1;\" stroke=\"#000000\" fill=\"#ffffff\"></circle><text style=\"font-family: Arial,sans-serif; font-size: 12px;\"><tspan x=\"11\" y=\"20\">H</tspan></text><text style=\"font-family: Arial,sans-serif; font-size: 12px;\" class=\" djs-label\"><tspan x=\"39\" y=\"43.5\">Holmes</tspan></text></g><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"VesCollector_1ljyqg8\" transform=\"matrix(1,0,0,1,213,140)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"132\" height=\"92\"></rect><g class=\"djs-visual\"><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" rx=\"0\" ry=\"0\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></rect><polyline points=\"120,80 120,20 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><polyline points=\"20,0 20,80 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><text style=\"font-family: Arial,sans-serif; font-size: 12px;\"><tspan x=\"5\" y=\"14\">V</tspan></text><text style=\"font-family: Arial,sans-serif; font-size: 12px;\"><tspan x=\"5\" y=\"26\">E</tspan></text><text style=\"font-family: Arial,sans-serif; font-size: 12px;\"><tspan x=\"5\" y=\"38\">S</tspan></text><text style=\"font-family: Arial,sans-serif; font-size: 12px;\" class=\" djs-label\"><tspan x=\"25.5\" y=\"43.5\">VesCollector</tspan></text></g><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"Policy_114xo8j\" transform=\"matrix(1,0,0,1,678,140)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"132\" height=\"92\"></rect><g class=\"djs-visual\"><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" rx=\"0\" ry=\"0\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></rect><polyline points=\"0,40 60,0 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><text style=\"font-family: Arial,sans-serif; font-size: 12px;\" class=\" djs-label\"><tspan x=\"43.5\" y=\"43.5\">Policy</tspan></text></g><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape selected\" data-element-id=\"EndEvent_0b4m6bk\" transform=\"matrix(1,0,0,1,901,162)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"48\" height=\"48\"></rect><g class=\"djs-visual\"><circle cx=\"18\" cy=\"18\" r=\"18\" style=\"stroke-width: 4;\" stroke=\"#000000\" fill=\"#ffffff\"></circle></g><rect x=\"0\" y=\"0\" width=\"36\" height=\"36\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect><g class=\" djs-resizer djs-resizer-nw\" transform=\"matrix(1,0,0,1,0,0)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g><g class=\" djs-resizer djs-resizer-ne\" transform=\"matrix(0,1,-1,0,36,0)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g><g class=\" djs-resizer djs-resizer-se\" transform=\"matrix(-1,0,0,-1,36,36)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g><g class=\" djs-resizer djs-resizer-sw\" transform=\"matrix(0,-1,1,0,0,36)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"EndEvent_0b4m6bk_label\" transform=\"matrix(1,0,0,1,874,198)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_1c9hzec\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"80\" y=\"174\" width=\"139\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 86,180L213,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSjdype4kmbu");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"86,180 213,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_1c9hzec_label\" transform=\"matrix(1,0,0,1,104.5,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_1ig3gix\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"327\" y=\"174\" width=\"117\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 333,180L438,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSjdype4kmbu");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"333,180 438,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_1ig3gix_label\" transform=\"matrix(1,0,0,1,340.5,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_0zwbn2r\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"552\" y=\"174\" width=\"132\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 558,180L678,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSjdype4kmbu");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"558,180 678,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_0zwbn2r_label\" transform=\"matrix(1,0,0,1,573,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_0ox6r95\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"792\" y=\"174\" width=\"115\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 798,180L901,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSjdype4kmbu");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"798,180 901,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_0ox6r95_label\" transform=\"matrix(1,0,0,1,804.5,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g></svg>", - "templateName":"templateHolmes2", - "typeId":null, - "deploymentId":null -}
\ No newline at end of file diff --git a/tests/clamp/APIs/data/createClTCA1.json b/tests/clamp/APIs/data/createClTCA1.json deleted file mode 100644 index 509288b5..00000000 --- a/tests/clamp/APIs/data/createClTCA1.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name":"ClTCA1", - "controlNamePrefix":"ClosedLoop-", - "bpmnText":"", - "propText":"{\"global\":[{\"name\":\"service\",\"value\":[\"4cc5b45a-1f63-4194-8100-cd8e14248c92\"]},{\"name\":\"vf\",\"value\":[\"023a3f0d-1161-45ff-b4cf-8918a8ccf3ad\"]},{\"name\":\"actionSet\",\"value\":[\"enbRecipe\"]},{\"name\":\"location\",\"value\":[\"DC1\",\"DC2\"]}],\"TCA_1d13unw\":{\"TCA1\":[{\"name\":\"tname\",\"value\":\"TCA1\"},{\"name\":\"tuuid\",\"value\":\"ce57408b-93ba-td02-1622-165abd6c5ff5\"},{\"name\":\"tcaPol\",\"value\":\"Policy3\"},{\"name\":\"eventName\",\"value\":\"vLoadBalancer\"},{\"name\":\"controlLoopSchemaType\",\"value\":\"VNF\"},{\"name\":\"tcaPolId\",\"value\":\"0\"},{\"serviceConfigurations\":[[\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta\",\"GREATER\",\"5\",\"ONSET\"]]}]},\"Policy_12lup3h\":{\"Policy3\":[{\"name\":\"pname\",\"value\":\"Policy3\"},{\"name\":\"pid\",\"value\":\"0\"},{\"name\":\"timeout\",\"value\":\"345\"},{\"policyConfigurations\":[[{\"name\":\"recipe\",\"value\":[\"reset\"]},{\"name\":\"maxRetries\",\"value\":[\"3\"]},{\"name\":\"retryTimeLimit\",\"value\":[\"200\"]},{\"name\":\"_id\",\"value\":[\"lecrG3I\"]},{\"name\":\"parentPolicy\",\"value\":[\"\"]},{\"name\":\"targetResourceId\",\"value\":[\"\"]}]]}]}}", - "imageText":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\" viewbox=\"\" width=\"100%\" height=\"100%\"><defs><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"11\" refY=\"10\" id=\"markerSjdype4kmnw\"><path d=\"M 1 5 L 11 10 L 1 15 Z\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#000000\"></path></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"20\" markerHeight=\"20\" orient=\"auto\" refX=\"6\" refY=\"6\" id=\"markerSjdype4kmny\"><circle cx=\"6\" cy=\"6\" r=\"3.5\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"></circle></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"20\" markerHeight=\"20\" orient=\"auto\" refX=\"8.5\" refY=\"5\" id=\"markerSjdype4kmo0\"><path d=\"m 1 5 l 0 -3 l 7 3 l -7 3 z\" style=\"stroke-width: 1; stroke-linecap: butt; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"></path></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"11\" refY=\"10\" id=\"markerSjdype4kmo2\"><path d=\"M 1 5 L 11 10 L 1 15\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"></path></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"-1\" refY=\"10\" id=\"markerSjdype4kmo4\"><path d=\"M 0 10 L 8 6 L 16 10 L 8 14 Z\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"></path></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"-5\" refY=\"10\" id=\"markerSjdype4kmo6\"><path d=\"M 1 4 L 5 16\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#000000\" stroke=\"#000000\"></path></marker></defs><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"StartEvent_1\" transform=\"matrix(1,0,0,1,50,162)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"48\" height=\"48\"></rect><g class=\"djs-visual\"><circle cx=\"18\" cy=\"18\" r=\"18\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></circle></g><rect x=\"0\" y=\"0\" width=\"36\" height=\"36\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"StartEvent_1_label\" transform=\"matrix(1,0,0,1,23,198)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"VesCollector_1g9cmz0\" transform=\"matrix(1,0,0,1,207,140)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"132\" height=\"92\"></rect><g class=\"djs-visual\"><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" rx=\"0\" ry=\"0\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></rect><polyline points=\"120,80 120,20 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><polyline points=\"20,0 20,80 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><text style=\"font-family: Arial,sans-serif; font-size: 12px;\"><tspan x=\"5\" y=\"14\">V</tspan></text><text style=\"font-family: Arial,sans-serif; font-size: 12px;\"><tspan x=\"5\" y=\"26\">E</tspan></text><text style=\"font-family: Arial,sans-serif; font-size: 12px;\"><tspan x=\"5\" y=\"38\">S</tspan></text><text style=\"font-family: Arial,sans-serif; font-size: 12px;\" class=\" djs-label\"><tspan x=\"25.5\" y=\"43.5\">VesCollector</tspan></text></g><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"TCA_1d13unw\" transform=\"matrix(1,0,0,1,453,140)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"132\" height=\"92\"></rect><g class=\"djs-visual\"><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" rx=\"0\" ry=\"0\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></rect><polyline points=\"0,60 120,60 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><text style=\"font-family: Arial,sans-serif; font-size: 12px;\" class=\" djs-label\"><tspan x=\"48\" y=\"43.5\">TCA</tspan></text></g><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"Policy_12lup3h\" transform=\"matrix(1,0,0,1,687,140)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"132\" height=\"92\"></rect><g class=\"djs-visual\"><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" rx=\"0\" ry=\"0\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></rect><polyline points=\"0,40 60,0 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><text style=\"font-family: Arial,sans-serif; font-size: 12px;\" class=\" djs-label\"><tspan x=\"43.5\" y=\"43.5\">Policy</tspan></text></g><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape selected\" data-element-id=\"EndEvent_16kg9fx\" transform=\"matrix(1,0,0,1,925,162)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"48\" height=\"48\"></rect><g class=\"djs-visual\"><circle cx=\"18\" cy=\"18\" r=\"18\" style=\"stroke-width: 4;\" stroke=\"#000000\" fill=\"#ffffff\"></circle></g><rect x=\"0\" y=\"0\" width=\"36\" height=\"36\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect><g class=\" djs-resizer djs-resizer-nw\" transform=\"matrix(1,0,0,1,0,0)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g><g class=\" djs-resizer djs-resizer-ne\" transform=\"matrix(0,1,-1,0,36,0)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g><g class=\" djs-resizer djs-resizer-se\" transform=\"matrix(-1,0,0,-1,36,36)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g><g class=\" djs-resizer djs-resizer-sw\" transform=\"matrix(0,-1,1,0,0,36)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"EndEvent_16kg9fx_label\" transform=\"matrix(1,0,0,1,898,198)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_1ahk7jg\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"80\" y=\"174\" width=\"133\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 86,180L207,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSjdype4kmnw");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"86,180 207,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_1ahk7jg_label\" transform=\"matrix(1,0,0,1,101.5,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_18ahat1\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"321\" y=\"174\" width=\"138\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 327,180L453,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSjdype4kmnw");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"327,180 453,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_18ahat1_label\" transform=\"matrix(1,0,0,1,345,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_1mo9gxb\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"567\" y=\"174\" width=\"126\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 573,180L687,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSjdype4kmnw");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"573,180 687,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_1mo9gxb_label\" transform=\"matrix(1,0,0,1,585,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_1dgtrrq\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"801\" y=\"174\" width=\"130\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 807,180L925,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSjdype4kmnw");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"807,180 925,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_1dgtrrq_label\" transform=\"matrix(1,0,0,1,821,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g></svg>", - "templateName":"templateTCA1", - "typeId":null, - "deploymentId":null -}
\ No newline at end of file diff --git a/tests/clamp/APIs/data/createClTCA2.json b/tests/clamp/APIs/data/createClTCA2.json deleted file mode 100644 index 5754a8e2..00000000 --- a/tests/clamp/APIs/data/createClTCA2.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name":"ClTCA2", - "controlNamePrefix":"ClosedLoop-", - "bpmnText":"", - "propText":"{\"Policy_1r0guma\":{\"Policy4\":[{\"name\":\"pname\",\"value\":\"Policy4\"},{\"name\":\"pid\",\"value\":\"0\"},{\"name\":\"timeout\",\"value\":\"345\"},{\"policyConfigurations\":[[{\"name\":\"recipe\",\"value\":[\"reset\"]},{\"name\":\"maxRetries\",\"value\":[\"3\"]},{\"name\":\"retryTimeLimit\",\"value\":[\"300\"]},{\"name\":\"_id\",\"value\":[\"JoL9ecT\"]},{\"name\":\"parentPolicy\",\"value\":[\"\"]},{\"name\":\"targetResourceId\",\"value\":[\"\"]}]]}]},\"global\":[{\"name\":\"service\",\"value\":[\"4cc5b45a-1f63-4194-8100-cd8e14248c92\"]},{\"name\":\"vf\",\"value\":[\"023a3f0d-1161-45ff-b4cf-8918a8ccf3ad\"]},{\"name\":\"actionSet\",\"value\":[\"enbRecipe\"]},{\"name\":\"location\",\"value\":[\"DC1\",\"DC2\",\"DC3\"]}],\"TCA_09syovq\":{\"TCA2\":[{\"name\":\"tname\",\"value\":\"TCA2\"},{\"name\":\"tuuid\",\"value\":\"3794f32d-8d95-tf61-444b-0b374cc173b2\"},{\"name\":\"tcaPol\",\"value\":\"Policy4\"},{\"name\":\"eventName\",\"value\":\"vLoadBalancer\"},{\"name\":\"controlLoopSchemaType\",\"value\":\"VM\"},{\"name\":\"tcaPolId\",\"value\":\"0\"},{\"serviceConfigurations\":[[\"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta\",\"GREATER\",\"15\",\"ONSET\",\"undefined\"]]}]}}", - "imageText":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\" viewbox=\"\" width=\"100%\" height=\"100%\"><defs><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"11\" refY=\"10\" id=\"markerSjdype4kmyk\"><path d=\"M 1 5 L 11 10 L 1 15 Z\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#000000\"></path></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"20\" markerHeight=\"20\" orient=\"auto\" refX=\"6\" refY=\"6\" id=\"markerSjdype4kmym\"><circle cx=\"6\" cy=\"6\" r=\"3.5\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"></circle></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"20\" markerHeight=\"20\" orient=\"auto\" refX=\"8.5\" refY=\"5\" id=\"markerSjdype4kmyo\"><path d=\"m 1 5 l 0 -3 l 7 3 l -7 3 z\" style=\"stroke-width: 1; stroke-linecap: butt; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"></path></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"11\" refY=\"10\" id=\"markerSjdype4kmyq\"><path d=\"M 1 5 L 11 10 L 1 15\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"></path></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"-1\" refY=\"10\" id=\"markerSjdype4kmys\"><path d=\"M 0 10 L 8 6 L 16 10 L 8 14 Z\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#ffffff\" stroke=\"#000000\"></path></marker><marker viewBox=\"0 0 20 20\" markerWidth=\"10\" markerHeight=\"10\" orient=\"auto\" refX=\"-5\" refY=\"10\" id=\"markerSjdype4kmyu\"><path d=\"M 1 4 L 5 16\" style=\"stroke-width: 1; stroke-linecap: round; stroke-dasharray: 10000, 1;\" fill=\"#000000\" stroke=\"#000000\"></path></marker></defs><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"StartEvent_1\" transform=\"matrix(1,0,0,1,50,162)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"48\" height=\"48\"></rect><g class=\"djs-visual\"><circle cx=\"18\" cy=\"18\" r=\"18\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></circle></g><rect x=\"0\" y=\"0\" width=\"36\" height=\"36\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"StartEvent_1_label\" transform=\"matrix(1,0,0,1,23,198)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"VesCollector_1u6hupb\" transform=\"matrix(1,0,0,1,231,140)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"132\" height=\"92\"></rect><g class=\"djs-visual\"><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" rx=\"0\" ry=\"0\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></rect><polyline points=\"120,80 120,20 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><polyline points=\"20,0 20,80 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><text style=\"font-family: Arial,sans-serif; font-size: 12px;\"><tspan x=\"5\" y=\"14\">V</tspan></text><text style=\"font-family: Arial,sans-serif; font-size: 12px;\"><tspan x=\"5\" y=\"26\">E</tspan></text><text style=\"font-family: Arial,sans-serif; font-size: 12px;\"><tspan x=\"5\" y=\"38\">S</tspan></text><text style=\"font-family: Arial,sans-serif; font-size: 12px;\" class=\" djs-label\"><tspan x=\"25.5\" y=\"43.5\">VesCollector</tspan></text></g><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"TCA_09syovq\" transform=\"matrix(1,0,0,1,472,140)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"132\" height=\"92\"></rect><g class=\"djs-visual\"><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" rx=\"0\" ry=\"0\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></rect><polyline points=\"0,60 120,60 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><text style=\"font-family: Arial,sans-serif; font-size: 12px;\" class=\" djs-label\"><tspan x=\"48\" y=\"43.5\">TCA</tspan></text></g><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"Policy_1r0guma\" transform=\"matrix(1,0,0,1,721,140)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"132\" height=\"92\"></rect><g class=\"djs-visual\"><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" rx=\"0\" ry=\"0\" style=\"stroke-width: 2;\" stroke=\"#000000\" fill=\"#ffffff\"></rect><polyline points=\"0,40 60,0 \" style=\"stroke-width: 2;\" fill=\"none\" stroke=\"#000000\"></polyline><text style=\"font-family: Arial,sans-serif; font-size: 12px;\" class=\" djs-label\"><tspan x=\"43.5\" y=\"43.5\">Policy</tspan></text></g><rect x=\"0\" y=\"0\" width=\"120\" height=\"80\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape selected\" data-element-id=\"EndEvent_04x88vg\" transform=\"matrix(1,0,0,1,966,162)\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"48\" height=\"48\"></rect><g class=\"djs-visual\"><circle cx=\"18\" cy=\"18\" r=\"18\" style=\"stroke-width: 4;\" stroke=\"#000000\" fill=\"#ffffff\"></circle></g><rect x=\"0\" y=\"0\" width=\"36\" height=\"36\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect><g class=\" djs-resizer djs-resizer-nw\" transform=\"matrix(1,0,0,1,0,0)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g><g class=\" djs-resizer djs-resizer-ne\" transform=\"matrix(0,1,-1,0,36,0)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g><g class=\" djs-resizer djs-resizer-se\" transform=\"matrix(-1,0,0,-1,36,36)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g><g class=\" djs-resizer djs-resizer-sw\" transform=\"matrix(0,-1,1,0,0,36)\"><rect x=\"-7\" y=\"-7\" width=\"5\" height=\"5\" class=\" djs-resizer-visual\"></rect><rect x=\"-7\" y=\"-7\" width=\"20\" height=\"20\" class=\" djs-resizer-hit\"></rect></g></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"EndEvent_04x88vg_label\" transform=\"matrix(1,0,0,1,939,198)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_0y4m01s\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"80\" y=\"174\" width=\"157\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 86,180L231,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSjdype4kmyk");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"86,180 231,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_0y4m01s_label\" transform=\"matrix(1,0,0,1,113.5,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_10vqotq\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"345\" y=\"174\" width=\"133\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 351,180L472,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSjdype4kmyk");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"351,180 472,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_10vqotq_label\" transform=\"matrix(1,0,0,1,366.5,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_0fpkygk\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"586\" y=\"174\" width=\"141\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 592,180L721,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSjdype4kmyk");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"592,180 721,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_0fpkygk_label\" transform=\"matrix(1,0,0,1,611.5,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-connection\" data-element-id=\"SequenceFlow_0jsvuvu\" style=\"display: block;\"><rect fill=\"none\" class=\"djs-outline\" x=\"835\" y=\"174\" width=\"137\" height=\"12\"></rect><g class=\"djs-visual\"><path d=\"m 841,180L966,180 \" style=\"stroke-width: 2; stroke-linejoin: round; marker-end: url("#markerSjdype4kmyk");\" fill=\"none\" stroke=\"#000000\"></path></g><polyline points=\"841,180 966,180 \" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></polyline></g></g><g class=\"djs-group\" xmlns=\"http://www.w3.org/2000/svg\"><g class=\"djs-element djs-shape\" data-element-id=\"SequenceFlow_0jsvuvu_label\" transform=\"matrix(1,0,0,1,858.5,170)\" style=\"display: none;\"><rect fill=\"none\" class=\"djs-outline\" x=\"-6\" y=\"-6\" width=\"102\" height=\"32\"></rect><g class=\"djs-visual\"><text style=\"font-family: Arial,sans-serif; font-size: 11px;\" class=\" djs-label\"><tspan x=\"45\" y=\"0\"></tspan></text></g><rect x=\"0\" y=\"0\" width=\"90\" height=\"20\" style=\"stroke-opacity: 0; stroke-width: 15;\" fill=\"none\" stroke=\"#ffffff\" class=\"djs-hit\"></rect></g></g></svg>", - "templateName":"templateTCA2", - "typeId":null, - "deploymentId":null -}
\ No newline at end of file diff --git a/tests/clamp/APIs/data/microservicePolicyTca1.json b/tests/clamp/APIs/data/microservicePolicyTca1.json new file mode 100644 index 00000000..f4e373e4 --- /dev/null +++ b/tests/clamp/APIs/data/microservicePolicyTca1.json @@ -0,0 +1,208 @@ +{ + "name": "TCA_iYTIP_v1_0_ResourceInstanceName1_tca", + "modelType": "onap.policy.monitoring.cdap.tca.hi.lo.app", + "properties": { + "domain": "measurementsForVfScaling", + "metricsPerEventName": [{ + "policyVersion": "version1.11", + "thresholds": [], + "policyName": "Scope1", + "controlLoopSchemaType": "VNF", + "policyScope": "Policyscope1", + "eventName": "Event1" + }] + }, + "shared": false, + "jsonRepresentation": { + "schema": { + "uniqueItems": "true", + "format": "tabs-top", + "type": "array", + "title": "TCA Policy JSON", + "items": { + "type": "object", + "title": "TCA Policy JSON", + "required": [ + "domain", + "metricsPerEventName" + ], + "properties": { + "domain": { + "propertyOrder": 1001, + "default": "measurementsForVfScaling", + "title": "Domain name to which TCA needs to be applied", + "type": "string" + }, + "metricsPerEventName": { + "propertyOrder": 1002, + "uniqueItems": "true", + "format": "tabs-top", + "title": "Contains eventName and threshold details that need to be applied to given eventName", + "type": "array", + "items": { + "type": "object", + "required": [ + "controlLoopSchemaType", + "eventName", + "policyName", + "policyScope", + "policyVersion", + "thresholds" + ], + "properties": { + "policyVersion": { + "propertyOrder": 1007, + "title": "TCA Policy Scope Version", + "type": "string" + }, + "thresholds": { + "propertyOrder": 1008, + "uniqueItems": "true", + "format": "tabs-top", + "title": "Thresholds associated with eventName", + "type": "array", + "items": { + "type": "object", + "required": [ + "closedLoopControlName", + "closedLoopEventStatus", + "direction", + "fieldPath", + "severity", + "thresholdValue", + "version" + ], + "properties": { + "severity": { + "propertyOrder": 1013, + "title": "Threshold Event Severity", + "type": "string", + "enum": [ + "CRITICAL", + "MAJOR", + "MINOR", + "WARNING", + "NORMAL" + ] + }, + "fieldPath": { + "propertyOrder": 1012, + "title": "Json field Path as per CEF message which needs to be analyzed for TCA", + "type": "string", + "enum": [ + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated", + "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated", + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle", + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt", + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice", + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq", + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal", + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem", + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait", + "$.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage", + "$.event.measurementsForVfScalingFields.meanRequestLatency", + "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered", + "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached", + "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured", + "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree", + "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed", + "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value" + ] + }, + "thresholdValue": { + "propertyOrder": 1014, + "title": "Threshold value for the field Path inside CEF message", + "type": "integer" + }, + "closedLoopEventStatus": { + "propertyOrder": 1010, + "title": "Closed Loop Event Status of the threshold", + "type": "string", + "enum": [ + "ONSET", + "ABATED" + ] + }, + "closedLoopControlName": { + "propertyOrder": 1009, + "title": "Closed Loop Control Name associated with the threshold", + "type": "string" + }, + "version": { + "propertyOrder": 1015, + "title": "Version number associated with the threshold", + "type": "string" + }, + "direction": { + "propertyOrder": 1011, + "title": "Direction of the threshold", + "type": "string", + "enum": [ + "LESS", + "LESS_OR_EQUAL", + "GREATER", + "GREATER_OR_EQUAL", + "EQUAL" + ] + } + } + } + }, + "policyName": { + "propertyOrder": 1005, + "title": "TCA Policy Scope Name", + "type": "string" + }, + "controlLoopSchemaType": { + "propertyOrder": 1003, + "title": "Specifies Control Loop Schema Type for the event Name e.g. VNF, VM", + "type": "string", + "enum": [ + "VM", + "VNF" + ] + }, + "policyScope": { + "propertyOrder": 1006, + "title": "TCA Policy Scope", + "type": "string" + }, + "eventName": { + "propertyOrder": 1004, + "title": "Event name to which thresholds need to be applied", + "type": "string" + } + } + } + } + } + } + } + } +}
\ No newline at end of file diff --git a/tests/clamp/APIs/data/operationalPolicyTca1.json b/tests/clamp/APIs/data/operationalPolicyTca1.json new file mode 100644 index 00000000..71a14493 --- /dev/null +++ b/tests/clamp/APIs/data/operationalPolicyTca1.json @@ -0,0 +1,6 @@ +[{ + "name": "OPERATIONAL_iYTIP_v1_0_ResourceInstanceName1_tca", + "configurationsJson": { + "testField": "Test_Field" + } +}]
\ No newline at end of file diff --git a/tests/clamp/UIs/01__Open_And_Edit_TCA.robot b/tests/clamp/UIs/01__Open_And_Edit_TCA.robot new file mode 100644 index 00000000..c0070c77 --- /dev/null +++ b/tests/clamp/UIs/01__Open_And_Edit_TCA.robot @@ -0,0 +1,67 @@ +*** Settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json +Library ../../../scripts/clamp/python-lib/CustomSeleniumLibrary.py +Library XvfbRobot + +*** Variables *** +${login} admin +${passw} password +${SELENIUM_SPEED_FAST} .2 seconds +${SELENIUM_SPEED_SLOW} .5 seconds +${BASE_URL} https://localhost:8443 + +*** Keywords *** +Create the sessions + ${auth}= Create List ${login} ${passw} + Create Session clamp ${BASE_URL} auth=${auth} disable_warnings=1 + Set Global Variable ${clamp_session} clamp + +*** Test Cases *** +Get Requests health check ok + Create the sessions + ${resp}= Get Request ${clamp_session} /restservices/clds/v1/healthcheck + Should Be Equal As Strings ${resp.status_code} 200 + +Open Browser +# Next line is to be enabled for Headless tests only (jenkins?). To see the tests disable the line. + Start Virtual Display 1920 1080 + Set Selenium Speed ${SELENIUM_SPEED_SLOW} + Open Browser ${BASE_URL}/designer/index.html browser=firefox + +Reply to authentication popup + Run Keyword And Ignore Error Insert into prompt ${login} ${passw} + Confirm action + +Good Login to Clamp UI and Verify logged in + Set Window Size 1920 1080 + ${title}= Get Title + Should Be Equal CLDS ${title} + Wait Until Element Is Visible xpath=//*[@class="navbar-brand logo_name ng-binding"] timeout=60 + Element Text Should Be xpath=//*[@class="navbar-brand logo_name ng-binding"] expected=Hello:admin + +Open TCA1 from Menu + Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[1]/a timeout=60 + Click Element xpath=//*[@id="navbar"]/ul/li[1]/a + Wait Until Element Is Visible locator=Open CL timeout=60 + Click Element locator=Open CL + Select From List By Label id=modelName LOOP_iYTIP_v1_0_ResourceInstanceName1_tca + Click Button locator=OK + +Set Properties for HolmesModel1 + Wait Until Element Is Visible xpath=//*[@data-element-id="TCA_iYTIP_v1_0_ResourceInstanceName1_tca"] timeout=60 + Click Element xpath=//*[@data-element-id="TCA_iYTIP_v1_0_ResourceInstanceName1_tca"] + Wait Until Element Is Visible xpath=//*[@id="editor"]/div/h3/div[2]/button[1] timeout=60 + Click Element xpath=//*[@id="editor"]/div/h3/div[2]/button[1] + Wait Until Element Is Visible xpath=//*[@id="root.0"]/div[2]/div/div/div[2]/div/h3/div[2]/button[1]/span timeout=60 + Click Element xpath=//*[@id="root.0"]/div[2]/div/div/div[2]/div/h3/div[2]/button[1]/span + Input Text xpath=//*[@name="root[0][metricsPerEventName][0][eventName]"] text=Event1 + Input Text xpath=//*[@name="root[0][metricsPerEventName][0][policyName]"] text=PolicyScope1 + Input Text xpath=//*[@name="root[0][metricsPerEventName][0][policyScope]"] text=TCAPolicyScope1 + Input Text xpath=//*[@name="root[0][metricsPerEventName][0][policyVersion]"] text=1.2.3 + Click Button locator=Done + +Close Browser + Close Browser diff --git a/tests/clamp/APIs/01__Create_CL_Holmes.robot b/tests/clamp/UIs/02__Verify_Modification_In_UI.robot index be63f22f..979547c6 100644 --- a/tests/clamp/APIs/01__Create_CL_Holmes.robot +++ b/tests/clamp/UIs/02__Verify_Modification_In_UI.robot @@ -19,3 +19,10 @@ Get Requests health check ok Create the sessions ${resp}= Get Request ${clamp_session} /restservices/clds/v1/healthcheck Should Be Equal As Strings ${resp.status_code} 200 + +Open TCA1 + ${resp}= Get Request ${clamp_session} /restservices/clds/v2/loop/LOOP_iYTIP_v1_0_ResourceInstanceName1_tca + Should Contain Match ${resp} *LOOP_iYTIP_v1_0_ResourceInstanceName1_tca* + Should Contain Match ${resp} *Event1* + Should Contain Match ${resp} *1.2.3* + Should Contain Match ${resp} *PolicyScope1* diff --git a/tests/clamp/UIs/04__Submit_deploy_chain_Holmes.robot b/tests/clamp/UIs/04__Submit_deploy_chain_Holmes.robot deleted file mode 100644 index b582fad9..00000000 --- a/tests/clamp/UIs/04__Submit_deploy_chain_Holmes.robot +++ /dev/null @@ -1,138 +0,0 @@ -*** Settings *** -Library Collections -Library RequestsLibrary -Library OperatingSystem -Library json -Library ../../../scripts/clamp/python-lib/CustomSeleniumLibrary.py -Library XvfbRobot - -*** Variables *** -${login} admin -${passw} password -${SELENIUM_SPEED_FAST} .2 seconds -${SELENIUM_SPEED_SLOW} .5 seconds -${BASE_URL} https://localhost:8443 - -*** Keywords *** -Create the sessions - ${auth}= Create List ${login} ${passw} - Create Session clamp ${BASE_URL} auth=${auth} disable_warnings=1 - Set Global Variable ${clamp_session} clamp - -*** Test Cases *** -Get Requests health check ok - Create the sessions - ${resp}= Get Request ${clamp_session} /restservices/clds/v1/healthcheck - Should Be Equal As Strings ${resp.status_code} 200 - -Open Browser -# Next line is to be enabled for Headless tests only (jenkins?). To see the tests disable the line. - Start Virtual Display 1920 1080 - Set Selenium Speed ${SELENIUM_SPEED_SLOW} - Open Browser ${BASE_URL}/designer/index.html browser=firefox - -Reply to authentication popup - Run Keyword And Ignore Error Insert into prompt ${login} ${passw} - Confirm action - -Good Login to Clamp UI and Verify logged in - Set Window Size 1920 1080 - ${title}= Get Title - Should Be Equal CLDS ${title} - Wait Until Element Is Visible xpath=//*[@class="navbar-brand logo_name ng-binding"] timeout=60 - Element Text Should Be xpath=//*[@class="navbar-brand logo_name ng-binding"] expected=Hello:admin - -#Open Holmes CL -# Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[1]/a timeout=60 -# Click Element xpath=//*[@id="navbar"]/ul/li[1]/a -# Wait Until Element Is Visible locator=Open CL timeout=60 -# Click Element locator=Open CL -# Select From List By Label id=modelName HolmesModel1 -# Click Button locator=OK -# Element Should Contain xpath=//*[@id="modeler_name"] Closed Loop Modeler - HolmesModel1 -# Element Should Contain xpath=//*[@id="status_clds"] DESIGN -# -#Validate-Test Holmes CL -# Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60 -# Click Element xpath=//*[@id="navbar"]/ul/li[2]/a -# Wait Until Element Is Visible locator=Validation Test timeout=60 -# Click Element locator=Validation Test -# Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 -# Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: test -# Element Should Contain xpath=//*[@id="status_clds"] DESIGN -# -#Submit Holmes CL -# Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60 -# Click Element xpath=//*[@id="navbar"]/ul/li[2]/a -# Wait Until Element Is Visible locator=Submit timeout=60 -# Click Element locator=Submit -# Click Button locator=Yes -# Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 -# Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: submit -# Element Should Contain xpath=//*[@id="status_clds"] DISTRIBUTED -# -#Resubmit Holmes CL -# Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60 -# Click Element xpath=//*[@id="navbar"]/ul/li[2]/a -# Wait Until Element Is Visible locator=Resubmit timeout=60 -# Click Element locator=Resubmit -# Click Button locator=Yes -# Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 -# Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: resubmit -# Element Should Contain xpath=//*[@id="status_clds"] DISTRIBUTED -# -#Deploy Holmes CL -# Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60 -# Click Element xpath=//*[@id="navbar"]/ul/li[2]/a -# Wait Until Element Is Visible locator=Deploy timeout=60 -# Click Element locator=Deploy -## Wait Until Element Is Visible xpath=//*[@id="deployProperties"] timeout=60 -## Input Text xpath=//*[@id="deployProperties"] text={} -# Click Button locator=Deploy -# Click Button locator=Yes -# Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 -# Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: deploy -# Element Should Contain xpath=//*[@id="status_clds"] ACTIVE -# -#Update Holmes CL -# Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60 -# Click Element xpath=//*[@id="navbar"]/ul/li[2]/a -# Wait Until Element Is Visible locator=Update timeout=60 -# Click Element locator=Update -# Click Button locator=Yes -# Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 -# Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: update -# Element Should Contain xpath=//*[@id="status_clds"] ACTIVE -# -#Stop Holmes CL -# Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60 -# Click Element xpath=//*[@id="navbar"]/ul/li[2]/a -# Wait Until Element Is Visible locator=Stop timeout=60 -# Click Element locator=Stop -# Click Button locator=Yes -# Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 -# Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: stop -# Element Should Contain xpath=//*[@id="status_clds"] STOPPED -# -#Restart Holmes CL -# Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60 -# Click Element xpath=//*[@id="navbar"]/ul/li[2]/a -# Wait Until Element Is Visible locator=Restart timeout=60 -# Click Element locator=Restart -# Click Button locator=Yes -# Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 -# Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: restart -# Element Should Contain xpath=//*[@id="status_clds"] ACTIVE -# -#UnDeploy Holmes CL -# Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60 -# Click Element xpath=//*[@id="navbar"]/ul/li[2]/a -# Wait Until Element Is Visible locator=UnDeploy timeout=60 -# Click Element locator=UnDeploy -# Click Button locator=Yes -# Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 -# Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: undeploy -# Element Should Contain xpath=//*[@id="status_clds"] DISTRIBUTED - -Close Browser - Close Browser diff --git a/tests/clamp/UIs/05__Submit_deploy_chain_TCA.robot b/tests/clamp/UIs/05__Submit_deploy_chain_TCA.robot deleted file mode 100644 index 7bcada12..00000000 --- a/tests/clamp/UIs/05__Submit_deploy_chain_TCA.robot +++ /dev/null @@ -1,131 +0,0 @@ -*** Settings *** -Library Collections -Library RequestsLibrary -Library OperatingSystem -Library json -Library ../../../scripts/clamp/python-lib/CustomSeleniumLibrary.py -Library XvfbRobot - -*** Variables *** -${login} admin -${passw} password -${SELENIUM_SPEED_FAST} .2 seconds -${SELENIUM_SPEED_SLOW} .5 seconds -${BASE_URL} https://localhost:8443 - -*** Test Cases *** -Get Requests health check ok - ${resp}= Get Request ${clamp_session} /restservices/clds/v1/healthcheck - Should Be Equal As Strings ${resp.status_code} 200 - -Open Browser -# Next line is to be enabled for Headless tests only (jenkins?). To see the tests disable the line. - Start Virtual Display 1920 1080 - Set Selenium Speed ${SELENIUM_SPEED_SLOW} - Open Browser ${BASE_URL}/designer/index.html browser=firefox - -Reply to authentication popup - Run Keyword And Ignore Error Insert into prompt ${login} ${passw} - Confirm action - -Good Login to Clamp UI and Verify logged in - Set Window Size 1920 1080 - ${title}= Get Title - Should Be Equal CLDS ${title} - Wait Until Element Is Visible xpath=//*[@class="navbar-brand logo_name ng-binding"] timeout=60 - Element Text Should Be xpath=//*[@class="navbar-brand logo_name ng-binding"] expected=Hello:admin - -#Open TCA CL -# Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[1]/a timeout=60 -# Click Element xpath=//*[@id="navbar"]/ul/li[1]/a -# Wait Until Element Is Visible locator=Open CL timeout=60 -# Click Element locator=Open CL -# Select From List By Label id=modelName TCAModel1 -# Click Button locator=OK -# Element Should Contain xpath=//*[@id="modeler_name"] Closed Loop Modeler - TCAModel1 -# Element Should Contain xpath=//*[@id="status_clds"] DESIGN -# -#Validate-Test TCA CL -# Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60 -# Click Element xpath=//*[@id="navbar"]/ul/li[2]/a -# Wait Until Element Is Visible locator=Validation Test timeout=60 -# Click Element locator=Validation Test -# Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 -# Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: test -# Element Should Contain xpath=//*[@id="status_clds"] DESIGN -# -#Submit TCA CL -# Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60 -# Click Element xpath=//*[@id="navbar"]/ul/li[2]/a -# Wait Until Element Is Visible locator=Submit timeout=60 -# Click Element locator=Submit -# Click Button locator=Yes -# Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 -# Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: submit -# Element Should Contain xpath=//*[@id="status_clds"] DISTRIBUTED -# -#Resubmit TCA CL -# Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60 -# Click Element xpath=//*[@id="navbar"]/ul/li[2]/a -# Wait Until Element Is Visible locator=Resubmit timeout=60 -# Click Element locator=Resubmit -# Click Button locator=Yes -# Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 -# Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: resubmit -# Element Should Contain xpath=//*[@id="status_clds"] DISTRIBUTED -# -#Deploy TCA CL -# Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60 -# Click Element xpath=//*[@id="navbar"]/ul/li[2]/a -# Wait Until Element Is Visible locator=Deploy timeout=60 -# Click Element locator=Deploy -## Wait Until Element Is Visible xpath=//*[@id="deployProperties"] timeout=60 -## Input Text xpath=//*[@id="deployProperties"] text={} -# Click Button locator=Deploy -# Click Button locator=Yes -# Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 -# Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: deploy -# Element Should Contain xpath=//*[@id="status_clds"] ACTIVE -# -#Update TCA CL -# Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60 -# Click Element xpath=//*[@id="navbar"]/ul/li[2]/a -# Wait Until Element Is Visible locator=Update timeout=60 -# Click Element locator=Update -# Click Button locator=Yes -# Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 -# Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: update -# Element Should Contain xpath=//*[@id="status_clds"] ACTIVE -# -#Stop TCA CL -# Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60 -# Click Element xpath=//*[@id="navbar"]/ul/li[2]/a -# Wait Until Element Is Visible locator=Stop timeout=60 -# Click Element locator=Stop -# Click Button locator=Yes -# Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 -# Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: stop -# Element Should Contain xpath=//*[@id="status_clds"] STOPPED -# -#Restart TCA CL -# Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60 -# Click Element xpath=//*[@id="navbar"]/ul/li[2]/a -# Wait Until Element Is Visible locator=Restart timeout=60 -# Click Element locator=Restart -# Click Button locator=Yes -# Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 -# Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: restart -# Element Should Contain xpath=//*[@id="status_clds"] ACTIVE -# -#UnDeploy TCA CL -# Wait Until Element Is Visible xpath=//*[@id="navbar"]/ul/li[2]/a timeout=60 -# Click Element xpath=//*[@id="navbar"]/ul/li[2]/a -# Wait Until Element Is Visible locator=UnDeploy timeout=60 -# Click Element locator=UnDeploy -# Click Button locator=Yes -# Wait Until Element Is Visible xpath=//*[@id="alert_message_"] timeout=60 -# Element Text Should Be xpath=//*[@id="alert_message_"] expected=Action Successful: undeploy -# Element Should Contain xpath=//*[@id="status_clds"] DISTRIBUTED - -Close Browser - Close Browser diff --git a/tests/clamp/UIs/data/TCA_template_properties.yml b/tests/clamp/UIs/data/TCA_template_properties.yml deleted file mode 100644 index 101dc2c0..00000000 --- a/tests/clamp/UIs/data/TCA_template_properties.yml +++ /dev/null @@ -1,82 +0,0 @@ -tosca_definitions_version: cloudify_dsl_1_3 -imports: -- http://www.getcloudify.org/spec/cloudify/3.4/types.yaml -- https://onap.org:8443/repository/solutioning01-mte2-raw/type_files/docker/2.2.0/node-type.yaml -- https://onap.org:8443/repository/solutioning01-mte2-raw/type_files/relationship/1.0.0/node-type.yaml -- http://onap.org:8081/repository/solutioning01-mte2-raw/type_files/dmaap/dmaap_mr.yaml -inputs: - location_id: - type: string - service_id: - type: string -node_templates: - cdap_host_host: - type: dcae.nodes.StreamingAnalytics.SelectedCDAPInfrastructure - properties: - location_id: - get_input: location_id - scn_override: cdap_broker.solutioning-central.dcae.onap.org - interfaces: - cloudify.interfaces.lifecycle: { - } - tca_tca: - type: dcae.nodes.MicroService.cdap - properties: - app_config: - appDescription: DCAE Analytics Threshold Crossing Alert Application - appName: dcae-tca - tcaSubscriberOutputStreamName: TCASubscriberOutputStream - tcaVESAlertsTableName: TCAVESAlertsTable - tcaVESAlertsTableTTLSeconds: '1728000' - tcaVESMessageStatusTableName: TCAVESMessageStatusTable - tcaVESMessageStatusTableTTLSeconds: '86400' - thresholdCalculatorFlowletInstances: '2' - app_preferences: - publisherContentType: application/json - publisherHostName: mrlocal-mtnjftle01.onap.org - publisherHostPort: '3905' - publisherMaxBatchSize: '10' - publisherMaxRecoveryQueueSize: '100000' - publisherPollingInterval: '20000' - publisherProtocol: https - publisherTopicName: org.onap.dcae.dmaap.mtnje2.DcaeTestVESPub - publisherUserName: m00502@tca.af.dcae.onap.org - publisherUserPassword: Te5021abc - subscriberConsumerGroup: OpenDCAE-c12 - subscriberConsumerId: c12 - subscriberContentType: application/json - subscriberHostName: mrlocal-mtnjftle01.onap.org - subscriberHostPort: '3905' - subscriberMessageLimit: '-1' - subscriberPollingInterval: '20000' - subscriberProtocol: https - subscriberTimeoutMS: '-1' - subscriberTopicName: org.onap.dcae.dmaap.mtnje2.DcaeTestVESSub - subscriberUserName: m00502@tca.af.dcae.onap.org - subscriberUserPassword: Te5021abc - tca_policy: null - artifact_name: dcae-analytics-tca - artifact_version: 1.0.0 - connections: - streams_publishes: [ - ] - streams_subscribes: [ - ] - jar_url: http://somejar - location_id: - get_input: location_id - namespace: cdap_tca_hi_lo - programs: - - program_id: TCAVESCollectorFlow - program_type: flows - - program_id: TCADMaaPMRSubscriberWorker - program_type: workers - - program_id: TCADMaaPMRPublisherWorker - program_type: workers - service_component_type: cdap_app_tca - service_id: - get_input: service_id - streamname: TCASubscriberOutputStream - relationships: - - target: cdap_host_host - type: dcae.relationships.component_contained_in
\ No newline at end of file diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot b/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot index 1e574b0e..92b65cd6 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot +++ b/tests/dcaegen2-collectors-hv-ves/testcases/__init__.robot @@ -34,23 +34,14 @@ HV-VES Collector Suites Setup Configure collector ${CONSUL_API_ACCESS}= Get Consul Api Access Url ${HTTP_METHOD_URL} ${CONSUL_CONTAINER_HOST} ${CONSUL_CONTAINER_PORT} ${CONSUL_API_URL}= Catenate SEPARATOR= ${CONSUL_API_ACCESS} ${CONSUL_HV_VES_CONFIGURATION_KEY_PATH} + Set Suite Variable ${CONSUL_API_URL} children=True Publish HV VES Configuration In Consul ${CONSUL_API_URL} ${HV_VES_CONFIGURATION_JSON_FILEPATH} Configure Dcae App - ${DCAE_APP_API_ACCESS}= Get Dcae App Api Access Url ${HTTP_METHOD_URL} ${DCAE_APP_CONTAINER_HOST} ${DCAE_APP_CONTAINER_PORT} - - ${DCAE_APP_API_MESSAGE_RESET_URL}= Catenate SEPARATOR= ${DCAE_APP_API_ACCESS} ${DCAE_APP_API_MESSAGES_RESET_PATH} - Set Suite Variable ${DCAE_APP_API_MESSAGE_RESET_URL} children=True - - ${DCAE_APP_API_MESSAGES_COUNT_URL}= Catenate SEPARATOR= ${DCAE_APP_API_ACCESS} ${DCAE_APP_API_MESSAGES_COUNT_PATH} - Set Suite Variable ${DCAE_APP_API_MESSAGES_COUNT_URL} children=True - - ${DCAE_APP_API_MESSAGES_VALIDATION_URL}= Catenate SEPARATOR= ${DCAE_APP_API_ACCESS} ${DCAE_APP_API_MESSAGES_VALIDATION_PATH} - Set Suite Variable ${DCAE_APP_API_MESSAGES_VALIDATION_URL} children=True - - ${DCAE_APP_API_TOPIC_CONFIGURATION_URL}= Catenate SEPARATOR= ${DCAE_APP_API_ACCESS} ${DCAE_APP_API_TOPIC_CONFIGURATION_PATH} Wait until keyword succeeds 10 sec 5 sec - ... Configure Dcae App Simulator To Consume Messages From Topics ${DCAE_APP_API_TOPIC_CONFIGURATION_URL} ${ROUTED_MESSAGES_TOPIC} + ... Configure Dcae App Simulator To Consume Messages From Topics ${DEFAULT_PERF3GPP_TOPIC},${SECOND_PERF3GPP_TOPIC} + Set Suite Variable ${DEFAULT_PERF3GPP_TOPIC} children=True + Set Suite Variable ${SECOND_PERF3GPP_TOPIC} children=True *** Variables *** @@ -60,15 +51,8 @@ ${CONSUL_CONTAINER_HOST} consul-server ${CONSUL_CONTAINER_PORT} 8500 ${CONSUL_HV_VES_CONFIGURATION_KEY_PATH} /v1/kv/dcae-hv-ves-collector -${DCAE_APP_CONTAINER_HOST} dcae-app-simulator -${DCAE_APP_CONTAINER_PORT} 6063 -${DCAE_APP_API_TOPIC_CONFIGURATION_PATH} /configuration/topics -${DCAE_APP_API_MESSAGES_RESET_PATH} /messages -${DCAE_APP_API_MESSAGES_PATH} /messages/all -${DCAE_APP_API_MESSAGES_COUNT_PATH} ${DCAE_APP_API_MESSAGES_PATH}/count -${DCAE_APP_API_MESSAGES_VALIDATION_PATH} ${DCAE_APP_API_MESSAGES_PATH}/validate - -${ROUTED_MESSAGES_TOPIC} TEST_HV_VES_PERF3GPP +${DEFAULT_PERF3GPP_TOPIC} TEST_HV_VES_PERF3GPP +${SECOND_PERF3GPP_TOPIC} TEST_HV_VES_PERF3GPP_BUT_WITH_EXTRA_WORDS ${HV_VES_RESOURCES} %{WORKSPACE}/tests/dcaegen2-collectors-hv-ves/testcases/resources ${HV_VES_CONFIGURATION_JSON_FILEPATH} ${HV_VES_RESOURCES}/hv-ves-configuration.json diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/authorization.robot b/tests/dcaegen2-collectors-hv-ves/testcases/authorization.robot index 4d13a6bf..537cb8c1 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/authorization.robot +++ b/tests/dcaegen2-collectors-hv-ves/testcases/authorization.robot @@ -1,7 +1,7 @@ # ============LICENSE_START======================================================= # csit-dcaegen2-collectors-hv-ves # ================================================================================ -# Copyright (C) 2018 NOKIA +# Copyright (C) 2018-2019 NOKIA # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -51,7 +51,7 @@ Authorization Send Messages From xNF Simulators ${XNF_WITH_INVALID_CERTIFICATES} ${XNF_VALID_MESSAGES_REQUEST} Wait until keyword succeeds 60 sec 5 sec - ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_0} + ... Assert Dcae App Consumed ${DEFAULT_PERF3GPP_TOPIC} ${AMOUNT_0} Unencrypted connection from client [Documentation] VES-HV Collector should not authorize XNF trying to connect through unencrypted connection @@ -59,7 +59,7 @@ Unencrypted connection from client Send Messages From xNF Simulators ${XNF_WITHOUT_SSL} ${XNF_VALID_MESSAGES_REQUEST} Wait until keyword succeeds 60 sec 5 sec - ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_0} + ... Assert Dcae App Consumed ${DEFAULT_PERF3GPP_TOPIC} ${AMOUNT_0} Unencrypted connection on both ends [Documentation] When run without SSL turned on, VES-HV Collector should route all valid messages @@ -68,7 +68,7 @@ Unencrypted connection on both ends Send Messages From xNF Simulators ${XNF_WITHOUT_SSL_CONNECTING_TO_UNENCRYPTED_HV_VES} ${XNF_VALID_MESSAGES_REQUEST} Wait until keyword succeeds 60 sec 5 sec - ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_5000} + ... Assert Dcae App Consumed ${DEFAULT_PERF3GPP_TOPIC} ${AMOUNT_5000} *** Variables *** diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/configuration.robot b/tests/dcaegen2-collectors-hv-ves/testcases/configuration.robot new file mode 100644 index 00000000..945cb81e --- /dev/null +++ b/tests/dcaegen2-collectors-hv-ves/testcases/configuration.robot @@ -0,0 +1,83 @@ +# ============LICENSE_START======================================================= +# csit-dcaegen2-collectors-hv-ves +# ================================================================================ +# Copyright (C) 2019 NOKIA +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END========================================================= + +*** Settings *** +Library DcaeAppSimulatorLibrary +Library ConsulLibrary +Library BuiltIn + +Resource resources/common-keywords.robot + +Suite Setup Configuration Changes Suite Setup +Suite Teardown VES-HV Collector Suite Teardown +Test Teardown VES-HV Collector Test Shutdown + +*** Keywords *** +Configuration Changes Suite Setup + Log Started Suite: VES-HV Client Configuration Changes + Configure Single xNF Simulator + Log Suite setup finished + +Change Configuration + [Arguments] ${CONFIGURATION_JSON_FILEPATH} ${MESSAGES_TOPIC} + Publish HV VES Configuration In Consul ${CONSUL_API_URL} ${CONFIGURATION_JSON_FILEPATH} + # Assure configuration fetch in hv-ves + Sleep 10 + +*** Test Cases *** +Configuration change + [Tags] non-critical + [Documentation] VES-HV Collector should adapt to changing configuration + # Given + Change Configuration ${DIFFERENT_TOPIC_CONFIGURATION_JSON_FILEPATH} ${SECOND_PERF3GPP_TOPIC} + + # When + Send Messages From xNF Simulators ${XNF_SIMULATOR} ${XNF_VALID_MESSAGES_REQUEST} + + # Then they are published to this topic + Wait until keyword succeeds 30 sec 3 sec + ... Assert Dcae App Consumed ${SECOND_PERF3GPP_TOPIC} ${AMOUNT_1000} + Assert Dcae App Consumed ${DEFAULT_PERF3GPP_TOPIC} ${AMOUNT_0} + + Log First configuration change assertion passed + Reset DCAE App Simulator ${DEFAULT_PERF3GPP_TOPIC} + Reset DCAE App Simulator ${SECOND_PERF3GPP_TOPIC} + + # Given configuration change + Change Configuration ${HV_VES_CONFIGURATION_JSON_FILEPATH} ${DEFAULT_PERF3GPP_TOPIC} + + # When + Send Messages From xNF Simulators ${XNF_SIMULATOR} ${XNF_VALID_MESSAGES_REQUEST} + + # Then they are published to this topic + Wait until keyword succeeds 30 sec 3 sec + ... Assert Dcae App Consumed ${DEFAULT_PERF3GPP_TOPIC} ${AMOUNT_1000} + Assert Dcae App Consumed ${SECOND_PERF3GPP_TOPIC} ${AMOUNT_0} + + + +*** Variables *** +${AMOUNT_0} 0 +${AMOUNT_1000} 1000 + +${HV_VES_SCENARIOS} %{WORKSPACE}/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios +${XNF_VALID_MESSAGES_REQUEST} ${HV_VES_SCENARIOS}/configuration-change/xnf-valid-messages-request.json + +${HV_VES_RESOURCES} %{WORKSPACE}/tests/dcaegen2-collectors-hv-ves/testcases/resources +${HV_VES_CONFIGURATION_JSON_FILEPATH} ${HV_VES_RESOURCES}/hv-ves-configuration.json +${DIFFERENT_TOPIC_CONFIGURATION_JSON_FILEPATH} ${HV_VES_RESOURCES}/hv-ves-configuration-with-different-topic.json diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/libraries/DcaeAppSimulatorLibrary.py b/tests/dcaegen2-collectors-hv-ves/testcases/libraries/DcaeAppSimulatorLibrary.py index dd41c6a3..ccad4308 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/libraries/DcaeAppSimulatorLibrary.py +++ b/tests/dcaegen2-collectors-hv-ves/testcases/libraries/DcaeAppSimulatorLibrary.py @@ -1,7 +1,7 @@ # ============LICENSE_START======================================================= # csit-dcaegen2-collectors-hv-ves # ================================================================================ -# Copyright (C) 2018 NOKIA +# Copyright (C) 2018-2019 NOKIA # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,48 +16,56 @@ # limitations under the License. # ============LICENSE_END========================================================= import HttpRequests +from VesHvContainersUtilsLibrary import VesHvContainersUtilsLibrary from robot.api import logger +import json -DCAE_APP_NAME = "DCAE App" +DCAE_APP_NAME = "DCAE App Simulator" + +DCAE_APP_HOST = "dcae-app-simulator" +DCAE_APP_PORT = "6063" +DCAE_APP_ADDRESS = VesHvContainersUtilsLibrary().get_dcae_app_api_access_url("http://", DCAE_APP_HOST, DCAE_APP_PORT) + +TOPIC_CONFIGURATION_PATH = DCAE_APP_ADDRESS + "/configuration/topics" + +MESSAGES_PATH = "/messages/%s" +MESSAGES_RESET_PATH = DCAE_APP_ADDRESS + MESSAGES_PATH +MESSAGES_COUNT_PATH = DCAE_APP_ADDRESS + MESSAGES_PATH + "/count" +MESSAGES_VALIDATION_PATH = DCAE_APP_ADDRESS + MESSAGES_PATH + "/validate" class DcaeAppSimulatorLibrary: - def configure_dcae_app_simulator_to_consume_messages_from_topics(self, app_url, topics): - logger.info("PUT at: " + app_url) - resp = HttpRequests.session_without_env().put(app_url, data={'topics': topics}, timeout=10) + def configure_dcae_app_simulator_to_consume_messages_from_topics(self, topics): + app_url = TOPIC_CONFIGURATION_PATH + logger.info("PUT " + str(topics) + " at: " + app_url) + resp = HttpRequests.session_without_env().put(app_url, data=self.not_escaped(topics), timeout=10) HttpRequests.checkStatusCode(resp.status_code, DCAE_APP_NAME) - def assert_DCAE_app_consumed(self, app_url, expected_messages_amount): - logger.info("GET at: " + app_url) + def not_escaped(self, data): + return json.dumps(data) + + def assert_DCAE_app_consumed(self, topic, expected_messages_amount): + app_url = MESSAGES_COUNT_PATH % topic + logger.info("GET at: " + str(app_url)) resp = HttpRequests.session_without_env().get(app_url, timeout=10) HttpRequests.checkStatusCode(resp.status_code, DCAE_APP_NAME) assert int(resp.content) == int(expected_messages_amount), \ "Messages consumed by simulator: " + str(resp.content) + " expecting: " + str(expected_messages_amount) - def assert_DCAE_app_consumed_less_equal_than(self, app_url, messages_threshold): - logger.info("GET at: " + app_url) - resp = HttpRequests.session_without_env().get(app_url, timeout=10) - HttpRequests.checkStatusCode(resp.status_code, DCAE_APP_NAME) - - logger.debug("Messages consumed by simulator: " + resp.content + - " expecting more than 0 and less/equal than " + messages_threshold) - - assert 0 < int(resp.content) <= int(messages_threshold), \ - "Messages consumed by simulator: " + str(resp.content) + \ - " expecting more than 0 and less/equal than " + str(messages_threshold) - - def reset_DCAE_app_simulator(self, app_url): + def reset_DCAE_app_simulator(self, topic): + app_url = MESSAGES_RESET_PATH % topic logger.info("DELETE at: " + app_url) resp = HttpRequests.session_without_env().delete(app_url, timeout=10) HttpRequests.checkStatusCode(resp.status_code, DCAE_APP_NAME) - def assert_DCAE_app_consumed_proper_messages(self, app_url, message_filepath): - logger.info("POST at: " + app_url) + def assert_DCAE_app_consumed_proper_messages(self, topic, message_filepath): + app_url = MESSAGES_VALIDATION_PATH % topic file = open(message_filepath, "rb") data = file.read() file.close() + logger.info("POST " + str(data) + "at: " + app_url) resp = HttpRequests.session_without_env().post(app_url, data=data, timeout=10) HttpRequests.checkStatusCode(resp.status_code, DCAE_APP_NAME) diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/libraries/HttpRequests.py b/tests/dcaegen2-collectors-hv-ves/testcases/libraries/HttpRequests.py index 4aa55d6c..48205f2a 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/libraries/HttpRequests.py +++ b/tests/dcaegen2-collectors-hv-ves/testcases/libraries/HttpRequests.py @@ -33,4 +33,4 @@ def session_without_env(): def checkStatusCode(status_code, server_name): if status_code not in valid_status_codes: logger.error("Response status code from " + server_name + ": " + str(status_code)) - raise (Exception(server_name + " returned status code " + status_code)) + raise (Exception(server_name + " returned status code " + str(status_code))) diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/libraries/XnfSimulatorLibrary.py b/tests/dcaegen2-collectors-hv-ves/testcases/libraries/XnfSimulatorLibrary.py index 789c0b69..ea225c53 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/libraries/XnfSimulatorLibrary.py +++ b/tests/dcaegen2-collectors-hv-ves/testcases/libraries/XnfSimulatorLibrary.py @@ -158,8 +158,9 @@ class XnfSimulator: cert_name_prefix = "" if should_use_valid_certs else "untrusted" certificates_path_with_file_prefix = COLLECTOR_CERTS_LOOKUP_DIR + cert_name_prefix self.key_store_path = certificates_path_with_file_prefix + "client.p12" + self.key_store_passwd_path = certificates_path_with_file_prefix + "client.pass" self.trust_store_path = certificates_path_with_file_prefix + "trust.p12" - self.sec_store_passwd = "onaponap" + self.trust_store_passwd_path = certificates_path_with_file_prefix + "trust.pass" self.disable_ssl = should_disable_ssl self.hv_collector_host = UNENCRYPTED_HV_VES_SERVICE_NAME \ if should_connect_to_unencrypted_hv_ves else HV_VES_SERVICE_NAME @@ -171,8 +172,8 @@ class XnfSimulator: "--ves-port", "6061", "--key-store", self.key_store_path, "--trust-store", self.trust_store_path, - "--key-store-password", self.sec_store_passwd, - "--trust-store-password", self.sec_store_passwd] + "--key-store-password-file", self.key_store_passwd_path, + "--trust-store-password-file", self.trust_store_passwd_path] if self.disable_ssl: startup_command.append("--ssl-disable") return startup_command diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/message-routing.robot b/tests/dcaegen2-collectors-hv-ves/testcases/message-routing.robot index 985c3793..40923aab 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/message-routing.robot +++ b/tests/dcaegen2-collectors-hv-ves/testcases/message-routing.robot @@ -42,8 +42,8 @@ Correct Messages Routing Send Messages From xNF Simulators ${XNF_SIMULATOR} ${XNF_FIXED_PAYLOAD_REQUEST} Wait until keyword succeeds 60 sec 5 sec - ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_25000} - Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_FIXED_PAYLOAD_REQUEST} + ... Assert Dcae App Consumed ${DEFAULT_PERF3GPP_TOPIC} ${AMOUNT_25000} + Assert Dcae App Consumed Proper Messages ${DEFAULT_PERF3GPP_TOPIC} ${DCAE_FIXED_PAYLOAD_REQUEST} Too big payload message handling @@ -52,8 +52,8 @@ Too big payload message handling Send Messages From xNF Simulators ${XNF_SIMULATOR} ${XNF_TOO_BIG_PAYLOAD_REQUEST} Wait until keyword succeeds 60 sec 5 sec - ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_25000} - Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_TOO_BIG_PAYLOAD_REQUEST} + ... Assert Dcae App Consumed ${DEFAULT_PERF3GPP_TOPIC} ${AMOUNT_25000} + Assert Dcae App Consumed Proper Messages ${DEFAULT_PERF3GPP_TOPIC} ${DCAE_TOO_BIG_PAYLOAD_REQUEST} Invalid wire frame message handling @@ -62,8 +62,8 @@ Invalid wire frame message handling Send Messages From xNF Simulators ${XNF_SIMULATOR} ${XNF_INVALID_WIRE_FRAME_REQUEST} Wait until keyword succeeds 60 sec 5 sec - ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_50000} - Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_INVALID_WIRE_FRAME_REQUEST} + ... Assert Dcae App Consumed ${DEFAULT_PERF3GPP_TOPIC} ${AMOUNT_50000} + Assert Dcae App Consumed Proper Messages ${DEFAULT_PERF3GPP_TOPIC} ${DCAE_INVALID_WIRE_FRAME_REQUEST} Invalid GPB data message handling @@ -72,8 +72,8 @@ Invalid GPB data message handling Send Messages From xNF Simulators ${XNF_SIMULATOR} ${XNF_INVALID_GPB_DATA_REQUEST} Wait until keyword succeeds 60 sec 5 sec - ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_50000} - Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_INVALID_GPB_DATA_REQUEST} + ... Assert Dcae App Consumed ${DEFAULT_PERF3GPP_TOPIC} ${AMOUNT_50000} + Assert Dcae App Consumed Proper Messages ${DEFAULT_PERF3GPP_TOPIC} ${DCAE_INVALID_GPB_DATA_REQUEST} Unsupported domain message handling @@ -82,8 +82,8 @@ Unsupported domain message handling Send Messages From xNF Simulators ${XNF_SIMULATOR} ${XNF_UNSUPPORTED_DOMAIN_REQUEST} Wait until keyword succeeds 60 sec 5 sec - ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_50000} - Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_UNSUPPORTED_DOMAIN_REQUEST} + ... Assert Dcae App Consumed ${DEFAULT_PERF3GPP_TOPIC} ${AMOUNT_50000} + Assert Dcae App Consumed Proper Messages ${DEFAULT_PERF3GPP_TOPIC} ${DCAE_UNSUPPORTED_DOMAIN_REQUEST} *** Variables *** ${HTTP_METHOD_URL} http:// diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/multiple-clients.robot b/tests/dcaegen2-collectors-hv-ves/testcases/multiple-clients.robot index 735a2085..109ec469 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/multiple-clients.robot +++ b/tests/dcaegen2-collectors-hv-ves/testcases/multiple-clients.robot @@ -1,7 +1,7 @@ # ============LICENSE_START======================================================= # csit-dcaegen2-collectors-hv-ves # ================================================================================ -# Copyright (C) 2018 NOKIA +# Copyright (C) 2018-2019 NOKIA # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -40,8 +40,8 @@ Handle Multiple Connections Send Messages From xNF Simulators ${SIMULATORS_LIST} ${XNF_SMALLER_PAYLOAD_REQUEST} Wait until keyword succeeds 60 sec 5 sec - ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_15000} - Assert Dcae App Consumed Proper Messages ${DCAE_APP_API_MESSAGES_VALIDATION_URL} ${DCAE_SMALLER_PAYLOAD_REQUEST} + ... Assert Dcae App Consumed ${DEFAULT_PERF3GPP_TOPIC} ${AMOUNT_15000} + Assert Dcae App Consumed Proper Messages ${DEFAULT_PERF3GPP_TOPIC} ${DCAE_SMALLER_PAYLOAD_REQUEST} *** Variables *** diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/common-keywords.robot b/tests/dcaegen2-collectors-hv-ves/testcases/resources/common-keywords.robot index 07e886a0..fee8bfd8 100644 --- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/common-keywords.robot +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/common-keywords.robot @@ -60,7 +60,8 @@ Send Messages From xNF Simulators VES-HV Collector Test Shutdown - Reset DCAE App Simulator ${DCAE_APP_API_MESSAGE_RESET_URL} + Reset DCAE App Simulator ${DEFAULT_PERF3GPP_TOPIC} + Reset DCAE App Simulator ${SECOND_PERF3GPP_TOPIC} VES-HV Collector Suite Teardown diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/hv-ves-configuration-with-different-topic.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/hv-ves-configuration-with-different-topic.json new file mode 100644 index 00000000..d3d1f4c3 --- /dev/null +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/hv-ves-configuration-with-different-topic.json @@ -0,0 +1,12 @@ +{ + "streams_publishes": { + "perf3gpp": { + "type": "kafka", + "kafka_info": { + "bootstrap_servers": "kafka:9092", + "topic_name": "TEST_HV_VES_PERF3GPP_BUT_WITH_EXTRA_WORDS" + } + } + } +} + diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/configuration-change/xnf-valid-messages-request.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/configuration-change/xnf-valid-messages-request.json new file mode 100644 index 00000000..adbcf2ab --- /dev/null +++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios/configuration-change/xnf-valid-messages-request.json @@ -0,0 +1,24 @@ +[ + { + "commonEventHeader": { + "version": "sample-version", + "domain": "perf3gpp", + "sequence": 1, + "priority": 1, + "eventId": "sample-event-id", + "eventName": "sample-event-name", + "eventType": "sample-event-type", + "startEpochMicrosec": 120034455, + "lastEpochMicrosec": 120034455, + "nfNamingCode": "sample-nf-naming-code", + "nfcNamingCode": "sample-nfc-naming-code", + "reportingEntityId": "sample-reporting-entity-id", + "reportingEntityName": "sample-reporting-entity-name", + "sourceId": "sample-source-id", + "sourceName": "sample-source-name", + "vesEventListenerVersion": "7.2.0" + }, + "messageType": "VALID", + "messagesAmount": 1000 + } +]
\ No newline at end of file diff --git a/tests/dcaegen2-collectors-restconf/testcases/__init__.robot b/tests/dcaegen2-collectors-restconf/testcases/__init__.robot new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/tests/dcaegen2-collectors-restconf/testcases/__init__.robot diff --git a/tests/dcaegen2-collectors-restconf/testcases/dcae_rcc.robot b/tests/dcaegen2-collectors-restconf/testcases/dcae_rcc.robot new file mode 100644 index 00000000..74171472 --- /dev/null +++ b/tests/dcaegen2-collectors-restconf/testcases/dcae_rcc.robot @@ -0,0 +1,23 @@ +*** Settings *** +Documentation Testing DCAE Restconf Listener with various event feeds from VoLTE, vDNS, vFW and cCPE use scenarios +Library RequestsLibrary +Library OperatingSystem +Library Collections +Library DcaeLibrary +Resource ./resources/dcae_keywords.robot +Resource ../../common.robot +Test Setup Init RCC +Suite Setup Run keywords Create rcc sessions Create rcc header +Suite Teardown teardown rcc + +*** Variables *** +${RCC_URL_HTTPS} https://%{RCC_IP}:8443 +${RCC_URL} http://%{RCC_IP}:8080 + +*** Test Cases *** +Restconf Collector Health Check + [Tags] DCAE-RCC-R1 + [Documentation] Restconf Collector Health Check + ${headers}= Create Dictionary Accept=*/* + ${resp}= Get Request ${suite_dcae_rcc_url_session} /healthcheck headers=${headers} + Should Be Equal As Strings ${resp.status_code} 200 diff --git a/tests/dcaegen2-collectors-restconf/testcases/resources/DcaeLibrary.py b/tests/dcaegen2-collectors-restconf/testcases/resources/DcaeLibrary.py new file mode 100644 index 00000000..d4848746 --- /dev/null +++ b/tests/dcaegen2-collectors-restconf/testcases/resources/DcaeLibrary.py @@ -0,0 +1,20 @@ +from robot.api import logger +import time + +class DcaeLibrary(object): + + def __init__(self): + pass + + @staticmethod + def init_rcc(): + logger.console("RestConf collector init and cleanup are done") + return "true" + + @staticmethod + def teardown_rcc(): + logger.console("RestConf collector teardown done") + return "true" + +if __name__ == '__main__': + time.sleep(100000) diff --git a/tests/dcaegen2-collectors-restconf/testcases/resources/dcae_keywords.robot b/tests/dcaegen2-collectors-restconf/testcases/resources/dcae_keywords.robot new file mode 100644 index 00000000..172210f6 --- /dev/null +++ b/tests/dcaegen2-collectors-restconf/testcases/resources/dcae_keywords.robot @@ -0,0 +1,23 @@ +*** Settings *** +Documentation The main interface for interacting with DCAE. It handles low level stuff like managing the http request library and DCAE required fields +Library RequestsLibrary +Library DcaeLibrary +Library OperatingSystem +Library Collections +Resource ../resources/dcae_properties.robot + +*** Variables *** +${DCAE_HEALTH_CHECK_BODY} %{WORKSPACE}/tests/dcae/testcases/assets/json_events/dcae_healthcheck.json + +*** Keywords *** +Create rcc sessions + [Documentation] Create all required sessions + Create Session dcae_rcc_url ${RCC_URL} + Set Suite Variable ${suite_dcae_rcc_url_session} dcae_rcc_url + ${auth}= Create List ${RCC_HTTPS_USER} ${RCC_HTTPS_PD} + Create Session dcae_rcc_url_https ${RCC_URL_HTTPS} auth=${auth} disable_warnings=1 + Set Suite Variable ${suite_dcae_rcc_url_https_session} dcae_rcc_url_https + +Create rcc header + ${headers}= Create Dictionary Content-Type=application/json + Set Suite Variable ${suite_headers} ${headers} diff --git a/tests/dcaegen2-collectors-restconf/testcases/resources/dcae_properties.robot b/tests/dcaegen2-collectors-restconf/testcases/resources/dcae_properties.robot new file mode 100644 index 00000000..3ba7690c --- /dev/null +++ b/tests/dcaegen2-collectors-restconf/testcases/resources/dcae_properties.robot @@ -0,0 +1,14 @@ +*** Settings *** +Documentation store all properties that can change or are used in multiple places here +... format is all caps with underscores between words and prepended with GLOBAL +... make sure you prepend them with GLOBAL so that other files can easily see it is from this file. + +*** Variables *** +${GLOBAL_APPLICATION_ID} robot-dcaegen2 +${GLOBAL_DCAE_CONSUL_URL} http://135.205.228.129:8500 +${GLOBAL_DCAE_CONSUL_URL1} http://135.205.228.170:8500 +${GLOBAL_DCAE_VES_URL} http://localhost:8443/eventlistener/v5 +${GLOBAL_DCAE_USERNAME} console +${GLOBAL_DCAE_PASSWORD} ZjJkYjllMjljMTI2M2Iz +${RCC_HTTPS_USER} sample1 +${RCC_HTTPS_PD} sample1 diff --git a/tests/dcaegen2-collectors-restconf/testcases/resources/index.htm b/tests/dcaegen2-collectors-restconf/testcases/resources/index.htm new file mode 100644 index 00000000..5ab2f8a4 --- /dev/null +++ b/tests/dcaegen2-collectors-restconf/testcases/resources/index.htm @@ -0,0 +1 @@ +Hello
\ No newline at end of file diff --git a/tests/dcaegen2-pmmapper/pmmapper/assets/.gitattributes b/tests/dcaegen2-pmmapper/pmmapper/assets/.gitattributes new file mode 100644 index 00000000..57cdc503 --- /dev/null +++ b/tests/dcaegen2-pmmapper/pmmapper/assets/.gitattributes @@ -0,0 +1 @@ +*.gz binary diff --git a/tests/dcaegen2-pmmapper/pmmapper/assets/A20181002.0000-1000-0015-1000_5G.xml b/tests/dcaegen2-pmmapper/pmmapper/assets/A20181002.0000-1000-0015-1000_5G.xml index 4d20d4b4..fadc8a65 100644 --- a/tests/dcaegen2-pmmapper/pmmapper/assets/A20181002.0000-1000-0015-1000_5G.xml +++ b/tests/dcaegen2-pmmapper/pmmapper/assets/A20181002.0000-1000-0015-1000_5G.xml @@ -47,9 +47,9 @@ xsi:schemaLocation="http://www.3gpp.org/ftp/specs/archive/32_series/32.435#measC <measType p="4">succImmediateAssignProcs4</measType> <measValue measObjLdn="ManagedElement=RNC-Gbg-1,ENodeBFunction=1"> <r p="1">4</r> - <r p="12">86,87,2,6,77,96,75,33,24</r> - <r p="13">40</r> - <r p="14">90</r> + <r p="2">86,87,2,6,77,96,75,33,24</r> + <r p="3">40</r> + <r p="4">90</r> <suspect>false</suspect> </measValue> </measInfo> diff --git a/tests/dcaegen2-pmmapper/pmmapper/assets/A20181002.0000-1000-0015-1000_5G.xml.gz b/tests/dcaegen2-pmmapper/pmmapper/assets/A20181002.0000-1000-0015-1000_5G.xml.gz Binary files differnew file mode 100644 index 00000000..32865fc1 --- /dev/null +++ b/tests/dcaegen2-pmmapper/pmmapper/assets/A20181002.0000-1000-0015-1000_5G.xml.gz diff --git a/tests/dcaegen2-pmmapper/pmmapper/assets/pm_filter_config.json b/tests/dcaegen2-pmmapper/pmmapper/assets/pm_filter_config.json index 544b6980..1e3604f6 100644 --- a/tests/dcaegen2-pmmapper/pmmapper/assets/pm_filter_config.json +++ b/tests/dcaegen2-pmmapper/pmmapper/assets/pm_filter_config.json @@ -2,9 +2,9 @@ "pm-mapper-filter": { "filters":[{ "pmDefVsn": "1.0", - "nfType": "5G", + "nfType": "gnb", "vendor": "Ericsson", - "measTypes": ["attTCHSeizures","succImmediateAssignProcs"] + "measTypes": ["attTCHSeizures","succTCHSeizures2","succImmediateAssignProcs8"] }] }, "streams_subscribes": { @@ -14,7 +14,7 @@ "aaf_password": null, "dmaap_info": { "location": "csit-pmmapper", - "delivery_url": "http://dcae-pm-mapper.onap.svc.cluster.local:8081/delivery", + "delivery_url": "http://dcae-pm-mapper:8081/delivery", "username": "username", "password": "password", "subscriber_id": "1" @@ -38,8 +38,8 @@ "dmaap_dr_delete_endpoint": "https://dmaap-dr-node:8443/delete", "services_calls": {}, "enable_http": true, - "key_store_path": "/opt/app/pm-mapper/etc/cert/cert.jks.b64", - "key_store_pass_path": "/opt/app/pm-mapper/etc/cert/jks.pass", - "trust_store_path": "/opt/app/pm-mapper/etc/cert/trust.jks.b64", - "trust_store_pass_path": "/opt/app/pm-mapper/etc/cert/trust.pass" + "key_store_path": "/opt/app/pm-mapper/etc/cert.jks.b64", + "key_store_pass_path": "/opt/app/pm-mapper/etc/jks.pass", + "trust_store_path": "/opt/app/pm-mapper/etc/trust.jks.b64", + "trust_store_pass_path": "/opt/app/pm-mapper/etc/trust.pass" }
\ No newline at end of file diff --git a/tests/dcaegen2-pmmapper/pmmapper/assets/vendor_filter_config.json b/tests/dcaegen2-pmmapper/pmmapper/assets/vendor_filter_config.json index 64fefa48..cbb313d0 100644 --- a/tests/dcaegen2-pmmapper/pmmapper/assets/vendor_filter_config.json +++ b/tests/dcaegen2-pmmapper/pmmapper/assets/vendor_filter_config.json @@ -1,5 +1,5 @@ { - "pm-mapper-filter": { + "pm-mapper-filter": { "filters":[{ "pmDefVsn": "1.0", "nfType": "gnb", @@ -14,7 +14,7 @@ "aaf_password": null, "dmaap_info": { "location": "csit-pmmapper", - "delivery_url": "http://dcae-pm-mapper.onap.svc.cluster.local:8081/delivery", + "delivery_url": "http://dcae-pm-mapper:8081/delivery", "username": "username", "password": "password", "subscriber_id": "1" @@ -38,8 +38,8 @@ "dmaap_dr_delete_endpoint": "https://dmaap-dr-node:8443/delete", "services_calls": {}, "enable_http": true, - "key_store_path": "/opt/app/pm-mapper/etc/cert/cert.jks.b64", - "key_store_pass_path": "/opt/app/pm-mapper/etc/cert/jks.pass", - "trust_store_path": "/opt/app/pm-mapper/etc/cert/trust.jks.b64", - "trust_store_pass_path": "/opt/app/pm-mapper/etc/cert/trust.pass" + "key_store_path": "/opt/app/pm-mapper/etc/cert.jks.b64", + "key_store_pass_path": "/opt/app/pm-mapper/etc/jks.pass", + "trust_store_path": "/opt/app/pm-mapper/etc/trust.jks.b64", + "trust_store_pass_path": "/opt/app/pm-mapper/etc/trust.pass" }
\ No newline at end of file diff --git a/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot b/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot index 5d217513..a103c5cc 100644 --- a/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot +++ b/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot @@ -21,20 +21,17 @@ ${NO_MANAGED_ELEMENT_PATH} %{WORKSPACE}/tests/dcaegen2-pmmapper/pm ${NO_MEASDATA_PATH} %{WORKSPACE}/tests/dcaegen2-pmmapper/pmmapper/assets/A_no_measdata.xml ${VALID_METADATA_PATH} %{WORKSPACE}/tests/dcaegen2-pmmapper/pmmapper/assets/valid_metadata.json ${DIFF_VENDOR_METADATA} %{WORKSPACE}/tests/dcaegen2-pmmapper/pmmapper/assets/diff_vendor_metadata.json -${CLI_EXEC_CLI_PM_LOG} docker exec pmmapper /bin/sh -c "tail -10 /var/log/ONAP/dcaegen2/services/pm-mapper/pm-mapper_output.log" +${NON_XML_FILE} %{WORKSPACE}/tests/dcaegen2-pmmapper/pmmapper/assets/diff_vendor_metadata.json +${CLI_EXEC_CLI_PM_LOG} docker exec pmmapper /bin/sh -c "tail -15 /var/log/ONAP/dcaegen2/services/pm-mapper/pm-mapper_output.log" ${PUBLISH_NODE_URL} https://${DR_NODE_IP}:8443/publish/1 ${TYPE-A_PM_DATA_FILE_PATH} %{WORKSPACE}/tests/dcaegen2-pmmapper/pmmapper/assets/A20181002.0000-1000-0015-1000_5G.xml ${TYPE-C_PM_DATA_FILE_PATH} %{WORKSPACE}/tests/dcaegen2-pmmapper/pmmapper/assets/C20190328.0000-0015.xml -${PUBLISH_CONTENT_TYPE} application/octet-stream ${CLI_EXEC_VENDOR_FILTER} curl 'http://${CONSUL_IP}:8500/v1/kv/pmmapper?dc=dc1' -X PUT -H 'Accept: application/^Con' -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' --data @$WORKSPACE/tests/dcaegen2-pmmapper/pmmapper/assets/vendor_filter_config.json ${CLI_EXEC_PM_FILTER} curl 'http://${CONSUL_IP}:8500/v1/kv/pmmapper?dc=dc1' -X PUT -H 'Accept: application/^Con' -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' --data @$WORKSPACE/tests/dcaegen2-pmmapper/pmmapper/assets/pm_filter_config.json -${CLI_RESTART_PMMAPPER} docker restart pmmapper -${CLI_DELETE_SUB1} curl -i -X DELETE -H "Content-Type:application/vnd.dmaap-dr.subscription" -H "X-DMAAP-DR-ON-BEHALF-OF:DGL" -k https://localhost:8443/subs/1 -${CLI_DELETE_SUB2} curl -i -X DELETE -H "Content-Type:application/vnd.dmaap-dr.subscription" -H "X-DMAAP-DR-ON-BEHALF-OF:DGL" -k https://localhost:8443/subs/2 -${CLI_MESSAGE_ROUTER_TOPIC} curl http://${DMAAP_MR_IP}:3904/events/PM_MAPPER/CG1/C1?timeout=1000 -${CLI_MR_EVENT_COUNT} curl http://${DMAAP_MR_IP}:3904/events/PM_MAPPER/CG1/C1?timeout=1000 | egrep -o 'measInfoId1|measInfoId2|measInfoId3' > /tmp/mr.log +${CLI_MESSAGE_ROUTER_TOPIC} curl http://${DMAAP_MR_IP}:3904/events/PM_MAPPER/CG1/C1?timeout=1000 > /tmp/mr.log ${CLI_MR_LOG} cat /tmp/mr.log + *** Test Cases *** Verify PM Mapper Receive Configuraton From Config Binding Service [Tags] PM_MAPPER_01 @@ -68,43 +65,55 @@ Verify 3GPP PM Mapper responds appropriately when invalid metadata is provided VerifyResponse ${resp.content} Malformed Metadata. CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=2 -Verify 3GPP PM Mapper maps Type-A file and publish 3gpp perf VES evnets to message router +Verify that PM Mapper logs successful when a file that contains no measdata is provided [Tags] PM_MAPPER_05 - [Documentation] Verify 3GPP PM Mapper maps Type-A file and publish 3gpp perf VES evnets to message router. + [Documentation] Verify that PM Mapper logs successful when a file that contains no measdata is provided [Timeout] 1 minute - SendToDatarouter ${TYPE-A_PM_DATA_FILE_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=3 - CheckLog ${CLI_EXEC_CLI_PM_LOG} Successfully published VES events to messagerouter + SendToDatarouter ${NO_MEASDATA_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=3 + CheckLog ${CLI_EXEC_CLI_PM_LOG} MeasData is empty CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=3 - Sleep 10s - CheckLog ${CLI_MESSAGE_ROUTER_TOPIC} perf3gpp_gnb-Ericsson_pmMeasResult -Verify that PM Mapper maps Type-C xml file and publish 3gpp perf VES evnets to message router. +Verify that PM Mapper throws Event failed validation against schema error when no managed element content is provided [Tags] PM_MAPPER_06 - [Documentation] Verify that PM Mapper maps Type-C xml file and publish 3gpp perf VES evnets to message router. + [Documentation] Verify 3gpp pm mapper responds with an error when no managed element content is provided [Timeout] 1 minute - SendToDatarouter ${TYPE-C_PM_DATA_FILE_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=4 - CheckLog ${CLI_EXEC_CLI_PM_LOG} Successfully published VES events to messagerouter + SendToDatarouter ${NO_MANAGED_ELEMENT_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=4 + CheckLog ${CLI_EXEC_CLI_PM_LOG} XML validation failed CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=4 - Run Process ${CLI_MR_EVENT_COUNT} shell=yes - CheckLog ${CLI_MR_LOG} measInfoId1 - CheckLog ${CLI_MR_LOG} measInfoId2 - CheckLog ${CLI_MR_LOG} measInfoId3 -Verify that PM Mapper logs successful when a file that contains no measdata is provided +Verify that PM Mapper maps Type-C xml file and publish 3gpp perf VES evnets to message router [Tags] PM_MAPPER_07 - [Documentation] Verify that PM Mapper logs successful when a file that contains no measdata is provided + [Documentation] Verify that PM Mapper maps Type-C xml file and publish 3gpp perf VES evnets to message router. [Timeout] 1 minute - SendToDatarouter ${NO_MEASDATA_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=5 - CheckLog ${CLI_EXEC_CLI_PM_LOG} MeasData is empty + SendToDatarouter ${TYPE-C_PM_DATA_FILE_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=5 + CheckLog ${CLI_EXEC_CLI_PM_LOG} Successfully published VES events to messagerouter CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=5 + Run Process ${CLI_MESSAGE_ROUTER_TOPIC} shell=yes + CheckLog ${CLI_MR_LOG} measInfoId1 + CheckLog ${CLI_MR_LOG} measInfoId2 + CheckLog ${CLI_MR_LOG} measInfoId3 -Verify that PM Mapper throws Event failed validation against schema error when no managed element content is provided +Verify 3GPP PM Mapper maps Type-A file based on counter filtering and publish 3gpp perf VES evnets to message router [Tags] PM_MAPPER_08 - [Documentation] Verify 3gpp pm mapper responds with an error when no managed element content is provided + [Documentation] Verify 3GPP PM Mapper maps Type-A file and publish 3gpp perf VES evnets to message router. [Timeout] 1 minute - SendToDatarouter ${NO_MANAGED_ELEMENT_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=6 - CheckLog ${CLI_EXEC_CLI_PM_LOG} XML validation failed + ${cli_cmd_output}= Run Process ${CLI_EXEC_PM_FILTER} shell=yes + ${resp}= Get Request mapper_session ${RECONFIGURE_ENDPOINT} + Sleep 5s + SendToDatarouter ${TYPE-A_PM_DATA_FILE_PATH} ${VALID_METADATA_PATH} X-ONAP-RequestID=6 + CheckLog ${CLI_EXEC_CLI_PM_LOG} Successfully published VES events to messagerouter CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=6 + Run Process ${CLI_MESSAGE_ROUTER_TOPIC} shell=yes + CheckLog ${CLI_MR_LOG} attTCHSeizures + CheckLog ${CLI_MR_LOG} 234 + CheckLog ${CLI_MR_LOG} 890 + CheckLog ${CLI_MR_LOG} 456 + CheckLog ${CLI_MR_LOG} succTCHSeizures2 + CheckLog ${CLI_MR_LOG} 86,87,2,6,77,96,75,33,24 + CheckLog ${CLI_MR_LOG} succImmediateAssignProcs8 + CheckLog ${CLI_MR_LOG} 787 + CheckLog ${CLI_MR_LOG} 238 + CheckLog ${CLI_MR_LOG} 785 Verify that PM Mapper correctly identifies a file that should not be mapped based on metadata filtering. [Tags] PM_MAPPER_09 @@ -118,6 +127,15 @@ Verify that PM Mapper correctly identifies a file that should not be mapped base CheckLog ${CLI_EXEC_CLI_PM_LOG} Metadata does not match any filters CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=7 +Verify that PM Mapper correctly identifies a non-xml file. + [Tags] PM_MAPPER_10 + [Documentation] Verify that PM Mapper correctly identifies a non-xml file. + [Timeout] 1 minute + SendToDatarouter ${NON_XML_FILE} ${VALID_METADATA_PATH} X-ONAP-RequestID=8 + CheckLog ${CLI_EXEC_CLI_PM_LOG} PM measurement file type not supported + CheckLog ${CLI_EXEC_CLI_PM_LOG} RequestID=8 + + *** Keywords *** SendToDatarouter diff --git a/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py b/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py index 0dd01dcb..597f8647 100644 --- a/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py +++ b/tests/dcaegen2/prh-testcases/resources/PrhLibrary.py @@ -41,16 +41,10 @@ class PrhLibrary(object): def create_pnf_ready_notification_as_pnf_ready(json_file): json_to_python = json.loads(json_file) correlation_id = PrhLibrary.extract_correlation_id_value(json_to_python, "correlationId") - serial_number = PrhLibrary.extract_value_from_pnfRegistrationFields(json_to_python, "serial-number", "serialNumber") - vendor_name = PrhLibrary.extract_value_from_pnfRegistrationFields(json_to_python, "equip-vendor", "vendorName") - model_number = PrhLibrary.extract_value_from_pnfRegistrationFields(json_to_python, "equip-model", "modelNumber") - unit_type = PrhLibrary.extract_value_from_pnfRegistrationFields(json_to_python, "equip-type", "unitType") additional_fields = PrhLibrary.extract_additional_fields_value(json_to_python) - nf_role = json_to_python.get("event").get("commonEventHeader").get("nfNamingCode") if "nfNamingCode" in json_to_python["event"]["commonEventHeader"] else "" - - str_json = '{' + correlation_id + serial_number + vendor_name + model_number + unit_type + '"nf-role":"' + nf_role + '","sw-version":"",' + additional_fields + str_json = '{' + correlation_id + additional_fields return json.dumps(str_json.rstrip(',') + '}').replace("\\", "")[1:-1] diff --git a/tests/dcaegen2/prh-testcases/resources/docker-compose.yml b/tests/dcaegen2/prh-testcases/resources/docker-compose.yml index 8b6ea128..45c71dc8 100644 --- a/tests/dcaegen2/prh-testcases/resources/docker-compose.yml +++ b/tests/dcaegen2/prh-testcases/resources/docker-compose.yml @@ -2,14 +2,6 @@ version: "3" services: prh: image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.prh.prh-app-server:latest - command: > - --dmaap.dmaapConsumerConfiguration.dmaapHostName=dmaap-bc - --dmaap.dmaapConsumerConfiguration.dmaapPortNumber=2222 - --dmaap.dmaapProducerConfiguration.dmaapHostName=dmaap-bc - --dmaap.dmaapProducerConfiguration.dmaapPortNumber=2222 - --aai.aaiClientConfiguration.aaiHostPortNumber=3333 - --aai.aaiClientConfiguration.aaiHost=aai - --aai.aaiClientConfiguration.aaiProtocol=http ports: - "8100:8100" - "8433:8433" @@ -19,27 +11,11 @@ services: container_name: prh depends_on: - cbs - - dmaap-bc + - dmaap-mr - aai ssl_prh: image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.prh.prh-app-server:latest - command: > - --dmaap.dmaapConsumerConfiguration.dmaapHostName=dmaap-bc - --dmaap.dmaapConsumerConfiguration.dmaapPortNumber=2223 - --dmaap.dmaapConsumerConfiguration.dmaapProtocol=https - --dmaap.dmaapProducerConfiguration.dmaapHostName=dmaap-bc - --dmaap.dmaapProducerConfiguration.dmaapPortNumber=2223 - --dmaap.dmaapProducerConfiguration.dmaapProtocol=https - --aai.aaiClientConfiguration.aaiHostPortNumber=3334 - --aai.aaiClientConfiguration.aaiHost=aai - --aai.aaiClientConfiguration.aaiProtocol=https - --security.enableAaiCertAuth=true - --security.enableDmaapCertAuth=true - --security.keyStorePath=/tmp/certs/org.onap.dcae.jks - --security.keyStorePasswordPath=/tmp/certs/keystore.password - --security.trustStorePath=/tmp/certs/org.onap.dcae.trust.jks - --security.trustStorePasswordPath=/tmp/certs/truststore.password ports: - "8200:8100" - "8533:8433" @@ -54,10 +30,10 @@ services: container_name: ssl_prh depends_on: - cbs - - dmaap-bc + - dmaap-mr - aai - dmaap-bc: + dmaap-mr: build: context: simulator dockerfile: DMaaP_simulator @@ -78,32 +54,95 @@ services: container_name: aai_simulator consul: - image: docker.io/consul:1.0.6 + image: consul:1.0.6 ports: - "8500:8500" - command: ["agent", "-bootstrap", "-client=0.0.0.0", "-server", "-config-dir=/consul/consul.d"] + command: ["agent", "-bootstrap", "-client=0.0.0.0", "-server", "-ui", "-config-dir=/consul/consul.d"] volumes: - ./consul.d/:/consul/consul.d consul-cfg: - image: docker.io/consul:1.0.6 + image: consul:1.0.6 restart: on-failure - command: ["kv", "put", "-http-addr=http://consul-server:8500", "dcae-prh", '{ - "dmaap.dmaapConsumerConfiguration.dmaapHostName":"dmaap-bc", + command: ["kv", "put", "-http-addr=http://consul:8500", "dcae-prh", '{ + "dmaap.dmaapConsumerConfiguration.dmaapUrl":"http://dmaap-mr:2222/events/unauthenticated.VES_PNFREG_OUTPUT", + "dmaap.dmaapConsumerConfiguration.dmaapHostName":"dmaap-mr", "dmaap.dmaapConsumerConfiguration.dmaapPortNumber":2223, - "dmaap.dmaapConsumerConfiguration.dmaapProtocol":"https", - "dmaap.dmaapProducerConfiguration.dmaapHostName":"dmaap-bc", + "dmaap.dmaapConsumerConfiguration.dmaapTopicName": "events/unauthenticated.VES_PNFREG_OUTPUT", + "dmaap.dmaapConsumerConfiguration.dmaapProtocol":"http", + "dmaap.dmaapConsumerConfiguration.dmaapUserName":"admin", + "dmaap.dmaapConsumerConfiguration.dmaapUserPassword":"admin", + "dmaap.dmaapConsumerConfiguration.dmaapContentType": "application/json", + "dmaap.dmaapConsumerConfiguration.consumerId": "c12", + "dmaap.dmaapConsumerConfiguration.consumerGroup": "OpenDCAE-c12", + "dmaap.dmaapConsumerConfiguration.timeoutMs": -1, + "dmaap.dmaapConsumerConfiguration.messageLimit": -1, + + "dmaap.dmaapProducerConfiguration.dmaapUrl":"http://dmaap-mr:2222/events/unauthenticated.PNF_READY", + "dmaap.dmaapProducerConfiguration.dmaapHostName":"dmaap-mr", "dmaap.dmaapProducerConfiguration.dmaapPortNumber":2223, - "dmaap.dmaapProducerConfiguration.dmaapProtocol":"https", - "aai.aaiClientConfiguration.aaiHostPortNumber":3334, + "dmaap.dmaapProducerConfiguration.dmaapTopicName": "events/unauthenticated.PNF_READY", + "dmaap.dmaapProducerConfiguration.dmaapProtocol":"http", + "dmaap.dmaapProducerConfiguration.dmaapUserName":"admin", + "dmaap.dmaapProducerConfiguration.dmaapUserPassword":"admin", + "dmaap.dmaapProducerConfiguration.dmaapContentType": "application/json", + + "dmaap.dmaapUpdateProducerConfiguration.dmaapUrl":"http://dmaap-mr:2222/events/unauthenticated.PNF_UPDATE", + "dmaap.dmaapUpdateProducerConfiguration.dmaapHostName": "dmaap-mr", + "dmaap.dmaapUpdateProducerConfiguration.dmaapPortNumber": 2223, + "dmaap.dmaapUpdateProducerConfiguration.dmaapTopicName": "events/unauthenticated.PNF_UPDATE", + "dmaap.dmaapUpdateProducerConfiguration.dmaapProtocol": "http", + "dmaap.dmaapUpdateProducerConfiguration.dmaapUserName": "admin", + "dmaap.dmaapUpdateProducerConfiguration.dmaapUserPassword": "admin", + "dmaap.dmaapUpdateProducerConfiguration.dmaapContentType": "application/json", + + "aai.aaiClientConfiguration.pnfUrl":"https://aai:3333/aai/v12/network/pnfs/pnf", "aai.aaiClientConfiguration.aaiHost":"aai", + "aai.aaiClientConfiguration.aaiHostPortNumber":3334, "aai.aaiClientConfiguration.aaiProtocol":"https", - "security.enableAaiCertAuth":"true", - "security.enableDmaapCertAuth":"true", - "security.keyStorePath":"/tmp/certs/org.onap.dcae.jks", - "security.keyStorePasswordPath":"/tmp/certs/keystore.password", - "security.trustStorePath":"/tmp/certs/org.onap.dcae.trust.jks", - "security.trustStorePasswordPath":"/tmp/certs/truststore.password" + "aai.aaiClientConfiguration.aaiUserName": "DCAE", + "aai.aaiClientConfiguration.aaiUserPassword": "DCAE", + "aai.aaiClientConfiguration.aaiIgnoreSslCertificateErrors": true, + "aai.aaiClientConfiguration.aaiBasePath": "/aai/v12", + "aai.aaiClientConfiguration.aaiPnfPath": "/network/pnfs/pnf", + "aai.aaiClientConfiguration.aaiServiceInstancePath":"/business/customers/customer/${customer}/service-subscriptions/service-subscription/${serviceType}/service-instances/service-instance/${serviceInstanceId}", + "aai.aaiClientConfiguration.aaiHeaders":{ + "X-FromAppId": "prh", + "X-TransactionId": "9999", + "Accept": "application/json", + "Real-Time": "true", + "Authorization": "Basic QUFJOkFBSQ==" + }, + + "security.trustStorePath":"change it", + "security.trustStorePasswordPath":"change it", + "security.keyStorePath":"change it", + "security.keyStorePasswordPath":"change it", + "security.enableAaiCertAuth":false, + "security.enableDmaapCertAuth":false, + + "streams_publishes":{ + "pnf-update":{ + "type": "message_router", + "dmaap_info":{ + "topic_url":"http://dmaap-mr:2222/events/unauthenticated.PNF_UPDATE" + } + }, + "pnf-ready":{ + "type": "message_router", + "dmaap_info":{ + "topic_url":"http://dmaap-mr:2222/events/unauthenticated.PNF_READY" + } + } + }, + "streams_subscribes":{ + "ves-reg-output":{ + "type": "message_router", + "dmaap_info":{ + "topic_url":"http://dmaap-mr:2222/events/unauthenticated.VES_PNFREG_OUTPUT" + } + } + } }' ] depends_on: diff --git a/tests/dcaegen2/prh-testcases/resources/prh_library.robot b/tests/dcaegen2/prh-testcases/resources/prh_library.robot index a6a01eb9..c2311852 100644 --- a/tests/dcaegen2/prh-testcases/resources/prh_library.robot +++ b/tests/dcaegen2/prh-testcases/resources/prh_library.robot @@ -33,9 +33,9 @@ Valid event processing [Arguments] ${input_valid__ves_event_in_dmaap} [Timeout] 30s ${data}= Get Data From File ${input_valid__ves_event_in_dmaap} + Set event in DMaaP ${data} ${pnf_name}= Create PNF name ${data} Set PNF name in AAI ${pnf_name} - Set event in DMaaP ${data} ${expected_event_pnf_ready_in_dpaap}= create pnf ready_notification as pnf ready ${data} #TODO to fix after CBS merge #Wait Until Keyword Succeeds 100x 300ms Check PNF_READY notification ${expected_event_pnf_ready_in_dpaap} diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py b/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py index 27883655..010c5231 100644 --- a/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py +++ b/tests/dcaegen2/prh-testcases/resources/simulator/AAI.py @@ -4,6 +4,7 @@ import sys import re import time from http.server import BaseHTTPRequestHandler +from os.path import basename import httpServerLib ch = logging.StreamHandler(sys.stdout) @@ -16,72 +17,125 @@ logging.basicConfig( logger = logging.getLogger('AAI-simulator-logger') -pnf_name = 'Empty' -pnf_entry = {} - - -def _mark_response_as_http_ok(http_endpoint): - logger.info('Execution status 200') - httpServerLib.header_200_and_json(http_endpoint) +AAI_RESOURCE_NOT_FOUND = b'{}' +pnf_entries = {} +patched_pnf = AAI_RESOURCE_NOT_FOUND +created_logical_link = AAI_RESOURCE_NOT_FOUND class AAISetup(BaseHTTPRequestHandler): - def do_PUT(self): - logger.info('AAI SIM Setup Put execution') - if re.search('/set_pnf', self.path): - global pnf_name - content_length = self._get_content_length() - pnf_name = self.rfile.read(content_length) - _mark_response_as_http_ok(self) - - if re.search('/set_pnf_entry',self.path): - global pnf_entry - content_length = self._get_content_length() - pnf_entry = json.loads(self.rfile.read(content_length)) - _mark_response_as_http_ok(self) + def do_GET(self): + try: + if re.search('/setup/patched_pnf', self.path): + httpServerLib.set_response_200_ok(self, payload = patched_pnf) + logger.debug('AAISetup GET /setup/patched_pnf -> 200 OK') + elif re.search('/setup/created_logical_link', self.path): + httpServerLib.set_response_200_ok(self, payload = created_logical_link) + logger.debug('AAISetup GET /setup/created_logical_link -> 200 OK') + else: + httpServerLib.set_response_404_not_found(self) + logger.info('AAISetup GET ' + self.path + ' -> 404 Not found') + except Exception as e: + logger.error(e) + httpServerLib.set_response_500_server_error(self) - return + def do_PUT(self): + try: + if re.search('/setup/add_pnf_entry', self.path): + pnf_entry = httpServerLib.get_payload(self) + pnf_name = json.loads(pnf_entry).get("pnf-name") + if pnf_name == None: + raise Exception("Invalid PNF entry, could not extract `pnf-name`") + + global pnf_entries + pnf_entries[pnf_name] = pnf_entry + + httpServerLib.set_response_200_ok(self) + logger.debug('AAISetup PUT /setup/add_pnf_entry [' + pnf_name + '] -> 200 OK') + elif re.search('/set_pnf', self.path): + pnf_name = httpServerLib.get_payload(self).decode() + pnf_entries[pnf_name] = AAI_RESOURCE_NOT_FOUND + httpServerLib.set_response_200_ok(self) + else: + httpServerLib.set_response_404_not_found(self) + logger.info('AAISetup PUT ' + self.path + ' -> 404 Not found') + except Exception as e: + logger.error(e) + httpServerLib.set_response_500_server_error(self) def do_POST(self): - logger.info('AAI SIM Setup Post execution') - if re.search('/reset', self.path): - global pnf_name - pnf_name = 'Empty' - _mark_response_as_http_ok(self) - - return - - def _get_content_length(self): - return int(self.headers['Content-Length']) - + try: + if re.search('/reset', self.path): + global pnf_entries + global patched_pnf + global created_logical_link + pnf_entries = {} + patched_pnf = AAI_RESOURCE_NOT_FOUND + created_logical_link = AAI_RESOURCE_NOT_FOUND + + httpServerLib.set_response_200_ok(self) + logger.debug('AAISetup POST /reset -> 200 OK') + else: + httpServerLib.set_response_404_not_found(self) + logger.info('AAISetup POST ' + self.path + ' -> 404 Not found') + except Exception as e: + logger.error(e) + httpServerLib.set_response_500_server_error(self) class AAIHandler(BaseHTTPRequestHandler): def do_GET(self): - logger.info('AAI SIM Get execution') - full_request_path = '/aai/v12/network/pnfs/pnf/' + pnf_name - if re.search(full_request_path, self.path): - _mark_response_as_http_ok(self) - body = json.dumps(pnf_entry) - logger.info('AAI SIM Get json prepared') - self.wfile.write(body.encode()) - return - + try: + if re.search('/aai/v12/network/pnfs/pnf/[^/]*$', self.path): + pnf_name = basename(self.path) + if pnf_name in pnf_entries: + httpServerLib.set_response_200_ok(self, payload = pnf_entries[pnf_name]) + logger.debug('AAIHandler GET /aai/v12/network/pnfs/pnf/' + pnf_name + ' -> 200 OK') + else: + httpServerLib.set_response_404_not_found(self) + logger.info('AAIHandler GET /aai/v12/network/pnfs/pnf/' + pnf_name + ' -> 404 Not found, actual entries: ' + str(pnf_entries.keys())) + else: + httpServerLib.set_response_404_not_found(self) + logger.info('AAIHandler GET ' + self.path + ' -> 404 Not found') + except Exception as e: + logger.error(e) + httpServerLib.set_response_500_server_error(self) def do_PATCH(self): - logger.info('AAI SIM Patch execution') - pnfs_name = '/aai/v12/network/pnfs/pnf/' + pnf_name - if re.search('wrong_aai_record', self.path): - self.send_response(400) - logger.info('Execution status 400') - self.end_headers() - elif re.search(pnfs_name, self.path): - self.send_response(200) - logger.info('Execution status 200') - self.end_headers() - - return + try: + if re.search('/aai/v12/network/pnfs/pnf/[^/]*$', self.path): + pnf_name = basename(self.path) + if pnf_name in pnf_entries: + global patched_pnf + patched_pnf = httpServerLib.get_payload(self) + + httpServerLib.set_response_200_ok(self) + logger.debug('AAIHandler PATCH /aai/v12/network/pnfs/pnf/' + pnf_name + ' -> 200 OK') + else: + httpServerLib.set_response_404_not_found(self) + logger.info('AAIHandler PATCH /aai/v12/network/pnfs/pnf/' + pnf_name + ' -> 404 Not found, actual entries: ' + str(pnf_entries.keys())) + else: + httpServerLib.set_response_404_not_found(self) + logger.info('AAIHandler PATCH ' + self.path + ' -> 404 Not found') + except Exception as e: + logger.error(e) + httpServerLib.set_response_500_server_error(self) + + def do_PUT(self): + try: + if re.search('/aai/v12/network/logical-links/logical-link/[^/]*$', self.path): + global created_logical_link + created_logical_link = httpServerLib.get_payload(self) + + httpServerLib.set_response_200_ok(self) + logger.debug('AAIHandler PUT /aai/v12/network/logical-links/logical-link/' + created_logical_link + ' -> 200 OK') + else: + httpServerLib.set_response_404_not_found(self) + logger.info('AAIHandler PUT ' + self.path + ' -> 404 Not found') + except Exception as e: + logger.error(e) + httpServerLib.set_response_500_server_error(self) def _main_(handler_class=AAIHandler, protocol="HTTP/1.0"): @@ -94,4 +148,4 @@ def _main_(handler_class=AAIHandler, protocol="HTTP/1.0"): if __name__ == '__main__': - _main_() + _main_()
\ No newline at end of file diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py b/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py index da113e68..7f590a5b 100644 --- a/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py +++ b/tests/dcaegen2/prh-testcases/resources/simulator/DMaaP.py @@ -15,62 +15,85 @@ logging.basicConfig( logger = logging.getLogger('DMaaP-simulator-logger') -posted_event_from_prh = b'Empty' -received_event_to_get_method = b'Empty' +DMAAP_EMPTY = b'[]' +ves_event = DMAAP_EMPTY +captured_prh_event = DMAAP_EMPTY class DmaapSetup(BaseHTTPRequestHandler): - def do_PUT(self): - logger.info('DMaaP SIM Setup Put execution') - if re.search('/set_get_event', self.path): - global received_event_to_get_method - content_length = int(self.headers['Content-Length']) - received_event_to_get_method = self.rfile.read(content_length) - httpServerLib.header_200_and_json(self) - - return - def do_GET(self): - logger.info('DMaaP SIM Setup Get execution') - if re.search('/events/pnfReady', self.path): - httpServerLib.header_200_and_json(self) - self.wfile.write(posted_event_from_prh) + try: + if re.search('/setup/pnf_ready', self.path) or re.search('events/pnfReady', self.path): + global captured_prh_event + httpServerLib.set_response_200_ok(self, payload = captured_prh_event) + logger.debug('DmaapSetup GET /setup/pnf_ready -> 200 OK') + else: + httpServerLib.set_response_404_not_found(self) + logger.info('DmaapSetup GET ' + self.path + ' -> 404 Not found') + except Exception as e: + logger.error(e) + httpServerLib.set_response_500_server_error(self) - return + def do_PUT(self): + try: + if re.search('/setup/ves_event', self.path) or re.search('/set_get_event', self.path): + global ves_event + ves_event = httpServerLib.get_payload(self) + httpServerLib.set_response_200_ok(self) + logger.debug('DmaapSetup PUT /setup/ves_event -> 200 OK') + else: + httpServerLib.set_response_404_not_found(self) + logger.info('DmaapSetup PUT ' + self.path + ' -> 404 Not found') + except Exception as e: + logger.error(e) + httpServerLib.set_response_500_server_error(self) def do_POST(self): - logger.info('DMaaP SIM Setup Post execution') - if re.search('/reset', self.path): - global posted_event_from_prh - global received_event_to_get_method - posted_event_from_prh = b'Empty' - received_event_to_get_method = b'Empty' - httpServerLib.header_200_and_json(self) - - return - + try: + if re.search('/reset', self.path): + global ves_event + global captured_prh_event + ves_event = DMAAP_EMPTY + captured_prh_event = DMAAP_EMPTY + httpServerLib.set_response_200_ok(self) + logger.debug('DmaapSetup POST /reset -> 200 OK') + else: + httpServerLib.set_response_404_not_found(self) + logger.info('DmaapSetup POST ' + self.path + ' -> 404 Not found') + except Exception as e: + logger.error(e) + httpServerLib.set_response_500_server_error(self) class DMaaPHandler(BaseHTTPRequestHandler): def do_POST(self): - logger.info('DMaaP SIM Post execution') - if re.search('/events/unauthenticated.PNF_READY', self.path): - global posted_event_from_prh - content_length = int(self.headers['Content-Length']) - posted_event_from_prh = self.rfile.read(content_length) - httpServerLib.header_200_and_json(self) - - return + try: + if re.search('/events/unauthenticated.PNF_READY', self.path): + global captured_prh_event + captured_prh_event = httpServerLib.get_payload(self) + httpServerLib.set_response_200_ok(self) + logger.debug('DMaaPHandler POST /events/unauthenticated.PNF_READY -> 200') + else: + httpServerLib.set_response_404_not_found(self) + logger.info('DMaaPHandler POST ' + self.path + ' -> 404 Not found') + except Exception as e: + logger.error(e) + httpServerLib.set_response_500_server_error(self) def do_GET(self): - logger.info('DMaaP SIM Get execution') - if re.search('/events/unauthenticated.VES_PNFREG_OUTPUT/OpenDcae-c12/c12', self.path): - httpServerLib.header_200_and_json(self) - self.wfile.write(received_event_to_get_method) - - return - + try: + if re.search('/events/unauthenticated.VES_PNFREG_OUTPUT/OpenDcae-c12/c12', self.path): + global ves_event + httpServerLib.set_response_200_ok(self, payload = ves_event) + ves_event = DMAAP_EMPTY + logger.debug('DMaaPHandler GET /events/unauthenticated.VES_PNFREG_OUTPUT/OpenDcae-c12/c12 -> 200') + else: + httpServerLib.set_response_404_not_found(self) + logger.info('DMaaPHandler GET ' + self.path + ' -> 404 Not found') + except Exception as e: + logger.error(e) + httpServerLib.set_response_500_server_error(self) def _main_(handler_class=DMaaPHandler, protocol="HTTP/1.0"): handler_class.protocol_version = protocol @@ -80,6 +103,5 @@ def _main_(handler_class=DMaaPHandler, protocol="HTTP/1.0"): while 1: time.sleep(10) - if __name__ == '__main__': - _main_() + _main_()
\ No newline at end of file diff --git a/tests/dcaegen2/prh-testcases/resources/simulator/httpServerLib.py b/tests/dcaegen2/prh-testcases/resources/simulator/httpServerLib.py index 7b54539a..e91927e3 100644 --- a/tests/dcaegen2/prh-testcases/resources/simulator/httpServerLib.py +++ b/tests/dcaegen2/prh-testcases/resources/simulator/httpServerLib.py @@ -2,32 +2,44 @@ import _thread import ssl from http.server import HTTPServer - -def header_200_and_json(self): +def set_response_200_ok(self, payload = None): self.send_response(200) self.send_header('Content-Type', 'application/json') self.end_headers() + if payload != None: + self.wfile.write(payload) + +def set_response_404_not_found(self): + self.send_response(404) + self.end_headers() + +def set_response_500_server_error(self): + self.send_response(500) + self.end_headers() +def get_payload(self): + if self.headers['Content-Length'] == None: + raise Exception('Invalid payload, Content-Length not defined') + + content_length = int(self.headers['Content-Length']) + return self.rfile.read(content_length) def start_http_endpoint(port, handler_class): _thread.start_new_thread(init_http_endpoints, (port, handler_class)) - def start_https_endpoint(port, handler_class, keyfile, certfile, ca_certs): _thread.start_new_thread(init_https_endpoints, (port, handler_class, keyfile, certfile, ca_certs)) - def init_http_endpoints(port, handler_class, server_class=HTTPServer): server = server_class(('', port), handler_class) sa = server.socket.getsockname() print("Serving HTTP on", sa[0], "port", sa[1], "for", handler_class, "...") server.serve_forever() - def init_https_endpoints(port, handler_class, keyfile, certfile, ca_certs, server_class=HTTPServer): server = server_class(('', port), handler_class) server.socket = ssl.wrap_socket(server.socket, keyfile=keyfile, certfile=certfile, ca_certs=ca_certs, server_side=True) sa = server.socket.getsockname() print("Serving HTTPS on", sa[0], "port", sa[1], "for", handler_class, "...") - server.serve_forever() + server.serve_forever()
\ No newline at end of file diff --git a/tests/optf-cmso/cmso/testsuites/ChangeManagementImmediate.robot b/tests/optf-cmso/cmso/testsuites/ChangeManagementImmediate.robot index ee6f8b10..6990cf46 100644 --- a/tests/optf-cmso/cmso/testsuites/ChangeManagementImmediate.robot +++ b/tests/optf-cmso/cmso/testsuites/ChangeManagementImmediate.robot @@ -1,28 +1,6 @@ *** Settings *** -Documentation Creates VID VNF Instance - -#Library StringTemplater -#Library UUID -Library ../attlibs/UID.py -Library ../attlibs/StringTemplater.py -Resource ../resources/change_management_ete.robot - -# Test Setup -Test Template Change Management Immediate Template -# Test Teardown +Documentation Placeholder for running CMSO IT *** Test Cases *** -One Vnf Immediate Replace OneVnfImmediate.json.template Replace - [Tags] ete immediate - -One Vnf Immediate Update Config OneVnfImmediate.json.template VNF Config Update - [Tags] ete immediate - -One Vnf Immediate Update In Place OneVnfImmediate.json.template VNF Update Software In Place - [Tags] ete immediate - -One Vnf Immediate Update OneVnfImmediate.json.template Update - [Tags] ete immediate - -Multiple Vnf Immediate MultipleVnfImmediate.json.template Replace - [Tags] ete immediate +CMSO Robot Test + Log CMSO IT tests run via cmso-robot docker container.
\ No newline at end of file diff --git a/tests/usecases/5G-bulkpm/BulkpmE2E.robot b/tests/usecases/5G-bulkpm/BulkpmE2E.robot index dcf97210..84243cba 100644 --- a/tests/usecases/5G-bulkpm/BulkpmE2E.robot +++ b/tests/usecases/5G-bulkpm/BulkpmE2E.robot @@ -20,8 +20,12 @@ ${CLI_EXEC_CLI} curl -k https://${DR_PROV_IP}:8443/inte ${CLI_EXEC_CLI_FILECONSUMER} docker exec fileconsumer-node /bin/sh -c "ls /opt/app/subscriber/delivery | grep .xml" ${CLI_EXEC_CLI_DFC_LOG} docker exec dfc /bin/sh -c "cat /var/log/ONAP/application.log" > /tmp/dfc_docker.log.robot ${CLI_EXEC_CLI_DFC_LOG_GREP} grep "Publish to DR successful!" /tmp/dfc_docker.log.robot -${CLI_EXEC_CLI_FILECONSUMER_CP} docker cp fileconsumer-node:/opt/app/subscriber/delivery/xNF.pm.xml.M %{WORKSPACE} -${CLI_EXEC_RENAME_METADATA} mv %{WORKSPACE}/xNF.pm.xml.M %{WORKSPACE}/metadata.json +${CLI_EXEC_CLI_FILECONSUMER_CP} docker cp fileconsumer-node:/opt/app/subscriber/delivery/A20181002.0000-1000-0015-1000_5G.xml.M %{WORKSPACE} +${CLI_EXEC_RENAME_METADATA} mv %{WORKSPACE}/A20181002.0000-1000-0015-1000_5G.xml.M %{WORKSPACE}/metadata.json +${CLI_EXEC_CLI_PMMAPPER_LOG} docker exec pmmapper /bin/sh -c "cat /var/log/ONAP/dcaegen2/services/pm-mapper/pm-mapper_output.log" > /tmp/pmmapper_docker.log.robot +${CLI_EXEC_CLI_PMMAPPER_LOG_GREP} grep "XML validation successful Event" /tmp/pmmapper_docker.log.robot +${CLI_EXEC_MR_PMMAPPER_TOPIC} curl http://${DMAAP_MR_IP}:3904/events/PM_MAPPER/CG1/C1?timeout=1000 > /tmp/mr.log +${CLI_EXEC_CLI_PMMAPPER_TOPIC_LOG_GREP} grep "perf3gpp_RnNode-Ericsson_pmMeasResult" /tmp/mr.log ${metadataSchemaPath} %{WORKSPACE}/tests/usecases/5G-bulkpm/assets/metadata.schema.json ${metadataJsonPath} %{WORKSPACE}/metadata.json @@ -86,7 +90,7 @@ Verify Fileconsumer Receive PM file from Data Router ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_FILECONSUMER} shell=yes Log ${cli_cmd_output.stdout} Should Be Equal As Strings ${cli_cmd_output.rc} 0 - Should Contain ${cli_cmd_output.stdout} xNF.pm.xml + Should Contain ${cli_cmd_output.stdout} A20181002.0000-1000-0015-1000_5G.xml Verify File Consumer Receive valid metadata from Data Router [Tags] Bulk_PM_E2E_06 @@ -94,8 +98,30 @@ Verify File Consumer Receive valid metadata from Data Router ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_FILECONSUMER} shell=yes Log ${cli_cmd_output.stdout} Should Be Equal As Strings ${cli_cmd_output.rc} 0 - Should Contain ${cli_cmd_output.stdout} xNF.pm.xml.M + Should Contain ${cli_cmd_output.stdout} A20181002.0000-1000-0015-1000_5G.xml.M ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_FILECONSUMER_CP} shell=yes ${cli_cmd_output}= Run Process ${CLI_EXEC_RENAME_METADATA} shell=yes ${validation_result}= Validate ${metadataSchemaPath} ${metadataJsonPath} - Should Be Equal As Strings ${validation_result} 0
\ No newline at end of file + Should Be Equal As Strings ${validation_result} 0 + +Verify PM-Mapper successfully receives uncompressed the PM XML file + [Tags] Bulk_PM_E2E_07 + [Documentation] Check that PM-Mapper receives the uncompressed PM XML file + ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_PMMAPPER_LOG} shell=yes + Log ${cli_cmd_output.stdout} + Should Be Equal As Strings ${cli_cmd_output.rc} 0 + ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_PMMAPPER_LOG_GREP} shell=yes + Log ${cli_cmd_output.stdout} + Should Be Equal As Strings ${cli_cmd_output.rc} 0 + Should Contain ${cli_cmd_output.stdout} XML validation successful Event + +Verify PM-Mapper successfully publishes PMMeasResult VES onto the Message Router Topic PM_MAPPER + [Tags] Bulk_PM_E2E_08 + [Documentation] Check that PM-Mapper publishes VES onto the Message Router + ${cli_cmd_output}= Run Process ${CLI_EXEC_MR_PMMAPPER_TOPIC} shell=yes + Log ${cli_cmd_output.stdout} + Should Be Equal As Strings ${cli_cmd_output.rc} 0 + ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_PMMAPPER_TOPIC_LOG_GREP} shell=yes + Log ${cli_cmd_output.stdout} + Should Be Equal As Strings ${cli_cmd_output.rc} 0 + Should Contain ${cli_cmd_output.stdout} perf3gpp_RnNode-Ericsson_pmMeasResult
\ No newline at end of file diff --git a/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotification.json b/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotification.json index d5d8fd05..375dbd80 100644 --- a/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotification.json +++ b/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotification.json @@ -19,9 +19,9 @@ "changeType": "FileReady", "notificationFieldsVersion": "2.0", "arrayOfNamedHashMap": [ - { "name": "xNF.pm.xml.gz", + { "name": "A20181002.0000-1000-0015-1000_5G.xml.gz", "hashMap":{ - "location": "sftp://admin:admin@sftpserver:sftpport/xNF.pm.xml.gz", + "location": "sftp://admin:admin@sftpserver:sftpport/A20181002.0000-1000-0015-1000_5G.xml.gz", "compression": "gzip", "fileFormatType": "org.3GPP.32.435#measCollec", "fileFormatVersion": "V10" diff --git a/tests/vid/resources/simulators/Dockerfile b/tests/vid/resources/simulators/Dockerfile index e6586b1e..de5b5fe8 100644 --- a/tests/vid/resources/simulators/Dockerfile +++ b/tests/vid/resources/simulators/Dockerfile @@ -5,8 +5,9 @@ ARG component ENV component=$component COPY SO.py / -ADD ./test_data_assets/ / +RUN mkdir test_data_assets +ADD ./test_data_assets/ /test_data_assets EXPOSE 8443 -CMD python ./SO.py expected_${component}_requests.json expected_${component}_responses.json +CMD python ./SO.py /test_data_assets/expected_${component}_requests.json /test_data_assets/expected_${component}_responses.json diff --git a/tests/vid/resources/simulators/SO.py b/tests/vid/resources/simulators/SO.py index fa481b38..12fd7763 100644 --- a/tests/vid/resources/simulators/SO.py +++ b/tests/vid/resources/simulators/SO.py @@ -26,10 +26,13 @@ DEFAULT_PORT = 8443 class SOHandler(BaseHTTPRequestHandler): - def __init__(self, expected_requests, expected_responses, *args, **kwargs): + def __init__(self, expected_requests, expected_responses, requests, responses, *args, **kwargs): self._expected_requests = expected_requests self._expected_responses = expected_responses + self._requests = requests["requests"] + self._responses = responses["responses"] + self._known_endpoints = self._get_known_endpoints() super().__init__(*args, **kwargs) def do_POST(self): @@ -44,15 +47,26 @@ class SOHandler(BaseHTTPRequestHandler): return def do_GET(self): - logging.info( - 'GET called. Expected GET REQUEST: ' + json.dumps( - self._expected_requests["get"]) + '\nExpected GET response: ' + - json.dumps(self._expected_responses["get"])) - self.send_response(200) - self._set_headers() - - self.wfile.write(json.dumps(self._expected_responses["get"]).encode("utf-8")) - return self._expected_responses["get"] + print(self._known_endpoints) + if self._does_path_exist_as_endpoint(): + expected_response = self._get_response_by_path() + if expected_response: + self.send_response(expected_response["responseCode"]) + self._set_headers() + self.wfile.write(json.dumps(expected_response["body"]).encode("utf-8")) + else: + response_body = "{\"message:\" \"no response for endpoint\"}" + self.send_response(400) + self._set_headers() + self.wfile.write(json.dumps(response_body).encode("utf-8")) + else: + logging.info('GET called. Expected GET REQUEST: ' + + json.dumps(self._expected_requests["get"]) + + '\nExpected GET response: ' + + json.dumps(self._expected_responses["get"])) + self.send_response(200) + self._set_headers() + self.wfile.write(json.dumps(self._expected_responses["get"]).encode("utf-8")) def do_PUT(self): request_body_json = self._get_request_body() @@ -80,9 +94,7 @@ class SOHandler(BaseHTTPRequestHandler): def _apply_expected_data(self, request_body_json): if self.path == '/setResponse': logging.info("IN PUT /setResponse: " + str(request_body_json)) - print("TYPE: %s and text: %s", type(request_body_json), str(request_body_json)) self._expected_responses.update(request_body_json) - print("TYPE: %s", type(request_body_json)) elif self.path == '/setRequest': logging.info("IN PUT /setRequest: " + str(request_body_json)) self._expected_requests.update(request_body_json) @@ -91,6 +103,37 @@ class SOHandler(BaseHTTPRequestHandler): self.send_header('Content-Type', 'application/json') self.end_headers() + def _get_response_by_path(self): + for response in self._responses: + if response["path"] == self.path: + return response + + def _does_path_exist_as_endpoint(self): + does_exist = False + for ep in self._known_endpoints: + if ep == self.path: + does_exist = True + break + return does_exist + + def _create_path_from_request(self, request): + base_uri = request["path"] + query_params = request["queryParams"] + return base_uri + self._get_params_uri(query_params) + + def _get_known_endpoints(self): + endpoints = [] + for request in self._requests: + endpoints.append(self._create_path_from_request(request)) + return endpoints + + @staticmethod + def _get_params_uri(query_params): + params_uri = "?" + for parameter in query_params: + params_uri += parameter + '=' + query_params.get(parameter, '') + '&' + return params_uri[:-1] + class JsonFileToDictReader(object): @@ -101,10 +144,13 @@ class JsonFileToDictReader(object): def init_so_simulator(): + requests = JsonFileToDictReader.read_expected_test_data("test_data_assets/requests.json") + responses = JsonFileToDictReader.read_expected_test_data("test_data_assets/responses.json") + expected_so_requests = JsonFileToDictReader.read_expected_test_data(argv[1]) expected_so_responses = JsonFileToDictReader.read_expected_test_data(argv[2]) logging.basicConfig(level=logging.INFO) - handler = partial(SOHandler, expected_so_requests, expected_so_responses) + handler = partial(SOHandler, expected_so_requests, expected_so_responses, requests, responses) handler.protocol_version = "HTTP/1.0" httpd = HTTPServer(('', DEFAULT_PORT), handler) logging.info("serving on: " + str(httpd.socket.getsockname())) diff --git a/tests/vid/resources/simulators/test_data_assets/endpoint_not_found.json b/tests/vid/resources/simulators/test_data_assets/endpoint_not_found.json new file mode 100644 index 00000000..3419e15c --- /dev/null +++ b/tests/vid/resources/simulators/test_data_assets/endpoint_not_found.json @@ -0,0 +1,4 @@ +{ + "responseCode": 404, + "message": "invalid endpoint" +}
\ No newline at end of file diff --git a/tests/vid/resources/simulators/test_data_assets/requests.json b/tests/vid/resources/simulators/test_data_assets/requests.json new file mode 100644 index 00000000..e94d26a6 --- /dev/null +++ b/tests/vid/resources/simulators/test_data_assets/requests.json @@ -0,0 +1,33 @@ +{ + "requests": [ + { + "method": "GET", + "path": "/aai/v13/service-design-and-creation/models", + "queryParams": { + "depth": "2", + "model-invariant-id": "88a71d72-ec80-4357-808e-f288823cb353" + } + }, + { + "method": "GET", + "path": "/aai/v../business/customers/customer/MSO_1610_ST", + "queryParams": { + "depth": "2" + } + }, + { + "method": "GET", + "path": "/aai/v13/query", + "queryParams": { + "format": "simple" + } + }, + { + "method": "GET", + "path": "/workflowSpecifications/v1/workflows", + "queryParams": { + "vnfModelVersionId": "103b4a1b-4a15-4559-a019-1ff132180c7c" + } + } + ] +}
\ No newline at end of file diff --git a/tests/vid/resources/simulators/test_data_assets/responses.json b/tests/vid/resources/simulators/test_data_assets/responses.json new file mode 100644 index 00000000..fb862e15 --- /dev/null +++ b/tests/vid/resources/simulators/test_data_assets/responses.json @@ -0,0 +1,220 @@ +{ + "responses": [ + { + "responseCode": 200, + "path": "/aai/v13/service-design-and-creation/models?depth=2&model-invariant-id=88a71d72-ec80-4357-808e-f288823cb353", + "body": { + "model": [ + { + "model-invariant-id": "88a71d72-ec80-4357-808e-f288823cb353", + "model-type": "resource", + "resource-version": "1549550682576", + "model-vers": { + "model-ver": [ + { + "model-version-id": "d2dcf256-2687-4631-9e36-1b7fc352b7bf", + "model-name": "HealthVF", + "model-version": "1.0", + "model-description": "HealthVSP", + "resource-version": "1549550682585", + "model-elements": { + "model-element": [ + { + "model-element-uuid": "ad8c74b6-d2ff-48a7-8fcb-4cf653efc1f9", + "new-data-del-flag": "T", + "cardinality": "unbounded", + "resource-version": "1549550682592", + "relationship-list": { + "relationship": [ + { + "related-to": "model-ver", + "relationship-label": "org.onap.relationships.inventory.IsA", + "related-link": "/aai/v13/service-design-and-creation/models/model/acc6edd8-a8d4-4b93-afaa-0994068be14c/model-vers/model-ver/93a6166f-b3d5-4f06-b4ba-aed48d009ad9", + "relationship-data": [ + { + "relationship-key": "model.model-invariant-id", + "relationship-value": "acc6edd8-a8d4-4b93-afaa-0994068be14c" + } + ], + "related-to-property": [ + { + "property-key": "model-ver.model-name", + "property-value": "generic-vnf" + } + ] + } + ] + } + } + ] + }, + "relationship-list": { + "relationship": [ + { + "related-to": "model-element", + "relationship-label": "org.onap.relationships.inventory.IsA", + "related-link": "/aai/v13/service-design-and-creation/models/model/4b5158b9-a0d5-4aeb-90a8-474bc2ccd8af/model-vers/model-ver/ba463093-6f2c-4d22-aa8d-fb4615660db2/model-elements/model-element/57d23b71-d5a0-484d-ac7c-1b94e9a1563e/model-elements/model-element/5d290a6a-3b35-46bb-a2d7-1b9c9f520c39", + "relationship-data": [ + { + "relationship-key": "model.model-invariant-id", + "relationship-value": "4b5158b9-a0d5-4aeb-90a8-474bc2ccd8af" + } + ] + } + ] + } + } + ] + } + } + ] + } + }, + { + "responseCode": 200, + "path": "/aai/v../business/customers/customer/MSO_1610_ST?depth=2", + "body": { + "global-customer-id": "MSO_1610_ST", + "subscriber-name": "MSO_1610_ST", + "subscriber-type": "INFRA", + "resource-version": "1549008901724", + "service-subscriptions": { + "service-subscription": [ + { + "service-type": "gNB", + "resource-version": "1549008901954", + "service-instances": { + "service-instance": [ + { + "service-instance-id": "40003c27-2876-4f3a-8a23-ef1ad7ef665a", + "service-instance-name": "AwServicePreload3", + "service-type": "vAwServiceType", + "environment-context": "General_Revenue-Bearing", + "workload-context": "Production", + "model-invariant-id": "33ebe1a9-1df3-4c35-b8a0-cd0504159511", + "model-version-id": "41658d87-b37c-4237-9a56-d27d1e430da6", + "resource-version": "1550761112266", + "orchestration-status": "Active", + "relationship-list": { + "relationship": [ + { + "related-to": "project", + "relationship-label": "org.onap.relationships.inventory.Uses", + "related-link": "/aai/v13/business/projects/project/AwTestProject", + "relationship-data": [ + { + "relationship-key": "project.project-name", + "relationship-value": "AwTestProject" + } + ] + } + ] + } + } + ] + }, + "relationship-list": { + "relationship": [ + { + "related-to": "tenant", + "relationship-label": "org.onap.relationships.inventory.Uses", + "related-link": "/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne/tenants/tenant/982c540f6e69488eb6be5664255e00c0", + "relationship-data": [ + { + "relationship-key": "cloud-region.cloud-owner", + "relationship-value": "CloudOwner" + } + ], + "related-to-property": [ + { + "property-key": "tenant.tenant-name", + "property-value": "onap-wro" + } + ] + } + ] + } + } + ] + } + } + }, + { + "responseCode": 200, + "path": "/aai/v13/query?format=simple", + "body": { + "results": [ + { + "id": "385160", + "node-type": "service-instance", + "url": "/aai/v13/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vLB/service-instances/service-instance/12965035-a690-400c-bf18-211a5b4710c8", + "properties": { + "service-instance-id": "12965035-a690-400c-bf18-211a5b4710c8", + "service-instance-name": "ws-service-02", + "service-type": "vAwServiceType", + "environment-context": "General_Revenue-Bearing", + "workload-context": "Production", + "model-invariant-id": "33ebe1a9-1df3-4c35-b8a0-cd0504159511", + "model-version-id": "cb8501da-6e03-40e0-900c-ef0df30d1183", + "resource-version": "1551434658559", + "selflink": "restconf/config/GENERIC-RESOURCE-API:services/service/12965035-a690-400c-bf18-211a5b4710c8/service-data/service-topology/", + "orchestration-status": "Active" + }, + "related-to": [ + { + "id": "200768", + "relationship-label": "org.onap.relationships.inventory.Uses", + "node-type": "project", + "url": "/aai/v13/business/projects/project/Project-Demonstration" + } + ] + } + ] + } + }, + { + "responseCode": 200, + "path": "/workflowSpecifications/v1/workflows?vnfModelVersionId=103b4a1b-4a15-4559-a019-1ff132180c7c", + "body": { + "workflowSpecificationList": [ + { + "workflowSpecification": { + "artifactInfo": { + "artifactType": "workflow", + "artifactUuid": "ab6478e4-ea33-3346-ac12-ab121484a333", + "artifactName": "inPlaceSoftwareUpdate-1_0.bpmn", + "artifactVersion": "1.0", + "artifactDescription": "xyz xyz", + "workflowName": "inPlaceSoftwareUpdate", + "operationName": "inPlaceSoftwareUpdate", + "workflowSource": "sdc", + "workflowResourceTarget": "vnf" + }, + "activitySequence": [ + { + "name": "VNFQuiesceTrafficActivity", + "description": "Activity to QuiesceTraffic on VNF" + } + ], + "workflowInputParameters": [ + { + "label": "Cloud Owner", + "inputType": "text", + "required": true, + "validation": [ + { + "maxLength": "7", + "allowableChars": "[a-zA-Z0-9]*" + } + ], + "soFieldName": "cloudOwner", + "soPayloadLocation": "cloudConfiguration" + } + ] + } + } + ] + } + } + ] +}
\ No newline at end of file |