ad5736b869e7f8731b8841ed8d3696c1e014fa40
[policy/models.git] / models-interactions / model-yaml / src / test / resources / v1.0.0 / bad_trigger_1.yaml
1 # Copyright 2018 AT&T Intellectual Property. All rights reserved
2 # Modifications Copyright (C) 2019 Nordix Foundation.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #         http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 controlLoop:
16   controlLoopName: ControlLoop-TEST-5dfa8fce-bd7a-4424-b60d-ee2ad2f254a3
17   version: 1.0.0
18   services: 
19     - serviceName: Foo Service
20   resources: 
21     - resourceName: Bar VNF
22       resourceType: VF
23   trigger_policy: FOO
24   timeout: 1200
25
26 policies:
27   - id: unique-policy-id-1-restart
28     name: Restart Policy for Trigger Event
29     description:
30     actor: APPC
31     recipe: Restart
32     target: VM
33     retry: 2
34     timeout: 300
35     success: unique-policy-id-2-healthcheck-restart
36     failure: unique-policy-id-3-rebuild
37     failure_timeout: unique-policy-id-3-rebuild
38     failure_retries: unique-policy-id-3-rebuild
39     failure_exception: final_failure_exception
40   
41   - id: unique-policy-id-2-healthcheck-restart
42     name: HealthCheck Policy
43     description:
44     actor: APPC
45     recipe: HealthCheck
46     target: VM
47     retry: 2
48     timeout: 300
49     success: final_success
50     failure: unique-policy-id-3-rebuild
51     failure_timeout: unique-policy-id-3-rebuild
52     failure_retries: unique-policy-id-3-rebuild
53     failure_exception: final_failure_exception
54   
55   - id: unique-policy-id-3-rebuild
56     name: Rebuild Policy
57     description:
58     actor: APPC
59     recipe: Rebuild
60     target: VM
61     retry: 0
62     timeout: 600
63     success: unique-policy-id-4-healthcheck-rebuild
64     failure: unique-policy-id-5-migrate
65     failure_timeout: unique-policy-id-5-migrate
66     failure_retries: unique-policy-id-5-migrate
67     failure_exception: final_failure_exception
68   
69   - id: unique-policy-id-4-healthcheck-rebuild
70     name: HealthCheck the Rebuild Policy
71     description:
72     actor: APPC
73     recipe: HealthCheck
74     target: VM
75     retry: 2
76     timeout: 300
77     success: final_success
78     failure: unique-policy-id-5-migrate
79     failure_timeout: unique-policy-id-5-migrate
80     failure_retries: unique-policy-id-5-migrate
81     failure_exception: final_failure_exception
82   
83   - id: unique-policy-id-5-migrate
84     name: Migrate Policy
85     description:
86     actor: APPC
87     recipe: Migrate
88     target: VM
89     retry: 0
90     timeout: 600
91     success: unique-policy-id-6-healthcheck-migrate
92     failure: final_failure
93     failure_timeout: final_failure_timeout
94     failure_retries: final_failure_retries
95     failure_exception: final_failure_exception
96
97   - id: unique-policy-id-6-healthcheck-migrate
98     name: Healthcheck the Migrate Policy
99     description:
100     actor: APPC
101     recipe: HealthCheck
102     target: VM
103     retry: 2
104     timeout: 300
105     success: final_success
106     failure: final_failure
107     failure_timeout: final_failure_timeout
108     failure_retries: final_failure_retries
109     failure_exception: final_failure_exception