aboutsummaryrefslogtreecommitdiffstats
path: root/tests/opnfv/test_cases/opnfv_yardstick_tc023.yaml
blob: 2804f25a27de17ebf87a7ccbf0b510cfd7e7519a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
##############################################################################
# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
---

schema: "yardstick:task:0.1"

{% set file = file or "etc/yardstick/nodes/compass_sclab_virtual/pod.yaml" %}
{% set cpu_set = cpu_set or "0,1,2,3" %}
{% set memory_load = memory_load or 0 %}

{% set flavor = flavor or "yardstick-migrate-flavor" %}
{% set ram = ram or "2048" %}
{% set vcpus = vcpus or "2" %}
{% set disk = disk or "3" %}

scenarios:
-
  type: GetServer

  output: status server

  host: server.migrate

  runner:
    type: Iteration
    iteration: 1
-
  type: GetNumaInfo

  options:
    server: $server
    file: {{ file }}

  output: origin_numa_info

  host: server.migrate

  runner:
    type: Iteration
    iteration: 1
-
  type: GetMigrateTargetHost

  options:
    server: $server
  output: target_host

  runner:
    type: Iteration
    iteration: 1
-
  type: GetServerIp

  options:
    server: $server

  output: server_ip

  runner:
    type: Iteration
    iteration: 1
-
  type: AddMemoryLoad

  options:
    memory_load: {{ memory_load }}

  host: server.migrate

  runner:
    type: Iteration
    iteration: 1
-
  type: Migrate

  options:
    server: $server
    host: $target_host
    server_ip: $server_ip

  output: status migrate_time1 downtime1

  runner:
    type: Iteration
    iteration: 1
-
  type: CheckValue

  options:
    value1: $status
    value2: 0
    operator: eq

  runner:
    type: Iteration
    iteration: 1
-
  type: GetServer

  output: status server

  host: server.migrate

  runner:
    type: Iteration
    iteration: 1
-
  type: GetNumaInfo

  options:
    server: $server
    file: {{ file }}

  output: new_numa_info

  host: server.migrate

  runner:
    type: Iteration
    iteration: 1
-
  type: CheckNumaInfo

  options:
    info1: $origin_numa_info
    info2: $new_numa_info
    cpu_set: {{ cpu_set }}

  output: status

  runner:
    type: Iteration
    iteration: 1
-
  type: CheckValue

  options:
    value1: $status
    value2: true
    operator: eq

  runner:
    type: Iteration
    iteration: 1


contexts:
-
  type: Node
  name: env-prepare
  file: {{ file }}

  env:
    type: ansible
    setup: migrate_pinning_setup.yaml -e "flavor={{ flavor }} ram={{ ram }} vcpus={{ vcpus }} disk={{ disk }} cpu_set={{ cpu_set }}"
    teardown: migrate_pinning_teardown.yaml -e "flavor={{ flavor }}"

-
  name: migrate
  image: yardstick-image
  flavor: {{ flavor }}
  user: ubuntu

  servers:
    server:
      floating_ip: true

  networks:
    test:
      cidr: '10.0.1.0/24'