summaryrefslogtreecommitdiffstats
path: root/examples/examples-aadm/src/main/resources
diff options
context:
space:
mode:
Diffstat (limited to 'examples/examples-aadm/src/main/resources')
-rw-r--r--examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestEvent.xml108
-rw-r--r--examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestEvent0.json27
-rw-r--r--examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestEvent1.json27
-rw-r--r--examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestEvent2.json27
-rw-r--r--examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestEvent3.json27
-rw-r--r--examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestEvent4.json28
-rw-r--r--examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestEvent5.json27
-rw-r--r--examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestEvent6.json27
-rw-r--r--examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestEvent7.json27
-rw-r--r--examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestPeridociEvent.json12
-rw-r--r--examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/AADMDoSProvenActTask_TaskLogic.mvel80
-rw-r--r--examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/AADMDoSSuggestionActTask_TaskLogic.mvel106
-rw-r--r--examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/AADMMatchTask_TaskLogic.mvel75
-rw-r--r--examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/AADMNoActTask_TaskLogic.mvel55
-rw-r--r--examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/AADMPolicy_Act_TaskSelectionLogic.mvel67
-rw-r--r--examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/Default_TaskLogic.mvel23
-rw-r--r--examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/Default_TaskSelectionLogic.mvel23
-rw-r--r--examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/PeriodicActTask_TaskLogic.mvel40
-rw-r--r--examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/SAPCActTask_TaskLogic.mvel79
-rw-r--r--examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/SAPCMatchTask_TaskLogic.mvel52
-rw-r--r--examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/VMMEActTask_TaskLogic.mvel44
-rw-r--r--examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/VMMEMatchTask_TaskLogic.mvel47
22 files changed, 1028 insertions, 0 deletions
diff --git a/examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestEvent.xml b/examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestEvent.xml
new file mode 100644
index 000000000..3ce3246d0
--- /dev/null
+++ b/examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestEvent.xml
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ SPDX-License-Identifier: Apache-2.0
+ ============LICENSE_END=========================================================
+-->
+
+<xmlApexEvent xmlns="http://www.ericsson.com/apexevent">
+ <name>AADMEvent</name>
+ <version>0.0.1</version>
+ <nameSpace>org.onap.policy.apex.examples.aadm.events</nameSpace>
+ <source>CompaA</source>
+ <target>apex</target>
+ <data>
+ <key>IMSI</key>
+ <value>27201872253157</value>
+ </data>
+ <data>
+ <key>ENODEB_ID</key>
+ <value>10000</value>
+ </data>
+ <data>
+ <key>IMSI_IP</key>
+ <value>111.222.333.444</value>
+ </data>
+ <data>
+ <key>NW_IP</key>
+ <value>THIS IS NOT AN IP ADDRESS</value>
+ </data>
+ <data>
+ <key>DoS</key>
+ <value>true</value>
+ </data>
+ <data>
+ <key>PROBE_ON</key>
+ <value>false</value>
+ </data>
+ <data>
+ <key>TCP_ON</key>
+ <value>false</value>
+ </data>
+ <data>
+ <key>SGW_IP_ADDRESS</key>
+ <value>10.0.0.2</value>
+ </data>
+ <data>
+ <key>UE_IP_ADDRESS</key>
+ <value>10.0.0.4</value>
+ </data>
+ <data>
+ <key>NUM_SUBSCRIBERS</key>
+ <value>101</value>
+ </data>
+ <data>
+ <key>ACTTASK</key>
+ <value />
+ </data>
+ <data>
+ <key>APPLICATION</key>
+ <value />
+ </data>
+ <data>
+ <key>ATTACH_COUNT</key>
+ <value>0</value>
+ </data>
+ <data>
+ <key>AVG_SUBSCRIBER_ATTACH</key>
+ <value>0</value>
+ </data>
+ <data>
+ <key>SERVICE_REQUEST_COUNT</key>
+ <value>99</value>
+ </data>
+ <data>
+ <key>AVG_SUBSCRIBER_SERVICE_REQUEST</key>
+ <value>101.0</value>
+ </data>
+ <data>
+ <key>TCP_UE_SIDE_AVG_THROUGHPUT</key>
+ <value>0</value>
+ </data>
+ <data>
+ <key>TCP_UE_SIDE_MEDIAN_RTT_TX_TO_RX</key>
+ <value>0</value>
+ </data>
+ <data>
+ <key>http_host_class</key>
+ <value />
+ </data>
+ <data>
+ <key>protocol_group</key>
+ <value />
+ </data>
+</xmlApexEvent>
diff --git a/examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestEvent0.json b/examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestEvent0.json
new file mode 100644
index 000000000..64d34fcf9
--- /dev/null
+++ b/examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestEvent0.json
@@ -0,0 +1,27 @@
+{
+ "nameSpace": "org.onap.policy.apex.examples.aadm.events",
+ "name": "AADMEvent",
+ "version": "0.0.1",
+ "source": "CompaA",
+ "target": "apex",
+ "IMSI": 123456,
+ "IMSI_IP": "101.111.121.131",
+ "ENODEB_ID": 123,
+ "SERVICE_REQUEST_COUNT": 99,
+ "AVG_SUBSCRIBER_SERVICE_REQUEST": 101.0,
+ "UE_IP_ADDRESS": "101.111.121.131",
+ "NUM_SUBSCRIBERS": 101,
+ "ACTTASK": "",
+ "APPLICATION": "",
+ "ATTACH_COUNT": 0,
+ "AVG_SUBSCRIBER_ATTACH": 0,
+ "DoS": false,
+ "NW_IP": "",
+ "PROBE_ON": false,
+ "SGW_IP_ADDRESS": "",
+ "TCP_ON": false,
+ "TCP_UE_SIDE_AVG_THROUGHPUT": 0,
+ "TCP_UE_SIDE_MEDIAN_RTT_TX_TO_RX": 0,
+ "http_host_class": "",
+ "protocol_group": ""
+}
diff --git a/examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestEvent1.json b/examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestEvent1.json
new file mode 100644
index 000000000..b525e5f2e
--- /dev/null
+++ b/examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestEvent1.json
@@ -0,0 +1,27 @@
+{
+ "nameSpace": "org.onap.policy.apex.examples.aadm.events",
+ "name": "AADMEvent",
+ "version": "0.0.1",
+ "source": "CompaA",
+ "target": "apex",
+ "IMSI": 123456,
+ "IMSI_IP": "101.111.121.131",
+ "ENODEB_ID": 123,
+ "SERVICE_REQUEST_COUNT": 101,
+ "AVG_SUBSCRIBER_SERVICE_REQUEST": 99.0,
+ "UE_IP_ADDRESS": "101.111.121.131",
+ "NUM_SUBSCRIBERS": 101,
+ "TCP_UE_SIDE_AVG_THROUGHPUT": 101.0,
+ "ACTTASK": "",
+ "APPLICATION": "",
+ "ATTACH_COUNT": 0,
+ "AVG_SUBSCRIBER_ATTACH": 0,
+ "DoS": false,
+ "NW_IP": "",
+ "PROBE_ON": false,
+ "SGW_IP_ADDRESS": "",
+ "TCP_ON": false,
+ "TCP_UE_SIDE_MEDIAN_RTT_TX_TO_RX": 0,
+ "http_host_class": "",
+ "protocol_group": ""
+}
diff --git a/examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestEvent2.json b/examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestEvent2.json
new file mode 100644
index 000000000..893a19675
--- /dev/null
+++ b/examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestEvent2.json
@@ -0,0 +1,27 @@
+{
+ "nameSpace": "org.onap.policy.apex.examples.aadm.events",
+ "name": "AADMEvent",
+ "version": "0.0.1",
+ "source": "CompaA",
+ "target": "apex",
+ "IMSI": 123456,
+ "IMSI_IP": "101.111.121.131",
+ "ENODEB_ID": 123,
+ "SERVICE_REQUEST_COUNT": 99,
+ "AVG_SUBSCRIBER_SERVICE_REQUEST": 101.0,
+ "UE_IP_ADDRESS": "101.111.121.131",
+ "NUM_SUBSCRIBERS": 99,
+ "ACTTASK": "",
+ "APPLICATION": "",
+ "ATTACH_COUNT": 0,
+ "AVG_SUBSCRIBER_ATTACH": 0,
+ "DoS": false,
+ "NW_IP": "",
+ "PROBE_ON": false,
+ "SGW_IP_ADDRESS": "",
+ "TCP_ON": false,
+ "TCP_UE_SIDE_AVG_THROUGHPUT": 0,
+ "TCP_UE_SIDE_MEDIAN_RTT_TX_TO_RX": 0,
+ "http_host_class": "",
+ "protocol_group": ""
+}
diff --git a/examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestEvent3.json b/examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestEvent3.json
new file mode 100644
index 000000000..dd8e0d549
--- /dev/null
+++ b/examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestEvent3.json
@@ -0,0 +1,27 @@
+{
+ "nameSpace": "org.onap.policy.apex.examples.aadm.events",
+ "name": "AADMEvent",
+ "version": "0.0.1",
+ "source": "CompaA",
+ "target": "apex",
+ "IMSI": 123456,
+ "IMSI_IP": "101.111.121.131",
+ "ENODEB_ID": 123,
+ "TCP_UE_SIDE_AVG_THROUGHPUT": 101.0,
+ "ACTTASK": "",
+ "APPLICATION": "",
+ "ATTACH_COUNT": 0,
+ "AVG_SUBSCRIBER_ATTACH": 0,
+ "AVG_SUBSCRIBER_SERVICE_REQUEST": 0.0,
+ "DoS": false,
+ "NUM_SUBSCRIBERS": 0,
+ "NW_IP": "",
+ "PROBE_ON": false,
+ "SERVICE_REQUEST_COUNT": 0,
+ "SGW_IP_ADDRESS": "",
+ "TCP_ON": false,
+ "TCP_UE_SIDE_MEDIAN_RTT_TX_TO_RX": 0,
+ "UE_IP_ADDRESS": "",
+ "http_host_class": "",
+ "protocol_group": ""
+}
diff --git a/examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestEvent4.json b/examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestEvent4.json
new file mode 100644
index 000000000..dca754500
--- /dev/null
+++ b/examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestEvent4.json
@@ -0,0 +1,28 @@
+{
+ "nameSpace": "org.onap.policy.apex.examples.aadm.events",
+ "name": "AADMEvent",
+ "version": "0.0.1",
+ "source": "CompaA",
+ "target": "apex",
+ "IMSI": 123456,
+ "IMSI_IP": "101.111.121.131",
+ "ENODEB_ID": 123,
+ "SERVICE_REQUEST_COUNT": 99,
+ "AVG_SUBSCRIBER_SERVICE_REQUEST": 101.0,
+ "UE_IP_ADDRESS": "101.111.121.131",
+ "NUM_SUBSCRIBERS": 101,
+ "ACTTASK": "",
+ "APPLICATION": "",
+ "ATTACH_COUNT": 0,
+ "AVG_SUBSCRIBER_ATTACH": 0,
+ "AVG_SUBSCRIBER_SERVICE_REQUEST": 0.0,
+ "DoS": false,
+ "NW_IP": "",
+ "PROBE_ON": false,
+ "SGW_IP_ADDRESS": "",
+ "TCP_ON": false,
+ "TCP_UE_SIDE_AVG_THROUGHPUT": 0,
+ "TCP_UE_SIDE_MEDIAN_RTT_TX_TO_RX": 0,
+ "http_host_class": "",
+ "protocol_group": ""
+}
diff --git a/examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestEvent5.json b/examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestEvent5.json
new file mode 100644
index 000000000..a7676e12f
--- /dev/null
+++ b/examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestEvent5.json
@@ -0,0 +1,27 @@
+{
+ "nameSpace": "org.onap.policy.apex.examples.aadm.events",
+ "name": "AADMEvent",
+ "version": "0.0.1",
+ "source": "CompaA",
+ "target": "apex",
+ "IMSI": 123456,
+ "ENODEB_ID": 124,
+ "SERVICE_REQUEST_COUNT": 99,
+ "AVG_SUBSCRIBER_SERVICE_REQUEST": 101.0,
+ "UE_IP_ADDRESS": "101.111.121.131",
+ "NUM_SUBSCRIBERS": 101,
+ "ACTTASK": "",
+ "APPLICATION": "",
+ "ATTACH_COUNT": 0,
+ "AVG_SUBSCRIBER_ATTACH": 0,
+ "DoS": false,
+ "IMSI_IP": "",
+ "NW_IP": "",
+ "PROBE_ON": false,
+ "SGW_IP_ADDRESS": "",
+ "TCP_ON": false,
+ "TCP_UE_SIDE_AVG_THROUGHPUT": 0,
+ "TCP_UE_SIDE_MEDIAN_RTT_TX_TO_RX": 0,
+ "http_host_class": "",
+ "protocol_group": ""
+}
diff --git a/examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestEvent6.json b/examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestEvent6.json
new file mode 100644
index 000000000..64d34fcf9
--- /dev/null
+++ b/examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestEvent6.json
@@ -0,0 +1,27 @@
+{
+ "nameSpace": "org.onap.policy.apex.examples.aadm.events",
+ "name": "AADMEvent",
+ "version": "0.0.1",
+ "source": "CompaA",
+ "target": "apex",
+ "IMSI": 123456,
+ "IMSI_IP": "101.111.121.131",
+ "ENODEB_ID": 123,
+ "SERVICE_REQUEST_COUNT": 99,
+ "AVG_SUBSCRIBER_SERVICE_REQUEST": 101.0,
+ "UE_IP_ADDRESS": "101.111.121.131",
+ "NUM_SUBSCRIBERS": 101,
+ "ACTTASK": "",
+ "APPLICATION": "",
+ "ATTACH_COUNT": 0,
+ "AVG_SUBSCRIBER_ATTACH": 0,
+ "DoS": false,
+ "NW_IP": "",
+ "PROBE_ON": false,
+ "SGW_IP_ADDRESS": "",
+ "TCP_ON": false,
+ "TCP_UE_SIDE_AVG_THROUGHPUT": 0,
+ "TCP_UE_SIDE_MEDIAN_RTT_TX_TO_RX": 0,
+ "http_host_class": "",
+ "protocol_group": ""
+}
diff --git a/examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestEvent7.json b/examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestEvent7.json
new file mode 100644
index 000000000..694b28f2a
--- /dev/null
+++ b/examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestEvent7.json
@@ -0,0 +1,27 @@
+{
+ "nameSpace": "org.onap.policy.apex.examples.aadm.events",
+ "name": "AADMEvent",
+ "version": "0.0.1",
+ "source": "CompaA",
+ "target": "apex",
+ "IMSI": 123456,
+ "ENODEB_ID": 123,
+ "SERVICE_REQUEST_COUNT": 99,
+ "UE_IP_ADDRESS": "101.111.121.131",
+ "ACTTASK": "",
+ "APPLICATION": "",
+ "ATTACH_COUNT": 0,
+ "AVG_SUBSCRIBER_ATTACH": 0,
+ "AVG_SUBSCRIBER_SERVICE_REQUEST": 0.0,
+ "DoS": false,
+ "IMSI_IP": "",
+ "NUM_SUBSCRIBERS": 0,
+ "NW_IP": "",
+ "PROBE_ON": false,
+ "SGW_IP_ADDRESS": "",
+ "TCP_ON": false,
+ "TCP_UE_SIDE_AVG_THROUGHPUT": 0,
+ "TCP_UE_SIDE_MEDIAN_RTT_TX_TO_RX": 0,
+ "http_host_class": "",
+ "protocol_group": ""
+}
diff --git a/examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestPeridociEvent.json b/examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestPeridociEvent.json
new file mode 100644
index 000000000..6283293c9
--- /dev/null
+++ b/examples/examples-aadm/src/main/resources/examples/events/AADM/AADMTestPeridociEvent.json
@@ -0,0 +1,12 @@
+{
+ "nameSpace": "org.onap.policy.apex.examples.aadm.events",
+ "name": "PeriodicEvent",
+ "version": "0.0.1",
+ "source": "apex",
+ "target": "apex",
+ "PERIODIC_EVENT_COUNT": 100,
+ "PERIODIC_DELAY": 1000,
+ "PERIODIC_FIRST_TIME": 1496828877,
+ "PERIODIC_CURRENT_TIME": 1496828908,
+ "PERIODIC_LAST_TIME": 1496828919
+} \ No newline at end of file
diff --git a/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/AADMDoSProvenActTask_TaskLogic.mvel b/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/AADMDoSProvenActTask_TaskLogic.mvel
new file mode 100644
index 000000000..078841792
--- /dev/null
+++ b/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/AADMDoSProvenActTask_TaskLogic.mvel
@@ -0,0 +1,80 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+import org.onap.policy.apex.examples.aadm.concepts.ENodeBStatus;
+import org.onap.policy.apex.examples.aadm.concepts.IMSIStatus;
+
+logger.debug(subject.id + ":" + subject.taskName + " execution logic");
+logger.debug(inFields);
+
+outFields["ACTTASK"] = "act";
+outFields["TRIGGER_SPEC"] = "XSTREAM_AADM_ACT_EVENT";
+outFields["MAJ_MIN_MAINT_VERSION"] = "0.0.1";
+outFields["PROBE_ON"] = true;
+outFields["TCP_ON"] = false;
+outFields["IMSI"] = inFields["IMSI"];
+
+if (inFields["IMSI_IP"] != null) {
+ outFields["IMSI_IP"] = inFields["IMSI_IP"];
+}
+else{
+ outFields["IMSI_IP"] = inFields["UE_IP_ADDRESS"];
+}
+
+if (inFields["NW_IP"] != null) {
+ outFields["NW_IP"] = inFields["NW_IP"];
+}
+else{
+ outFields["NW_IP"] = inFields["SGW_IP_ADDRESS"];
+}
+
+IMSIStatus imsiStatus = getContextAlbum("IMSIStatusAlbum").get((String)inFields["IMSI"]);
+logger.debug(imsiStatus);
+
+ENodeBStatus eNodeBStatus = getContextAlbum("ENodeBStatusAlbum").get(imsiStatus.getENodeBID());
+eNodeBStatus.setBeingProbed(false);
+
+leaveProbingOn = false;
+for (ENodeBStatus enbStatus : getContextAlbum("ENodeBStatusAlbum").values) {
+ if (enbStatus.getBeingProbed()) {
+ leaveProbingOn = true;
+ }
+}
+
+if (!leaveProbingOn) {
+ outFields["PROBE_ON"] = false;
+ outFields["TCP_ON"] = false;
+}
+
+eNodeBStatus.decrementDOSCount();
+logger.debug(eNodeBStatus.getENodeB() + ": dosCount is " + eNodeBStatus.getDOSCount());
+
+imsiStatus.setAnomalous(false);
+
+logger.debug("imsi: " + imsiStatus.getIMSI() + " anamalous " + imsiStatus.getAnomalous());
+
+getContextAlbum("IMSIStatusAlbum") .put(imsiStatus.getIMSI(), imsiStatus);
+getContextAlbum("ENodeBStatusAlbum").put(eNodeBStatus.getENodeB(), eNodeBStatus);
+
+outFields["THRESHOLD"] = 0;
+outFields["PROFILE"] = "";
+outFields["VERSION"] = "0.0.1";
+outFields["BLACKLIST_ON"] = false;
+
+return true;
diff --git a/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/AADMDoSSuggestionActTask_TaskLogic.mvel b/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/AADMDoSSuggestionActTask_TaskLogic.mvel
new file mode 100644
index 000000000..d04f9425e
--- /dev/null
+++ b/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/AADMDoSSuggestionActTask_TaskLogic.mvel
@@ -0,0 +1,106 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+import org.onap.policy.apex.examples.aadm.concepts.ENodeBStatus;
+import org.onap.policy.apex.examples.aadm.concepts.IMSIStatus;
+
+logger.debug(subject.id + ":" + subject.taskName + " execution logic");
+logger.debug(inFields);
+
+outFields["ACTTASK"] = "probe";
+outFields["TRIGGER_SPEC"] = "XSTREAM_AADM_ACT_EVENT";
+outFields["MAJ_MIN_MAINT_VERSION"] = "0.0.1";
+outFields["IMSI"] = inFields["IMSI"];
+
+if (inFields["IMSI_IP"] != null) {
+ outFields["IMSI_IP"] = inFields["IMSI_IP"];
+}
+else {
+ outFields["IMSI_IP"] = inFields["UE_IP_ADDRESS"];
+}
+
+if (inFields["NW_IP"] != null) {
+ outFields["NW_IP"] = inFields["NW_IP"];
+}
+else {
+ outFields["NW_IP"] = inFields["SGW_IP_ADDRESS"];
+}
+
+IMSIStatus imsiStatus = getContextAlbum("IMSIStatusAlbum").get((String)inFields["IMSI"]);
+logger.debug(imsiStatus);
+
+ENodeBStatus eNodeBStatus = getContextAlbum("ENodeBStatusAlbum").get(imsiStatus.getENodeBID());
+logger.debug(eNodeBStatus);
+
+if (imsiStatus.getENodeBID() != null && !imsiStatus.getENodeBID().equals(inFields["ENODEB_ID"]) || inFields["AVG_SUBSCRIBER_SERVICE_REQUEST"] == null) {
+ // if user moved enodeB remove him from previous one
+ if (imsiStatus.getENodeBID() != null) {
+ eNodeBStatus.decrementDOSCount();
+ }
+
+ // if user became non anomalous return action
+ if (inFields["AVG_SUBSCRIBER_SERVICE_REQUEST"] == null) {
+ imsiStatus.setAnomalous(false);
+ outFields["ACTTASK"] = "remove_from_probe";
+
+ for (ENodeBStatus enbStatus : getContextAlbum("ENodeBStatusAlbum").values) {
+ if (enbStatus.getBeingProbed()) {
+ outFields["PROBE_ON"] = true;
+ outFields["TCP_ON"] = true;
+ return true;
+ }
+ }
+
+ outFields["PROBE_ON"] = false;
+ outFields["TCP_ON"] = false;
+
+ getContextAlbum("IMSIStatusAlbum").put(imsiStatus.getIMSI(), imsiStatus);
+ getContextAlbum("ENodeBStatusAlbum").put(eNodeBStatus.getENodeB(), eNodeBStatus);
+
+ return true;
+ }
+}
+
+imsiStatus.setAnomalous(true);
+imsiStatus.setAnomolousTime(System.currentTimeMillis());
+imsiStatus.setENodeBID(inFields["ENODEB_ID"]);
+getContextAlbum("IMSIStatusAlbum").put(imsiStatus.getIMSI(), imsiStatus);
+logger.debug(imsiStatus.getENodeBID() + ": enodeb added to imsi ip added " + outFields["IMSI_IP"]);
+
+ENodeBStatus eNodeBStatus = getContextAlbum("ENodeBStatusAlbum").get(imsiStatus.getENodeBID());
+if (eNodeBStatus == null) {
+ eNodeBStatus = new ENodeBStatus(imsiStatus.getENodeBID());
+ getContextAlbum("ENodeBStatusAlbum").put(eNodeBStatus.getENodeB(), eNodeBStatus);
+ logger.debug("new eNodeB added " + getContextAlbum("ENodeBStatusAlbum").get(imsiStatus.getENodeBID()));
+}
+
+eNodeBStatus.incrementDOSCount();
+getContextAlbum("ENodeBStatusAlbum").put(eNodeBStatus.getENodeB(), eNodeBStatus);
+logger.debug(eNodeBStatus.getENodeB() + ": dosCount incremented to " + eNodeBStatus.getDOSCount());
+
+outFields["PROBE_ON"] = true;
+outFields["TCP_ON"] = true;
+outFields["THRESHOLD"] = 0;
+outFields["PROFILE"] = "";
+outFields["VERSION"] = "0.0.1";
+outFields["BLACKLIST_ON"] = false;
+
+logger.debug("out here5");
+
+return true;
diff --git a/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/AADMMatchTask_TaskLogic.mvel b/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/AADMMatchTask_TaskLogic.mvel
new file mode 100644
index 000000000..bb38034af
--- /dev/null
+++ b/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/AADMMatchTask_TaskLogic.mvel
@@ -0,0 +1,75 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+import org.onap.policy.apex.examples.aadm.concepts.ENodeBStatus;
+import org.onap.policy.apex.examples.aadm.concepts.IPAddressStatus;
+import org.onap.policy.apex.examples.aadm.concepts.IMSIStatus;
+
+logger.debug(subject.id + ":" + subject.taskName + " execution logic");
+logger.debug(inFields);
+
+ipAddress = inFields["UE_IP_ADDRESS"];
+if (ipAddress == null ) {
+ ipAddress = inFields["IMSI_IP"];
+
+ if (ipAddress == null ) {
+ logger.debug("Incoming event must specify parameter UE_IP_ADDRESS or parameter IMSI_IP");
+ return false;
+ }
+}
+
+imsi = inFields["IMSI"];
+if (imsi == null ) {
+ logger.debug("Incoming event must specify parameter IMSI");
+ return false;
+}
+
+eNodeBID = inFields["ENODEB_ID"];
+if (eNodeBID == null ) {
+ logger.debug("Incoming event must specify parameter ENODEB_ID");
+ return false;
+}
+
+IPAddressStatus ipAddressStatus = getContextAlbum("IPAddressStatusAlbum").get(ipAddress);
+if (ipAddressStatus == null) {
+ ipAddressStatus = new IPAddressStatus(ipAddress);
+ ipAddressStatus.setIMSI(imsi);
+ getContextAlbum("IPAddressStatusAlbum").put(ipAddressStatus.getIPAddress(), ipAddressStatus);
+ logger.debug("added new IP address " + getContextAlbum("IPAddressStatusAlbum").get(ipAddress));
+}
+else {
+ logger.debug("found IP address " + ipAddressStatus);
+}
+
+IMSIStatus imsiStatus = getContextAlbum("IMSIStatusAlbum").get((String)imsi);
+if (imsiStatus == null) {
+ imsiStatus = new IMSIStatus(imsi);
+ imsiStatus.setENodeBID(eNodeBID);
+ getContextAlbum("IMSIStatusAlbum").put(imsiStatus.getIMSI(), imsiStatus);
+ logger.debug("added new IMSI " + imsi + " to IMSI status map")
+}
+
+ENodeBStatus eNodeBStatus = getContextAlbum("ENodeBStatusAlbum").get((String)eNodeBID);
+if (eNodeBStatus == null) {
+ eNodeBStatus = new ENodeBStatus(eNodeBID);
+ getContextAlbum("ENodeBStatusAlbum").put(eNodeBStatus.getENodeB(), eNodeBStatus);
+ logger.debug("added new ENodeB " + eNodeBID + " to ENodeB status map")
+}
+
+return true;
diff --git a/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/AADMNoActTask_TaskLogic.mvel b/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/AADMNoActTask_TaskLogic.mvel
new file mode 100644
index 000000000..7107b940b
--- /dev/null
+++ b/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/AADMNoActTask_TaskLogic.mvel
@@ -0,0 +1,55 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+logger.debug(subject.id + ":" + subject.taskName + " execution logic");
+
+outFields["ACTTASK"] = "no";
+outFields["TRIGGER_SPEC"] = "XSTREAM_AADM_ACT_EVENT";
+outFields["MAJ_MIN_MAINT_VERSION"] = "0.0.1";
+
+if (inFields["PROBE_ON"] != null) {
+ outFields["PROBE_ON"] = inFields["PROBE_ON"];
+}
+else{
+ outFields["PROBE_ON"] = false;
+}
+
+if (inFields["TCP_ON"] != null) {
+ outFields["TCP_ON"] = inFields["TCP_ON"];
+}
+else {
+ outFields["TCP_ON"] = false;
+}
+
+outFields["IMSI"] = inFields["IMSI"];
+if (inFields["IMSI_IP"] != null) {
+ outFields["IMSI_IP"] = inFields["IMSI_IP"];
+}
+else {
+ outFields["IMSI_IP"] = inFields["UE_IP_ADDRESS"];
+}
+
+if (inFields["NW_IP"] != null) {
+ outFields["NW_IP"] = inFields["NW_IP"];
+}
+else{
+ outFields["NW_IP"] = inFields["SGW_IP_ADDRESS"];
+}
+
+return true;
diff --git a/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/AADMPolicy_Act_TaskSelectionLogic.mvel b/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/AADMPolicy_Act_TaskSelectionLogic.mvel
new file mode 100644
index 000000000..2d0d45bdf
--- /dev/null
+++ b/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/AADMPolicy_Act_TaskSelectionLogic.mvel
@@ -0,0 +1,67 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+import org.onap.policy.apex.examples.aadm.concepts.IMSIStatus;
+import org.onap.policy.apex.examples.aadm.concepts.ENodeBStatus;
+
+logger.debug(subject.id + ":" + subject.stateName + " execution logic");
+logger.debug(inFields);
+
+logger.debug("inFields[SERVICE_REQUEST_COUNT]=" + inFields["SERVICE_REQUEST_COUNT"]);
+
+IMSIStatus imsiStatus = getContextAlbum("IMSIStatusAlbum").get((String)inFields["IMSI"]);
+
+if (imsiStatus.getBlockingCount() > 1) {
+ subject.getTaskKey("AADMNoActTask").copyTo(selectedTask);
+ logger.debug("user blacklisted permanently");
+ return false;
+}
+
+logger.debug("imsi: " + imsiStatus.getIMSI() + " anamalous " + imsiStatus.getAnomalous());
+
+// check if this is second iteration
+if (inFields["TCP_UE_SIDE_AVG_THROUGHPUT"] != null && inFields["TCP_UE_SIDE_AVG_THROUGHPUT"] > 100 && imsiStatus.getAnomalous()) {
+ subject.getTaskKey("AADMDoSProvenActTask").copyTo(selectedTask);
+ logger.debug("inside TCP_UE_SIDE_AVG_THROUGHPUT");
+ return true;
+}
+
+// Get the status of the ENodeB
+ENodeBStatus eNodeBStatus = getContextAlbum("ENodeBStatusAlbum").get((String)inFields["ENODEB_ID"]);
+
+// check if this is first iteration and DoS
+if (inFields["SERVICE_REQUEST_COUNT"] != null &&
+ inFields["AVG_SUBSCRIBER_SERVICE_REQUEST"] != null &&
+ inFields["SERVICE_REQUEST_COUNT"] > inFields["AVG_SUBSCRIBER_SERVICE_REQUEST"] &&
+ eNodeBStatus != null && eNodeBStatus.getDOSCount() > 100 &&
+ inFields["NUM_SUBSCRIBERS"] != null && inFields["NUM_SUBSCRIBERS"] > 100) {
+ logger.debug("inside NUM_SUBSCRIBERS");
+ subject.getTaskKey("AADMDoSProvenActTask").copyTo(selectedTask);
+ return true;
+}
+
+// check if this is first iteration and request probe
+if (inFields["UE_IP_ADDRESS"] != null) {
+ logger.debug("inside UE_IP_ADDRESS");
+ subject.getTaskKey("AADMDoSSuggestionActTask").copyTo(selectedTask);
+ return true;
+}
+
+subject.defaultTaskKey.copyTo(selectedTask);
+return true;
diff --git a/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/Default_TaskLogic.mvel b/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/Default_TaskLogic.mvel
new file mode 100644
index 000000000..69146d19c
--- /dev/null
+++ b/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/Default_TaskLogic.mvel
@@ -0,0 +1,23 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+logger.debug(subject.id + ":" + subject.taskName + " execution logic");
+logger.debug(inFields);
+logger.debug(outFields);
+return true;
diff --git a/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/Default_TaskSelectionLogic.mvel b/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/Default_TaskSelectionLogic.mvel
new file mode 100644
index 000000000..20fe626cd
--- /dev/null
+++ b/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/Default_TaskSelectionLogic.mvel
@@ -0,0 +1,23 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+logger.debug(subject.id + ":" + subject.stateName);
+subject.defaultTaskKey.copyTo(selectedTask)
+logger.debug(subject.id + ":" + subject.stateName) + ", using default task";
+return true;
diff --git a/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/PeriodicActTask_TaskLogic.mvel b/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/PeriodicActTask_TaskLogic.mvel
new file mode 100644
index 000000000..115ac5477
--- /dev/null
+++ b/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/PeriodicActTask_TaskLogic.mvel
@@ -0,0 +1,40 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+import org.onap.policy.apex.examples.aadm.concepts.IMSIStatus;
+
+logger.debug(subject.id + ":" + subject.taskName + " execution logic");
+logger.debug(inFields);
+
+for (IMSIStatus imsiStatus : getContextAlbum("IMSIStatusAlbum").values()) {
+ if ((System.currentTimeMillis() - imsiStatus.getBlacklistedTime()) > 180000) {
+ imsiStatus.setBlacklistedTime(0);
+ getContextAlbum("IMSIStatusAlbum").put(imsiStatus.getIMSI(), imsiStatus);
+ }
+}
+
+outFields["IMSI"] = 0;
+outFields["PROFILE"] = "ServiceA";
+outFields["BLACKLIST_ON"] = false;
+outFields["PROBE_ON"] = false;
+outFields["TCP_ON"] = false;
+outFields["NW_IP"] = "0.0.0.0";
+outFields["IMSI_IP"] = "0.0.0.0";
+
+return true;
diff --git a/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/SAPCActTask_TaskLogic.mvel b/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/SAPCActTask_TaskLogic.mvel
new file mode 100644
index 000000000..7ceaa2abe
--- /dev/null
+++ b/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/SAPCActTask_TaskLogic.mvel
@@ -0,0 +1,79 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+import org.onap.policy.apex.examples.aadm.concepts.IMSIStatus;
+
+logger.debug(subject.id + ":" + subject.taskName + " execution logic");
+logger.debug(inFields);
+
+if (inFields["IMSI"] == null) {
+ outFields["IMSI"] = 0;
+}
+else {
+ outFields["IMSI"] = inFields["IMSI"];
+}
+
+if (outFields["IMSI"] == 0 && inFields["IMSI_IP"] != null && inFields["IMSI_IP"].equals("0")) {
+ // no action arrived
+ outFields["IMSI"] = 0;
+ outFields["PROFILE"] = "none";
+ outFields["BLACKLIST_ON"] = false;
+ outFields["PROBE_ON"] = false;
+ return true;
+}
+
+IMSIStatus imsiStatus = getContextAlbum("IMSIStatusAlbum").get((String)inFields["IMSI"]);
+logger.debug(imsiStatus);
+
+if (imsiStatus.getBlockingCount() > 1) {
+ outFields["IMSI"] = 0;
+ outFields["PROFILE"] = "none";
+ outFields["BLACKLIST_ON"] = false;
+ outFields["PROBE_ON"] = false;
+
+ return true;
+}
+
+if (imsiStatus.getBlockingCount() > 0 && imsiStatus.getBlacklistedTime() != 0) {
+ outFields["IMSI"] = 0;
+ outFields["PROFILE"] = "none";
+ outFields["BLACKLIST_ON"] = false;
+ outFields["PROBE_ON"] = false;
+
+ return true;
+}
+
+imsiStatus.incrementBlockingCount();
+imsiStatus.setBlacklistedTime(System.currentTimeMillis());
+
+logger.debug("Bocking count for IMSI: " + imsiStatus.getIMSI() + " is: " + imsiStatus.getBlockingCount());
+getContextAlbum("IMSIStatusAlbum").put(imsiStatus.getIMSI(), imsiStatus);
+
+outFields["PROFILE"] = "ServiceA";
+outFields["BLACKLIST_ON"] = true;
+outFields["PROBE_ON"] = false;
+
+if (imsiStatus.getBlockingCount() > 1) {
+ logger.debug("POLICY SAPCPolicy - blacklisting imsi: " + outFields["IMSI"] + " permanently");
+}
+else {
+ logger.debug("POLICY SAPCPolicy - blacklisting imsi: " + outFields["IMSI"] + " temporary for 120000 ms");
+}
+
+return true;
diff --git a/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/SAPCMatchTask_TaskLogic.mvel b/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/SAPCMatchTask_TaskLogic.mvel
new file mode 100644
index 000000000..1de8b190c
--- /dev/null
+++ b/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/SAPCMatchTask_TaskLogic.mvel
@@ -0,0 +1,52 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+logger.debug(subject.id + ":" + subject.taskName + " execution logic");
+logger.debug(inFields);
+
+if (inFields["ACTTASK"] != null && inFields["ACTTASK"].equals("no")) {
+ outFields["IMSI"] = 0;
+ outFields["IMSI_IP"] = "0";
+ return true;
+}
+
+if (inFields["PROBE_ON"] != null) {
+ outFields["PROBE_ON"] = inFields["PROBE_ON"];
+}
+else{
+ outFields["PROBE_ON"] = false;
+}
+
+if (inFields["TCP_ON"] != null) {
+ outFields["TCP_ON"] = inFields["TCP_ON"];
+}
+else{
+ outFields["TCP_ON"] = false;
+}
+
+outFields["IMSI"] = inFields["IMSI"];
+if (inFields["IMSI_IP"] != null) {
+ outFields["IMSI_IP"] = inFields["IMSI_IP"];
+}
+
+if (inFields["NW_IP"] != null) {
+ outFields["NW_IP"] = inFields["NW_IP"];
+}
+
+return true;
diff --git a/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/VMMEActTask_TaskLogic.mvel b/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/VMMEActTask_TaskLogic.mvel
new file mode 100644
index 000000000..db1abdfe9
--- /dev/null
+++ b/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/VMMEActTask_TaskLogic.mvel
@@ -0,0 +1,44 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+logger.debug(subject.id + ":" + subject.taskName + " execution logic");
+logger.debug(inFields);
+
+outFields["TRIGGER_SPEC"] = "vMMEThresholdEvent";
+outFields["MAJ_MIN_MAINT_VERSION"] = "0.0.1";
+
+if (outFields["IMSI"] == null) {
+ outFields["IMSI"] = 0;
+}
+
+if (outFields["ENODEB_ID"] == null) {
+ outFields["ENODEB_ID"] = 0;
+}
+
+if (outFields["IMSI_IP"] == null) {
+ outFields["IMSI_IP"] = "";
+}
+
+if (outFields["NW_IP"] == null) {
+ outFields["NW_IP"] = "";
+}
+
+outFields["PROFILE"] = "ServiceA";
+outFields["THRESHOLD"] = 20;
+return true;
diff --git a/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/VMMEMatchTask_TaskLogic.mvel b/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/VMMEMatchTask_TaskLogic.mvel
new file mode 100644
index 000000000..33dbd4cd0
--- /dev/null
+++ b/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/VMMEMatchTask_TaskLogic.mvel
@@ -0,0 +1,47 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+logger.debug(subject.id + ":" + subject.taskName + " execution logic");
+logger.debug(inFields);
+
+if (inFields["PROBE_ON"] != null) {
+ outFields["PROBE_ON"] = inFields["PROBE_ON"];
+}
+else{
+ outFields["PROBE_ON"] = false;
+}
+
+if (inFields["TCP_ON"] != null) {
+ outFields["TCP_ON"] = inFields["TCP_ON"];
+}
+else{
+ outFields["TCP_ON"] = false;
+}
+
+outFields["IMSI"] = inFields["IMSI"];
+if (inFields["IMSI_IP"] != null) {
+ outFields["IMSI_IP"] = inFields["IMSI_IP"];
+}
+
+if (inFields["NW_IP"] != null) {
+ outFields["NW_IP"] = inFields["NW_IP"];
+}
+outFields["VERSION"] = inFields.getkey().getVersion();
+
+return true;