aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/templates/archetype-cl-amsterdam
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/templates/archetype-cl-amsterdam')
-rw-r--r--controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/__artifactId__-controller.properties27
-rw-r--r--controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/__artifactId__-controller.rest.json23
-rw-r--r--controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/appc.lcm.success.json (renamed from controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/appc.success.json)4
-rw-r--r--controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/appc.legacy.success.json41
-rw-r--r--controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/dcae.vcpe.onset.json (renamed from controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/dcae.onset.json)2
-rw-r--r--controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/dcae.vdns.onset.json15
-rw-r--r--controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/dcae.vfw.onset.json15
-rw-r--r--controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/so.success.json7
-rw-r--r--controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/vDNS.yaml26
-rw-r--r--controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/vFW.yaml28
-rw-r--r--controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl12
11 files changed, 178 insertions, 22 deletions
diff --git a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/__artifactId__-controller.properties b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/__artifactId__-controller.properties
index 18daf6a50..b22ba98eb 100644
--- a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/__artifactId__-controller.properties
+++ b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/__artifactId__-controller.properties
@@ -20,7 +20,7 @@
controller.name=${artifactId}
-ueb.source.topics=${dcaeTopic},APPC-CL
+ueb.source.topics=${dcaeTopic},APPC-CL,APPC-LCM-WRITE
ueb.source.topics.${dcaeTopic}.servers=${dcaeServers}
ueb.source.topics.${dcaeTopic}.apiKey=
@@ -32,17 +32,30 @@ ueb.source.topics.${dcaeTopic}.events.custom.gson=org.onap.policy.controlloop.ut
ueb.source.topics.APPC-CL.servers=${dmaapServers}
ueb.source.topics.APPC-CL.apiKey=
ueb.source.topics.APPC-CL.apiSecret=
-ueb.source.topics.APPC-CL.events=org.onap.policy.appclcm.LCMResponseWrapper
-ueb.source.topics.APPC-CL.events.org.onap.policy.appclcm.LCMResponseWrapper.filter=type\=response
-ueb.source.topics.APPC-CL.events.custom.gson=org.onap.policy.appclcm.util.Serialization,gson
+ueb.source.topics.APPC-CL.events=org.onap.policy.appc.Response
+ueb.source.topics.APPC-CL.events.org.onap.policy.appc.Response.filter=CommonHeader\=.*,Status\=.*
+ueb.source.topics.APPC-CL.events.custom.gson=org.onap.policy.appc.util.Serialization,gsonPretty
-noop.sink.topics=APPC-CL,POLICY-CL-MGT
+ueb.source.topics.APPC-LCM-WRITE.servers=${dmaapServers}
+ueb.source.topics.APPC-LCM-WRITE.apiKey=
+ueb.source.topics.APPC-LCM-WRITE.apiSecret=
+ueb.source.topics.APPC-LCM-WRITE.events=org.onap.policy.appclcm.LCMResponseWrapper
+ueb.source.topics.APPC-LCM-WRITE.events.org.onap.policy.appclcm.LCMResponseWrapper.filter=type\=response
+ueb.source.topics.APPC-LCM-WRITE.events.custom.gson=org.onap.policy.appclcm.util.Serialization,gson
+
+noop.sink.topics=APPC-CL,APPC-LCM-READ,POLICY-CL-MGT
noop.sink.topics.APPC-CL.servers=${dmaapServers}
noop.sink.topics.APPC-CL.apiKey=
noop.sink.topics.APPC-CL.apiSecret=
-noop.sink.topics.APPC-CL.events=org.onap.policy.appclcm.LCMRequestWrapper
-noop.sink.topics.APPC-CL.events.custom.gson=org.onap.policy.appclcm.util.Serialization,gson
+noop.sink.topics.APPC-CL.events=org.onap.policy.appc.Request
+noop.sink.topics.APPC-CL.events.custom.gson=org.onap.policy.appc.util.Serialization,gsonPretty
+
+noop.sink.topics.APPC-LCM-READ.servers=${dmaapServers}
+noop.sink.topics.APPC-LCM-READ.apiKey=
+noop.sink.topics.APPC-LCM-READ.apiSecret=
+noop.sink.topics.APPC-LCM-READ.events=org.onap.policy.appclcm.LCMRequestWrapper
+noop.sink.topics.APPC-LCM-READ.events.custom.gson=org.onap.policy.appclcm.util.Serialization,gson
noop.sink.topics.POLICY-CL-MGT.servers=${dmaapServers}
noop.sink.topics.POLICY-CL-MGT.apiKey=
diff --git a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/__artifactId__-controller.rest.json b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/__artifactId__-controller.rest.json
index 356af7d99..48d48de82 100644
--- a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/__artifactId__-controller.rest.json
+++ b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/__artifactId__-controller.rest.json
@@ -1,7 +1,7 @@
{
"controller.name": "${artifactId}",
- "ueb.source.topics": "${dcaeTopic},APPC-CL",
+ "ueb.source.topics": "${dcaeTopic},APPC-CL,APPC-LCM-WRITE",
"ueb.source.topics.${dcaeTopic}.servers": "${dcaeServers}",
"ueb.source.topics.${dcaeTopic}.events": "org.onap.policy.controlloop.VirtualControlLoopEvent",
@@ -9,15 +9,24 @@
"ueb.source.topics.${dcaeTopic}.events.custom.gson": "org.onap.policy.controlloop.util.Serialization,gson",
"ueb.source.topics.APPC-CL.servers": "${dmaapServers}",
- "ueb.source.topics.APPC-CL.events": "org.onap.policy.appclcm.LCMResponseWrapper",
- "ueb.source.topics.APPC-CL.events.org.onap.policy.appclcm.LCMResponseWrapper.filter": "type=response",
- "ueb.source.topics.APPC-CL.events.custom.gson": "org.onap.policy.appclcm.util.Serialization,gson",
+ "ueb.source.topics.APPC-CL.events": "org.onap.policy.appc.Response",
+ "ueb.source.topics.APPC-CL.events.org.onap.policy.appclcm.LCMResponseWrapper.filter": "CommonHeader=.*,Status=.*",
+ "ueb.source.topics.APPC-CL.events.custom.gson": "org.onap.policy.appc.util.Serialization,gsonPretty",
- "noop.sink.topics": "APPC-CL,POLICY-CL-MGT",
+ "ueb.source.topics.APPC-LCM-WRITE.servers": "${dmaapServers}",
+ "ueb.source.topics.APPC-LCM-WRITE.events": "org.onap.policy.appclcm.LCMResponseWrapper",
+ "ueb.source.topics.APPC-LCM-WRITE.events.org.onap.policy.appclcm.LCMResponseWrapper.filter": "type=response",
+ "ueb.source.topics.APPC-LCM-WRITE.events.custom.gson": "org.onap.policy.appclcm.util.Serialization,gson",
+
+ "noop.sink.topics": "APPC-CL,APPC-LCM-READ,POLICY-CL-MGT",
"noop.sink.topics.APPC-CL.servers": "${dmaapServers}",
- "noop.sink.topics.APPC-CL.events": "org.onap.policy.appclcm.LCMRequestWrapper",
- "noop.sink.topics.APPC-CL.events.custom.gson": "org.onap.policy.appclcm.util.Serialization,gson",
+ "noop.sink.topics.APPC-CL.events": "org.onap.policy.appc.Request",
+ "noop.sink.topics.APPC-CL.events.custom.gson": "org.onap.policy.appc.util.Serialization,gsonPretty",
+
+ "noop.sink.topics.APPC-LCM-READ.servers": "${dmaapServers}",
+ "noop.sink.topics.APPC-LCM-READ.events": "org.onap.policy.appclcm.LCMRequestWrapper",
+ "noop.sink.topics.APPC-LCM-READ.events.custom.gson": "org.onap.policy.appclcm.util.Serialization,gson",
"noop.sink.topics.POLICY-CL-MGT.servers": "${dmaapServers}",
"noop.sink.topics.POLICY-CL-MGT.events": "org.onap.policy.controlloop.VirtualControlLoopNotification",
diff --git a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/appc.success.json b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/appc.lcm.success.json
index 6f8af9b64..985685000 100644
--- a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/appc.success.json
+++ b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/appc.lcm.success.json
@@ -4,7 +4,7 @@
"common-header": {
"timestamp": "2017-08-25T21:06:23.037Z",
"api-ver": "5.00",
- "originator-id": "a20e2073-30b1-4357-893b-f5ed57b66ef0",
+ "originator-id": "664be3d2-6c12-4f4b-a3e7-c349acced200",
"request-id": "664be3d2-6c12-4f4b-a3e7-c349acced200",
"sub-request-id": "1",
"flags": {}
@@ -17,6 +17,6 @@
},
"version": "2.0",
"rpc-name": "restart",
- "correlation-id": "a20e2073-30b1-4357-893b-f5ed57b66ef0-1",
+ "correlation-id": "664be3d2-6c12-4f4b-a3e7-c349acced200-1",
"type": "response"
} \ No newline at end of file
diff --git a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/appc.legacy.success.json b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/appc.legacy.success.json
new file mode 100644
index 000000000..2c6570d03
--- /dev/null
+++ b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/appc.legacy.success.json
@@ -0,0 +1,41 @@
+{
+ "CommonHeader": {
+ "TimeStamp": 1506051879001,
+ "APIver": "1.01",
+ "RequestID": "c7c6a4aa-bb61-4a15-b831-ba1472dd4a65",
+ "SubRequestID": "1",
+ "RequestTrack": [],
+ "Flags": []
+ },
+ "Status": {
+ "Code": 400,
+ "Value": "SUCCESS"
+ },
+ "Payload": {
+ "generic-vnf.vnf-id": "jimmy-test-vnf2",
+ "pg-streams": {
+ "pg-stream": [
+ {
+ "id": "fw_udp1",
+ "is-enabled": "true"
+ },
+ {
+ "id": "fw_udp2",
+ "is-enabled": "true"
+ },
+ {
+ "id": "fw_udp3",
+ "is-enabled": "true"
+ },
+ {
+ "id": "fw_udp4",
+ "is-enabled": "true"
+ },
+ {
+ "id": "fw_udp5",
+ "is-enabled": "true"
+ }
+ ]
+ }
+ }
+} \ No newline at end of file
diff --git a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/dcae.onset.json b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/dcae.vcpe.onset.json
index edb1e27e5..184b87787 100644
--- a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/dcae.onset.json
+++ b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/dcae.vcpe.onset.json
@@ -4,7 +4,7 @@
"closedLoopEventClient": "microservice.stringmatcher",
"closedLoopEventStatus": "ONSET",
"requestID": "664be3d2-6c12-4f4b-a3e7-c349acced200",
- "target_type": "VNF",
+ "target_type": "VM",
"target": "generic-vnf.vnf-id",
"AAI": {
"vserver.is-closed-loop-disabled": "false",
diff --git a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/dcae.vdns.onset.json b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/dcae.vdns.onset.json
new file mode 100644
index 000000000..4868c586e
--- /dev/null
+++ b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/dcae.vdns.onset.json
@@ -0,0 +1,15 @@
+{
+ "closedLoopControlName": "${closedLoopControlName}",
+ "closedLoopAlarmStart": 1484677482204798,
+ "closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca",
+ "closedLoopEventStatus": "ONSET",
+ "requestID": "e4f95e0c-a013-4530-8e59-c5c5f9e539b6",
+ "target_type": "VNF",
+ "target": "vserver.vserver-name",
+ "AAI": {
+ "vserver.is-closed-loop-disabled": "false",
+ "vserver.vserver-name": "dfw1lb01lb01"
+ },
+ "from": "DCAE",
+ "version": "1.0.2"
+} \ No newline at end of file
diff --git a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/dcae.vfw.onset.json b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/dcae.vfw.onset.json
new file mode 100644
index 000000000..140e9c295
--- /dev/null
+++ b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/dcae.vfw.onset.json
@@ -0,0 +1,15 @@
+{
+ "closedLoopControlName": "${closedLoopControlName}",
+ "closedLoopAlarmStart": 1463679805324,
+ "closedLoopEventClient": "microservice.stringmatcher",
+ "closedLoopEventStatus": "ONSET",
+ "requestID": "c7c6a4aa-bb61-4a15-b831-ba1472dd4a65",
+ "target_type": "VNF",
+ "target": "generic-vnf.vnf-id",
+ "AAI": {
+ "vserver.is-closed-loop-disabled": "false",
+ "generic-vnf.vnf-id": "fw0002vm002fw002"
+ },
+ "from": "DCAE",
+ "version": "1.0.2"
+}
diff --git a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/so.success.json b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/so.success.json
new file mode 100644
index 000000000..8f3387e4d
--- /dev/null
+++ b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/so.success.json
@@ -0,0 +1,7 @@
+{
+ "requestReferences": {
+ "instanceId": "ff305d54-75b4-ff1b-bdb2-eb6b9e5460ff",
+ "requestId": "e4f95e0c-a013-4530-8e59-c5c5f9e539b6"
+ },
+ "httpResponseCode": 200
+} \ No newline at end of file
diff --git a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/vDNS.yaml b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/vDNS.yaml
new file mode 100644
index 000000000..56426eebd
--- /dev/null
+++ b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/vDNS.yaml
@@ -0,0 +1,26 @@
+controlLoop:
+ version: 2.0.0
+ controlLoopName: ${closedLoopControlName}
+ services:
+ - serviceName: d4738992-6497-4dca-9db9
+ serviceInvariantUUID: dc112d6e-7e73-4777-9c6f-1a7fb5fd1b6f
+ serviceUUID: 2eea06c6-e1d3-4c3a-b9c4-478c506eeedf
+ trigger_policy: unique-policy-id-1-scale-up
+ timeout: 3600
+
+policies:
+ - id: unique-policy-id-1-scale-up
+ name: Create a new VF Module
+ description:
+ actor: SO
+ recipe: VF Module Create
+ target:
+ type: VNF
+ retry: 3
+ timeout: 1200
+ success: final_success
+ failure: final_failure
+ failure_timeout: final_failure_timeout
+ failure_retries: final_failure_retries
+ failure_exception: final_failure_exception
+ failure_guard: final_failure_guard
diff --git a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/vFW.yaml b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/vFW.yaml
new file mode 100644
index 000000000..8273f46b9
--- /dev/null
+++ b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/vFW.yaml
@@ -0,0 +1,28 @@
+controlLoop:
+ version: 2.0.0
+ controlLoopName: ${closedLoopControlName}
+ services:
+ - serviceInvariantUUID: 5cfe6f4a-41bc-4247-8674-ebd4b98e35cc
+ serviceUUID: 0f40bba5-986e-4b3c-803f-ddd1b7b25f24
+ serviceName: 57e66ea7-0ed6-45c7-970f
+ trigger_policy: unique-policy-id-1-modifyConfig
+ timeout: 3600
+ abatement: true
+
+policies:
+ - id: unique-policy-id-1-modifyConfig
+ name: modify packet gen config
+ description:
+ actor: APPC
+ recipe: ModifyConfig
+ target:
+ resourceID: Eace933104d443b496b8.nodes.heat.vpg
+ type: VNF
+ retry: 2
+ timeout: 1200
+ success: final_success
+ failure: final_failure
+ failure_timeout: final_failure_timeout
+ failure_retries: final_failure_retries
+ failure_exception: final_failure_exception
+ failure_guard: final_failure_guard
diff --git a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl
index a2939a0bf..f56a3ff6a 100644
--- a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl
+++ b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl
@@ -127,7 +127,7 @@ rule "${policyName}.SETUP"
String vfcUsername = PolicyEngine.manager.getEnvironmentProperty("vfc.username");
String vfcPassword = PolicyEngine.manager.getEnvironmentProperty("vfc.password");
- String guardUrl =PolicyEngine.manager.getEnvironmentProperty("guard.url");
+ String guardUrl = PolicyEngine.manager.getEnvironmentProperty("guard.url");
String guardUsername = PolicyEngine.manager.getEnvironmentProperty("guard.username");
String guardPassword = PolicyEngine.manager.getEnvironmentProperty("guard.password");
String guardJdbcUrl = PolicyEngine.manager.getEnvironmentProperty("guard.jdbc.url");
@@ -537,9 +537,12 @@ rule "${policyName}.EVENT.MANAGER.OPERATION.LOCKED.GUARD_PERMITTED"
case "APPC":
- if (request instanceof Request || request instanceof LCMRequestWrapper) {
+ if (request instanceof Request) {
PolicyEngine.manager.deliver("APPC-CL", request);
}
+ else if (request instanceof LCMRequestWrapper) {
+ PolicyEngine.manager.deliver("APPC-LCM-READ", request);
+ }
break;
case "SO":
// at this point the AAI named query request should have already been made, the response recieved and used
@@ -938,15 +941,14 @@ rule "${policyName}.SO.RESPONSE"
$operation : ControlLoopOperationManager( onset.closedLoopControlName == $event.closedLoopControlName, onset.requestID == $event.requestID )
$opTimer : OperationTimer( closedLoopControlName == $event.closedLoopControlName, requestID == $event.requestID.toString() )
$lock : TargetLock (requestID == $event.requestID)
- $request : SORequest( requestId == $event.requestID.toString() )
$response : SOResponse( request.requestId == $event.requestID.toString() )
then
Logger logger = LoggerFactory.getLogger(drools.getRule().getPackage());
logger.info("{}: {}", $params.getClosedLoopControlName(), drools.getRule().getName());
- logger.debug("{}: {}: event={} manager={} operation={} lock={} opTimer={} request={} response={}",
+ logger.debug("{}: {}: event={} manager={} operation={} lock={} opTimer={} response={}",
$params.getClosedLoopControlName(), drools.getRule().getName(),
- $event, $manager, $operation, $lock, $operation, $opTimer, $request, $response);
+ $event, $manager, $operation, $lock, $operation, $opTimer, $response);
// Get the result of the operation
//