From bc25b72025a7b92c2b1bb7a3f0cfcd9ddedba001 Mon Sep 17 00:00:00 2001 From: xg353y Date: Wed, 27 Sep 2017 13:21:21 +0200 Subject: Code Improvement Change-Id: I703aabf234cb656b1faea3b5c0776d034d8ec807 Signed-off-by: xg353y Issue-ID: CLAMP-54 --- src/test/resources/example/dao/bpmn-template.xml | 20 +- src/test/resources/example/dao/image-template.xml | 42 --- .../example/model-properties/modelBpmn.json | 14 +- .../example/model-properties/modelBpmnProp.json | 86 ----- .../model-properties/modelBpmnPropWithGlobal.json | 77 ---- src/test/resources/example/modelBpmnProp.json | 24 +- .../resources/example/modelBpmnPropForPolicy.json | 13 +- src/test/resources/example/modelProp.json | 392 +++------------------ src/test/resources/example/sdc/sdcVFResources.json | 2 +- src/test/resources/example/templateProp.json | 10 - .../resources/example/xsl-validation/modelBpmn.xml | 23 +- .../example/xsl-validation/modelBpmnForVerif.json | 14 +- 12 files changed, 54 insertions(+), 663 deletions(-) delete mode 100644 src/test/resources/example/templateProp.json (limited to 'src/test/resources/example') diff --git a/src/test/resources/example/dao/bpmn-template.xml b/src/test/resources/example/dao/bpmn-template.xml index 5aa133ac..12671ac9 100644 --- a/src/test/resources/example/dao/bpmn-template.xml +++ b/src/test/resources/example/dao/bpmn-template.xml @@ -4,16 +4,8 @@ SequenceFlow_0mshiwd - - SequenceFlow_0mshiwd - SequenceFlow_0z37chw - - - SequenceFlow_0z37chw - SequenceFlow_1io8zzg - - SequenceFlow_1io8zzg + SequenceFlow_0mshiwd SequenceFlow_0yenh9m @@ -31,9 +23,7 @@ SequenceFlow_1q2yngv - - - + @@ -44,12 +34,6 @@ - - - - - - diff --git a/src/test/resources/example/dao/image-template.xml b/src/test/resources/example/dao/image-template.xml index d7af2aa6..fe0af067 100644 --- a/src/test/resources/example/dao/image-template.xml +++ b/src/test/resources/example/dao/image-template.xml @@ -69,48 +69,6 @@ class="djs-hit"> - - - - - - - - - Collector - - - - - - - - - - - - - StringMatch - - - - - diff --git a/src/test/resources/example/model-properties/modelBpmn.json b/src/test/resources/example/model-properties/modelBpmn.json index 823641c7..8f7b8e61 100644 --- a/src/test/resources/example/model-properties/modelBpmn.json +++ b/src/test/resources/example/model-properties/modelBpmn.json @@ -1,16 +1,4 @@ { - "collector": [ - { - "id": "Collector_1c72ct5", - "from": "StartEvent_1" - } - ], - "stringMatch": [ - { - "id": "StringMatch_05arstl", - "from": "Collector_1c72ct5" - } - ], "policy": [ { "id": "Policy_0honxgv", @@ -32,7 +20,7 @@ "vesCollector": [ { "id": "VesCollector_0orydnh", - "from": "StringMatch_05arstl" + "from": "StartEvent_1" } ] } diff --git a/src/test/resources/example/model-properties/modelBpmnProp.json b/src/test/resources/example/model-properties/modelBpmnProp.json index 3b86ad79..a521ba7d 100644 --- a/src/test/resources/example/model-properties/modelBpmnProp.json +++ b/src/test/resources/example/model-properties/modelBpmnProp.json @@ -1,90 +1,4 @@ { - "Collector_1c72ct5": [ - { - "name": "topicPublishes", - "value": "DCAE-COLLECTOR-UCSNMP" - } - ], - "StringMatch_05arstl": { - "group1": [ - { - "name": "rgname", - "value": "1505133578560" - }, - { - "name": "rgfriendlyname", - "value": "group1" - }, - { - "name": "policyName", - "value": "policy1" - }, - { - "name": "policyId", - "value": "0" - }, - { - "serviceConfigurations": [ - [ - { - "name": "aaiMatchingFields", - "value": [ - "complex.city" - ] - }, - { - "name": "aaiSendFields", - "value": [ - "cloud-region.identity-url" - ] - }, - { - "name": "timeWindow", - "value": [ - "0" - ] - }, - { - "name": "ageLimit", - "value": [ - "1600" - ] - }, - { - "name": "createClosedLoopEventId", - "value": [ - "Initial" - ] - }, - { - "name": "outputEventName", - "value": [ - "" - ] - }, - { - "stringSet": [ - { - }, - { - "name": "eventSeverity", - "value": [ - "NORMAL" - ] - }, - { - "name": "eventSourceType", - "value": [ - "" - ] - } - ] - } - ] - ] - } - ] - }, "Policy_0honxgv": { "policy1": [ { diff --git a/src/test/resources/example/model-properties/modelBpmnPropWithGlobal.json b/src/test/resources/example/model-properties/modelBpmnPropWithGlobal.json index fba99c6f..3030adfb 100644 --- a/src/test/resources/example/model-properties/modelBpmnPropWithGlobal.json +++ b/src/test/resources/example/model-properties/modelBpmnPropWithGlobal.json @@ -1,81 +1,4 @@ { - "collector": { - "topicPublishes": { - "DCAE-COLLECTOR-UCSNMP": "DCAE-COLLECTOR-UCSNMP", - "GFP-IP-AIC-SNMP-TRAPS": "GFP-IP-AIC-SNMP-TRAPS", - "AIC-SNMP-TRAPS": "AIC-SNMP-TRAPS" - } - }, - "string_match": { - "topicPublishes": { - "DCAE-CL-EVENT": "DCAE-CL-EVENT" - }, - "aaiMatchingFields": { - "cloud-region.identity-url": "cloud-region.identity-url", - "complex.city": "complex.city", - "complex.physical-location-id": "complex.physical-location-id", - "complex.state": "complex.state", - "generic-vnf.service-id": "generic-vnf.service-id", - "generic-vnf.vnf-name": "generic-vnf.vnf-name", - "generic-vnf.vnf-type": "generic-vnf.vnf-type", - "tenant.tenant-id": "tenant.tenant-id", - "vserver.in-maint": "vserver.in-maint", - "vserver.is-closed-loop-disabled": "vserver.is-closed-loop-disabled", - "vserver.l-interface.interface-name": "vserver.l-interface.interface-name", - "vserver.l-interface.l3-interface-ipv4-address-list.l3-inteface-ipv4-address": "vserver.l-interface.l3-interface-ipv4-address-list.l3-inteface-ipv4-address", - "vserver.l-interface.l3-interface-ipv6-address-list.l3-inteface-ipv6-address": "vserver.l-interface.l3-interface-ipv6-address-list.l3-inteface-ipv6-address", - "vserver.l-interface.network-name": "vserver.l-interface.network-name", - "vserver.prov-status": "vserver.prov-status", - "vserver.selflink": "vserver.selflink", - "vserver.vserver-id": "vserver.vserver-id", - "vserver.vserver-name": "vserver.vserver-name" - }, - "aaiSendFields": { - "cloud-region.identity-url": "cloud-region.identity-url", - "complex.city": "complex.city", - "complex.physical-location-id": "complex.physical-location-id", - "complex.state": "complex.state", - "generic-vnf.service-id": "generic-vnf.service-id", - "generic-vnf.vnf-name": "generic-vnf.vnf-name", - "generic-vnf.vnf-type": "generic-vnf.vnf-type", - "tenant.tenant-id": "tenant.tenant-id", - "vserver.in-maint": "vserver.in-maint", - "vserver.is-closed-loop-disabled": "vserver.is-closed-loop-disabled", - "vserver.l-interface.interface-name": "vserver.l-interface.interface-name", - "vserver.l-interface.l3-interface-ipv4-address-list.l3-inteface-ipv4-address": "vserver.l-interface.l3-interface-ipv4-address-list.l3-inteface-ipv4-address", - "vserver.l-interface.l3-interface-ipv6-address-list.l3-inteface-ipv6-address": "vserver.l-interface.l3-interface-ipv6-address-list.l3-inteface-ipv6-address", - "vserver.l-interface.network-name": "vserver.l-interface.network-name", - "vserver.prov-status": "vserver.prov-status", - "vserver.selflink": "vserver.selflink", - "vserver.vserver-id": "vserver.vserver-id", - "vserver.vserver-name": "vserver.vserver-name" - }, - "eventSourceType": { - "f5BigIP": "f5BigIP", - "vSBG_Alarms": "vSBG_Alarms", - "vCTS_Alarms": "vCTS_Alarms" - }, - "eventSeverity": { - "NORMAL": "NORMAL", - "not-NORMAL": "not-NORMAL", - "OK": "OK", - "WARNING": "WARNING", - "MINOR": "MINOR", - "MAJOR": "MAJOR", - "CRITICAL": "CRITICAL" - }, - "timeWindow": 0, - "ageLimit": 1600, - "outputEventName": { - "": "", - "ONSET": "ONSET", - "ABATED": "ABATED" - }, - "createClosedLoopEventId": { - "Initial": "Initial", - "Close": "Close" - } - }, "tca": { "tname": "New_Set", "tcaInt": "1", diff --git a/src/test/resources/example/modelBpmnProp.json b/src/test/resources/example/modelBpmnProp.json index 26fd884d..c8efff87 100644 --- a/src/test/resources/example/modelBpmnProp.json +++ b/src/test/resources/example/modelBpmnProp.json @@ -1,29 +1,13 @@ { - "collector": - [ - { - "id": "Collector_", - "from": "StartEvent_1" - } - ], - - "stringMatch": - [ - { - "id": "StringMatch_", - "from": "Collector_" - } - ], - - "policy": + "policy": [ { "id": "Policy_", - "from": "StringMatch_" + "from": "StartEvent_1" } ], - "tca": + "tca": [ { "id": "TCA_", @@ -31,7 +15,7 @@ } ], - "customType": + "customType": [ { "id": "CustomType_", diff --git a/src/test/resources/example/modelBpmnPropForPolicy.json b/src/test/resources/example/modelBpmnPropForPolicy.json index 243f7e80..de643a69 100644 --- a/src/test/resources/example/modelBpmnPropForPolicy.json +++ b/src/test/resources/example/modelBpmnPropForPolicy.json @@ -1,14 +1,5 @@ { - "collector": - [ - - ], - "stringMatch": - [ - - ], - - "policy": + "policy": [ { "id": "Policy_", @@ -16,7 +7,7 @@ } ], - "tca": + "tca": [ { "id": "TCA_", diff --git a/src/test/resources/example/modelProp.json b/src/test/resources/example/modelProp.json index c2262f52..99f67b62 100644 --- a/src/test/resources/example/modelProp.json +++ b/src/test/resources/example/modelProp.json @@ -1,17 +1,9 @@ { - "Collector_": - [ - { - "name": "topicPublishes", - "value": "DCAE-COLLECTOR-UCSNMP" - } - ], - - "global": + "global": [ { "name": "service", - "value": + "value": [ "0f983e18-4603-4bb4-a98c-e29691fb16a1" ] @@ -19,7 +11,7 @@ { "name": "vf", - "value": + "value": [ "6c7aaec2-59eb-41d9-8681-b7f976ab668d" ] @@ -27,7 +19,7 @@ { "name": "actionSet", - "value": + "value": [ "enbRecipe" ] @@ -35,318 +27,16 @@ { "name": "location", - "value": + "value": [ "SNDGCA64" ] } ], - "StringMatch_": - { - "Group1": - [ - { - "name": "rgname", - "value": "1493749598520" - }, - - { - "name": "rgfriendlyname", - "value": "Group1" - }, - - { - "name": "policyName", - "value": "Policy1" - }, - - { - "name": "policyId", - "value": "1" - }, - - { - "serviceConfigurations": - [ - [ - { - "name": "aaiMatchingFields", - "value": - [ - "complex.city", - "vserver.vserver-name" - ] - }, - - { - "name": "aaiSendFields", - "value": - [ - "complex.city", - "vserver.vserver-name" - ] - }, - - { - "name": "timeWindow", - "value": - [ - "100" - ] - }, - - { - "name": "ageLimit", - "value": - [ - "100" - ] - }, - - { - "name": "createClosedLoopEventId", - "value": - [ - "Initial" - ] - }, - - { - "name": "outputEventName", - "value": - [ - "ONSET" - ] - }, - - { - "stringSet": - [ - { - "name": "alarmCondition", - "value": - [ - "Reports a transient alarm condition when an outgoing Ro message send fails" - ] - }, - - { - "name": "eventSeverity", - "value": - [ - "WARNING" - ] - }, - - { - "name": "eventSourceType", - "value": - [ - "f5BigIP" - ] - } - ] - } - ] - ] - } - ], - - "Group2": - [ - { - "name": "rgname", - "value": "1493749665149" - }, - - { - "name": "rgfriendlyname", - "value": "Group2" - }, - - { - "name": "policyName", - "value": "Policy2" - }, - - { - "name": "policyId", - "value": "2" - }, - - { - "serviceConfigurations": - [ - [ - { - "name": "aaiMatchingFields", - "value": - [ - "cloud-region.identity-url", - "vserver.vserver-name" - ] - }, - - { - "name": "aaiSendFields", - "value": - [ - "cloud-region.identity-url", - "vserver.vserver-name" - ] - }, - - { - "name": "timeWindow", - "value": - [ - "1000" - ] - }, - - { - "name": "ageLimit", - "value": - [ - "1000" - ] - }, - - { - "name": "createClosedLoopEventId", - "value": - [ - "Initial" - ] - }, - - { - "name": "outputEventName", - "value": - [ - "ONSET" - ] - }, - - { - "stringSet": - [ - { - "name": "alarmCondition", - "value": - [ - "LSS_asdaCommunicationFailure" - ] - }, - - { - "name": "eventSeverity", - "value": - [ - "WARNING" - ] - }, - - { - "name": "eventSourceType", - "value": - [ - "f5BigIP" - ] - } - ] - } - ], - - [ - { - "name": "aaiMatchingFields", - "value": - [ - "generic-vnf.vnf-name", - "vserver.vserver-name" - ] - }, - - { - "name": "aaiSendFields", - "value": - [ - "generic-vnf.vnf-name", - "vserver.vserver-name" - ] - }, - - { - "name": "timeWindow", - "value": - [ - "3000" - ] - }, - - { - "name": "ageLimit", - "value": - [ - "3000" - ] - }, - - { - "name": "createClosedLoopEventId", - "value": - [ - "Initial" - ] - }, - - { - "name": "outputEventName", - "value": - [ - "ABATED" - ] - }, - - { - "stringSet": - [ - { - "name": "alarmCondition", - "value": - [ - "LSS_asdaCommunicationFailure" - ] - }, - - { - "name": "eventSeverity", - "value": - [ - "MAJOR" - ] - }, - - { - "name": "eventSourceType", - "value": - [ - "f5BigIP" - ] - } - ] - } - ] - ] - } - ] - }, - - "Policy_": + "Policy_": { - "Policy1": + "Policy1": [ { "name": "pname", @@ -364,12 +54,12 @@ }, { - "policyConfigurations": + "policyConfigurations": [ [ { "name": "recipe", - "value": + "value": [ "restart" ] @@ -377,7 +67,7 @@ { "name": "maxRetries", - "value": + "value": [ "3" ] @@ -385,7 +75,7 @@ { "name": "retryTimeLimit", - "value": + "value": [ "180" ] @@ -393,7 +83,7 @@ { "name": "_id", - "value": + "value": [ "n9bQ4t6" ] @@ -401,14 +91,14 @@ { "name": "parentPolicy", - "value": + "value": [ "" ] }, { "name": "targetResourceId", - "value": + "value": [ "resource-id" ] @@ -418,7 +108,7 @@ [ { "name": "recipe", - "value": + "value": [ "rebuild" ] @@ -426,7 +116,7 @@ { "name": "maxRetries", - "value": + "value": [ "3" ] @@ -434,7 +124,7 @@ { "name": "retryTimeLimit", - "value": + "value": [ "180" ] @@ -442,7 +132,7 @@ { "name": "_id", - "value": + "value": [ "ItE5xKT" ] @@ -450,7 +140,7 @@ { "name": "parentPolicy", - "value": + "value": [ "n9bQ4t6" ] @@ -458,7 +148,7 @@ { "name": "parentPolicyConditions", - "value": + "value": [ "Failure_Retries", "Failure_Timeout", @@ -468,7 +158,7 @@ }, { "name": "targetResourceId", - "value": + "value": [ "resource-id" ] @@ -478,7 +168,7 @@ } ], - "Policy2": + "Policy2": [ { "name": "pname", @@ -496,12 +186,12 @@ }, { - "policyConfigurations": + "policyConfigurations": [ [ { "name": "recipe", - "value": + "value": [ "restart" ] @@ -509,7 +199,7 @@ { "name": "maxRetries", - "value": + "value": [ "3" ] @@ -517,7 +207,7 @@ { "name": "retryTimeLimit", - "value": + "value": [ "180" ] @@ -525,7 +215,7 @@ { "name": "_id", - "value": + "value": [ "n9bQ4t6" ] @@ -533,14 +223,14 @@ { "name": "parentPolicy", - "value": + "value": [ "" ] }, { "name": "targetResourceId", - "value": + "value": [ "resource-id" ] @@ -550,7 +240,7 @@ [ { "name": "recipe", - "value": + "value": [ "rebuild" ] @@ -558,7 +248,7 @@ { "name": "maxRetries", - "value": + "value": [ "3" ] @@ -566,7 +256,7 @@ { "name": "retryTimeLimit", - "value": + "value": [ "180" ] @@ -574,7 +264,7 @@ { "name": "_id", - "value": + "value": [ "ItE5xKT" ] @@ -582,7 +272,7 @@ { "name": "parentPolicy", - "value": + "value": [ "n9bQ4t6" ] @@ -590,7 +280,7 @@ { "name": "parentPolicyConditions", - "value": + "value": [ "Failure_Retries", "Failure_Timeout", @@ -600,7 +290,7 @@ }, { "name": "targetResourceId", - "value": + "value": [ "resource-id" ] @@ -611,9 +301,9 @@ ] }, - "TCA_": + "TCA_": { - "Narra": + "Narra": [ { "name": "tname", @@ -661,7 +351,7 @@ }, { - "serviceConfigurations": + "serviceConfigurations": [ [ "PMRRCCONNESTABFAILCELLLATENCY", @@ -680,7 +370,7 @@ } ], - "Srini": + "Srini": [ { "name": "tname", @@ -728,7 +418,7 @@ }, { - "serviceConfigurations": + "serviceConfigurations": [ [ "PMRRCCONNESTABFAILCELLLATENCY", diff --git a/src/test/resources/example/sdc/sdcVFResources.json b/src/test/resources/example/sdc/sdcVFResources.json index a8f32195..62c58bee 100644 --- a/src/test/resources/example/sdc/sdcVFResources.json +++ b/src/test/resources/example/sdc/sdcVFResources.json @@ -197,7 +197,7 @@ { "uuid": "10b535db-b01b-4a4b-aeef-97423d2d2093", "invariantUUID": "761ed279-e5ff-43e2-8a05-b160224b7f54", - "name": "StringMatchingMS", + "name": "TcaMS", "version": "0.1", "toscaModelURL": "/sdc/v1/catalog/resources/10b535db-b01b-4a4b-aeef-97423d2d2093/toscaModel", "category": "DCAE Component", diff --git a/src/test/resources/example/templateProp.json b/src/test/resources/example/templateProp.json deleted file mode 100644 index bbbfca59..00000000 --- a/src/test/resources/example/templateProp.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "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 SM:\r\n type: dcae.nodes.cdap_app\r\n properties:\r\n service_name: \"cdap-string-matching\"\r\n deployment_JSON: |-\r\n {\r\n \"clusterService\": {\"$ref\": \"\/services\/vm-cdap-cluster-central\/instances\/rdm2-central\"},\r\n \"$class\": \"com.att.ecomp.dcae.controller.service.cdap.CdapServiceInstance\",\r\n \"namespace\": \"<%= dcae_target_name %>\",\r\n \"appNames\": [ \"SM\" ],\r\n \"flowNames\": [ \"SM.SimpleFlow\" ],\r\n \"apps\": {\r\n \"SM\": {\r\n \"jarFile\": \"\/opt\/app\/dcae-analytics-closed-loop-stringmatching-jars\/lib\/CdapClosedLoopSnmpTrapStringMatcher-0.1.jar\",\r\n \"artifactName\": \"CdapClosedLoopSnmpTrapStringMatcher\",\r\n \"version\": \"0.1\"\r\n }\r\n },\r\n \r\n \"configuration\": {\r\n \"$class\": \"com.att.ecomp.dcae.clamp.common.StringMatchingConfiguration\",\r\n \"messageReaderConsumerID\":\"4699\",\r\n \"messageReaderConsumerGroup\": \"<%= dcae_target_name %>\",\r\n \"aaiURL\": \"http:\/\/REPLACE_THIS_WITH_IP_PORT_FROM_BOOTED_DOCKER\/tenant\/\",\r\n \"closedLoopEventClient\": \"configuration.dcae.microservice.stringmatcher.xml\",\r\n \"dcae_target_name\": \"<%= dcae_target_name %>\",\r\n \"dcae_target_type\": \"VM\",\r\n \r\n \"serviceConfigurations\": {}\r\n }\r\n }}}" - ] - } - ] -} diff --git a/src/test/resources/example/xsl-validation/modelBpmn.xml b/src/test/resources/example/xsl-validation/modelBpmn.xml index 3021902c..d80c89e3 100644 --- a/src/test/resources/example/xsl-validation/modelBpmn.xml +++ b/src/test/resources/example/xsl-validation/modelBpmn.xml @@ -7,18 +7,10 @@ SequenceFlow_1nvvr00 - - SequenceFlow_0qf2552 - SequenceFlow_1a2oxpd - SequenceFlow_0jeu0gv SequenceFlow_15gkgs5 - - SequenceFlow_1nvvr00 - SequenceFlow_0qf2552 - SequenceFlow_15gkgs5 SequenceFlow_0ev75ss @@ -31,15 +23,11 @@ SequenceFlow_103hvmr - SequenceFlow_1a2oxpd + SequenceFlow_1nvvr00 SequenceFlow_0jeu0gv - - + sourceRef="StartEvent_1" targetRef="Holmes_1fzdqp9" /> - - - - - - diff --git a/src/test/resources/example/xsl-validation/modelBpmnForVerif.json b/src/test/resources/example/xsl-validation/modelBpmnForVerif.json index 40afe179..567a69db 100644 --- a/src/test/resources/example/xsl-validation/modelBpmnForVerif.json +++ b/src/test/resources/example/xsl-validation/modelBpmnForVerif.json @@ -1,16 +1,4 @@ { - "collector": [ - { - "id": "Collector_", - "from": "StartEvent_1" - } - ], - "stringMatch": [ - { - "id": "StringMatch_0tw2y4f", - "from": "Collector_" - } - ], "policy": [ { "id": "Policy_", @@ -32,7 +20,7 @@ "holmes": [ { "id": "Holmes_1fzdqp9", - "from": "StringMatch_0tw2y4f" + "from": "StartEvent_1" } ] } -- cgit 1.2.3-korg