Skip to content

Commit 41ef80e

Browse files
committed
tests rename host
1 parent a6db540 commit 41ef80e

File tree

4 files changed

+64
-64
lines changed

4 files changed

+64
-64
lines changed

tests/integration/targets/cs_host/aliases

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
cloud/cs
2+
cs/group1
3+
cs/group3

tests/integration/targets/cs_host/tasks/main.yml renamed to tests/integration/targets/host/tasks/main.yml

Lines changed: 61 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
- name: test fail missing params
3-
cs_host:
3+
ngine_io.cloudstack.host:
44
zone: "{{ cs_common_zone_basic }}"
55
register: host
66
ignore_errors: true
@@ -11,7 +11,7 @@
1111
- 'host.msg == "missing required arguments: name"'
1212

1313
- name: test fail missing params if host is not existent
14-
cs_host:
14+
ngine_io.cloudstack.host:
1515
name: sim
1616
zone: "{{ cs_common_zone_basic }}"
1717
register: host
@@ -23,7 +23,7 @@
2323
- 'host.msg == "missing required arguments: password, username, hypervisor, pod"'
2424

2525
- name: test create a host in check mode
26-
cs_host:
26+
ngine_io.cloudstack.host:
2727
name: sim
2828
zone: "{{ cs_common_zone_basic }}"
2929
url: "http://sim/c0-basic/h2"
@@ -34,8 +34,8 @@
3434
hypervisor: Simulator
3535
allocation_state: enabled
3636
host_tags:
37-
- perf
38-
- gpu
37+
- perf
38+
- gpu
3939
register: host
4040
check_mode: true
4141
- name: verify test create a host in check mode
@@ -44,7 +44,7 @@
4444
- host is changed
4545

4646
- name: test create a host
47-
cs_host:
47+
ngine_io.cloudstack.host:
4848
name: sim
4949
zone: "{{ cs_common_zone_basic }}"
5050
url: "http://sim/c0-basic/h2"
@@ -55,8 +55,8 @@
5555
hypervisor: Simulator
5656
allocation_state: enabled
5757
host_tags:
58-
- perf
59-
- gpu
58+
- perf
59+
- gpu
6060
register: host
6161
- name: verify test create a host
6262
assert:
@@ -69,7 +69,7 @@
6969
- host.zone == 'Sandbox-simulator-basic'
7070
- host.state == 'Up'
7171
- "host.name.startswith('SimulatedAgent.')"
72-
- host.host_tags == ['perf', 'gpu']
72+
- host.host_tags|sort == ['gpu', 'perf']
7373

7474
# This is special in simulator mode, we can not predict the full hostname.
7575
# That is why we gather the infos from the returns and use a fact.
@@ -79,7 +79,7 @@
7979
host_ip_address: "{{ host.ip_address }}"
8080

8181
- name: test create a host idempotence
82-
cs_host:
82+
ngine_io.cloudstack.host:
8383
name: "{{ host_hostname }}"
8484
zone: "{{ cs_common_zone_basic }}"
8585
url: "http://sim/c0-basic/h2"
@@ -90,8 +90,8 @@
9090
hypervisor: Simulator
9191
allocation_state: enabled
9292
host_tags:
93-
- perf
94-
- gpu
93+
- perf
94+
- gpu
9595
register: host
9696
- name: verify test create a host idempotence
9797
assert:
@@ -103,11 +103,11 @@
103103
- host.allocation_state == 'enabled'
104104
- host.zone == 'Sandbox-simulator-basic'
105105
- host.state == 'Up'
106-
- host.name == '{{ host_hostname }}'
107-
- host.host_tags == ['perf', 'gpu']
106+
- host.name == host_hostname
107+
- host.host_tags|sort == ['gpu', 'perf']
108108

109109
- name: test update host in check mode
110-
cs_host:
110+
ngine_io.cloudstack.host:
111111
name: "{{ host_hostname }}"
112112
zone: "{{ cs_common_zone_basic }}"
113113
url: "http://sim/c0-basic/h2"
@@ -118,9 +118,9 @@
118118
hypervisor: Simulator
119119
allocation_state: enabled
120120
host_tags:
121-
- perf
122-
- gpu
123-
- x2
121+
- perf
122+
- gpu
123+
- x2
124124
register: host
125125
check_mode: true
126126
- name: verify test update a host in check mode
@@ -133,11 +133,11 @@
133133
- host.allocation_state == 'enabled'
134134
- host.zone == 'Sandbox-simulator-basic'
135135
- host.state == 'Up'
136-
- host.name == '{{ host_hostname }}'
137-
- host.host_tags == ['perf', 'gpu']
136+
- host.name == host_hostname
137+
- host.host_tags|sort == ['gpu', 'perf']
138138

139139
- name: test update host
140-
cs_host:
140+
ngine_io.cloudstack.host:
141141
name: "{{ host_hostname }}"
142142
zone: "{{ cs_common_zone_basic }}"
143143
url: "http://sim/c0-basic/h2"
@@ -148,9 +148,9 @@
148148
hypervisor: Simulator
149149
allocation_state: enabled
150150
host_tags:
151-
- perf
152-
- gpu
153-
- x2
151+
- perf
152+
- gpu
153+
- x2
154154
register: host
155155
- name: verify test update a host in check mode
156156
assert:
@@ -162,11 +162,11 @@
162162
- host.allocation_state == 'enabled'
163163
- host.zone == 'Sandbox-simulator-basic'
164164
- host.state == 'Up'
165-
- host.name == '{{ host_hostname }}'
166-
- host.host_tags == ['perf', 'gpu', 'x2']
165+
- host.name == host_hostname
166+
- host.host_tags|sort == ['gpu', 'perf', 'x2']
167167

168168
- name: test update host idempotence
169-
cs_host:
169+
ngine_io.cloudstack.host:
170170
name: "{{ host_hostname }}"
171171
zone: "{{ cs_common_zone_basic }}"
172172
url: "http://sim/c0-basic/h2"
@@ -177,9 +177,9 @@
177177
hypervisor: Simulator
178178
allocation_state: enabled
179179
host_tags:
180-
- perf
181-
- gpu
182-
- x2
180+
- perf
181+
- gpu
182+
- x2
183183
register: host
184184
- name: verify test update a host idempotence
185185
assert:
@@ -191,12 +191,12 @@
191191
- host.allocation_state == 'enabled'
192192
- host.zone == 'Sandbox-simulator-basic'
193193
- host.state == 'Up'
194-
- host.name == '{{ host_hostname }}'
195-
- host.host_tags == ['perf', 'gpu', 'x2']
194+
- host.name == host_hostname
195+
- host.host_tags|sort == ['gpu', 'perf', 'x2']
196196

197197
# FIXME: Removing by empty list seems to be an issue in the used lib cs underneath, disabled
198198
- name: test update host remove host_tags
199-
cs_host:
199+
ngine_io.cloudstack.host:
200200
name: "{{ host_hostname }}"
201201
zone: "{{ cs_common_zone_basic }}"
202202
url: "http://sim/c0-basic/h2"
@@ -220,12 +220,12 @@
220220
- host.allocation_state == 'enabled'
221221
- host.zone == 'Sandbox-simulator-basic'
222222
- host.state == 'Up'
223-
- host.name == '{{ host_hostname }}'
223+
- host.name == host_hostname
224224
when: false
225225

226226
# FIXME: Removing by empty list seems to be an issue in the used lib cs underneath, disabled
227227
- name: test update host remove host_tags idempotence
228-
cs_host:
228+
ngine_io.cloudstack.host:
229229
name: "{{ host_hostname }}"
230230
zone: "{{ cs_common_zone_basic }}"
231231
url: "http://sim/c0-basic/h2"
@@ -249,12 +249,11 @@
249249
- host.allocation_state == 'enabled'
250250
- host.zone == 'Sandbox-simulator-basic'
251251
- host.state == 'Up'
252-
- host.name == '{{ host_hostname }}'
252+
- host.name == host_hostname
253253
when: false
254254

255-
256255
- name: test put host in maintenance in check mode
257-
cs_host:
256+
ngine_io.cloudstack.host:
258257
name: "{{ host_hostname }}"
259258
zone: "{{ cs_common_zone_basic }}"
260259
cluster: C0-basic
@@ -272,11 +271,11 @@
272271
- host.allocation_state == 'enabled'
273272
- host.zone == 'Sandbox-simulator-basic'
274273
- host.state == 'Up'
275-
- host.name == '{{ host_hostname }}'
276-
- host.host_tags == ['perf', 'gpu', 'x2']
274+
- host.name == host_hostname
275+
- host.host_tags|sort == ['gpu', 'perf', 'x2']
277276

278277
- name: test put host in maintenance
279-
cs_host:
278+
ngine_io.cloudstack.host:
280279
name: "{{ host_hostname }}"
281280
zone: "{{ cs_common_zone_basic }}"
282281
cluster: C0-basic
@@ -293,11 +292,11 @@
293292
- host.allocation_state == 'maintenance'
294293
- host.zone == 'Sandbox-simulator-basic'
295294
- host.state == 'Up'
296-
- host.name == '{{ host_hostname }}'
297-
- host.host_tags == ['perf', 'gpu', 'x2']
295+
- host.name == host_hostname
296+
- host.host_tags|sort == ['gpu', 'perf', 'x2']
298297

299298
- name: test put host in maintenance idempotence
300-
cs_host:
299+
ngine_io.cloudstack.host:
301300
name: "{{ host_hostname }}"
302301
zone: "{{ cs_common_zone_basic }}"
303302
cluster: C0-basic
@@ -314,11 +313,11 @@
314313
- host.allocation_state == 'maintenance'
315314
- host.zone == 'Sandbox-simulator-basic'
316315
- host.state == 'Up'
317-
- host.name == '{{ host_hostname }}'
318-
- host.host_tags == ['perf', 'gpu', 'x2']
316+
- host.name == host_hostname
317+
- host.host_tags|sort == ['gpu', 'perf', 'x2']
319318

320319
- name: test put host out of maintenance in check mode
321-
cs_host:
320+
ngine_io.cloudstack.host:
322321
name: "{{ host_hostname }}"
323322
zone: "{{ cs_common_zone_basic }}"
324323
cluster: C0-basic
@@ -336,11 +335,11 @@
336335
- host.allocation_state == 'maintenance'
337336
- host.zone == 'Sandbox-simulator-basic'
338337
- host.state == 'Up'
339-
- host.name == '{{ host_hostname }}'
340-
- host.host_tags == ['perf', 'gpu', 'x2']
338+
- host.name == host_hostname
339+
- host.host_tags|sort == ['gpu', 'perf', 'x2']
341340

342341
- name: test put host out of maintenance
343-
cs_host:
342+
ngine_io.cloudstack.host:
344343
name: "{{ host_hostname }}"
345344
zone: "{{ cs_common_zone_basic }}"
346345
cluster: C0-basic
@@ -357,11 +356,11 @@
357356
- host.allocation_state == 'enabled'
358357
- host.zone == 'Sandbox-simulator-basic'
359358
- host.state == 'Up'
360-
- host.name == '{{ host_hostname }}'
361-
- host.host_tags == ['perf', 'gpu', 'x2']
359+
- host.name == host_hostname
360+
- host.host_tags|sort == ['gpu', 'perf', 'x2']
362361

363362
- name: test put host out of maintenance idempotence
364-
cs_host:
363+
ngine_io.cloudstack.host:
365364
name: "{{ host_hostname }}"
366365
zone: "{{ cs_common_zone_basic }}"
367366
cluster: C0-basic
@@ -378,11 +377,11 @@
378377
- host.allocation_state == 'enabled'
379378
- host.zone == 'Sandbox-simulator-basic'
380379
- host.state == 'Up'
381-
- host.name == '{{ host_hostname }}'
382-
- host.host_tags == ['perf', 'gpu', 'x2']
380+
- host.name == host_hostname
381+
- host.host_tags|sort == ['gpu', 'perf', 'x2']
383382

384383
- name: test remove host in check mode
385-
cs_host:
384+
ngine_io.cloudstack.host:
386385
name: "{{ host_hostname }}"
387386
zone: "{{ cs_common_zone_basic }}"
388387
cluster: C0-basic
@@ -400,11 +399,11 @@
400399
- host.allocation_state == 'enabled'
401400
- host.zone == 'Sandbox-simulator-basic'
402401
- host.state == 'Up'
403-
- host.name == '{{ host_hostname }}'
404-
- host.host_tags == ['perf', 'gpu', 'x2']
402+
- host.name == host_hostname
403+
- host.host_tags|sort == ['gpu', 'perf', 'x2']
405404

406405
- name: test remove host
407-
cs_host:
406+
ngine_io.cloudstack.host:
408407
name: "{{ host_hostname }}"
409408
zone: "{{ cs_common_zone_basic }}"
410409
cluster: C0-basic
@@ -421,11 +420,11 @@
421420
- host.allocation_state == 'enabled'
422421
- host.zone == 'Sandbox-simulator-basic'
423422
- host.state == 'Up'
424-
- host.name == '{{ host_hostname }}'
425-
- host.host_tags == ['perf', 'gpu', 'x2']
423+
- host.name == host_hostname
424+
- host.host_tags|sort == ['gpu', 'perf', 'x2']
426425

427426
- name: test remove host idempotence
428-
cs_host:
427+
ngine_io.cloudstack.host:
429428
name: "{{ host_hostname }}"
430429
zone: "{{ cs_common_zone_basic }}"
431430
cluster: C0-basic

0 commit comments

Comments
 (0)