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/CCVPN.yaml36
-rw-r--r--controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/dcae.ccvpn.onset.json21
-rw-r--r--controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl5
3 files changed, 62 insertions, 0 deletions
diff --git a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/CCVPN.yaml b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/CCVPN.yaml
new file mode 100644
index 000000000..b5b37b0eb
--- /dev/null
+++ b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/CCVPN.yaml
@@ -0,0 +1,36 @@
+# Copyright (C) 2018 Huawei. 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.
+controlLoop:
+ version: 2.0.0
+ controlLoopName: ${ccvpnClosedLoopControlName}
+ trigger_policy: unique-policy-id-16-Reroute
+ timeout: 3600
+ abatement: false
+
+policies:
+ - id: unique-policy-id-16-Reroute
+ name: Connectivity Reroute
+ description:
+ actor: SDNC
+ recipe: Reroute
+ target:
+ type: VM
+ 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/dcae.ccvpn.onset.json b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/dcae.ccvpn.onset.json
new file mode 100644
index 000000000..474911e74
--- /dev/null
+++ b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/config/dcae.ccvpn.onset.json
@@ -0,0 +1,21 @@
+{
+ "closedLoopEventClient": "DCAE.HolmesInstance",
+ "policyVersion": "1.0.0.5",
+ "policyName": "CCVPN",
+ "policyScope": "service=SOTNService,type=SampleType,closedLoopControlName=CL-CCVPN-d925ed73-8231-4d02-9545-db4e101f88f8",
+ "target_type": "VM",
+ "AAI": {
+ "vserver.vserver-name" : "TBD",
+ "globalSubscriberId" : "e151059a-d924-4629-845f-264db19e50b4",
+ "serviceType" : "SOTN",
+ "service-information.service-instance-id" : "service-instance-id-example-1",
+ "network-information. network-id " : "id"
+ },
+ "closedLoopAlarmStart": 1484677482204798,
+ "closedLoopEventStatus": "ONSET",
+ "closedLoopControlName": "${ccvpnClosedLoopControlName}",
+ "version": "1.0.2",
+ "target": "vserver.vserver-name",
+ "requestID": "97964e10-686e-4790-8c45-bdfa61df770f",
+ "from": "DCAE"
+}
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 48cfab24c..cac512eac 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
@@ -618,6 +618,11 @@ rule "${policyName}.EVENT.MANAGER.OPERATION.LOCKED.GUARD_PERMITTED"
retract($operation);
modify($manager) {finishOperation($operation)};
}
+ else if ("sdnc".equalsIgnoreCase($operation.policy.getActor())) {
+ retract($opTimer);
+ retract($operation);
+ modify($manager) {finishOperation($operation)};
+ }
}
} catch (Exception e) {