tc063: make node parameter can be pass
[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 attack_host = attack_host or 'node1' %}
17 {% set check_host = check_host or 'node2' %}
18 {% set jump_host = jump_host or 'node0' %}
19 {% set file = file or '/etc/yardstick/pod.yaml' %}
20 {% set vip_management = vip_management or '192.168.0.2' %}
21 {% set vip_public = vip_public or '172.16.0.3' %}
22 {% set vip_router_management = vip_router_management or '192.168.0.1' %}
23 {% set vip_router_public = vip_router_public or '172.16.0.2' %}
24 {% set monitor_time = monitor_time or 180 %}
25
26 scenarios:
27   -
28     type: "GeneralHA"
29     options:
30       attackers:
31         -
32           fault_type: "bare-metal-down"
33           host: {{attack_host}}
34           key: "bare-metal-down"
35           jump_host: {{jump_host}}
36
37       monitors:
38         -
39           monitor_type: "openstack-cmd"
40           key: "list-images"
41           command_name: "openstack image list"
42           monitor_time: {{monitor_time}}
43           monitor_number: 3
44           sla:
45             max_outage_time: 5
46
47         -
48           monitor_type: "general-monitor"
49           monitor_key: "ip-status"
50           key: "vip-mgmt-status"
51           host: {{check_host}}
52           monitor_time: {{monitor_time}}
53           monitor_number: 3
54           sla:
55             max_outage_time: 5
56           parameter:
57             ip_address: {{vip_management}}
58
59         -
60           monitor_type: "general-monitor"
61           monitor_key: "ip-status"
62           key: "vip-routerp-status"
63           host: {{check_host}}
64           monitor_time: {{monitor_time}}
65           monitor_number: 3
66           sla:
67             max_outage_time: 5
68           parameter:
69             ip_address: {{vip_router_public}}
70
71         -
72           monitor_type: "general-monitor"
73           monitor_key: "ip-status"
74           key: "vip-router-status"
75           host: {{check_host}}
76           monitor_time: {{monitor_time}}
77           monitor_number: 3
78           sla:
79             max_outage_time: 5
80           parameter:
81             ip_address: {{vip_router_management}}
82
83         -
84           monitor_type: "general-monitor"
85           monitor_key: "ip-status"
86           key: "vip-pub"
87           host: {{check_host}}
88           monitor_time: {{monitor_time}}
89           monitor_number: 3
90           sla:
91             max_outage_time: 5
92           parameter:
93             ip_address: {{vip_public}}
94
95
96       steps:
97         -
98           actionKey: "bare-metal-down"
99           actionType: "attacker"
100           index: 1
101         -
102           actionKey: "list-images"
103           actionType: "monitor"
104           index: 2
105
106         -
107           actionKey: "vip-mgmt-status"
108           actionType: "monitor"
109           index: 3
110
111         -
112           actionKey: "vip-routerp-status"
113           actionType: "monitor"
114           index: 4
115
116         -
117           actionKey: "vip-router-status"
118           actionType: "monitor"
119           index: 5
120
121         -
122           actionKey: "vip-pub"
123           actionType: "monitor"
124           index: 6
125
126     nodes:
127       {{jump_host}}: {{jump_host}}.LF
128       {{attack_host}}: {{attack_host}}.LF
129       {{check_host}}: {{check_host}}.LF
130     runner:
131       type: Duration
132       duration: 1
133     sla:
134       outage_time: 5
135       action: monitor
136
137 context:
138   type: Node
139   name: LF
140   file: {{file}}