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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
|
.. This work is licensed under a Creative Commons Attribution 4.0 International License.
.. http://creativecommons.org/licenses/by/4.0
.. (c) Huawei Technologies Co.,Ltd
===========================================================
Common virtual machine life cycle events test specification
===========================================================
.. toctree::
:maxdepth: 2
Scope
=====
The common virtual machine life cycle events test area evaluates the ability of
the system under test to behave correctly after common virtual machine life
cycle events. The tests in this test area will evaluate:
- Stop/Start a server
- Reboot a server
- Rebuild a server
- Pause/Unpause a server
- Suspend/Resume a server
- Resize a server
- Resizing a volume-backed server
- Sequence suspend resume
- Shelve/Unshelve a server
- Cold migrate a server
- Live migrate a server
References
==========
- iSCSI
- https://docs.openstack.org/liberty/config-reference/content/config-iscsi-storage.html
Definitions and abbreviations
=============================
The following terms and abbreviations are used in conjunction with this test area
- API - Application Programming Interface
- NFVi - Network Functions Virtualization infrastructure
- VIM - Virtual Infrastructure Manager
- VM - Virtual Machine
System Under Test (SUT)
=======================
The system under test is assumed to be the NFVi and VIM in operation on a
Pharos compliant infrastructure.
Test Area Structure
===================
The test area is structured based on common virtual machine life cycle events.
Each test case is able to run independently, i.e. irrelevant of the state
created by a previous test. Specifically, every test performs clean-up
operations which return the system to the same state as before the test.
All these test cases are included in the test case dovetail.tempest.vm_lifecycle of
OVP test suite.
Test Descriptions
=================
----------------------
API Used and Reference
----------------------
Block storage: https://developer.openstack.org/api-ref/block-storage
- create volume
- delete volume
- attach volume to server
- detach volume from server
Security Groups: https://developer.openstack.org/api-ref/network/v2/index.html#security-groups-security-groups
- create security group
- delete security group
Networks: https://developer.openstack.org/api-ref/networking/v2/index.html#networks
- create network
- delete network
Routers and interface: https://developer.openstack.org/api-ref/networking/v2/index.html#routers-routers
- create router
- delete router
- add interface to router
Subnets: https://developer.openstack.org/api-ref/networking/v2/index.html#subnets
- create subnet
- delete subnet
Servers: https://developer.openstack.org/api-ref/compute/
- create keypair
- create server
- show server
- delete server
- add/assign floating IP
- resize server
- revert resized server
- confirm resized server
- pause server
- unpause server
- start server
- stop server
- reboot server
- rebuild server
- suspend server
- resume suspended server
- shelve server
- unshelve server
- migrate server
- live-migrate server
Ports: https://developer.openstack.org/api-ref/networking/v2/index.html#ports
- create port
- delete port
Floating IPs: https://developer.openstack.org/api-ref/networking/v2/index.html#floating-ips-floatingips
- create floating IP
- delete floating IP
Availability zone: https://developer.openstack.org/api-ref/compute/
- get availability zone
------------------------------------
Test Case 1 - Minimum basic scenario
------------------------------------
Test case specification
-----------------------
tempest.scenario.test_minimum_basic.TestMinimumBasicScenario.test_minimum_basic_scenario
Test preconditions
------------------
* Nova, cinder, glance, neutron services are available
* One public network
Basic test flow execution description and pass/fail criteria
------------------------------------------------------------
Test execution
''''''''''''''
* Test action 1: Create an image IMG1
* Test action 2: Create a keypair KEYP1
* Test action 3: Create a server VM1 with IMG1 and KEYP1
* **Test assertion 1:** Verify VM1 is created successfully
* Test action 4: Create a volume VOL1
* **Test assertion 2:** Verify VOL1 is created successfully
* Test action 5: Attach VOL1 to VM1
* **Test assertion 3:** Verify VOL1's status has been updated after attached to VM1
* Test action 6: Create a floating IP FIP1 and assign FIP1 to VM1
* **Test assertion 4:** Verify VM1's addresses have been refreshed after associating FIP1
* Test action 7: Create and add security group SG1 to VM1
* **Test assertion 5:** Verify can SSH to VM1 via FIP1
* Test action 8: Reboot VM1
* **Test assertion 6:** Verify can SSH to VM1 via FIP1
* **Test assertion 7:** Verify VM1's disk count equals to 1
* Test action 9: Delete the floating IP FIP1 from VM1
* **Test assertion 8:** Verify VM1's addresses have been refreshed after disassociating FIP1
* Test action 10: Delete SG1, IMG1, KEYP1, VOL1, VM1 and FIP1
Pass / fail criteria
''''''''''''''''''''
This test evaluates a minimum basic scenario. Specifically, the test verifies that:
* The server can be connected before reboot.
* The server can be connected after reboot.
In order to pass this test, all test assertions listed in the test execution above need to pass.
Post conditions
---------------
N/A
----------------------------
Test Case 2 - Cold migration
----------------------------
Test case specification
-----------------------
tempest.scenario.test_network_advanced_server_ops.TestNetworkAdvancedServerOps.test_server_connectivity_cold_migration
Test preconditions
------------------
* At least 2 compute nodes
* Nova, neutron services are available
* One public network
Basic test flow execution description and pass/fail criteria
------------------------------------------------------------
Test execution
''''''''''''''
* Test action 1: Create a keypair KEYP1
* Test action 2: Create a server VM1 with KEYP1
* Test action 3: Create a floating IP FIP1 and assign FIP1 to VM1
* Test action 4: Get VM1's host info SRC_HOST
* Test action 5: Wait for VM1 to reach 'ACTIVE' status
* **Test assertion 1:** Verify can ping FIP1 successfully and can SSH to VM1 via FIP1
* Test action 6: Cold migrate VM1
* Test action 7: Wait for VM1 to reach 'VERIFY_RESIZE' status
* Test action 8: Confirm resize VM1
* Test action 9: Wait for VM1 to reach 'ACTIVE' status
* **Test assertion 2:** Verify can ping FIP1 successfully and can SSH to VM1 via FIP1
* Test action 10: Get VM1's host info DST_HOST
* **Test assertion 3:** Verify SRC_HOST does not equal to DST_HOST
* Test action 11: Delete KEYP1, VM1 and FIP1
Pass / fail criteria
''''''''''''''''''''
This test evaluates the ability to cold migrate VMs. Specifically, the test verifies that:
* Servers can be cold migrated from one compute node to another computer node.
In order to pass this test, all test assertions listed in the test execution above need to pass.
Post conditions
---------------
N/A
--------------------------------------
Test Case 3 - Pause and unpause server
--------------------------------------
Test case specification
-----------------------
tempest.scenario.test_network_advanced_server_ops.TestNetworkAdvancedServerOps.test_server_connectivity_pause_unpause
Test preconditions
------------------
* Nova, neutron services are available
* One public network
Basic test flow execution description and pass/fail criteria
------------------------------------------------------------
Test execution
''''''''''''''
* Test action 1: Create a keypair KEYP1
* Test action 2: Create a server VM1 with KEYP1
* Test action 3: Create a floating IP FIP1 and assign FIP1 to VM1
* Test action 4: Pause VM1
* Test action 5: Wait for VM1 to reach 'PAUSED' status
* **Test assertion 1:** Verify FIP1 status is 'ACTIVE'
* **Test assertion 2:** Verify ping FIP1 failed and SSH to VM1 via FIP1 failed
* Test action 6: Unpause VM1
* Test action 7: Wait for VM1 to reach 'ACTIVE' status
* **Test assertion 3:** Verify can ping FIP1 successfully and can SSH to VM1 via FIP1
* Test action 8: Delete KEYP1, VM1 and FIP1
Pass / fail criteria
''''''''''''''''''''
This test evaluates the ability to pause and unpause VMs. Specifically, the test verifies that:
* When paused, servers cannot be reached.
* When unpaused, servers can recover its reachability.
In order to pass this test, all test assertions listed in the test execution above need to pass.
Post conditions
---------------
N/A
---------------------------
Test Case 4 - Reboot server
---------------------------
Test case specification
-----------------------
tempest.scenario.test_network_advanced_server_ops.TestNetworkAdvancedServerOps.test_server_connectivity_reboot
Test preconditions
------------------
* Nova, neutron services are available
* One public network
Basic test flow execution description and pass/fail criteria
------------------------------------------------------------
Test execution
''''''''''''''
* Test action 1: Create a keypair KEYP1
* Test action 2: Create a server VM1 with KEYP1
* Test action 3: Create a floating IP FIP1 and assign FIP1 to VM1
* Test action 4: Soft reboot VM1
* Test action 5: Wait for VM1 to reach 'ACTIVE' status
* **Test assertion 1:** Verify can ping FIP1 successfully and can SSH to VM1 via FIP1
* Test action 6: Delete KEYP1, VM1 and FIP1
Pass / fail criteria
''''''''''''''''''''
This test evaluates the ability to reboot servers. Specifically, the test verifies that:
* After reboot, servers can still be connected.
In order to pass this test, all test assertions listed in the test execution above need to pass.
Post conditions
---------------
N/A
----------------------------
Test Case 5 - Rebuild server
----------------------------
Test case specification
-----------------------
tempest.scenario.test_network_advanced_server_ops.TestNetworkAdvancedServerOps.test_server_connectivity_rebuild
Test preconditions
------------------
* Nova, neutron services are available
* One public network
Basic test flow execution description and pass/fail criteria
------------------------------------------------------------
Test execution
''''''''''''''
* Test action 1: Create a keypair KEYP1
* Test action 2: Create a server VM1 with KEYP1
* Test action 3: Create a floating IP FIP1 and assign FIP1 to VM1
* Test action 4: Rebuild VM1 with another image
* Test action 5: Wait for VM1 to reach 'ACTIVE' status
* **Test assertion 1:** Verify can ping FIP1 successfully and can SSH to VM1 via FIP1
* Test action 6: Delete KEYP1, VM1 and FIP1
Pass / fail criteria
''''''''''''''''''''
This test evaluates the ability to rebuild servers. Specifically, the test verifies that:
* Servers can be rebuilt with specific image correctly.
In order to pass this test, all test assertions listed in the test execution above need to pass.
Post conditions
---------------
N/A
---------------------------
Test Case 6 - Resize server
---------------------------
Test case specification
-----------------------
tempest.scenario.test_network_advanced_server_ops.TestNetworkAdvancedServerOps.test_server_connectivity_resize
Test preconditions
------------------
* Nova, neutron services are available
* One public network
Basic test flow execution description and pass/fail criteria
------------------------------------------------------------
Test execution
''''''''''''''
* Test action 1: Create a keypair KEYP1
* Test action 2: Create a server VM1 with KEYP1
* Test action 3: Create a floating IP FIP1 and assign FIP1 to VM1
* Test action 4: Resize VM1 with another flavor
* Test action 5: Wait for VM1 to reach 'VERIFY_RESIZE' status
* Test action 6: Confirm resize VM1
* Test action 7: Wait for VM1 to reach 'ACTIVE' status
* **Test assertion 1:** Verify can ping FIP1 successfully and can SSH to VM1 via FIP1
* Test action 8: Delete KEYP1, VM1 and FIP1
Pass / fail criteria
''''''''''''''''''''
This test evaluates the ability to resize servers. Specifically, the test verifies that:
* Servers can be resized with specific flavor correctly.
In order to pass this test, all test assertions listed in the test execution above need to pass.
Post conditions
---------------
N/A
-----------------------------------
Test Case 7 - Stop and start server
-----------------------------------
Test case specification
-----------------------
tempest.scenario.test_network_advanced_server_ops.TestNetworkAdvancedServerOps.test_server_connectivity_stop_start
Test preconditions
------------------
* Nova, neutron services are available
* One public network
Basic test flow execution description and pass/fail criteria
------------------------------------------------------------
Test execution
''''''''''''''
* Test action 1: Create a keypair KEYP1
* Test action 2: Create a server VM1 with KEYP1
* Test action 3: Create a floating IP FIP1 and assign FIP1 to VM1
* Test action 4: Stop VM1
* Test action 5: Wait for VM1 to reach 'SHUTOFF' status
* **Test assertion 1:** Verify ping FIP1 failed and SSH to VM1 via FIP1 failed
* Test action 6: Start VM1
* Test action 7: Wait for VM1 to reach 'ACTIVE' status
* **Test assertion 2:** Verify can ping FIP1 successfully and can SSH to VM1 via FIP1
* Test action 8: Delete KEYP1, VM1 and FIP1
Pass / fail criteria
''''''''''''''''''''
This test evaluates the ability to stop and start servers. Specifically, the test verifies that:
* When stopped, servers cannot be reached.
* When started, servers can recover its reachability.
In order to pass this test, all test assertions listed in the test execution above need to pass.
Post conditions
---------------
N/A
---------------------------------------
Test Case 8 - Suspend and resume server
---------------------------------------
Test case specification
-----------------------
tempest.scenario.test_network_advanced_server_ops.TestNetworkAdvancedServerOps.test_server_connectivity_suspend_resume
Test preconditions
------------------
* Nova, neutron services are available
* One public network
Basic test flow execution description and pass/fail criteria
------------------------------------------------------------
Test execution
''''''''''''''
* Test action 1: Create a keypair KEYP1
* Test action 2: Create a server VM1 with KEYP1
* Test action 3: Create a floating IP FIP1 and assign FIP1 to VM1
* Test action 4: Suspend VM1
* Test action 5: Wait for VM1 to reach 'SUSPENDED' status
* **Test assertion 1:** Verify ping FIP1 failed and SSH to VM1 via FIP1 failed
* Test action 6: Resume VM1
* Test action 7: Wait for VM1 to reach 'ACTIVE' status
* **Test assertion 2:** Verify can ping FIP1 successfully and can SSH to VM1 via FIP1
* Test action 8: Delete KEYP1, VM1 and FIP1
Pass / fail criteria
''''''''''''''''''''
This test evaluates the ability to suspend and resume servers. Specifically, the test verifies that:
* When suspended, servers cannot be reached.
* When resumed, servers can recover its reachability.
In order to pass this test, all test assertions listed in the test execution above need to pass.
Post conditions
---------------
N/A
----------------------------------------------------
Test Case 9 - Suspend and resume server in sequence
----------------------------------------------------
Test case specification
-----------------------
tempest.scenario.test_server_advanced_ops.TestServerAdvancedOps.test_server_sequence_suspend_resume
Test preconditions
------------------
* Nova, neutron services are available
* One public network
Basic test flow execution description and pass/fail criteria
------------------------------------------------------------
Test execution
''''''''''''''
* Test action 1: Create a server VM1
* Test action 2: Suspend VM1
* Test action 3: Wait for VM1 to reach 'SUSPENDED' status
* **Test assertion 1:** Verify VM1's status is 'SUSPENDED'
* Test action 4: Resume VM1
* Test action 5: Wait for VM1 to reach 'ACTIVE' status
* **Test assertion 2:** Verify VM1's status is 'ACTIVE'
* Test action 6: Suspend VM1
* Test action 7: Wait for VM1 to reach 'SUSPENDED' status
* **Test assertion 3:** Verify VM1 status is 'SUSPENDED'
* Test action 8: Resume VM1
* Test action 9: Wait for VM1 to reach 'ACTIVE' status
* **Test assertion 4:** Verify VM1 status is 'ACTIVE'
* Test action 10: Delete KEYP1, VM1 and FIP1
Pass / fail criteria
''''''''''''''''''''
This test evaluates the ability to suspend and resume servers in sequence.
Specifically, the test verifies that:
* Servers can be suspend and resume in sequence correctly.
In order to pass this test, all test assertions listed in the test execution above need to pass.
Post conditions
---------------
N/A
------------------------------------------
Test Case 10 - Resize volume backed server
------------------------------------------
Test case specification
-----------------------
tempest.scenario.test_server_advanced_ops.TestServerAdvancedOps.test_resize_volume_backed_server_confirm
Test preconditions
------------------
* Nova, neutron, cinder services are available
* One public network
Basic test flow execution description and pass/fail criteria
------------------------------------------------------------
Test execution
''''''''''''''
* Test action 1: Create a volume backed server VM1
* Test action 2: Resize VM1 with another flavor
* Test action 3: Wait for VM1 to reach 'VERIFY_RESIZE' status
* Test action 4: Confirm resize VM1
* Test action 5: Wait for VM1 to reach 'ACTIVE' status
* **Test assertion 1:** VM1's status is 'ACTIVE'
* Test action 6: Delete VM1
Pass / fail criteria
''''''''''''''''''''
This test evaluates the ability to resize volume backed servers.
Specifically, the test verifies that:
* Volume backed servers can be resized with specific flavor correctly.
In order to pass this test, all test assertions listed in the test execution above need to pass.
Post conditions
---------------
N/A
-----------------------------------------
Test Case 11 - Shelve and unshelve server
-----------------------------------------
Test case specification
-----------------------
tempest.scenario.test_shelve_instance.TestShelveInstance.test_shelve_instance
Test preconditions
------------------
* Nova, neutron, image services are available
* One public network
Basic test flow execution description and pass/fail criteria
------------------------------------------------------------
Test execution
''''''''''''''
* Test action 1: Create a keypair KEYP1
* Test action 2: Create a security group SG1, which has rules for allowing
incoming SSH and ICMP traffic
* Test action 3: Create a server with SG1 and KEYP1
* Test action 4: Create a timestamp and store it in a file F1 inside VM1
* Test action 5: Shelve VM1
* Test action 6: Unshelve VM1
* Test action 7: Wait for VM1 to reach 'ACTIVE' status
* Test action 8: Read F1 and compare if the read value and the previously written value
are the same or not
* **Test assertion 1:** Verify the values written and read are the same
* Test action 9: Delete SG1, KEYP1 and VM1
Pass / fail criteria
''''''''''''''''''''
This test evaluates the ability to shelve and unshelve servers.
Specifically, the test verifies that:
* Servers can be shelved and unshelved correctly.
In order to pass this test, all test assertions listed in the test execution above need to pass.
Post conditions
---------------
N/A
-------------------------------------------------------
Test Case 12 - Shelve and unshelve volume backed server
-------------------------------------------------------
Test case specification
-----------------------
tempest.scenario.test_shelve_instance.TestShelveInstance.test_shelve_volume_backed_instance
Test preconditions
------------------
* Nova, neutron, image, cinder services are available
* One public network
Basic test flow execution description and pass/fail criteria
------------------------------------------------------------
Test execution
''''''''''''''
* Test action 1: Create a keypair KEYP1
* Test action 2: Create a security group SG1, which has rules for allowing
incoming and outgoing SSH and ICMP traffic
* Test action 3: Create a volume backed server VM1 with SG1 and KEYP1
* Test action 4: SSH to VM1 to create a timestamp T_STAMP1 and store it in a file F1 inside VM1
* Test action 5: Shelve VM1
* Test action 6: Unshelve VM1
* Test action 7: Wait for VM1 to reach 'ACTIVE' status
* Test action 8: SSH to VM1 to read the timestamp T_STAMP2 stored in F1
* **Test assertion 1:** Verify T_STAMP1 equals to T_STAMP2
* Test action 9: Delete SG1, KEYP1 and VM1
Pass / fail criteria
''''''''''''''''''''
This test evaluates the ability to shelve and unshelve volume backed servers.
Specifically, the test verifies that:
* Volume backed servers can be shelved and unshelved correctly.
In order to pass this test, all test assertions listed in the test execution above need to pass.
Post conditions
---------------
N/A
|