Merge "bugfix: remove pod_name in host and unify host parameter"
[yardstick.git] / tests / opnfv / test_cases / opnfv_yardstick_tc051.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 TC051 :OpenStack Controller Node CPU Overload 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 attack_host = attack_host or "node1" %}
18
19 scenarios:
20   -
21     type: "GeneralHA"
22     options:
23       attackers:
24         -
25           fault_type: "general-attacker"
26           host: {{attack_host}}
27           key: "stress-cpu"
28           attack_key: "stress-cpu"
29
30       monitors:
31         -
32           monitor_type: "openstack-cmd"
33           key: "nova-image-list"
34           command_name: "openstack image list"
35           monitor_time: 10
36           monitor_number: 3
37           sla:
38             max_outage_time: 5
39
40         -
41           monitor_type: "openstack-cmd"
42           key: "neutron-router-list"
43           command_name: "openstack router list"
44           monitor_time: 10
45           monitor_number: 3
46           sla:
47             max_outage_time: 5
48
49         -
50           monitor_type: "openstack-cmd"
51           key: "heat-stack-list"
52           command_name: "openstack stack list"
53           monitor_time: 10
54           monitor_number: 3
55           sla:
56             max_outage_time: 5
57
58         -
59           monitor_type: "openstack-cmd"
60           key: "cinder-list"
61           command_name: "openstack volume list"
62           monitor_time: 10
63           monitor_number: 3
64           sla:
65             max_outage_time: 5
66
67
68       steps:
69         -
70           actionKey: "stress-cpu"
71           actionType: "attacker"
72           index: 1
73
74         -
75           actionKey: "nova-image-list"
76           actionType: "monitor"
77           index: 2
78
79         -
80           actionKey: "neutron-router-list"
81           actionType: "monitor"
82           index: 3
83
84         -
85           actionKey: "heat-stack-list"
86           actionType: "monitor"
87           index: 4
88
89         -
90           actionKey: "cinder-list"
91           actionType: "monitor"
92           index: 5
93
94
95     nodes:
96       {{attack_host}}: {{attack_host}}.LF
97     runner:
98       type: Duration
99       duration: 1
100     sla:
101       outage_time: 5
102       action: monitor
103
104 context:
105   type: Node
106   name: LF
107   file: {{file}}