Merge "Auto Generated INFO.yaml file"
[snaps.git] / docs / how-to-use / APITests.rst
1 SNAPS OpenStack API Testing
2 ===========================
3
4 Tests designated as component tests extend the snaps.openstack.tests.OSComponentTestCase class and must be exercised
5 with OpenStack credentials for all as well as an external network for many. When leveraging the unit\_test\_suite.py
6 application, the -e argument and -n arguments will suffice. When attempting to execute these tests within your IDE
7 of choice (tested on IntelliJ), you will need to edit the [repo\_dir]/snaps/openstack/tests/conf/os\_env.yaml file as well
8 as ensuring that your run configuration's working directory is set to [repo\_dir]/snaps.
9
10 The Test Classes
11 ================
12
13 glance_utils_tests.py - GlanceSmokeTests
14 ----------------------------------------
15
16 Ensures that a Glance client can be obtained as well as the proper
17 exceptions thrown with the wrong credentials.
18
19 keystone_utils_tests.py - KeystoneSmokeTests
20 --------------------------------------------
21
22 Ensures that a Keystone client can be obtained as well as the proper
23 exceptions thrown with the wrong credentials.
24
25 neutron_utils_tests.py - NeutronSmokeTests
26 ------------------------------------------
27
28 Ensures that a Neutron client can be obtained as well as the proper
29 exceptions thrown with the wrong credentials.
30
31 nova_utils_tests.py - NovaSmokeTests
32 ------------------------------------
33
34 Ensures that a Nova client can be obtained as well as the proper
35 exceptions thrown with the wrong credentials.
36
37 cinder_utils_tests.py - CinderSmokeTests
38 ----------------------------------------
39
40 Ensures that a Cinder client can be obtained as well as the proper
41 exceptions thrown with the wrong credentials.
42
43 heat_utils_tests.py - HeatSmokeTests
44 ------------------------------------
45
46 Ensures that a Heat client can be obtained as well as the proper
47 exceptions thrown with the wrong credentials.
48
49 keystone_utils_tests.py - KeystoneUtilsTests
50 --------------------------------------------
51
52 +----------------------------------+---------------+-----------------------------------------------------------+
53 | Test Name                        | Keystone API  | Description                                               |
54 +==================================+===============+===========================================================+
55 | test_create_user_minimal         | 2 & 3         | Tests the creation of a user with minimal configuration   |
56 |                                  |               | settings via the utility functions                        |
57 +----------------------------------+---------------+-----------------------------------------------------------+
58 | test_create_project_minimal      | 2 & 3         | Tests the creation of a project with minimal configuration|
59 |                                  |               | settings via the utility functions                        |
60 +----------------------------------+---------------+-----------------------------------------------------------+
61 | test_get_endpoint_success        | 2 & 3         | Tests to ensure that proper credentials and proper service|
62 |                                  |               | type can succeed                                          |
63 +----------------------------------+---------------+-----------------------------------------------------------+
64 | test_get_endpoint_fail_without   | 2 & 3         | Tests to ensure that proper credentials and improper      |
65 | _proper_service                  |               | service type cannot succeed                               |
66 +----------------------------------+---------------+-----------------------------------------------------------+
67 | test_get_endpoint_fail_without   | 2 & 3         | Tests to ensure that improper credentials and proper      |
68 | _proper_credentials              |               | service type cannot succeed                               |
69 +----------------------------------+---------------+-----------------------------------------------------------+
70 | test_get_endpoint_with_each      | 2 & 3         | Tests to ensure that an interface URL is returned for each|
71 | _interface                       |               | supported interface type (i.e. public, internal, & admin) |
72 +----------------------------------+---------------+-----------------------------------------------------------+
73 | test_grant_user_role_to_project  | 2 & 3         | Tests to ensure that one can grant a new user's role to a |
74 |                                  |               | new project                                               |
75 +----------------------------------+---------------+-----------------------------------------------------------+
76
77 create_user_tests.py - CreateUserSuccessTests
78 ---------------------------------------------
79 +----------------------------------+---------------+-----------------------------------------------------------+
80 | Test Name                        | Keystone API  | Description                                               |
81 +==================================+===============+===========================================================+
82 | test_create_user                 | 2 & 3         | Tests the creation of a user with minimal configuration   |
83 |                                  |               | settings via the utility functions                        |
84 +----------------------------------+---------------+-----------------------------------------------------------+
85 | test_create_user_2x              | 2 & 3         | Tests the creation of a user 2x and ensure it has been    |
86 |                                  |               | done only once                                            |
87 +----------------------------------+---------------+-----------------------------------------------------------+
88 | test_create_delete_user          | 2 & 3         | Tests the creation of a user and ensure clean can be      |
89 |                                  |               | called 2x without exceptions being raised                 |
90 +----------------------------------+---------------+-----------------------------------------------------------+
91 | test_create_admin_user           | 2 & 3         | Tests the creation of a user with an 'admin' role         |
92 +----------------------------------+---------------+-----------------------------------------------------------+
93
94 create_project_tests.py - CreateProjectSuccessTests
95 ---------------------------------------------------
96
97 +----------------------------------+---------------+-----------------------------------------------------------+
98 | Test Name                        | Keystone API  | Description                                               |
99 +==================================+===============+===========================================================+
100 | test_create_project_bad_domain   | 3             | Ensures that keystone v3 clients using the domain ID      |
101 |                                  |               | project setting project creation will fail with an invalid|
102 |                                  |               | domain id/name                                            |
103 +----------------------------------+---------------+-----------------------------------------------------------+
104 | test_create_project              | 2 & 3         | Tests the creation of a project via the OpenStackProject  |
105 |                                  |               | class                                                     |
106 +----------------------------------+---------------+-----------------------------------------------------------+
107 | test_create_project_quota        | 2 & 3         | Tests the creation of a project via the OpenStackProject  |
108 | _override                        |               | class with overriding the default quota values            |
109 +----------------------------------+---------------+-----------------------------------------------------------+
110 | test_create_project_2x           | 2 & 3         | Tests the creation of a project a second time via the     |
111 |                                  |               | OpenStackProject class to ensure it is only created once  |
112 +----------------------------------+---------------+-----------------------------------------------------------+
113 | test_create_delete_project       | 2 & 3         | Tests the creation and deletion of a project via the      |
114 |                                  |               | OpenStackProject class to ensure that clean will not raise|
115 |                                  |               | an exception                                              |
116 +----------------------------------+---------------+-----------------------------------------------------------+
117 | test_update_quotas               | 2 & 3         | Tests the ability to update quota values                  |
118 |                                  | nova & neutron|                                                           |
119 +----------------------------------+---------------+-----------------------------------------------------------+
120
121 create_project_tests.py - CreateProjectUserTests
122 ------------------------------------------------
123
124 +---------------------------------------+---------------+-----------------------------------------------------------+
125 | Test Name                             | Keystone API  | Description                                               |
126 +=======================================+===============+===========================================================+
127 | test_create_project_sec_grp_one_user  | 2 & 3         | Tests the creation of an OpenStack object to a project    |
128 |                                       |               | with a new users and to create a security group           |
129 |                                       |               |                                                           |
130 +---------------------------------------+---------------+-----------------------------------------------------------+
131 | test_create_project_sec_grp_two_users | 2 & 3         | Tests the creation of an OpenStack object to a project    |
132 |                                       |               | with two new users and to create a security group under   |
133 |                                       |               | each                                                      |
134 +---------------------------------------+---------------+-----------------------------------------------------------+
135
136 glance_utils_tests.py - GlanceUtilsTests
137 ----------------------------------------
138
139 +---------------------------------------+---------------+-----------------------------------------------------------+
140 | Test Name                             | Glance API    | Description                                               |
141 +=======================================+===============+===========================================================+
142 | test_create_image_minimal_url         | 1             | Tests the glance_utils.create_image() function with a URL |
143 +---------------------------------------+---------------+-----------------------------------------------------------+
144 | test_create_image_minimal_file        | 1             | Tests the glance_utils.create_image() function with a file|
145 +---------------------------------------+---------------+-----------------------------------------------------------+
146
147 neutron_utils_tests.py - NeutronUtilsNetworkTests
148 -------------------------------------------------
149
150 +---------------------------------------+---------------+-----------------------------------------------------------+
151 | Test Name                             | Neutron API   | Description                                               |
152 +=======================================+===============+===========================================================+
153 | test_create_network                   | 2             | Ensures neutron_utils.create_network() properly creates a |
154 |                                       |               | network                                                   |
155 +---------------------------------------+---------------+-----------------------------------------------------------+
156 | test_create_network_empty_name        | 2             | Ensures neutron_utils.create_network() raises an exception|
157 |                                       |               | when the network name is an empty string                  |
158 +---------------------------------------+---------------+-----------------------------------------------------------+
159 | test_create_network_null_name         | 2             | Ensures neutron_utils.create_network() raises an exception|
160 |                                       |               | when the network name is None                             |
161 +---------------------------------------+---------------+-----------------------------------------------------------+
162
163 neutron_utils_tests.py - NeutronUtilsSubnetTests
164 ------------------------------------------------
165
166 +---------------------------------------+---------------+-----------------------------------------------------------+
167 | Test Name                             | Neutron API   | Description                                               |
168 +=======================================+===============+===========================================================+
169 | test_create_subnet                    | 2             | Ensures neutron_utils.create_network() can properly create|
170 |                                       |               | an OpenStack subnet object                                |
171 +---------------------------------------+---------------+-----------------------------------------------------------+
172 | test_create_subnet_null_name          | 2             | Ensures neutron_utils.create_network() raises an exception|
173 |                                       |               | when the subnet name is None                              |
174 +---------------------------------------+---------------+-----------------------------------------------------------+
175 | test_create_subnet_empty_name         | 2             | Ensures neutron_utils.create_network() raises an exception|
176 |                                       |               | when the subnet name is an empty string                   |
177 +---------------------------------------+---------------+-----------------------------------------------------------+
178 | test_create_subnet_null_cidr          | 2             | Ensures neutron_utils.create_network() raises an exception|
179 |                                       |               | when the subnet CIDR is None                              |
180 +---------------------------------------+---------------+-----------------------------------------------------------+
181 | test_create_subnet_empty_cidr         | 2             | Ensures neutron_utils.create_network() raises an exception|
182 |                                       |               | when the subnet CIDR is an empty string                   |
183 +---------------------------------------+---------------+-----------------------------------------------------------+
184
185 neutron_utils_tests.py - NeutronUtilsIPv6Tests
186 ----------------------------------------------
187
188 +---------------------------------------+---------------+-----------------------------------------------------------+
189 | Test Name                             | Neutron API   | Description                                               |
190 +=======================================+===============+===========================================================+
191 | test_create_network_slaac             | 2             | Ensures neutron_utils.create_network() can properly create|
192 |                                       |               | an OpenStack network with an IPv6 subnet when DHCP is True|
193 |                                       |               | and modes are 'slaac'                                     |
194 +---------------------------------------+---------------+-----------------------------------------------------------+
195 | test_create_network_stateful          | 2             | Ensures neutron_utils.create_network() can properly create|
196 |                                       |               | an OpenStack network with an IPv6 subnet when DHCP is True|
197 |                                       |               | and modes are 'stateful'                                  |
198 +---------------------------------------+---------------+-----------------------------------------------------------+
199 | test_create_network_stateless         | 2             | Ensures neutron_utils.create_network() can properly create|
200 |                                       |               | an OpenStack network with an IPv6 subnet when DHCP is True|
201 |                                       |               | and modes are 'stateless'                                 |
202 +---------------------------------------+---------------+-----------------------------------------------------------+
203 | test_create_network_no_dhcp_slaac     | 2             | Ensures neutron_utils.create_network() raises a BadRequest|
204 |                                       |               | exception when deploying the network with an IPv6 subnet  |
205 |                                       |               | when DHCP is False and modes are 'slaac'                  |
206 +---------------------------------------+---------------+-----------------------------------------------------------+
207 | test_create_network_invalid_start_ip  | 2             | Ensures neutron_utils.create_network() sets the start IP  |
208 |                                       |               | address to the minimum value when the start configuration |
209 |                                       |               | parameter is some garbage value                           |
210 +---------------------------------------+---------------+-----------------------------------------------------------+
211 | test_create_network_invalid_end_ip    | 2             | Ensures neutron_utils.create_network() sets the end IP    |
212 |                                       |               | address to the maximum value when the end configuration   |
213 |                                       |               | parameter is some garbage value                           |
214 +---------------------------------------+---------------+-----------------------------------------------------------+
215 | test_create_network_with_bad_cidr     | 2             | Ensures neutron_utils.create_network() raises a BadRequest|
216 |                                       |               | exception when the IPv6 CIDR is incorrect                 |
217 +---------------------------------------+---------------+-----------------------------------------------------------+
218 | test_create_network_invalid_gateway_ip| 2             | Ensures neutron_utils.create_network() raises a BadRequest|
219 |                                       |               | exception when the IPv6 gateway IP does not match the CIDR|
220 +---------------------------------------+---------------+-----------------------------------------------------------+
221 | test_create_network_with_bad_dns      | 2             | Ensures neutron_utils.create_network() raises a BadRequest|
222 |                                       |               | exception when the IPv6 DNS IP address is not a valid IPv6|
223 |                                       |               | address                                                   |
224 +---------------------------------------+---------------+-----------------------------------------------------------+
225
226 neutron_utils_tests.py - NeutronUtilsRouterTests
227 ------------------------------------------------
228
229 +---------------------------------------+---------------+-----------------------------------------------------------+
230 | Test Name                             | Neutron API   | Description                                               |
231 +=======================================+===============+===========================================================+
232 | test_create_router_simple             | 2             | Ensures neutron_utils.create_router() can properly create |
233 |                                       |               | a simple OpenStack router object                          |
234 +---------------------------------------+---------------+-----------------------------------------------------------+
235 | test_create_router_with_public_inter  | 2             | Ensures neutron_utils.create_router() can properly create |
236 | face                                  |               | an OpenStack router object with an interface to the       |
237 |                                       |               | external network                                          |
238 +---------------------------------------+---------------+-----------------------------------------------------------+
239 | test_add_interface_router             | 2             | Ensures neutron_utils.add_interface_router() properly adds|
240 |                                       |               | an interface to another subnet                            |
241 +---------------------------------------+---------------+-----------------------------------------------------------+
242 | test_add_interface_router_null_router | 2             | Ensures neutron_utils.add_interface_router() raises an    |
243 |                                       |               | exception when the router object is None                  |
244 +---------------------------------------+---------------+-----------------------------------------------------------+
245 | test_add_interface_router_null_subnet | 2             | Ensures neutron_utils.add_interface_router() raises an    |
246 |                                       |               | exception when the subnet object is None                  |
247 +---------------------------------------+---------------+-----------------------------------------------------------+
248 | test_add_interface_router_missing_sub | 2             | Ensures neutron_utils.add_interface_router() raises an    |
249 | net                                   |               | exception when the subnet object had been deleted         |
250 +---------------------------------------+---------------+-----------------------------------------------------------+
251 | test_create_port                      | 2             | Ensures neutron_utils.create_port() can properly create an|
252 |                                       |               | OpenStack port object                                     |
253 +---------------------------------------+---------------+-----------------------------------------------------------+
254 | test_create_port_empty_name           | 2             | Ensures neutron_utils.create_port() raises an exception   |
255 |                                       |               | when the port name is an empty string                     |
256 +---------------------------------------+---------------+-----------------------------------------------------------+
257 | test_create_port_null_name            | 2             | Ensures neutron_utils.create_port() raises an exception   |
258 |                                       |               | when the port name is None                                |
259 +---------------------------------------+---------------+-----------------------------------------------------------+
260 | test_create_port_null_network_object  | 2             | Ensures neutron_utils.create_port() raises an exception   |
261 |                                       |               | when the network object is None                           |
262 +---------------------------------------+---------------+-----------------------------------------------------------+
263 | test_create_port_null_ip              | 2             | Ensures neutron_utils.create_port() raises an exception   |
264 |                                       |               | when the assigned IP value is None                        |
265 +---------------------------------------+---------------+-----------------------------------------------------------+
266 | test_create_port_invalid_ip           | 2             | Ensures neutron_utils.create_port() raises an exception   |
267 |                                       |               | when the assigned IP value is invalid                     |
268 +---------------------------------------+---------------+-----------------------------------------------------------+
269 | test_create_port_invalid_ip_to_subnet | 2             | Ensures neutron_utils.create_port() raises an exception   |
270 |                                       |               | when the assigned IP value is not part of CIDR            |
271 +---------------------------------------+---------------+-----------------------------------------------------------+
272
273 neutron_utils_tests.py - NeutronUtilsSecurityGroupTests
274 -------------------------------------------------------
275
276 +---------------------------------------+---------------+-----------------------------------------------------------+
277 | Test Name                             | Neutron API   | Description                                               |
278 +=======================================+===============+===========================================================+
279 | test_create_delete_simple_sec_grp     | 2             | Ensures that a security group can be created              |
280 |                                       |               | (neutron_utils.create_security_group() and deleted via    |
281 |                                       |               | neutron_utils.delete_security_group()                     |
282 +---------------------------------------+---------------+-----------------------------------------------------------+
283 | test_create_sec_grp_no_name           | 2             | Ensures that neutron_utils.create_security_group() raises |
284 |                                       |               | an exception when attempting to create a security group   |
285 |                                       |               | without a name                                            |
286 +---------------------------------------+---------------+-----------------------------------------------------------+
287 | test_create_sec_grp_no_rules          | 2             | Ensures that neutron_utils.create_security_group() can    |
288 |                                       |               | create a security group without any rules                 |
289 +---------------------------------------+---------------+-----------------------------------------------------------+
290 | test_create_sec_grp_one_rule          | 2             | Ensures that neutron_utils.create_security_group_rule()   |
291 |                                       |               | can add a rule to a security group                        |
292 +---------------------------------------+---------------+-----------------------------------------------------------+
293 | test_get_sec_grp_by_id                | 2             | Ensures that neutron_utils.get_security_group_by_id()     |
294 |                                       |               | returns the expected security group                       |
295 +---------------------------------------+---------------+-----------------------------------------------------------+
296
297 neutron_utils_tests.py - NeutronUtilsFloatingIpTests
298 ----------------------------------------------------
299
300 +---------------------------------------+---------------+-----------------------------------------------------------+
301 | Test Name                             | Neutron API   | Description                                               |
302 +=======================================+===============+===========================================================+
303 | test_floating_ips                     | 2             | Ensures that a floating IP can be created                 |
304 +---------------------------------------+---------------+-----------------------------------------------------------+
305
306 cinder_utils_tests.py - CinderUtilsQoSTests
307 -------------------------------------------
308
309 +---------------------------------------+---------------+-----------------------------------------------------------+
310 | Test Name                             |  Cinder API   | Description                                               |
311 +=======================================+===============+===========================================================+
312 | test_create_qos_both                  | 2 & 3         | Ensures that a QoS Spec can be created with a Consumer    |
313 |                                       |               | value of 'both'                                           |
314 +---------------------------------------+---------------+-----------------------------------------------------------+
315 | test_create_qos_front                 | 2 & 3         | Ensures that a QoS Spec can be created with a Consumer    |
316 |                                       |               | value of 'front-end'                                      |
317 +---------------------------------------+---------------+-----------------------------------------------------------+
318 | test_create_qos_back                  | 2 & 3         | Ensures that a QoS Spec can be created with a Consumer    |
319 |                                       |               | value of 'back-end'                                       |
320 +---------------------------------------+---------------+-----------------------------------------------------------+
321 | test_create_delete_qos                | 2 & 3         | Ensures that a QoS Spec can be created and deleted        |
322 +---------------------------------------+---------------+-----------------------------------------------------------+
323
324 cinder_utils_tests.py - CinderUtilsSimpleVolumeTypeTests
325 --------------------------------------------------------
326
327 +---------------------------------------+---------------+-----------------------------------------------------------+
328 | Test Name                             |  Cinder API   | Description                                               |
329 +=======================================+===============+===========================================================+
330 | test_create_simple_volume_type        | 2 & 3         | Tests the creation of a simple volume type with the       |
331 |                                       |               | function cinder_utils#create_volume_type()                |
332 +---------------------------------------+---------------+-----------------------------------------------------------+
333 | test_create_delete_volume_type        | 2 & 3         | Tests the creation of a simple volume type with the       |
334 |                                       |               | function cinder_utils#create_volume_type() then deletes   |
335 |                                       |               | with the function cinder_utils#delete_volume_type()       |
336 +---------------------------------------+---------------+-----------------------------------------------------------+
337
338 cinder_utils_tests.py - CinderUtilsAddEncryptionTests
339 -----------------------------------------------------
340
341 +---------------------------------------+---------------+-----------------------------------------------------------+
342 | Test Name                             |  Cinder API   | Description                                               |
343 +=======================================+===============+===========================================================+
344 | test_create_simple_encryption         | 2 & 3         | Tests the creation of a simple volume type encryption     |
345 |                                       |               | with the function cinder_utils#create_volume_encryption() |
346 +---------------------------------------+---------------+-----------------------------------------------------------+
347 | test_create_delete_encryption         | 2 & 3         | Tests the creation of a simple volume type encryption     |
348 |                                       |               | with the function cinder_utils#create_volume_encryption() |
349 |                                       |               | then deletes with the function                            |
350 |                                       |               | cinder_utils#delete_volume_type_encryption()              |
351 +---------------------------------------+---------------+-----------------------------------------------------------+
352 | test_create_with_all_attrs            | 2 & 3         | Tests the creation of a simple volume type encryption     |
353 |                                       |               | with the function cinder_utils#create_volume_encryption() |
354 |                                       |               | where all configuration attributes have been set          |
355 +---------------------------------------+---------------+-----------------------------------------------------------+
356 | test_create_bad_key_size              | 2 & 3         | Tests to ensure that the function                         |
357 |                                       |               | cinder_utils#create_volume_encryption() raises a          |
358 |                                       |               | BadRequest exception when the key_size attribute is -1    |
359 +---------------------------------------+---------------+-----------------------------------------------------------+
360
361 cinder_utils_tests.py - CinderUtilsVolumeTypeCompleteTests
362 ----------------------------------------------------------
363
364 +---------------------------------------+---------------+-----------------------------------------------------------+
365 | Test Name                             |  Cinder API   | Description                                               |
366 +=======================================+===============+===========================================================+
367 | test_create_with_encryption           | 2 & 3         | Tests the creation of a volume type with encryption       |
368 |                                       |               | with the function cinder_utils#create_volume_type()       |
369 +---------------------------------------+---------------+-----------------------------------------------------------+
370 | test_create_with_qos                  | 2 & 3         | Tests the creation of a volume type with a QoS Spec       |
371 |                                       |               | with the function cinder_utils#create_volume_type()       |
372 +---------------------------------------+---------------+-----------------------------------------------------------+
373 | test_create_with_invalid_qos          | 2 & 3         | Tests the creation of a volume type with an invalid QoS   |
374 |                                       |               | Spec with the function cinder_utils#create_volume_type()  |
375 +---------------------------------------+---------------+-----------------------------------------------------------+
376 | test_create_with_qos_and_encryption   | 2 & 3         | Tests the creation of a volume type with a QoS Spec and   |
377 |                                       |               | encryption with the function                              |
378 |                                       |               | cinder_utils#create_volume_type()                         |
379 +---------------------------------------+---------------+-----------------------------------------------------------+
380
381 cinder_utils_tests.py - CinderUtilsVolumeTests
382 ----------------------------------------------
383
384 +---------------------------------------+---------------+-----------------------------------------------------------+
385 | Test Name                             |  Cinder API   | Description                                               |
386 +=======================================+===============+===========================================================+
387 | test_create_simple_volume             | 2 & 3         | Tests the creation of a simple volume with the function   |
388 |                                       |               | cinder_utils#create_volume()                              |
389 +---------------------------------------+---------------+-----------------------------------------------------------+
390 | test_create_delete_volume             | 2 & 3         | Tests the creation of a volume with the function          |
391 |                                       |               | cinder_utils#create_volume() then deletion with the       |
392 |                                       |               | function cinder_utils#delete_volume()                     |
393 +---------------------------------------+---------------+-----------------------------------------------------------+
394
395 nova_utils_tests.py - NovaUtilsKeypairTests
396 -------------------------------------------
397
398 +---------------------------------------+---------------+-----------------------------------------------------------+
399 | Test Name                             | Nova API      | Description                                               |
400 +=======================================+===============+===========================================================+
401 | test_create_keypair                   | 2             | Ensures that a keypair can be properly created via        |
402 |                                       |               | nova_utils.upload_keypair() with a public_key object      |
403 +---------------------------------------+---------------+-----------------------------------------------------------+
404 | test_create_delete_keypair            | 2             | Ensures that a keypair can be properly deleted via        |
405 |                                       |               | nova_utils.delete_keypair()                               |
406 +---------------------------------------+---------------+-----------------------------------------------------------+
407 | test_create_key_from_file             | 2             | Ensures that a keypair can be properly created via        |
408 |                                       |               | nova_utils.upload_keypair_file()                          |
409 +---------------------------------------+---------------+-----------------------------------------------------------+
410
411 nova_utils_tests.py - NovaUtilsFlavorTests
412 ------------------------------------------
413
414 +---------------------------------------+---------------+-----------------------------------------------------------+
415 | Test Name                             | Nova API      | Description                                               |
416 +=======================================+===============+===========================================================+
417 | test_create_flavor                    | 2             | Ensures that a flavor can be properly created via         |
418 |                                       |               | nova_utils.create_flavor()                                |
419 +---------------------------------------+---------------+-----------------------------------------------------------+
420 | test_create_delete_flavor             | 2             | Ensures that a flavor can be properly deleted via         |
421 |                                       |               | nova_utils.delete_flavor()                                |
422 +---------------------------------------+---------------+-----------------------------------------------------------+
423
424 nova_utils_tests.py - NovaUtilsInstanceTests
425 --------------------------------------------
426
427 +---------------------------------------+---------------+-----------------------------------------------------------+
428 | Test Name                             | Nova API      | Description                                               |
429 +=======================================+===============+===========================================================+
430 | test_create_instance                  | 2             | Ensures that a VM instance can be properly created via    |
431 |                                       |               | nova_utils.create_server()                                |
432 +---------------------------------------+---------------+-----------------------------------------------------------+
433
434 nova_utils_tests.py - NovaUtilsInstanceVolumeTests
435 --------------------------------------------------
436
437 +---------------------------------------+---------------+-----------------------------------------------------------+
438 | Test Name                             | Nova API      | Description                                               |
439 +=======================================+===============+===========================================================+
440 | test_add_remove_volume                | 2             | Ensures that a VM instance can properly attach and detach |
441 |                                       |               | a volume using the nova interface while waiting for       |
442 |                                       |               | the update to fully occur                                 |
443 +---------------------------------------+---------------+-----------------------------------------------------------+
444 | test_attach_volume_nowait             | 2             | Ensures that the call to nova_utils.attach_volume raises  |
445 |                                       |               | an exception when the timeout is too short to return an   |
446 |                                       |               | properly updated VmInst object                            |
447 +---------------------------------------+---------------+-----------------------------------------------------------+
448 | test_detach_volume_nowait             | 2             | Ensures that the call to nova_utils.detach_volume raises  |
449 |                                       |               | an exception when the timeout is too short to return an   |
450 |                                       |               | properly updated VmInst object                            |
451 +---------------------------------------+---------------+-----------------------------------------------------------+
452
453 create_flavor_tests.py - CreateFlavorTests
454 ------------------------------------------
455
456 +---------------------------------------+---------------+-----------------------------------------------------------+
457 | Test Name                             | Nova API      | Description                                               |
458 +=======================================+===============+===========================================================+
459 | test_create_flavor                    | 2             | Ensures that the OpenStackFlavor class's create() method  |
460 |                                       |               | creates an OpenStack flavor object                        |
461 +---------------------------------------+---------------+-----------------------------------------------------------+
462 | test_create_flavor_existing           | 2             | Ensures that the OpenStackFlavor class's create() will not|
463 |                                       |               | create a flavor with the same name more than once         |
464 +---------------------------------------+---------------+-----------------------------------------------------------+
465 | test_create_clean_flavor              | 2             | Ensures that the OpenStackFlavor class's clean() method   |
466 |                                       |               | will delete the flavor object                             |
467 +---------------------------------------+---------------+-----------------------------------------------------------+
468 | test_create_delete_flavor             | 2             | Ensures that the OpenStackFlavor class's clean() method   |
469 |                                       |               | will not raise an exception when called and the object no |
470 |                                       |               | longer exists                                             |
471 +---------------------------------------+---------------+-----------------------------------------------------------+
472 | test_create_delete_flavor_all_settings| 2             | Ensures that the OpenStackFlavor class will create a      |
473 |                                       |               | a flavor properly with all supported settings             |
474 +---------------------------------------+---------------+-----------------------------------------------------------+
475
476 heat_utils_tests.py - HeatUtilsCreateSimpleStackTests
477 -----------------------------------------------------
478
479 +---------------------------------------+---------------+-----------------------------------------------------------+
480 | Test Name                             | Heat API      | Description                                               |
481 +=======================================+===============+===========================================================+
482 | test_create_stack                     | 1-3           | Tests the heat_utils.create_stack() with a test template  |
483 +---------------------------------------+---------------+-----------------------------------------------------------+
484 | test_create_stack_x2                  | 1-3           | Tests the heat_utils.create_stack() with a test template  |
485 |                                       |               | and attempts to deploy a second time w/o actually         |
486 |                                       |               | deploying any objects                                     |
487 +---------------------------------------+---------------+-----------------------------------------------------------+
488
489 heat_utils_tests.py - HeatUtilsCreateComplexStackTests
490 ------------------------------------------------------
491
492 +---------------------------------------+---------------+-----------------------------------------------------------+
493 | Test Name                             | Heat API      | Description                                               |
494 +=======================================+===============+===========================================================+
495 | test_get_settings_from_stack          | 1-3           | Tests the heat_utils functions that are responsible for   |
496 |                                       |               | reverse engineering settings objects of the types deployed|
497 |                                       |               | by Heat                                                   |
498 +---------------------------------------+---------------+-----------------------------------------------------------+
499
500 heat_utils_tests.py - HeatUtilsRouterTests
501 ------------------------------------------
502
503 +---------------------------------------+---------------+-----------------------------------------------------------+
504 | Test Name                             | Heat API      | Description                                               |
505 +=======================================+===============+===========================================================+
506 | test_create_router_with_stack         | 1-3           | Tests ability of the function                             |
507 |                                       |               | heat_utils.get_stack_routers() to return the correct      |
508 |                                       |               | OpenStackRouter instance                                  |
509 +---------------------------------------+---------------+-----------------------------------------------------------+
510
511 heat_utils_tests.py - HeatUtilsVolumeTests
512 ------------------------------------------
513
514 +---------------------------------------+---------------+-----------------------------------------------------------+
515 | Test Name                             | Heat API      | Description                                               |
516 +=======================================+===============+===========================================================+
517 | test_create_vol_with_stack            | 1-3           | Tests ability of the function                             |
518 |                                       |               | heat_utils.create_stack() to return the correct           |
519 |                                       |               | Volume domain objects deployed with Heat                  |
520 +---------------------------------------+---------------+-----------------------------------------------------------+
521 | test_create_vol_types_with_stack      | 1-3           | Tests ability of the function                             |
522 |                                       |               | heat_utils.get_stack_volumes_types() to return the correct|
523 |                                       |               | VolumeType domain objects deployed with Heat              |
524 +---------------------------------------+---------------+-----------------------------------------------------------+
525
526 heat_utils_tests.py - HeatUtilsKeypairTests
527 -------------------------------------------
528
529 +---------------------------------------+---------------+-----------------------------------------------------------+
530 | Test Name                             | Heat API      | Description                                               |
531 +=======================================+===============+===========================================================+
532 | test_create_keypair_with_stack        | 1-3           | Tests ability of the function                             |
533 |                                       |               | heat_utils.get_stack_keypairs() to return the correct     |
534 |                                       |               | Keypair domain objects deployed with Heat                 |
535 +---------------------------------------+---------------+-----------------------------------------------------------+
536
537 heat_utils_tests.py - HeatUtilsSecurityGroupTests
538 -------------------------------------------------
539
540 +---------------------------------------+---------------+-----------------------------------------------------------+
541 | Test Name                             | Heat API      | Description                                               |
542 +=======================================+===============+===========================================================+
543 | test_create_security_group_with_stack | 1-3           | Tests ability of the function                             |
544 |                                       |               | heat_utils.get_stack_security_groups() to return the      |
545 |                                       |               | correct SecurityGroup domain objects deployed with Heat   |
546 +---------------------------------------+---------------+-----------------------------------------------------------+
547
548 heat_utils_tests.py - HeatUtilsFlavorTests
549 ------------------------------------------
550
551 +---------------------------------------+---------------+-----------------------------------------------------------+
552 | Test Name                             | Heat API      | Description                                               |
553 +=======================================+===============+===========================================================+
554 | test_create_flavor_with_stack         | 1-3           | Tests ability of the function                             |
555 |                                       |               | heat_utils.get_stack_flavors() to return the correct      |
556 |                                       |               | Flavor domain objects deployed with Heat                  |
557 +---------------------------------------+---------------+-----------------------------------------------------------+
558
559 magnum_utils_tests.py - MagnumUtilsTests
560 ----------------------------------------
561
562 +---------------------------------------+---------------+-----------------------------------------------------------+
563 | Test Name                             | Magnum API    | Description                                               |
564 +=======================================+===============+===========================================================+
565 | test_create_cluster_template_simple   | 1             | Tests ability of the function                             |
566 |                                       |               | magnum_utils.create_cluster_template() to create a simple |
567 |                                       |               | cluster template OpenStack object with minimal config     |
568 +---------------------------------------+---------------+-----------------------------------------------------------+
569 | test_create_cluster_template_all      | 1             | Tests ability of the function                             |
570 |                                       |               | magnum_utils.create_cluster_template() to create a        |
571 |                                       |               | cluster template OpenStack object with maximum config     |
572 +---------------------------------------+---------------+-----------------------------------------------------------+
573 | test_create_cluster_template_bad_image| 1             | Ensures the function                                      |
574 |                                       |               | magnum_utils.create_cluster_template() will raise a       |
575 |                                       |               | BadRequest exception when the image does not exist        |
576 +---------------------------------------+---------------+-----------------------------------------------------------+
577 | test_create_cluster_template_bad_ext  | 1             | Ensures the function                                      |
578 | _net                                  |               | magnum_utils.create_cluster_template() will raise a       |
579 |                                       |               | BadRequest exception when the external network does not   |
580 |                                       |               | exist                                                     |
581 +---------------------------------------+---------------+-----------------------------------------------------------+
582 | test_create_cluster_template_bad      | 1             | Ensures the function                                      |
583 | _flavor                               |               | magnum_utils.create_cluster_template() will raise a       |
584 |                                       |               | BadRequest exception when the flavor does not exist       |
585 +---------------------------------------+---------------+-----------------------------------------------------------+
586 | test_create_cluster_template_bad      | 1             | Ensures the function                                      |
587 | _master_flavor                        |               | magnum_utils.create_cluster_template() will raise a       |
588 |                                       |               | BadRequest exception when the master flavor does not exist|
589 +---------------------------------------+---------------+-----------------------------------------------------------+
590 | test_create_cluster_template_bad      | 1             | Ensures the function                                      |
591 | _network_driver                       |               | magnum_utils.create_cluster_template() will raise a       |
592 |                                       |               | BadRequest exception when the network driver is invalid   |
593 +---------------------------------------+---------------+-----------------------------------------------------------+
594 | test_create_cluster_template_bad      | 1             | Ensures the function                                      |
595 | _volume_driver                        |               | magnum_utils.create_cluster_template() will raise a       |
596 |                                       |               | BadRequest exception when the volume driver is invalid    |
597 +---------------------------------------+---------------+-----------------------------------------------------------+
598
599 settings_utils_tests.py - SettingsUtilsNetworkingTests
600 ------------------------------------------------------
601
602 +---------------------------------------+---------------+-----------------------------------------------------------+
603 | Test Name                             | API           | Description                                               |
604 +=======================================+===============+===========================================================+
605 | test_derive_net_settings_no_subnet    | Neutron 2     | Tests to ensure that derived NetworkConfig from an        |
606 |                                       |               | OpenStack network are correct without a subnet            |
607 +---------------------------------------+---------------+-----------------------------------------------------------+
608 | test_derive_net_settings_two_subnets  | Neutron 2     | Tests to ensure that derived NetworkConfig from an        |
609 |                                       |               | OpenStack network are correct with two subnets            |
610 +---------------------------------------+---------------+-----------------------------------------------------------+
611
612
613 settings_utils_tests.py - SettingsUtilsVmInstTests
614 --------------------------------------------------
615 +---------------------------------------+---------------+-----------------------------------------------------------+
616 | Test Name                             | API           | Description                                               |
617 +=======================================+===============+===========================================================+
618 | test_derive_vm_inst_config            | Neutron 2     | Tests to ensure that derived VmInstanceSettings from an   |
619 |                                       |               | OpenStack VM instance is correct                          |
620 +---------------------------------------+---------------+-----------------------------------------------------------+
621 | test_derive_image_settings            | Neutron 2     | Tests to ensure that derived ImageConfig from an        |
622 |                                       |               | OpenStack VM instance is correct                          |
623 +---------------------------------------+---------------+-----------------------------------------------------------+