e9feb97f5e8a529917a99a4bead1a22c1ccc725c
[yardstick.git] / tests / opnfv / test_cases / opnfv_yardstick_tc058.yaml
1 ##############################################################################
2 # Copyright (c) 2017 14_ykl@tongji.edu.cn 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     Test case for TC058 :OpenStack Controller Virtual Router Service High
14     Availability;
15     This test case is written by scenario-based HA testing framework.
16
17 {% set file = file or '/etc/yardstick/pod.yaml' %}
18 {% set image = image or 'yardstick-image' %}
19 {% set flavor = flavor or 'yardstick-flavor' %}
20 {% set attack_host = attack_host or 'node1' %}
21
22 scenarios:
23   -
24     type: "GeneralHA"
25     options:
26       attackers:
27         -
28           fault_type: "kill-process"
29           host: {{attack_host}}
30           key: "kill-process"
31           process_name: "neutron-l3-agent"
32
33       monitors:
34         -
35           monitor_type: "process"
36           process_name: "neutron-l3-agent"
37           host: {{attack_host}}
38           key: "monitor-recovery"
39           monitor_time: 20
40           sla:
41             max_recover_time: 20
42
43         -
44           monitor_type: "general-monitor"
45           monitor_key: "ip-status"
46           key: "server-status"
47           monitor_time: 10
48           sla:
49             max_outage_time: 5
50           parameter:
51             ip_address: "$floating_ip"
52
53       operations:
54         -
55           operation_type: "general-operation"
56           key: "get-floatingip"
57           operation_key: "get-floatingip"
58           action_parameter:
59             server_name: "tc058"
60           return_parameter:
61             all: "$floating_ip"
62
63
64       steps:
65         -
66           actionKey: "get-floatingip"
67           actionType: "operation"
68           index: 1
69         -
70           actionKey: "kill-process"
71           actionType: "attacker"
72           index: 2
73
74         -
75           actionKey: "monitor-recovery"
76           actionType: "monitor"
77           index: 3
78
79         -
80           actionKey: "server-status"
81           actionType: "monitor"
82           index: 4
83
84     nodes:
85       {{attack_host}}: {{attack_host}}.LF
86     runner:
87       type: Duration
88       duration: 1
89     sla:
90       outage_time: 5
91       action: monitor
92
93 contexts:
94 -
95   type: Node
96   name: LF
97   file: {{file}}
98
99 -
100   name: demo
101   image: {{image}}
102   flavor: {{flavor}}
103   user: cirros
104
105   servers:
106     tc058:
107       floating_ip: true
108
109   networks:
110     test:
111       cidr: '10.0.1.0/24'