aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--archetype-closedloop-demo-rules/src/main/resources/archetype-resources/src/main/config/appc.accepted.json1
-rw-r--r--archetype-closedloop-demo-rules/src/main/resources/archetype-resources/src/main/config/appc.success.json1
-rw-r--r--archetype-closedloop-demo-rules/src/main/resources/archetype-resources/src/main/config/dcae.onset.json2
-rw-r--r--archetype-closedloop-demo-rules/src/main/resources/archetype-resources/src/main/resources/ControlLoopDemo__closedLoopControlName__.drl44
4 files changed, 14 insertions, 34 deletions
diff --git a/archetype-closedloop-demo-rules/src/main/resources/archetype-resources/src/main/config/appc.accepted.json b/archetype-closedloop-demo-rules/src/main/resources/archetype-resources/src/main/config/appc.accepted.json
new file mode 100644
index 000000000..01be66011
--- /dev/null
+++ b/archetype-closedloop-demo-rules/src/main/resources/archetype-resources/src/main/config/appc.accepted.json
@@ -0,0 +1 @@
+{"Status":{"Value":"ACCEPTED","Code":"100"},"Payload":{"pg-streams":"{\\\"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\\\"}]}}","generic-vnf.vnf-id":"fw0001vm001fw001"},"CommonHeader":{"TimeStamp":"1493841850199","APIver":"1.01","RequestID":"664be3d2-6c12-4f4b-a3e7-c349acced200","SubrequestID":null,"OriginatorID":null}}
diff --git a/archetype-closedloop-demo-rules/src/main/resources/archetype-resources/src/main/config/appc.success.json b/archetype-closedloop-demo-rules/src/main/resources/archetype-resources/src/main/config/appc.success.json
new file mode 100644
index 000000000..b9ef41f50
--- /dev/null
+++ b/archetype-closedloop-demo-rules/src/main/resources/archetype-resources/src/main/config/appc.success.json
@@ -0,0 +1 @@
+{"Status":{"Value":"SUCCESS","Code":"400"},"Payload":{"pg-streams":"{\\\"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\\\"}]}}","generic-vnf.vnf-id":"fw0001vm001fw001"},"CommonHeader":{"TimeStamp":"1493841850199","APIver":"1.01","RequestID":"664be3d2-6c12-4f4b-a3e7-c349acced200","SubrequestID":null,"OriginatorID":null}}
diff --git a/archetype-closedloop-demo-rules/src/main/resources/archetype-resources/src/main/config/dcae.onset.json b/archetype-closedloop-demo-rules/src/main/resources/archetype-resources/src/main/config/dcae.onset.json
index 5c787ed5d..4553faa13 100644
--- a/archetype-closedloop-demo-rules/src/main/resources/archetype-resources/src/main/config/dcae.onset.json
+++ b/archetype-closedloop-demo-rules/src/main/resources/archetype-resources/src/main/config/dcae.onset.json
@@ -7,7 +7,7 @@
"target_type": "VF",
"target": "generic-vnf.vnf-id",
"AAI": {
- "generic-vnf.vnf-id": "fw0001vm001fw001",
+ "generic-vnf.vnf-id": "fw0001vm001fw001"
},
"from": "DCAE",
"version": "1.0.2"
diff --git a/archetype-closedloop-demo-rules/src/main/resources/archetype-resources/src/main/resources/ControlLoopDemo__closedLoopControlName__.drl b/archetype-closedloop-demo-rules/src/main/resources/archetype-resources/src/main/resources/ControlLoopDemo__closedLoopControlName__.drl
index f03d32ba3..c5614e006 100644
--- a/archetype-closedloop-demo-rules/src/main/resources/archetype-resources/src/main/resources/ControlLoopDemo__closedLoopControlName__.drl
+++ b/archetype-closedloop-demo-rules/src/main/resources/archetype-resources/src/main/resources/ControlLoopDemo__closedLoopControlName__.drl
@@ -1121,40 +1121,18 @@ rule "${policyName}.MSO.RESPONSE"
}
end
-
/*
-*
-* Queries
-*
-*/
-query "${policyName}.QUERY.PARAMS"
- param : Params()
-end
-
-query "${policyName}.QUERY.EVENTS"
- event : VirtualControlLoopEvent()
-end
-
-query "${policyName}.QUERY.MANAGERS"
- manager : EventManager()
-end
-
-query "${policyName}.QUERY.OPERATIONS"
- manager : ControlLoopOperationWrapper()
-end
-
-query "${policyName}.QUERY.APPC.REQUEST"
- appcRequest : Request()
-end
-
-query "${policyName}.QUERY.APPC.RESPONSE"
- appcResponse : Response()
-end
-
-query "${policyName}.QUERY.MSO.REQUEST"
- msoRequest : MSORequest()
+ * Sample Queries for illustration with and without arguments
+ * The results of the query can be introspected (and retracted if desired)
+ * through REST API.
+ */
+query "${policyName}.QUERY.EVENT.ONSET"
+ event : VirtualControlLoopEvent( closedLoopEventStatus == ControlLoopEventStatus.ONSET )
end
-query "${policyName}.QUERY.MSO.RESPONSE"
- msoResponse : MSOResponse()
+query "${policyName}.QUERY.MANAGER.RNA" (String aRequestId, Integer numOnsetsLowerBound, Boolean aActivated)
+ manager : EventManager( closedLoopControlName == "${closedLoopControlName}",
+ requestID.toString() == aRequestId,
+ numOnsets > numOnsetsLowerBound,
+ activated == aActivated )
end