de2590c157d79b347b1699de5278a418f76c3a4a
[policy/models.git] / models-interactions / model-yaml / src / test / resources / v1.0.0 / policy_Test.yaml
1 # Copyright 2018 AT&T Intellectual Property. All rights reserved
2 # Modifications Copyright (C) 2019-2020 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: unique-policy-id-1-restart
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:
33       type: VM
34     retry: 2
35     timeout: 300
36     success: unique-policy-id-2-healthcheck-restart
37     failure: unique-policy-id-3-rebuild
38     failure_timeout: unique-policy-id-3-rebuild
39     failure_retries: unique-policy-id-3-rebuild
40     failure_exception: final_failure_exception
41
42   - id: unique-policy-id-2-healthcheck-restart
43     name: HealthCheck Policy
44     description:
45     actor: APPC
46     recipe: HealthCheck
47     target:
48       type: VM
49     retry: 2
50     timeout: 300
51     success: final_success
52     failure: unique-policy-id-3-rebuild
53     failure_timeout: unique-policy-id-3-rebuild
54     failure_retries: unique-policy-id-3-rebuild
55     failure_exception: final_failure_exception
56
57   - id: unique-policy-id-3-rebuild
58     name: Rebuild Policy
59     description:
60     actor: APPC
61     recipe: Rebuild
62     target:
63       type: VM
64     retry: 0
65     timeout: 600
66     success: unique-policy-id-4-healthcheck-rebuild
67     failure: unique-policy-id-5-migrate
68     failure_timeout: unique-policy-id-5-migrate
69     failure_retries: unique-policy-id-5-migrate
70     failure_exception: final_failure_exception
71
72   - id: unique-policy-id-4-healthcheck-rebuild
73     name: HealthCheck the Rebuild Policy
74     description:
75     actor: APPC
76     recipe: HealthCheck
77     target:
78       type: VM
79     retry: 2
80     timeout: 300
81     success: final_success
82     failure: unique-policy-id-5-migrate
83     failure_timeout: unique-policy-id-5-migrate
84     failure_retries: unique-policy-id-5-migrate
85     failure_exception: final_failure_exception
86
87   - id: unique-policy-id-5-migrate
88     name: Migrate Policy
89     description:
90     actor: APPC
91     recipe: Migrate
92     target:
93       type: VM
94     retry: 0
95     timeout: 600
96     success: unique-policy-id-6-healthcheck-migrate
97     failure: final_failure
98     failure_timeout: final_failure_timeout
99     failure_retries: final_failure_retries
100     failure_exception: final_failure_exception
101
102   - id: unique-policy-id-6-healthcheck-migrate
103     name: Healthcheck the Migrate Policy
104     description:
105     actor: APPC
106     recipe: HealthCheck
107     target:
108       type: VM
109     retry: 2
110     timeout: 300
111     success: final_success
112     failure: final_failure
113     failure_timeout: final_failure_timeout
114     failure_retries: final_failure_retries
115     failure_exception: final_failure_exception