Merge "Add send socket commands function"
[yardstick.git] / tests / opnfv / test_cases / opnfv_yardstick_tc092.yaml
1 ##############################################################################
2 ## Copyright (c) 2018 Intracom Telecom and others.
3 ##
4 ## All rights reserved. This program and the accompanying materials
5 ## are made available under the terms of the Apache License, Version 2.0
6 ## which accompanies this distribution, and is available at
7 ## http://www.apache.org/licenses/LICENSE-2.0
8 ###############################################################################
9 ---
10
11 schema: "yardstick:task:0.1"
12 description: >
13     Yardstick TC092 config file;
14     SDN Controller resilience in HA configuration
15
16 {% set file = file or '/etc/yardstick/pod.yaml' %}
17 {% set attack_host = attack_host or 'node6' %}
18
19 scenarios:
20
21 -
22       type: "GeneralHA"
23       options:
24           monitors:
25             - monitor_type: "general-monitor"
26               monitor_key: "ip-status"
27               key: "snat"
28               monitor_time: 50
29               host: athena
30               sla:
31                  max_outage_time: 0
32               parameter:
33                 destination_ip: "8.8.8.8"
34
35             - monitor_type: "general-monitor"
36               monitor_key: "ip-status"
37               key: "l2"
38               monitor_time: 50
39               host: athena
40               sla:
41                  max_outage_time: 0
42               parameter:
43                 destination_ip: "@private_ip"
44
45           operations:
46             - operation_type: "general-operation"
47               key: "get-privateip"
48               operation_key: "get-privateip"
49               action_parameter:
50                 server_name: "ares"
51               return_parameter:
52                 all: "@private_ip"
53
54
55           steps:
56             - actionKey: "get-privateip"
57               actionType: "operation"
58               index: 1
59
60             - actionKey: "l2"
61               actionType: "monitor"
62               index: 2
63
64             - actionKey: "snat"
65               actionType: "monitor"
66               index: 3
67
68
69       nodes:
70         {{attack_host}}: {{attack_host}}.LF
71         athena: athena.ODLHA1
72       runner:
73         type: Duration
74         duration: 1
75       sla:
76         action: monitor
77
78 -
79       type: "GeneralHA"
80       options:
81           attackers:
82             -
83               fault_type: "kill-process"
84               process_name: "opendaylight"
85               key: "kill-process"
86               host: {{attack_host}}
87
88           monitors:
89             - monitor_type: "process"
90               process_name: "opendaylight"
91               host: {{attack_host}}
92               key: "monitor-recovery"
93               monitor_time: 50
94               sla:
95                 max_recover_time: 30
96
97
98             - monitor_type: "general-monitor"
99               monitor_key: "ip-status"
100               key: "snat"
101               monitor_time: 70
102               host: athena
103               sla:
104                  max_outage_time: 0
105               parameter:
106                 destination_ip: "8.8.8.8"
107
108             - monitor_type: "general-monitor"
109               monitor_key: "ip-status"
110               key: "l2"
111               monitor_time: 70
112               host: athena
113               sla:
114                  max_outage_time: 0
115               parameter:
116                 destination_ip: "@private_ip"
117
118           operations:
119             - operation_type: "general-operation"
120               key: "start-service"
121               host: {{attack_host}}
122               operation_key: "start-service"
123               action_parameter:
124                 service: "opendaylight"
125               rollback_parameter:
126                 service: "opendaylight"
127
128             - operation_type: "general-operation"
129               key: "get-privateip"
130               operation_key: "get-privateip"
131               action_parameter:
132                 server_name: "ares"
133               return_parameter:
134                 all: "@private_ip"
135
136
137
138           steps:
139
140             - actionKey: "monitor-recovery"
141               actionType: "monitor"
142               index: 1
143
144             - actionKey: "get-privateip"
145               actionType: "operation"
146               index: 2
147
148             - actionKey: "l2"
149               actionType: "monitor"
150               index: 3
151
152             - actionKey: "snat"
153               actionType: "monitor"
154               index: 4
155
156             - actionKey: "kill-process"
157               actionType: "attacker"
158               index: 5
159
160             - actionKey: "start-service"
161               actionType: "operation"
162               index: 6
163
164
165
166       nodes:
167         {{attack_host}}: {{attack_host}}.LF
168         athena: athena.ODLHA1
169       runner:
170         type: Duration
171         duration: 1
172       sla:
173         action: monitor
174
175 -
176       type: "GeneralHA"
177       options:
178           monitors:
179
180             - monitor_type: "general-monitor"
181               monitor_key: "ip-status"
182               key: "l2"
183               monitor_time: 80
184               host: athena
185               sla:
186                  max_outage_time: 40
187               parameter:
188                 destination_ip: "@private_ip"
189
190           operations:
191             - operation_type: "general-operation"
192               key: "get-privateip"
193               operation_key: "get-privateip"
194               action_parameter:
195                 server_name: "hermes"
196               return_parameter:
197                 all: "@private_ip"
198
199             - operation_type: "general-operation"
200               key: "nova-create-instance"
201               operation_key: "nova-create-instance"
202               action_parameter:
203                 serverconfig: "hermes yardstick-image yardstick-flavor test_one"
204               rollback_parameter:
205                 serverconfig: "hermes"
206
207             - operation_type: "general-operation"
208               key: "add-server-to-secgroup"
209               operation_key: "add-server-to-secgroup"
210               action_parameter:
211                 serverconfig: "hermes ODLHA1"
212               rollback_parameter:
213                 serverconfig: "hermes ODLHA1"
214
215
216           steps:
217             - actionKey: "nova-create-instance"
218               actionType: "operation"
219               index: 1
220
221             - actionKey: "add-server-to-secgroup"
222               actionType: "operation"
223               index: 2
224
225             - actionKey: "get-privateip"
226               actionType: "operation"
227               index: 3
228
229             - actionKey: "l2"
230               actionType: "monitor"
231               index: 4
232
233       nodes:
234         {{attack_host}}: {{attack_host}}.LF
235         athena: athena.ODLHA1
236       runner:
237         type: Duration
238         duration: 1
239       sla:
240         action: monitor
241
242
243 contexts:
244     -
245         type: Node
246         name: LF
247         file: {{file}}
248     -
249         name: ODLHA1
250         image: yardstick-image
251         flavor: yardstick-flavor
252         user: ubuntu
253         host: athena
254         placement_groups:
255             pgrp1:
256                 policy: "availability"
257         servers:
258             athena:
259                 floating_ip: true
260                 placement: "pgrp1"
261                 network_ports:
262                     test_one:
263                         - ens0
264
265             ares:
266                 floating_ip: true
267                 placement: "pgrp1"
268                 network_ports:
269                     test_one:
270                         - ens0
271
272         networks:
273             test_one:
274                 cidr: '10.0.1.0/24'
275                 router: 'test_router'
276