Merge "unify pod keywork so api can easily used"
[yardstick.git] / tests / opnfv / test_cases / opnfv_yardstick_tc054.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 TC054 :OpenStack VIP Master Node abnormally shutdown High Availability;
14     This test case is written by new scenario-based HA testing framework.
15
16 {% set file = file or '/etc/yardstick/pod.yaml' %}
17 {% set vip_management = vip_management or '192.168.0.2' %}
18 {% set vip_public = vip_public or '172.16.0.3' %}
19 {% set vip_router_management = vip_router_management or '192.168.0.1' %}
20 {% set vip_router_public = vip_router_public or '172.16.0.2' %}
21
22 scenarios:
23   -
24     type: "GeneralHA"
25     options:
26       attackers:
27         -
28           fault_type: "bare-metal-down"
29           host: node1
30           key: "bare-metal-down"
31
32       monitors:
33         -
34           monitor_type: "openstack-cmd"
35           key: "list-images"
36           command_name: "openstack image list"
37           monitor_time: 10
38           monitor_number: 3
39           sla:
40             max_outage_time: 5
41
42         -
43           monitor_type: "general-monitor"
44           monitor_key: "ip-status"
45           key: "vip-mgmt-status"
46           host: node2
47           monitor_time: 10
48           monitor_number: 3
49           sla:
50             max_outage_time: 5
51           parameter:
52             ip_address: {{vip_management}}
53
54         -
55           monitor_type: "general-monitor"
56           monitor_key: "ip-status"
57           key: "vip-routerp-status"
58           host: node2
59           monitor_time: 10
60           monitor_number: 3
61           sla:
62             max_outage_time: 5
63           parameter:
64             ip_address: {{vip_router_public}}
65
66         -
67           monitor_type: "general-monitor"
68           monitor_key: "ip-status"
69           key: "vip-router-status"
70           host: node2
71           monitor_time: 10
72           monitor_number: 3
73           sla:
74             max_outage_time: 5
75           parameter:
76             ip_address: {{vip_router_management}}
77
78         -
79           monitor_type: "general-monitor"
80           monitor_key: "ip-status"
81           key: "vip-pub"
82           host: node2
83           monitor_time: 10
84           monitor_number: 3
85           sla:
86             max_outage_time: 5
87           parameter:
88             ip_address: {{vip_public}}
89
90
91       steps:
92         -
93           actionKey: "bare-metal-down"
94           actionType: "attacker"
95           index: 1
96         -
97           actionKey: "list-images"
98           actionType: "monitor"
99           index: 2
100
101         -
102           actionKey: "vip-mgmt-status"
103           actionType: "monitor"
104           index: 3
105
106         -
107           actionKey: "vip-routerp-status"
108           actionType: "monitor"
109           index: 4
110
111         -
112           actionKey: "vip-router-status"
113           actionType: "monitor"
114           index: 5
115
116         -
117           actionKey: "vip-pub"
118           actionType: "monitor"
119           index: 6
120
121     nodes:
122       node1: node1.LF
123       node2: node2.LF
124     runner:
125       type: Duration
126       duration: 1
127     sla:
128       outage_time: 5
129       action: monitor
130
131 context:
132   type: Node
133   name: LF
134   file: {{file}}