diff options
author | 2018-10-18 11:45:52 +0530 | |
---|---|---|
committer | 2018-10-23 18:28:01 +0530 | |
commit | b9007182f9a8fa0dea48fc970e38fb6761bf6c24 (patch) | |
tree | 8acc33b3aab928e3b7e1d4db7baee7c5ee4135af /controlloop/templates/archetype-cl-casablanca/src/main/resources | |
parent | ecffd0e5dfe112bcc69ee420848bbc476571637c (diff) |
Add CCVPN policy
CCVPN policy
Issue-ID: POLICY-1209
Change-Id: I8adea233f8672c9ff43b4a169b50336d9e43c91d
Signed-off-by: Vidyashree Rama <vidyashree.rama@huawei.com>
Diffstat (limited to 'controlloop/templates/archetype-cl-casablanca/src/main/resources')
5 files changed, 78 insertions, 0 deletions
diff --git a/controlloop/templates/archetype-cl-casablanca/src/main/resources/META-INF/maven/archetype-metadata.xml b/controlloop/templates/archetype-cl-casablanca/src/main/resources/META-INF/maven/archetype-metadata.xml index 4ef410083..a96989acd 100644 --- a/controlloop/templates/archetype-cl-casablanca/src/main/resources/META-INF/maven/archetype-metadata.xml +++ b/controlloop/templates/archetype-cl-casablanca/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -61,6 +61,15 @@ <requiredProperty key="volteControlLoopYaml"> <defaultValue>controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b%0D%0A++trigger_policy%3A+unique-policy-id-1-restart%0D%0A++timeout%3A+3600%0D%0A++abatement%3A+false%0D%0A+%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-1-restart%0D%0A++++name%3A+Restart+the+VM%0D%0A++++description%3A%0D%0A++++actor%3A+VFC%0D%0A++++recipe%3A+Restart%0D%0A++++target%3A%0D%0A++++++type%3A+VM%0D%0A++++retry%3A+3%0D%0A++++timeout%3A+1200%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard</defaultValue> </requiredProperty> + <requiredProperty key="ccvpnClosedLoopControlName"> + <defaultValue>ControlLoop-CCVPN-2179b738-fd36-4843-a71a-a8c24c70c66b</defaultValue> + </requiredProperty> + <requiredProperty key="ccvpnPolicyName"> + <defaultValue>CCVPN</defaultValue> + </requiredProperty> + <requiredProperty key="ccvpnControlLoopYaml"> + <defaultValue>controlLoop%3A%0D%0A++version%3A+2.0.0%0D%0A++controlLoopName%3A+ControlLoop-CCVPN-2179b738-fd36-4843-a71a-a8c24c70c66b%0D%0A++trigger_policy%3A+unique-policy-id-16-Reroute%0D%0A++timeout%3A+3600%0D%0A++abatement%3A+false%0D%0A+%0D%0Apolicies%3A%0D%0A++-+id%3A+unique-policy-id-16-Reroute%0D%0A++++name%3A+Connectivity Reroute%0D%0A++++description%3A%0D%0A++++actor%3A+SDNC%0D%0A++++recipe%3A+Reroute%0D%0A++++target%3A%0D%0A++++++type%3A+VM%0D%0A++++retry%3A+3%0D%0A++++timeout%3A+1200%0D%0A++++success%3A+final_success%0D%0A++++failure%3A+final_failure%0D%0A++++failure_timeout%3A+final_failure_timeout%0D%0A++++failure_retries%3A+final_failure_retries%0D%0A++++failure_exception%3A+final_failure_exception%0D%0A++++failure_guard%3A+final_failure_guard</defaultValue> + </requiredProperty> <requiredProperty key="policyScope"> <defaultValue>DCAE</defaultValue> </requiredProperty> diff --git a/controlloop/templates/archetype-cl-casablanca/src/main/resources/archetype-resources/src/main/config/CCVPN.yaml b/controlloop/templates/archetype-cl-casablanca/src/main/resources/archetype-resources/src/main/config/CCVPN.yaml new file mode 100644 index 000000000..b5b37b0eb --- /dev/null +++ b/controlloop/templates/archetype-cl-casablanca/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-casablanca/src/main/resources/archetype-resources/src/main/config/ccvpn.brmsgw.params.json b/controlloop/templates/archetype-cl-casablanca/src/main/resources/archetype-resources/src/main/config/ccvpn.brmsgw.params.json new file mode 100644 index 000000000..5feeecd9e --- /dev/null +++ b/controlloop/templates/archetype-cl-casablanca/src/main/resources/archetype-resources/src/main/config/ccvpn.brmsgw.params.json @@ -0,0 +1,7 @@ +{ + "closedLoopControlName": "${ccvpnClosedLoopControlName}", + "controlLoopYaml": "${ccvpnControlLoopYaml}", + "policyName": "${ccvpnPolicyName}", + "policyScope": "${policyScope}", + "policyVersion": "${policyVersion}" +}
\ No newline at end of file diff --git a/controlloop/templates/archetype-cl-casablanca/src/main/resources/archetype-resources/src/main/config/dcae.ccvpn.onset.json b/controlloop/templates/archetype-cl-casablanca/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-casablanca/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-casablanca/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl b/controlloop/templates/archetype-cl-casablanca/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl index 11855d47d..f2aa7ef16 100644 --- a/controlloop/templates/archetype-cl-casablanca/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl +++ b/controlloop/templates/archetype-cl-casablanca/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl @@ -579,6 +579,11 @@ rule "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) { |