aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/templates
diff options
context:
space:
mode:
authorJorge Hernandez <jh1730@att.com>2017-08-30 06:25:18 -0500
committerJorge Hernandez <jh1730@att.com>2017-08-30 06:25:18 -0500
commit3cc999671adbaccb179b4a260c2b6b6faa913080 (patch)
tree7a7c6783ce54a3953b992e56c70e53088fc31fd9 /controlloop/templates
parent85fb00b9a31ad2695be24f95fd71109f6e59dacb (diff)
legacy archetype simplification
removes pom warnings on versionn duplication from parent pom. Change-Id: I7b218d6d72bf4db2692370ecc637dbd74e96290f Issue-ID: POLICY-162 Signed-off-by: Jorge Hernandez <jh1730@att.com>
Diffstat (limited to 'controlloop/templates')
-rw-r--r--controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/main/resources/META-INF/maven/archetype-metadata.xml13
-rw-r--r--controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/main/resources/archetype-resources/src/main/config/__artifactId__-controller.properties22
-rw-r--r--controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/main/resources/archetype-resources/src/main/config/__artifactId__-controller.rest.json14
-rw-r--r--controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/main/resources/archetype-resources/src/main/config/dcae.onset.json2
-rw-r--r--controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/main/resources/archetype-resources/src/main/resources/__controlLoopName__.drl (renamed from controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/main/resources/archetype-resources/src/main/resources/ControlLoopDemo__closedLoopControlName__.drl)20
-rw-r--r--controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/test/resources/projects/basic/archetype.properties13
6 files changed, 31 insertions, 53 deletions
diff --git a/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/main/resources/META-INF/maven/archetype-metadata.xml b/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/main/resources/META-INF/maven/archetype-metadata.xml
index a0b5506fc..44990c536 100644
--- a/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/main/resources/META-INF/maven/archetype-metadata.xml
+++ b/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -25,7 +25,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<requiredProperties>
- <requiredProperty key="closedLoopControlName"></requiredProperty>
+ <requiredProperty key="controlLoopName"></requiredProperty>
<requiredProperty key="policyScope"></requiredProperty>
<requiredProperty key="policyName"></requiredProperty>
<requiredProperty key="policyVersion"></requiredProperty>
@@ -37,19 +37,12 @@
<requiredProperty key="aaiPatternMatch"></requiredProperty>
<requiredProperty key="msoURL"></requiredProperty>
<requiredProperty key="msoUsername"></requiredProperty>
- <requiredProperty key="msoPassword"></requiredProperty>
+ <requiredProperty key="msoPassword"></requiredProperty>
+ <requiredProperty key="dmaapServers"></requiredProperty>
<requiredProperty key="appcTopic"></requiredProperty>
- <requiredProperty key="appcServers"></requiredProperty>
- <requiredProperty key="appcApiKey"></requiredProperty>
- <requiredProperty key="appcApiSecret"></requiredProperty>
<requiredProperty key="notificationTopic"></requiredProperty>
- <requiredProperty key="notificationServers"></requiredProperty>
- <requiredProperty key="notificationApiKey"></requiredProperty>
- <requiredProperty key="notificationApiSecret"></requiredProperty>
<requiredProperty key="dcaeTopic"></requiredProperty>
<requiredProperty key="dcaeServers"></requiredProperty>
- <requiredProperty key="dcaeApiKey"></requiredProperty>
- <requiredProperty key="dcaeApiSecret"></requiredProperty>
<requiredProperty key="dependenciesVersion"></requiredProperty>
</requiredProperties>
diff --git a/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/main/resources/archetype-resources/src/main/config/__artifactId__-controller.properties b/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/main/resources/archetype-resources/src/main/config/__artifactId__-controller.properties
index 712bc2946..798d480c6 100644
--- a/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/main/resources/archetype-resources/src/main/config/__artifactId__-controller.properties
+++ b/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/main/resources/archetype-resources/src/main/config/__artifactId__-controller.properties
@@ -23,30 +23,30 @@ controller.name=${artifactId}
ueb.source.topics=${dcaeTopic},${appcTopic}
ueb.source.topics.${dcaeTopic}.servers=${dcaeServers}
-ueb.source.topics.${dcaeTopic}.apiKey=${dcaeApiKey}
-ueb.source.topics.${dcaeTopic}.apiSecret=${dcaeApiSecret}
+ueb.source.topics.${dcaeTopic}.apiKey=
+ueb.source.topics.${dcaeTopic}.apiSecret=
ueb.source.topics.${dcaeTopic}.events=org.onap.policy.controlloop.VirtualControlLoopEvent
ueb.source.topics.${dcaeTopic}.events.org.onap.policy.controlloop.VirtualControlLoopEvent.filter=closedLoopEventStatus=.*
ueb.source.topics.${dcaeTopic}.events.custom.gson=org.onap.policy.controlloop.util.Serialization,gsonPretty
-ueb.source.topics.${appcTopic}.servers=${appcServers}
-ueb.source.topics.${appcTopic}.apiKey=${appcApiKey}
-ueb.source.topics.${appcTopic}.apiSecret=${appcApiSecret}
+ueb.source.topics.${appcTopic}.servers=${dmaapServers}
+ueb.source.topics.${appcTopic}.apiKey=
+ueb.source.topics.${appcTopic}.apiSecret=
ueb.source.topics.${appcTopic}.events=org.onap.policy.appc.Response
ueb.source.topics.${appcTopic}.events.org.onap.policy.appc.Response.filter=CommonHeader=.*,Status=.*
ueb.source.topics.${appcTopic}.events.custom.gson=org.onap.policy.appc.util.Serialization,gsonPretty
ueb.sink.topics=${appcTopic},${notificationTopic}
-ueb.sink.topics.${appcTopic}.servers=${appcServers}
-ueb.sink.topics.${appcTopic}.apiKey=${appcApiKey}
-ueb.sink.topics.${appcTopic}.apiSecret=${appcApiSecret}
+ueb.sink.topics.${appcTopic}.servers=${dmaapServers}
+ueb.sink.topics.${appcTopic}.apiKey=
+ueb.sink.topics.${appcTopic}.apiSecret=
ueb.sink.topics.${appcTopic}.events=org.onap.policy.appc.Request
ueb.sink.topics.${appcTopic}.events.custom.gson=org.onap.policy.appc.util.Serialization,gsonPretty
-ueb.sink.topics.${notificationTopic}.servers=${notificationServers}
-ueb.sink.topics.${notificationTopic}.apiKey=${notificationApiKey}
-ueb.sink.topics.${notificationTopic}.apiSecret=${notificationApiSecret}
+ueb.sink.topics.${notificationTopic}.servers=${dmaapServers}
+ueb.sink.topics.${notificationTopic}.apiKey=
+ueb.sink.topics.${notificationTopic}.apiSecret=
ueb.sink.topics.${notificationTopic}.events=org.onap.policy.controlloop.VirtualControlLoopNotification
ueb.sink.topics.${notificationTopic}.events.custom.gson=org.onap.policy.controlloop.util.Serialization,gsonPretty
diff --git a/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/main/resources/archetype-resources/src/main/config/__artifactId__-controller.rest.json b/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/main/resources/archetype-resources/src/main/config/__artifactId__-controller.rest.json
index 712cf7034..df1feb781 100644
--- a/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/main/resources/archetype-resources/src/main/config/__artifactId__-controller.rest.json
+++ b/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/main/resources/archetype-resources/src/main/config/__artifactId__-controller.rest.json
@@ -4,30 +4,22 @@
"ueb.source.topics": "${dcaeTopic},${appcTopic}",
"ueb.source.topics.${dcaeTopic}.servers": "${dcaeServers}",
- "ueb.source.topics.${dcaeTopic}.apiKey": "${dcaeApiKey}",
- "ueb.source.topics.${dcaeTopic}.apiSecret": "${dcaeApiSecret}",
"ueb.source.topics.${dcaeTopic}.events": "org.onap.policy.controlloop.VirtualControlLoopEvent",
"ueb.source.topics.${dcaeTopic}.events.org.onap.policy.controlloop.VirtualControlLoopEvent.filter": "closedLoopEventStatus=.*",
"ueb.source.topics.${dcaeTopic}.events.custom.gson": "org.onap.policy.controlloop.util.Serialization,gsonPretty",
- "ueb.source.topics.${appcTopic}.servers": "${appcServers}",
- "ueb.source.topics.${appcTopic}.apiKey": "${appcApiKey}",
- "ueb.source.topics.${appcTopic}.apiSecret": "${appcApiSecret}",
+ "ueb.source.topics.${appcTopic}.servers": "${dmaapServers}",
"ueb.source.topics.${appcTopic}.events": "org.onap.policy.appc.Response",
"ueb.source.topics.${appcTopic}.events.org.onap.policy.appc.Response.filter": "CommonHeader=.*,Status=.*",
"ueb.source.topics.${appcTopic}.events.custom.gson": "org.onap.policy.appc.util.Serialization,gsonPretty",
"ueb.sink.topics": "${appcTopic},${notificationTopic}",
- "ueb.sink.topics.${appcTopic}.servers": "${appcServers}",
- "ueb.sink.topics.${appcTopic}.apiKey": "${appcApiKey}",
- "ueb.sink.topics.${appcTopic}.apiSecret": "${appcApiSecret}",
+ "ueb.sink.topics.${appcTopic}.servers": "${dmaapServers}",
"ueb.sink.topics.${appcTopic}.events": "org.onap.policy.appc.Request",
"ueb.sink.topics.${appcTopic}.events.custom.gson": "org.onap.policy.appc.util.Serialization,gsonPretty",
- "ueb.sink.topics.${notificationTopic}.servers": "${notificationServers}",
- "ueb.sink.topics.${notificationTopic}.apiKey": "${notificationApiKey}",
- "ueb.sink.topics.${notificationTopic}.apiSecret": "${notificationApiSecret}",
+ "ueb.sink.topics.${notificationTopic}.servers": "${dmaapServers}",
"ueb.sink.topics.${notificationTopic}.events": "org.onap.policy.controlloop.VirtualControlLoopNotification",
"ueb.sink.topics.${notificationTopic}.events.custom.gson": "org.onap.policy.controlloop.util.Serialization,gsonPretty",
diff --git a/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/main/resources/archetype-resources/src/main/config/dcae.onset.json b/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/main/resources/archetype-resources/src/main/config/dcae.onset.json
index 4553faa13..534ab3b80 100644
--- a/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/main/resources/archetype-resources/src/main/config/dcae.onset.json
+++ b/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/main/resources/archetype-resources/src/main/config/dcae.onset.json
@@ -1,5 +1,5 @@
{
- "closedLoopControlName": "${closedLoopControlName}",
+ "closedLoopControlName": "${controlLoopName}",
"closedLoopAlarmStart": 1463679805324,
"closedLoopEventClient": "microservice.stringmatcher",
"closedLoopEventStatus": "ONSET",
diff --git a/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/main/resources/archetype-resources/src/main/resources/ControlLoopDemo__closedLoopControlName__.drl b/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/main/resources/archetype-resources/src/main/resources/__controlLoopName__.drl
index ff5d82e5e..1c6244cc3 100644
--- a/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/main/resources/archetype-resources/src/main/resources/ControlLoopDemo__closedLoopControlName__.drl
+++ b/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/main/resources/archetype-resources/src/main/resources/__controlLoopName__.drl
@@ -84,7 +84,7 @@ import org.onap.policy.drools.system.PolicyEngine;
// These parameters are required to build the runtime policy
//
declare Params
- closedLoopControlName : String
+ controlLoopName : String
actor : String
aaiURL : String
aaiUsername : String
@@ -110,7 +110,7 @@ rule "${policyName}.SETUP"
then
System.out.println("rule SETUP is triggered.");
Params params = new Params();
- params.setClosedLoopControlName("${closedLoopControlName}");
+ params.setClosedLoopControlName("${controlLoopName}");
params.setActor("${actor}");
params.setAaiURL("${aaiURL}");
params.setAaiUsername("${aaiUsername}");
@@ -136,7 +136,7 @@ end
*/
rule "${policyName}.EVENT"
when
- $params : Params( getClosedLoopControlName() == "${closedLoopControlName}" )
+ $params : Params( getClosedLoopControlName() == "${controlLoopName}" )
$event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )
not ( ControlLoopEventManager( closedLoopControlName == $event.closedLoopControlName ))
then
@@ -257,7 +257,7 @@ end
*/
rule "${policyName}.EVENT.MANAGER"
when
- $params : Params( getClosedLoopControlName() == "${closedLoopControlName}" )
+ $params : Params( getClosedLoopControlName() == "${controlLoopName}" )
$event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )
$manager : ControlLoopEventManager( closedLoopControlName == $event.closedLoopControlName, controlLoopResult == null)
then
@@ -442,7 +442,7 @@ end
*/
rule "${policyName}.EVENT.MANAGER.AAINQF199REQUEST"
when
- $params : Params( getClosedLoopControlName() == "${closedLoopControlName}" )
+ $params : Params( getClosedLoopControlName() == "${controlLoopName}" )
$event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )
$manager : ControlLoopEventManager( closedLoopControlName == $event.closedLoopControlName )
$aainqf199RequestWrapper : AAINQF199RequestWrapper(requestID == $event.requestID)
@@ -484,7 +484,7 @@ end
*/
rule "${policyName}.EVENT.MANAGER.AAINQF199RESPONSE"
when
- $params : Params( getClosedLoopControlName() == "${closedLoopControlName}" )
+ $params : Params( getClosedLoopControlName() == "${controlLoopName}" )
$event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )
$manager : ControlLoopEventManager( closedLoopControlName == $event.closedLoopControlName )
$aainqf199RequestWrapper : AAINQF199RequestWrapper(requestID == $event.requestID)
@@ -886,7 +886,7 @@ end
*/
rule "${policyName}.APPC.RESPONSE"
when
- $params : Params( getClosedLoopControlName() == "${closedLoopControlName}" )
+ $params : Params( getClosedLoopControlName() == "${controlLoopName}" )
$event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )
$manager : ControlLoopEventManager( closedLoopControlName == $event.closedLoopControlName )
$operationWrapper : ControlLoopOperationWrapper( requestID == $event.requestID )
@@ -1014,7 +1014,7 @@ end
*/
rule "${policyName}.APPC.RESPONSE.CLEANUP"
when
- $params : Params( getClosedLoopControlName() == "${closedLoopControlName}" )
+ $params : Params( getClosedLoopControlName() == "${controlLoopName}" )
$response : Response($id : getCommonHeader().RequestID )
not ( VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), requestID == $id, closedLoopEventStatus == ControlLoopEventStatus.ONSET ) )
then
@@ -1029,7 +1029,7 @@ end
*/
rule "${policyName}.MSO.RESPONSE"
when
- $params : Params( getClosedLoopControlName() == "${closedLoopControlName}" )
+ $params : Params( getClosedLoopControlName() == "${controlLoopName}" )
$event : VirtualControlLoopEvent( closedLoopControlName == $params.getClosedLoopControlName(), closedLoopEventStatus == ControlLoopEventStatus.ONSET )
$manager : ControlLoopEventManager( closedLoopControlName == $event.closedLoopControlName )
$operationWrapper : ControlLoopOperationWrapper( requestID == $event.requestID )
@@ -1133,7 +1133,7 @@ query "${policyName}.QUERY.EVENT.ONSET"
end
query "${policyName}.QUERY.MANAGER.RNA" (String aRequestId, Integer numOnsetsLowerBound, Boolean aActivated)
- manager : ControlLoopEventManager( closedLoopControlName == "${closedLoopControlName}",
+ manager : ControlLoopEventManager( closedLoopControlName == "${controlLoopName}",
requestID.toString() == aRequestId,
numOnsets > numOnsetsLowerBound,
activated == aActivated )
diff --git a/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/test/resources/projects/basic/archetype.properties b/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/test/resources/projects/basic/archetype.properties
index 0b077b052..96ae89858 100644
--- a/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/test/resources/projects/basic/archetype.properties
+++ b/controlloop/templates/template.demo.v1.0.0/archetype-cl-legacy/src/test/resources/projects/basic/archetype.properties
@@ -19,26 +19,19 @@
###
groupId=org.onap.policy.demo.drools
-artifactId=closedloop-demo-rules
+artifactId=legacy
version=1.0.0-SNAPSHOT
package=org.onap.policy.demo.drools
-closedLoopControlName=CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8
+controlLoopName=CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8
policyScope=service=test;resource=FRWL;type=configuration
policyName=FirewallDemo
policyVersion=v1.0
actor=APPC
+dmaapServers=server1,server2,server3
appcTopic=APPC-CL
-appcApiKey=NO-API-KEY
-appcApiSecret=NO-API-SECRET
-appcServers=server1,server2,server3
notificationTopic=POLICY-CL-MGT
-notificationApiKey=NO-API-KEY
-notificationApiSecret=NO-API-SECRET
-notificationServers=server1,server2,server3
dcaeTopic=DCAE-CL-EVENT
dcaeServers=server1,server2,server3
-dcaeApiKey=NO-API-KEY
-dcaeApiSecret=NO-API-SECRET
dependenciesVersion=1.0.0-SNAPSHOT
aaiURL=http://localhost:8080/TestREST/Test
aaiUsername=policy