From: eh552t Date: Fri, 15 Sep 2017 12:47:45 +0000 (+0200) Subject: Add first Holmes test and refactor X-Git-Tag: 1.0.0-Amsterdam~253 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F21%2F12721%2F2;p=integration.git Add first Holmes test and refactor Change-Id: Ic508686c2f12424ac87698a09f372de578c6dc91 Signed-off-by: eh552t Issue-ID: CLAMP-34 --- diff --git a/test/csit/plans/clamp/TCA/setup.sh b/test/csit/plans/clamp/APIs/setup.sh similarity index 100% rename from test/csit/plans/clamp/TCA/setup.sh rename to test/csit/plans/clamp/APIs/setup.sh diff --git a/test/csit/plans/clamp/TCA/teardown.sh b/test/csit/plans/clamp/APIs/teardown.sh similarity index 100% rename from test/csit/plans/clamp/TCA/teardown.sh rename to test/csit/plans/clamp/APIs/teardown.sh diff --git a/test/csit/plans/clamp/TCA/testplan.txt b/test/csit/plans/clamp/APIs/testplan.txt similarity index 90% rename from test/csit/plans/clamp/TCA/testplan.txt rename to test/csit/plans/clamp/APIs/testplan.txt index c0f569673..9d328f52a 100644 --- a/test/csit/plans/clamp/TCA/testplan.txt +++ b/test/csit/plans/clamp/APIs/testplan.txt @@ -1,4 +1,4 @@ # Test suites are relative paths under [integration.git]/test/csit/tests/. # Place the suites in run order. -clamp/TCA +clamp/APIs diff --git a/test/csit/tests/clamp/TCA/01__TCA.robot b/test/csit/tests/clamp/APIs/01__TCA.robot similarity index 70% rename from test/csit/tests/clamp/TCA/01__TCA.robot rename to test/csit/tests/clamp/APIs/01__TCA.robot index 45f20f248..e4837a66a 100644 --- a/test/csit/tests/clamp/TCA/01__TCA.robot +++ b/test/csit/tests/clamp/APIs/01__TCA.robot @@ -11,45 +11,45 @@ Get Requests health check ok ${resp}= Get Request clamp /restservices/clds/v1/clds/healthcheck Should Be Equal As Strings ${resp.status_code} 200 -Put Requests to add template1 with yaml properties +Put Requests to add TCA template1 with yaml properties ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 Create Session clamp http://localhost:8080 auth=${auth} - ${data}= Get Binary File ${CURDIR}${/}data${/}createTemplate1.json + ${data}= Get Binary File ${CURDIR}${/}data${/}createTCATemplate1.json &{headers}= Create Dictionary Content-Type=application/json - ${resp}= Put Request clamp /restservices/clds/v1/cldsTempate/template/template1 data=${data} headers=${headers} + ${resp}= Put Request clamp /restservices/clds/v1/cldsTempate/template/TCATemplate1 data=${data} headers=${headers} Should Be Equal As Strings ${resp.status_code} 200 -Put Requests to add template2 with yaml properties +Put Requests to add TCA template2 with yaml properties ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 Create Session clamp http://localhost:8080 auth=${auth} - ${data}= Get Binary File ${CURDIR}${/}data${/}createTemplate2.json + ${data}= Get Binary File ${CURDIR}${/}data${/}createTCATemplate2.json &{headers}= Create Dictionary Content-Type=application/json - ${resp}= Put Request clamp /restservices/clds/v1/cldsTempate/template/template2 data=${data} headers=${headers} + ${resp}= Put Request clamp /restservices/clds/v1/cldsTempate/template/TCATemplate2 data=${data} headers=${headers} Should Be Equal As Strings ${resp.status_code} 200 -Get Requests verify template1 and template2 found +Get Requests verify TCA template1 and template2 found ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 Create Session clamp http://localhost:8080 auth=${auth} ${resp}= Get Request clamp /restservices/clds/v1/cldsTempate/template-names Should Be Equal As Strings ${resp.status_code} 200 - Should Contain Match ${resp} *template1* - Should Contain Match ${resp} *template2* - Should Not Contain Match ${resp} *template99* + Should Contain Match ${resp} *TCATemplate1* + Should Contain Match ${resp} *TCATemplate2* + Should Not Contain Match ${resp} *TCATemplate99* -Put Requests to add Close Loop Model1 +Put Requests to add Close Loop TCA Model1 ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 Create Session clamp http://localhost:8080 auth=${auth} - ${data}= Get Binary File ${CURDIR}${/}data${/}createModel1.json + ${data}= Get Binary File ${CURDIR}${/}data${/}createTCAModel1.json &{headers}= Create Dictionary Content-Type=application/json - ${resp}= Put Request clamp /restservices/clds/v1/clds/model/Model1 data=${data} headers=${headers} + ${resp}= Put Request clamp /restservices/clds/v1/clds/model/TCAModel1 data=${data} headers=${headers} Should Be Equal As Strings ${resp.status_code} 200 -Put Requests to add Close Loop Model2 +Put Requests to add Close Loop TCA Model2 ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 Create Session clamp http://localhost:8080 auth=${auth} - ${data}= Get Binary File ${CURDIR}${/}data${/}createModel2.json + ${data}= Get Binary File ${CURDIR}${/}data${/}createTCAModel2.json &{headers}= Create Dictionary Content-Type=application/json - ${resp}= Put Request clamp /restservices/clds/v1/clds/model/Model2 data=${data} headers=${headers} + ${resp}= Put Request clamp /restservices/clds/v1/clds/model/TCAModel2 data=${data} headers=${headers} Should Be Equal As Strings ${resp.status_code} 200 Get Requests verify Model1 and Model2 found @@ -57,6 +57,6 @@ Get Requests verify Model1 and Model2 found Create Session clamp http://localhost:8080 auth=${auth} ${resp}= Get Request clamp /restservices/clds/v1/clds/model-names Should Be Equal As Strings ${resp.status_code} 200 - Should Contain Match ${resp} *Model1* - Should Contain Match ${resp} *Model2* - Should Not Contain Match ${resp} *Model99* + Should Contain Match ${resp} *TCAModel1* + Should Contain Match ${resp} *TCAModel2* + Should Not Contain Match ${resp} *TCAModel99* diff --git a/test/csit/tests/clamp/APIs/02__Holmes.robot b/test/csit/tests/clamp/APIs/02__Holmes.robot new file mode 100644 index 000000000..9087c4bcd --- /dev/null +++ b/test/csit/tests/clamp/APIs/02__Holmes.robot @@ -0,0 +1,38 @@ +*** Settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json + + +*** Test Cases *** +Get Requests health check ok + CreateSession clamp http://localhost:8080 + ${resp}= Get Request clamp /restservices/clds/v1/clds/healthcheck + Should Be Equal As Strings ${resp.status_code} 200 + +Put Requests to add Holmes template1 with yaml properties + ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 + Create Session clamp http://localhost:8080 auth=${auth} + ${data}= Get Binary File ${CURDIR}${/}data${/}createHolmesTemplate1.json + &{headers}= Create Dictionary Content-Type=application/json + ${resp}= Put Request clamp /restservices/clds/v1/cldsTempate/template/HolmesTemplate1 data=${data} headers=${headers} + Should Be Equal As Strings ${resp.status_code} 200 + +Put Requests to add Holmes template2 with yaml properties + ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 + Create Session clamp http://localhost:8080 auth=${auth} + ${data}= Get Binary File ${CURDIR}${/}data${/}createHolmesTemplate2.json + &{headers}= Create Dictionary Content-Type=application/json + ${resp}= Put Request clamp /restservices/clds/v1/cldsTempate/template/HolmesTemplate2 data=${data} headers=${headers} + Should Be Equal As Strings ${resp.status_code} 200 + +Get Requests verify Holmes template1 and template2 found + ${auth}= Create List admin 5f4dcc3b5aa765d61d8327deb882cf99 + Create Session clamp http://localhost:8080 auth=${auth} + ${resp}= Get Request clamp /restservices/clds/v1/cldsTempate/template-names + Should Be Equal As Strings ${resp.status_code} 200 + Should Contain Match ${resp} *HolmesTemplate1* + Should Contain Match ${resp} *HolmesTemplate2* + Should Not Contain Match ${resp} *HolmesTemplate99* + diff --git a/test/csit/tests/clamp/APIs/__init__.robot b/test/csit/tests/clamp/APIs/__init__.robot new file mode 100644 index 000000000..de57680c2 --- /dev/null +++ b/test/csit/tests/clamp/APIs/__init__.robot @@ -0,0 +1,2 @@ +*** Settings *** +Documentation Clamp - APIs diff --git a/test/csit/tests/clamp/APIs/data/createHolmesModel1.json b/test/csit/tests/clamp/APIs/data/createHolmesModel1.json new file mode 100644 index 000000000..10bc82cd6 --- /dev/null +++ b/test/csit/tests/clamp/APIs/data/createHolmesModel1.json @@ -0,0 +1,8 @@ +{ + "name": "HolmesModel1", + "controlNamePrefix": "ClosedLoop-", + "bpmnText": " SequenceFlow_0co4u88 SequenceFlow_0rastvv SequenceFlow_0dk7l0v SequenceFlow_0dk7l0v SequenceFlow_0e0orup SequenceFlow_0ra7ywp SequenceFlow_1luu2du SequenceFlow_0e0orup SequenceFlow_0co4u88 SequenceFlow_10lgcns SequenceFlow_0ra7ywp SequenceFlow_0rastvv SequenceFlow_10lgcns SequenceFlow_1luu2du ", + "propText": "{\"Policy_0cq8t1w\":{\"Policy1\":[{\"name\":\"pname\",\"value\":\"Policy1\"},{\"name\":\"pid\",\"value\":\"0\"},{\"name\":\"timeout\",\"value\":\"345\"},{\"policyConfigurations\":[[{\"name\":\"maxRetries\",\"value\":[\"3\"]},{\"name\":\"retryTimeLimit\",\"value\":[\"180\"]},{\"name\":\"_id\",\"value\":[\"fv24LBw\"]},{\"name\":\"parentPolicy\",\"value\":[\"\"]}]]}]},\"TCA_199ueal\":{\"tca1\":[{\"name\":\"tname\",\"value\":\"tca1\"},{\"name\":\"tuuid\",\"value\":\"66657dc2-beee-t33a-8d6a-9f0ad61b7269\"},{\"name\":\"tnfc\",\"value\":\"\"},{\"name\":\"tcaEnab\",\"value\":\"on\"},{\"name\":\"tcaPol\",\"value\":\"Policy1\"},{\"name\":\"tcaPolId\",\"value\":\"0\"},{\"name\":\"tcaInt\",\"value\":\"1\"},{\"name\":\"tcaSev\",\"value\":\"NORMAL\"},{\"name\":\"tcaVio\",\"value\":\"1\"},{\"serviceConfigurations\":[]}]},\"StringMatch_08icoyk\":{\"group1\":[{\"name\":\"rgname\",\"value\":\"1505404573310\"},{\"name\":\"rgfriendlyname\",\"value\":\"group1\"},{\"name\":\"policyName\",\"value\":\"Policy1\"},{\"name\":\"policyId\",\"value\":\"0\"},{\"serviceConfigurations\":[[{\"name\":\"aaiMatchingFields\",\"value\":[\"complex.city\",\"complex.physical-location-id\"]},{\"name\":\"aaiSendFields\",\"value\":[\"complex.city\",\"complex.physical-location-id\"]},{\"name\":\"timeWindow\",\"value\":[\"0\"]},{\"name\":\"ageLimit\",\"value\":[\"1600\"]},{\"name\":\"createClosedLoopEventId\",\"value\":[\"Initial\"]},{\"name\":\"outputEventName\",\"value\":[\"ONSET\"]},{\"stringSet\":[{},{\"name\":\"eventSeverity\",\"value\":[\"NORMAL\"]},{\"name\":\"eventSourceType\",\"value\":[\"\"]}]}]]}]},\"Collector_0ki9muk\":[{\"name\":\"topicPublishes\",\"value\":\"DCAE-COLLECTOR-UCSNMP\"}]}", + "imageText": "", + "templateName": "HolmesTemplate1" +} \ No newline at end of file diff --git a/test/csit/tests/clamp/APIs/data/createHolmesTemplate1.json b/test/csit/tests/clamp/APIs/data/createHolmesTemplate1.json new file mode 100644 index 000000000..27a044f5e --- /dev/null +++ b/test/csit/tests/clamp/APIs/data/createHolmesTemplate1.json @@ -0,0 +1,7 @@ +{ + "name": "HolmesTemplate1", + "controlNamePrefix": "ClosedLoop-", + "bpmnText": " SequenceFlow_0co4u88 SequenceFlow_0rastvv SequenceFlow_0dk7l0v SequenceFlow_0dk7l0v SequenceFlow_0e0orup SequenceFlow_0ra7ywp SequenceFlow_1luu2du SequenceFlow_0e0orup SequenceFlow_0co4u88 SequenceFlow_10lgcns SequenceFlow_0ra7ywp SequenceFlow_0rastvv SequenceFlow_10lgcns SequenceFlow_1luu2du ", + "propText": "{\"global\":[{\"name\":\"service\",\"value\":[\"tosca_definitions_version: cloudify_dsl_1_2\\r\\n\\r\\nimports:\\r\\n- http://www.getcloudify.org/spec/cloudify/3.3.1/types.yaml\\r\\n- http://135.207.127.211/1607_prod/type_files/cdap_app.yaml\\r\\n\\r\\nnode_templates:\\r\\n MTCA:\\r\\n type: dcae.nodes.cdap_app\\r\\n properties:\\r\\n service_name: \\\"cdap-mtca-central\\\"\\r\\n deployment_JSON: |-\\r\\n {\\r\\n \\\"clusterService\\\": {\\\"$ref\\\": \\\"/services/vm-cdap-cluster-central/instances/rdm2c\\\"},\\r\\n \\\"namespace\\\": \\\"MTCA\\\",\\r\\n \\\"appNames\\\": [ \\\"cdap-mtca\\\" ],\\r\\n \\\"flowNames\\\": [ \\\"cdap-mtca.TCAVESCollectorFlow\\\" ],\\r\\n \\\"workerNames\\\": [\\\"cdap-mtca.TCADMaaPMRSubscriberWorker\\\", \\\"cdap-mtca.TCADMaaPMRPublisherWorker\\\"],\\r\\n \\\"serviceNames\\\" : [],\\r\\n \\\"apps\\\": {\\r\\n \\\"cdap-mtca\\\": {\\r\\n \\\"jarFile\\\": \\\"/opt/app/cdap-apps/dcae-analytics-mtca-1.0.0.jar\\\",\\r\\n \\\"artifactName\\\": \\\"dcae-analytics-mtca\\\",\\r\\n \\\"version\\\": \\\"1.0.0\\\",\\r\\n \\\"appConfigFileContent\\\": \\\"{config:{ \\\\\\\"appName\\\\\\\":\\\\\\\"cdap-mtca\\\\\\\", \\\\\\\"appDescription\\\\\\\":\\\\\\\"DCAE Analytics Threshold Crossing Alert Application\\\\\\\", \\\\\\\"tcaSubscriberOutputStreamName\\\\\\\":\\\\\\\"TCASubscriberOutputStream\\\\\\\", \\\\\\\"thresholdCalculatorFlowletInstances\\\\\\\":2, \\\\\\\"tcaVESMessageStatusTableName\\\\\\\":\\\\\\\"TCAVESMessageStatusTable\\\\\\\", \\\\\\\"tcaVESMessageStatusTableTTLSeconds\\\\\\\":864000, \\\\\\\"tcaVESAlertsTableName\\\\\\\":\\\\\\\"TCAVESAlertsTable\\\\\\\", \\\\\\\"tcaVESAlertsTableTTLSeconds\\\\\\\":1728000 }}\\\"\\r\\n }\\r\\n },\\r\\n \\r\\n \\\"configuration\\\": {\\r\\n \\\"$class\\\": \\\"com.att.ecomp.dcae.clamp.common.MThresholdCrossingConfiguration\\\",\\r\\n \\\"subscriberContentType\\\": \\\"\\\",\\r\\n \\\"subscriberConsumerId\\\": \\\"c12\\\",\\r\\n \\\"subscriberConsumerGroup\\\": \\\"OpenDCAE-c12\\\",\\r\\n \\\"subscriberTimeoutMS\\\": \\\"-1\\\",\\r\\n \\\"subscriberMessageLimit\\\": \\\"-1\\\",\\r\\n \\\"subscriberPollingInterval\\\": \\\"20000\\\",\\r\\n \\\"publisherContentType\\\": \\\"application/json\\\",\\r\\n \\\"publisherMaxBatchSize\\\": \\\"10\\\",\\r\\n \\\"publisherMaxRecoveryQueueSize\\\": \\\"100000\\\",\\r\\n \\\"publisherPollingInterval\\\": \\\"20000\\\",\\r\\n \\\"publisherAlertWindowingTime\\\": \\\"86400\\\",\\r\\n \\\"policyName\\\": \\\"policy.dcae.configuration\\\",\\r\\n \\\"policyScope\\\": \\\"pnf=eNodeB;type=configuration\\\",\\r\\n \\\"policyVersion\\\": \\\"1.0.0\\\",\\r\\n \\\"domain\\\" : \\\"measurementsForVfScaling\\\",\\r\\n \\r\\n \\\"signatures\\\" : {\\r\\n \\t }\\r\\n\\r\\n }\\r\\n }\"]}]}", + "imageText":"PolicyHHolmesVESVesCollectorCollectorTCAStringMatch" +} \ No newline at end of file diff --git a/test/csit/tests/clamp/APIs/data/createHolmesTemplate2.json b/test/csit/tests/clamp/APIs/data/createHolmesTemplate2.json new file mode 100644 index 000000000..e267591bd --- /dev/null +++ b/test/csit/tests/clamp/APIs/data/createHolmesTemplate2.json @@ -0,0 +1,7 @@ +{ + "name": "HolmesTemplate2", + "controlNamePrefix": "ClosedLoop-", + "bpmnText": " SequenceFlow_0co4u88 SequenceFlow_0rastvv SequenceFlow_0dk7l0v SequenceFlow_0dk7l0v SequenceFlow_0e0orup SequenceFlow_0ra7ywp SequenceFlow_1luu2du SequenceFlow_0e0orup SequenceFlow_0co4u88 SequenceFlow_10lgcns SequenceFlow_0ra7ywp SequenceFlow_0rastvv SequenceFlow_10lgcns SequenceFlow_1luu2du ", + "propText": "{\"global\":[{\"name\":\"service\",\"value\":[\"tosca_definitions_version: cloudify_dsl_1_2\\r\\n\\r\\nimports:\\r\\n- http://www.getcloudify.org/spec/cloudify/3.3.1/types.yaml\\r\\n- http://135.207.127.211/1607_prod/type_files/cdap_app.yaml\\r\\n\\r\\nnode_templates:\\r\\n MTCA:\\r\\n type: dcae.nodes.cdap_app\\r\\n properties:\\r\\n service_name: \\\"cdap-mtca-central\\\"\\r\\n deployment_JSON: |-\\r\\n {\\r\\n \\\"clusterService\\\": {\\\"$ref\\\": \\\"/services/vm-cdap-cluster-central/instances/rdm2c\\\"},\\r\\n \\\"namespace\\\": \\\"MTCA\\\",\\r\\n \\\"appNames\\\": [ \\\"cdap-mtca\\\" ],\\r\\n \\\"flowNames\\\": [ \\\"cdap-mtca.TCAVESCollectorFlow\\\" ],\\r\\n \\\"workerNames\\\": [\\\"cdap-mtca.TCADMaaPMRSubscriberWorker\\\", \\\"cdap-mtca.TCADMaaPMRPublisherWorker\\\"],\\r\\n \\\"serviceNames\\\" : [],\\r\\n \\\"apps\\\": {\\r\\n \\\"cdap-mtca\\\": {\\r\\n \\\"jarFile\\\": \\\"/opt/app/cdap-apps/dcae-analytics-mtca-1.0.0.jar\\\",\\r\\n \\\"artifactName\\\": \\\"dcae-analytics-mtca\\\",\\r\\n \\\"version\\\": \\\"1.0.0\\\",\\r\\n \\\"appConfigFileContent\\\": \\\"{config:{ \\\\\\\"appName\\\\\\\":\\\\\\\"cdap-mtca\\\\\\\", \\\\\\\"appDescription\\\\\\\":\\\\\\\"DCAE Analytics Threshold Crossing Alert Application\\\\\\\", \\\\\\\"tcaSubscriberOutputStreamName\\\\\\\":\\\\\\\"TCASubscriberOutputStream\\\\\\\", \\\\\\\"thresholdCalculatorFlowletInstances\\\\\\\":2, \\\\\\\"tcaVESMessageStatusTableName\\\\\\\":\\\\\\\"TCAVESMessageStatusTable\\\\\\\", \\\\\\\"tcaVESMessageStatusTableTTLSeconds\\\\\\\":864000, \\\\\\\"tcaVESAlertsTableName\\\\\\\":\\\\\\\"TCAVESAlertsTable\\\\\\\", \\\\\\\"tcaVESAlertsTableTTLSeconds\\\\\\\":1728000 }}\\\"\\r\\n }\\r\\n },\\r\\n \\r\\n \\\"configuration\\\": {\\r\\n \\\"$class\\\": \\\"com.att.ecomp.dcae.clamp.common.MThresholdCrossingConfiguration\\\",\\r\\n \\\"subscriberContentType\\\": \\\"\\\",\\r\\n \\\"subscriberConsumerId\\\": \\\"c12\\\",\\r\\n \\\"subscriberConsumerGroup\\\": \\\"OpenDCAE-c12\\\",\\r\\n \\\"subscriberTimeoutMS\\\": \\\"-1\\\",\\r\\n \\\"subscriberMessageLimit\\\": \\\"-1\\\",\\r\\n \\\"subscriberPollingInterval\\\": \\\"20000\\\",\\r\\n \\\"publisherContentType\\\": \\\"application/json\\\",\\r\\n \\\"publisherMaxBatchSize\\\": \\\"10\\\",\\r\\n \\\"publisherMaxRecoveryQueueSize\\\": \\\"100000\\\",\\r\\n \\\"publisherPollingInterval\\\": \\\"20000\\\",\\r\\n \\\"publisherAlertWindowingTime\\\": \\\"86400\\\",\\r\\n \\\"policyName\\\": \\\"policy.dcae.configuration\\\",\\r\\n \\\"policyScope\\\": \\\"pnf=eNodeB;type=configuration\\\",\\r\\n \\\"policyVersion\\\": \\\"1.0.0\\\",\\r\\n \\\"domain\\\" : \\\"measurementsForVfScaling\\\",\\r\\n \\r\\n \\\"signatures\\\" : {\\r\\n \\t }\\r\\n\\r\\n }\\r\\n }\"]}]}", + "imageText":"PolicyHHolmesVESVesCollectorCollectorTCAStringMatch" +} \ No newline at end of file diff --git a/test/csit/tests/clamp/TCA/data/createModel1.json b/test/csit/tests/clamp/APIs/data/createTCAModel1.json similarity index 99% rename from test/csit/tests/clamp/TCA/data/createModel1.json rename to test/csit/tests/clamp/APIs/data/createTCAModel1.json index 49ff85c28..7d21771df 100644 --- a/test/csit/tests/clamp/TCA/data/createModel1.json +++ b/test/csit/tests/clamp/APIs/data/createTCAModel1.json @@ -1,8 +1,8 @@ { - "name": "Model1", + "name": "TCAModel1", "controlNamePrefix": "ClosedLoop-", "bpmnText": " SequenceFlow_0wokvsg SequenceFlow_0wokvsg SequenceFlow_0w8129u SequenceFlow_0w8129u SequenceFlow_0bdkahu SequenceFlow_0bdkahu SequenceFlow_039geog SequenceFlow_039geog ", "propText": "{\"Collector_04kan6k\":[{\"name\":\"topicPublishes\",\"value\":\"DCAE-COLLECTOR-UCSNMP\"}],\"TCA_0laok3g\":{\"New_Set\":[{\"name\":\"tname\",\"value\":\"New_Set\"},{\"name\":\"tuuid\",\"value\":\"06663292-a9ca-te93-329f-bd12accc6bd9\"},{\"name\":\"tnfc\",\"value\":\"\"},{\"name\":\"tcaEnab\",\"value\":\"on\"},{\"name\":\"tcaPolId\",\"value\":\"\"},{\"name\":\"tcaInt\",\"value\":\"1\"},{\"name\":\"tcaSev\",\"value\":\"Normal\"},{\"name\":\"tcaVio\",\"value\":\"1\"},{\"serviceConfigurations\":[]}]},\"Policy_1u1q61z\":{}}", "imageText": "", - "templateName": "template1" + "templateName": "TCATemplate1" } \ No newline at end of file diff --git a/test/csit/tests/clamp/TCA/data/createModel2.json b/test/csit/tests/clamp/APIs/data/createTCAModel2.json similarity index 99% rename from test/csit/tests/clamp/TCA/data/createModel2.json rename to test/csit/tests/clamp/APIs/data/createTCAModel2.json index 6e08bc4ad..6e26e314c 100644 --- a/test/csit/tests/clamp/TCA/data/createModel2.json +++ b/test/csit/tests/clamp/APIs/data/createTCAModel2.json @@ -1,8 +1,8 @@ { - "name": "Model2", + "name": "TCAModel2", "controlNamePrefix": "ClosedLoop-", "bpmnText": " SequenceFlow_0wokvsg SequenceFlow_0wokvsg SequenceFlow_0w8129u SequenceFlow_0w8129u SequenceFlow_0bdkahu SequenceFlow_0bdkahu SequenceFlow_039geog SequenceFlow_039geog ", "propText": "{\"Collector_04kan6k\":[{\"name\":\"topicPublishes\",\"value\":\"DCAE-COLLECTOR-UCSNMP\"}],\"TCA_0laok3g\":{\"TCA1\":[{\"name\":\"tname\",\"value\":\"TCA1\"},{\"name\":\"tuuid\",\"value\":\"22edf952-0c3f-t957-94e0-d5911e155aff\"},{\"name\":\"tnfc\",\"value\":\"\"},{\"name\":\"tcaEnab\",\"value\":\"on\"},{\"name\":\"tcaPol\",\"value\":\"Policy1\"},{\"name\":\"tcaPolId\",\"value\":\"0\"},{\"name\":\"tcaInt\",\"value\":\"1\"},{\"name\":\"tcaSev\",\"value\":\"Normal\"},{\"name\":\"tcaVio\",\"value\":\"1\"},{\"serviceConfigurations\":[]}]},\"Policy_1u1q61z\":{\"Policy1\":[{\"name\":\"pname\",\"value\":\"Policy1\"},{\"name\":\"pid\",\"value\":\"0\"},{\"name\":\"timeout\",\"value\":\"345\"},{\"policyConfigurations\":[[{\"name\":\"recipe\",\"value\":[\"migrate\"]},{\"name\":\"maxRetries\",\"value\":[\"3\"]},{\"name\":\"retryTimeLimit\",\"value\":[\"180\"]},{\"name\":\"_id\",\"value\":[\"Maw1TWE\"]},{\"name\":\"parentPolicy\",\"value\":[\"\"]}]]}]},\"global\":[{\"name\":\"service\",\"value\":[\"e27f3679-8d95-4ee1-a5a3-95a7e243306f\"]},{\"name\":\"vf\",\"value\":[\"6c7aaec2-59eb-41d9-8681-b7f976ab668d\"]},{\"name\":\"actionSet\",\"value\":[\"vnfRecipe\"]}]}", "imageText": "", - "templateName": "template1" + "templateName": "TCATemplate1" } \ No newline at end of file diff --git a/test/csit/tests/clamp/TCA/data/createTemplate1.json b/test/csit/tests/clamp/APIs/data/createTCATemplate1.json similarity index 99% rename from test/csit/tests/clamp/TCA/data/createTemplate1.json rename to test/csit/tests/clamp/APIs/data/createTCATemplate1.json index b6363ef9e..2157b9589 100644 --- a/test/csit/tests/clamp/TCA/data/createTemplate1.json +++ b/test/csit/tests/clamp/APIs/data/createTCATemplate1.json @@ -1,5 +1,5 @@ { - "name": "template1", + "name": "TCATemplate1", "controlNamePrefix": "ClosedLoop-", "bpmnText": " SequenceFlow_0wokvsg SequenceFlow_0wokvsg SequenceFlow_0w8129u SequenceFlow_0w8129u SequenceFlow_0bdkahu SequenceFlow_0bdkahu SequenceFlow_039geog SequenceFlow_039geog ", "propText": "{\"global\":[{\"name\":\"service\",\"value\":[\"tosca_definitions_version: cloudify_dsl_1_2\\r\\n\\r\\nimports:\\r\\n- http://www.getcloudify.org/spec/cloudify/3.3.1/types.yaml\\r\\n- http://127.0.0.1/1607_prod/type_files/cdap_app.yaml\\r\\n\\r\\nnode_templates:\\r\\n MTCA:\\r\\n type: dcae.nodes.cdap_app\\r\\n properties:\\r\\n service_name: \\\"cdap-mtca-central\\\"\\r\\n deployment_JSON: |-\\r\\n {\\r\\n \\\"clusterService\\\": {\\\"$ref\\\": \\\"/services/vm-cdap-cluster-central/instances/rdm2c\\\"},\\r\\n \\\"namespace\\\": \\\"MTCA\\\",\\r\\n \\\"appNames\\\": [ \\\"cdap-mtca\\\" ],\\r\\n \\\"flowNames\\\": [ \\\"cdap-mtca.TCAVESCollectorFlow\\\" ],\\r\\n \\\"workerNames\\\": [\\\"cdap-mtca.TCADMaaPMRSubscriberWorker\\\", \\\"cdap-mtca.TCADMaaPMRPublisherWorker\\\"],\\r\\n \\\"serviceNames\\\" : [],\\r\\n \\\"apps\\\": {\\r\\n \\\"cdap-mtca\\\": {\\r\\n \\\"jarFile\\\": \\\"/opt/app/cdap-apps/dcae-analytics-mtca-1.0.0.jar\\\",\\r\\n \\\"artifactName\\\": \\\"dcae-analytics-mtca\\\",\\r\\n \\\"version\\\": \\\"1.0.0\\\",\\r\\n \\\"appConfigFileContent\\\": \\\"{config:{ \\\\\\\"appName\\\\\\\":\\\\\\\"cdap-mtca\\\\\\\", \\\\\\\"appDescription\\\\\\\":\\\\\\\"DCAE Analytics Threshold Crossing Alert Application\\\\\\\", \\\\\\\"tcaSubscriberOutputStreamName\\\\\\\":\\\\\\\"TCASubscriberOutputStream\\\\\\\", \\\\\\\"thresholdCalculatorFlowletInstances\\\\\\\":2, \\\\\\\"tcaVESMessageStatusTableName\\\\\\\":\\\\\\\"TCAVESMessageStatusTable\\\\\\\", \\\\\\\"tcaVESMessageStatusTableTTLSeconds\\\\\\\":864000, \\\\\\\"tcaVESAlertsTableName\\\\\\\":\\\\\\\"TCAVESAlertsTable\\\\\\\", \\\\\\\"tcaVESAlertsTableTTLSeconds\\\\\\\":1728000 }}\\\"\\r\\n }\\r\\n },\\r\\n \\r\\n \\\"configuration\\\": {\\r\\n \\\"$class\\\": \\\"com.att.ecomp.dcae.clamp.common.MThresholdCrossingConfiguration\\\",\\r\\n \\\"subscriberContentType\\\": \\\"\\\",\\r\\n \\\"subscriberConsumerId\\\": \\\"c12\\\",\\r\\n \\\"subscriberConsumerGroup\\\": \\\"OpenDCAE-c12\\\",\\r\\n \\\"subscriberTimeoutMS\\\": \\\"-1\\\",\\r\\n \\\"subscriberMessageLimit\\\": \\\"-1\\\",\\r\\n \\\"subscriberPollingInterval\\\": \\\"20000\\\",\\r\\n \\\"publisherContentType\\\": \\\"application/json\\\",\\r\\n \\\"publisherMaxBatchSize\\\": \\\"10\\\",\\r\\n \\\"publisherMaxRecoveryQueueSize\\\": \\\"100000\\\",\\r\\n \\\"publisherPollingInterval\\\": \\\"20000\\\",\\r\\n \\\"publisherAlertWindowingTime\\\": \\\"86400\\\",\\r\\n \\\"policyName\\\": \\\"policy.dcae.configuration\\\",\\r\\n \\\"policyScope\\\": \\\"pnf=eNodeB;type=configuration\\\",\\r\\n \\\"policyVersion\\\": \\\"1.0.0\\\",\\r\\n \\\"domain\\\" : \\\"measurementsForVfScaling\\\",\\r\\n \\r\\n \\\"signatures\\\" : {\\r\\n \\t }\\r\\n\\r\\n }\\r\\n }\"]}]}", diff --git a/test/csit/tests/clamp/TCA/data/createTemplate2.json b/test/csit/tests/clamp/APIs/data/createTCATemplate2.json similarity index 99% rename from test/csit/tests/clamp/TCA/data/createTemplate2.json rename to test/csit/tests/clamp/APIs/data/createTCATemplate2.json index b246fdc26..b0cc1b6ab 100644 --- a/test/csit/tests/clamp/TCA/data/createTemplate2.json +++ b/test/csit/tests/clamp/APIs/data/createTCATemplate2.json @@ -1,5 +1,5 @@ { - "name": "template2", + "name": "TCATemplate2", "controlNamePrefix": "ClosedLoop-", "bpmnText": " SequenceFlow_0wokvsg SequenceFlow_0wokvsg SequenceFlow_0w8129u SequenceFlow_0w8129u SequenceFlow_0bdkahu SequenceFlow_0bdkahu SequenceFlow_039geog SequenceFlow_039geog ", "propText": "{\"global\":[{\"name\":\"service\",\"value\":[\"tosca_definitions_version: cloudify_dsl_1_2\\r\\n\\r\\nimports:\\r\\n- http://www.getcloudify.org/spec/cloudify/3.3.1/types.yaml\\r\\n- http://127.0.0.1/1607_prod/type_files/cdap_app.yaml\\r\\n\\r\\nnode_templates:\\r\\n MTCA:\\r\\n type: dcae.nodes.cdap_app\\r\\n properties:\\r\\n service_name: \\\"cdap-mtca-central\\\"\\r\\n deployment_JSON: |-\\r\\n {\\r\\n \\\"clusterService\\\": {\\\"$ref\\\": \\\"/services/vm-cdap-cluster-central/instances/rdm2c\\\"},\\r\\n \\\"namespace\\\": \\\"MTCA\\\",\\r\\n \\\"appNames\\\": [ \\\"cdap-mtca\\\" ],\\r\\n \\\"flowNames\\\": [ \\\"cdap-mtca.TCAVESCollectorFlow\\\" ],\\r\\n \\\"workerNames\\\": [\\\"cdap-mtca.TCADMaaPMRSubscriberWorker\\\", \\\"cdap-mtca.TCADMaaPMRPublisherWorker\\\"],\\r\\n \\\"serviceNames\\\" : [],\\r\\n \\\"apps\\\": {\\r\\n \\\"cdap-mtca\\\": {\\r\\n \\\"jarFile\\\": \\\"/opt/app/cdap-apps/dcae-analytics-mtca-1.0.0.jar\\\",\\r\\n \\\"artifactName\\\": \\\"dcae-analytics-mtca\\\",\\r\\n \\\"version\\\": \\\"1.0.0\\\",\\r\\n \\\"appConfigFileContent\\\": \\\"{config:{ \\\\\\\"appName\\\\\\\":\\\\\\\"cdap-mtca\\\\\\\", \\\\\\\"appDescription\\\\\\\":\\\\\\\"DCAE Analytics Threshold Crossing Alert Application\\\\\\\", \\\\\\\"tcaSubscriberOutputStreamName\\\\\\\":\\\\\\\"TCASubscriberOutputStream\\\\\\\", \\\\\\\"thresholdCalculatorFlowletInstances\\\\\\\":2, \\\\\\\"tcaVESMessageStatusTableName\\\\\\\":\\\\\\\"TCAVESMessageStatusTable\\\\\\\", \\\\\\\"tcaVESMessageStatusTableTTLSeconds\\\\\\\":864000, \\\\\\\"tcaVESAlertsTableName\\\\\\\":\\\\\\\"TCAVESAlertsTable\\\\\\\", \\\\\\\"tcaVESAlertsTableTTLSeconds\\\\\\\":1728000 }}\\\"\\r\\n }\\r\\n },\\r\\n \\r\\n \\\"configuration\\\": {\\r\\n \\\"$class\\\": \\\"com.att.ecomp.dcae.clamp.common.MThresholdCrossingConfiguration\\\",\\r\\n \\\"subscriberContentType\\\": \\\"\\\",\\r\\n \\\"subscriberConsumerId\\\": \\\"c12\\\",\\r\\n \\\"subscriberConsumerGroup\\\": \\\"OpenDCAE-c12\\\",\\r\\n \\\"subscriberTimeoutMS\\\": \\\"-1\\\",\\r\\n \\\"subscriberMessageLimit\\\": \\\"-1\\\",\\r\\n \\\"subscriberPollingInterval\\\": \\\"20000\\\",\\r\\n \\\"publisherContentType\\\": \\\"application/json\\\",\\r\\n \\\"publisherMaxBatchSize\\\": \\\"10\\\",\\r\\n \\\"publisherMaxRecoveryQueueSize\\\": \\\"100000\\\",\\r\\n \\\"publisherPollingInterval\\\": \\\"20000\\\",\\r\\n \\\"publisherAlertWindowingTime\\\": \\\"86400\\\",\\r\\n \\\"policyName\\\": \\\"policy.dcae.configuration\\\",\\r\\n \\\"policyScope\\\": \\\"pnf=eNodeB;type=configuration\\\",\\r\\n \\\"policyVersion\\\": \\\"1.0.0\\\",\\r\\n \\\"domain\\\" : \\\"measurementsForVfScaling\\\",\\r\\n \\r\\n \\\"signatures\\\" : {\\r\\n \\t }\\r\\n\\r\\n }\\r\\n }\"]}]}", diff --git a/test/csit/tests/clamp/TCA/__init__.robot b/test/csit/tests/clamp/TCA/__init__.robot deleted file mode 100644 index 5da0c75fa..000000000 --- a/test/csit/tests/clamp/TCA/__init__.robot +++ /dev/null @@ -1,2 +0,0 @@ -*** Settings *** -Documentation Clamp - TCA diff --git a/test/csit/tests/clamp/UIs/01__Create_template.robot b/test/csit/tests/clamp/UIs/01__Create_TCA_template.robot similarity index 98% rename from test/csit/tests/clamp/UIs/01__Create_template.robot rename to test/csit/tests/clamp/UIs/01__Create_TCA_template.robot index d740ac987..447fc8465 100644 --- a/test/csit/tests/clamp/UIs/01__Create_template.robot +++ b/test/csit/tests/clamp/UIs/01__Create_TCA_template.robot @@ -41,7 +41,7 @@ Create Template from Menu Click Element xpath=//*[@id="navbar"]/ul/li[1]/a Wait Until Element Is Visible locator=Create Template timeout=60 Click Element locator=Create Template - Input Text locator=modelName text=template + Input Text locator=modelName text=TCATemplate Click Button locator=OK Drag and Drop Boxes for template diff --git a/test/csit/tests/clamp/UIs/02__Create_model.robot b/test/csit/tests/clamp/UIs/02__Create_TCA_model.robot similarity index 89% rename from test/csit/tests/clamp/UIs/02__Create_model.robot rename to test/csit/tests/clamp/UIs/02__Create_TCA_model.robot index 979a9802e..9f287cac7 100644 --- a/test/csit/tests/clamp/UIs/02__Create_model.robot +++ b/test/csit/tests/clamp/UIs/02__Create_TCA_model.robot @@ -34,10 +34,12 @@ Create Model from Menu Click Element xpath=//*[@id="navbar"]/ul/li[2]/a Wait Until Element Is Visible locator=Create CL timeout=60 Click Element locator=Create CL - Input Text locator=modelName text=model1 + Input Text locator=modelName text=TCAModel + Select From List By Label id=templateName TCATemplate Click Button locator=Create Save Model from Menu + 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=Save CL timeout=60 Click Element locator=Save CL