Make drools-pdp work with drools and java versions compatible
[policy/drools-applications.git] / controlloop / common / policy-yaml / src / test / resources / v2.0.0 / policy_vService.yaml
1 # Copyright 2018 AT&T Intellectual Property. All rights reserved
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #         http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 controlLoop:
15   version: 2.0.0
16   controlLoopName: ControlLoop-GENERIC-64cdc9fa-6601-4989-9de7-8f47134aa043
17   #
18   # Example of how someone can fine-grain this
19   # policy for a specific service and/or resources
20   # contained within the service.
21   #
22   services:
23     - serviceName: vFooService
24  
25   resources:
26     - resourceName: vVNF1
27       resourceType: VFC
28     - resourceName: vVNF2
29       resourceType: VFC
30     - resourceName: vVNF3
31       resourceType: VFC
32     - resourceName: vVNF4
33       resourceType: VFC
34  
35   trigger_policy: unique-policy-id-1-restart
36   timeout: 1200
37   #
38   # Example of case where an abatement isn't possible
39   # from DCAE to Policy. So Policy should NOT expect
40   #
41   abatement: false
42  
43 policies:
44  
45   - id: unique-policy-id-1-restart
46     name: Restart Policy
47     description:
48     actor: APPC
49     recipe: Restart
50     target:
51       type: VM
52     retry: 2
53     timeout: 300
54     success: unique-policy-id-1-healthdiagnostic
55     failure: unique-policy-id-2-rebuild
56     failure_timeout: unique-policy-id-2-rebuild
57     failure_retries: unique-policy-id-2-rebuild
58     failure_exception: final_failure_exception
59     failure_guard: unique-policy-id-2-rebuild
60    
61  
62   - id: unique-policy-id-2-rebuild
63     name: Rebuild Policy
64     description:
65     actor: APPC
66     recipe: Rebuild
67     target:
68       type: VM
69     retry: 0
70     timeout: 600
71     success: unique-policy-id-2-healthdiagnostic
72     failure: unique-policy-id-3-migrate
73     failure_timeout: unique-policy-id-3-migrate
74     failure_retries: unique-policy-id-3-migrate
75     failure_exception: final_failure_exception
76     failure_guard: unique-policy-id-3-migrate
77  
78   - id: unique-policy-id-3-migrate
79     name: Migrate Policy
80     description:
81     actor: APPC
82     recipe: Migrate
83     target:
84       type: VM
85     retry: 0
86     timeout: 600
87     success: final_success
88     failure: final_failure
89     failure_timeout: final_failure_timeout
90     failure_retries: final_failure_retries
91     failure_exception: final_failure_exception
92     failure_guard: final_failure_guard
93  
94   - id: unique-policy-id-1-healthdiagnostic
95     name: Do A Health Diagnostic
96     description:
97     actor: APPC
98     recipe: health-diagnostic
99     # Example of a payload
100     payload:
101       health-diagnostic-code: HC01234
102       health-diagnostic-code-parameters: "{\"Junk\":\"--version\",\"Junk2\":\"--help\"}"
103     target:
104       type: VM
105     retry: 0
106     timeout: 600
107     success: final_success
108     failure: unique-policy-id-2-rebuild
109     failure_timeout: unique-policy-id-2-rebuild
110     failure_retries: unique-policy-id-2-rebuild
111     failure_exception: final_failure_exception
112     failure_guard: unique-policy-id-2-rebuild
113  
114  
115   - id: unique-policy-id-2-healthdiagnostic
116     name: Do Health Diagnostic
117     description:
118     actor: APPC
119     recipe: health-diagnostic
120     payload:
121       health-diagnostic-code: HC01234
122       health-diagnostic-code-parameters: "{\"Junk\":\"--version\",\"Junk2\":\"--help\"}"
123     target:
124       type: VM
125     retry: 0
126     timeout: 600
127     success: final_success
128     failure: final_failure
129     failure_timeout: final_failure_timeout
130     failure_retries: final_failure_retries
131     failure_exception: final_failure_exception
132     failure_guard: final_failure_guard
133     
134