Fix NoneType in create_router.py
[snaps.git] / docs / how-to-use / APITests.rst
index ff0ab45..9f46839 100644 (file)
@@ -34,6 +34,12 @@ nova_utils_tests.py - NovaSmokeTests
 Ensures that a Nova client can be obtained as well as the proper
 exceptions thrown with the wrong credentials.
 
+cinder_utils_tests.py - CinderSmokeTests
+----------------------------------------
+
+Ensures that a Cinder client can be obtained as well as the proper
+exceptions thrown with the wrong credentials.
+
 heat_utils_tests.py - HeatSmokeTests
 ------------------------------------
 
@@ -98,6 +104,9 @@ create_project_tests.py - CreateProjectSuccessTests
 | test_create_project              | 2 & 3         | Tests the creation of a project via the OpenStackProject  |
 |                                  |               | class                                                     |
 +----------------------------------+---------------+-----------------------------------------------------------+
+| test_create_project_quota        | 2 & 3         | Tests the creation of a project via the OpenStackProject  |
+| _override                        |               | class with overriding the default quota values            |
++----------------------------------+---------------+-----------------------------------------------------------+
 | test_create_project_2x           | 2 & 3         | Tests the creation of a project a second time via the     |
 |                                  |               | OpenStackProject class to ensure it is only created once  |
 +----------------------------------+---------------+-----------------------------------------------------------+
@@ -105,6 +114,9 @@ create_project_tests.py - CreateProjectSuccessTests
 |                                  |               | OpenStackProject class to ensure that clean will not raise|
 |                                  |               | an exception                                              |
 +----------------------------------+---------------+-----------------------------------------------------------+
+| test_update_quotas               | 2 & 3         | Tests the ability to update quota values                  |
+|                                  | nova & neutron|                                                           |
++----------------------------------+---------------+-----------------------------------------------------------+
 
 create_project_tests.py - CreateProjectUserTests
 ------------------------------------------------
@@ -154,22 +166,63 @@ neutron_utils_tests.py - NeutronUtilsSubnetTests
 +---------------------------------------+---------------+-----------------------------------------------------------+
 | Test Name                             | Neutron API   | Description                                               |
 +=======================================+===============+===========================================================+
-| test_create_subnet                    | 2             | Ensures neutron_utils.create_subnet() can properly create |
+| test_create_subnet                    | 2             | Ensures neutron_utils.create_network() can properly create|
 |                                       |               | an OpenStack subnet object                                |
 +---------------------------------------+---------------+-----------------------------------------------------------+
-| test_create_subnet_null_name          | 2             | Ensures neutron_utils.create_subnet() raises an exception |
+| test_create_subnet_null_name          | 2             | Ensures neutron_utils.create_network() raises an exception|
 |                                       |               | when the subnet name is None                              |
 +---------------------------------------+---------------+-----------------------------------------------------------+
-| test_create_subnet_empty_name         | 2             | Ensures neutron_utils.create_subnet() raises an exception |
+| test_create_subnet_empty_name         | 2             | Ensures neutron_utils.create_network() raises an exception|
 |                                       |               | when the subnet name is an empty string                   |
 +---------------------------------------+---------------+-----------------------------------------------------------+
-| test_create_subnet_null_cidr          | 2             | Ensures neutron_utils.create_subnet() raises an exception |
+| test_create_subnet_null_cidr          | 2             | Ensures neutron_utils.create_network() raises an exception|
 |                                       |               | when the subnet CIDR is None                              |
 +---------------------------------------+---------------+-----------------------------------------------------------+
-| test_create_subnet_empty_cidr         | 2             | Ensures neutron_utils.create_subnet() raises an exception |
+| test_create_subnet_empty_cidr         | 2             | Ensures neutron_utils.create_network() raises an exception|
 |                                       |               | when the subnet CIDR is an empty string                   |
 +---------------------------------------+---------------+-----------------------------------------------------------+
 
+neutron_utils_tests.py - NeutronUtilsIPv6Tests
+----------------------------------------------
+
++---------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name                             | Neutron API   | Description                                               |
++=======================================+===============+===========================================================+
+| test_create_network_slaac             | 2             | Ensures neutron_utils.create_network() can properly create|
+|                                       |               | an OpenStack network with an IPv6 subnet when DHCP is True|
+|                                       |               | and modes are 'slaac'                                     |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_network_stateful          | 2             | Ensures neutron_utils.create_network() can properly create|
+|                                       |               | an OpenStack network with an IPv6 subnet when DHCP is True|
+|                                       |               | and modes are 'stateful'                                  |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_network_stateless         | 2             | Ensures neutron_utils.create_network() can properly create|
+|                                       |               | an OpenStack network with an IPv6 subnet when DHCP is True|
+|                                       |               | and modes are 'stateless'                                 |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_network_no_dhcp_slaac     | 2             | Ensures neutron_utils.create_network() raises a BadRequest|
+|                                       |               | exception when deploying the network with an IPv6 subnet  |
+|                                       |               | when DHCP is False and modes are 'slaac'                  |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_network_invalid_start_ip  | 2             | Ensures neutron_utils.create_network() sets the start IP  |
+|                                       |               | address to the minimum value when the start configuration |
+|                                       |               | parameter is some garbage value                           |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_network_invalid_end_ip    | 2             | Ensures neutron_utils.create_network() sets the end IP    |
+|                                       |               | address to the maximum value when the end configuration   |
+|                                       |               | parameter is some garbage value                           |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_network_with_bad_cidr     | 2             | Ensures neutron_utils.create_network() raises a BadRequest|
+|                                       |               | exception when the IPv6 CIDR is incorrect                 |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_network_invalid_gateway_ip| 2             | Ensures neutron_utils.create_network() raises a BadRequest|
+|                                       |               | exception when the IPv6 gateway IP does not match the CIDR|
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_network_with_bad_dns      | 2             | Ensures neutron_utils.create_network() raises a BadRequest|
+|                                       |               | exception when the IPv6 DNS IP address is not a valid IPv6|
+|                                       |               | address                                                   |
++---------------------------------------+---------------+-----------------------------------------------------------+
+
 neutron_utils_tests.py - NeutronUtilsRouterTests
 ------------------------------------------------
 
@@ -183,12 +236,6 @@ neutron_utils_tests.py - NeutronUtilsRouterTests
 | face                                  |               | an OpenStack router object with an interface to the       |
 |                                       |               | external network                                          |
 +---------------------------------------+---------------+-----------------------------------------------------------+
-| test_create_router_empty_name         | 2             | Ensures neutron_utils.create_router() raises an exception |
-|                                       |               | when the name is an empty string                          |
-+---------------------------------------+---------------+-----------------------------------------------------------+
-| test_create_router_null_name          | 2             | Ensures neutron_utils.create_router() raises an exception |
-|                                       |               | when the name is None                                     |
-+---------------------------------------+---------------+-----------------------------------------------------------+
 | test_add_interface_router             | 2             | Ensures neutron_utils.add_interface_router() properly adds|
 |                                       |               | an interface to another subnet                            |
 +---------------------------------------+---------------+-----------------------------------------------------------+
@@ -198,6 +245,9 @@ neutron_utils_tests.py - NeutronUtilsRouterTests
 | test_add_interface_router_null_subnet | 2             | Ensures neutron_utils.add_interface_router() raises an    |
 |                                       |               | exception when the subnet object is None                  |
 +---------------------------------------+---------------+-----------------------------------------------------------+
+| test_add_interface_router_missing_sub | 2             | Ensures neutron_utils.add_interface_router() raises an    |
+| net                                   |               | exception when the subnet object had been deleted         |
++---------------------------------------+---------------+-----------------------------------------------------------+
 | test_create_port                      | 2             | Ensures neutron_utils.create_port() can properly create an|
 |                                       |               | OpenStack port object                                     |
 +---------------------------------------+---------------+-----------------------------------------------------------+
@@ -253,6 +303,95 @@ neutron_utils_tests.py - NeutronUtilsFloatingIpTests
 | test_floating_ips                     | 2             | Ensures that a floating IP can be created                 |
 +---------------------------------------+---------------+-----------------------------------------------------------+
 
+cinder_utils_tests.py - CinderUtilsQoSTests
+-------------------------------------------
+
++---------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name                             |  Cinder API   | Description                                               |
++=======================================+===============+===========================================================+
+| test_create_qos_both                  | 2 & 3         | Ensures that a QoS Spec can be created with a Consumer    |
+|                                       |               | value of 'both'                                           |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_qos_front                 | 2 & 3         | Ensures that a QoS Spec can be created with a Consumer    |
+|                                       |               | value of 'front-end'                                      |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_qos_back                  | 2 & 3         | Ensures that a QoS Spec can be created with a Consumer    |
+|                                       |               | value of 'back-end'                                       |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_delete_qos                | 2 & 3         | Ensures that a QoS Spec can be created and deleted        |
++---------------------------------------+---------------+-----------------------------------------------------------+
+
+cinder_utils_tests.py - CinderUtilsSimpleVolumeTypeTests
+--------------------------------------------------------
+
++---------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name                             |  Cinder API   | Description                                               |
++=======================================+===============+===========================================================+
+| test_create_simple_volume_type        | 2 & 3         | Tests the creation of a simple volume type with the       |
+|                                       |               | function cinder_utils#create_volume_type()                |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_delete_volume_type        | 2 & 3         | Tests the creation of a simple volume type with the       |
+|                                       |               | function cinder_utils#create_volume_type() then deletes   |
+|                                       |               | with the function cinder_utils#delete_volume_type()       |
++---------------------------------------+---------------+-----------------------------------------------------------+
+
+cinder_utils_tests.py - CinderUtilsAddEncryptionTests
+-----------------------------------------------------
+
++---------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name                             |  Cinder API   | Description                                               |
++=======================================+===============+===========================================================+
+| test_create_simple_encryption         | 2 & 3         | Tests the creation of a simple volume type encryption     |
+|                                       |               | with the function cinder_utils#create_volume_encryption() |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_delete_encryption         | 2 & 3         | Tests the creation of a simple volume type encryption     |
+|                                       |               | with the function cinder_utils#create_volume_encryption() |
+|                                       |               | then deletes with the function                            |
+|                                       |               | cinder_utils#delete_volume_type_encryption()              |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_with_all_attrs            | 2 & 3         | Tests the creation of a simple volume type encryption     |
+|                                       |               | with the function cinder_utils#create_volume_encryption() |
+|                                       |               | where all configuration attributes have been set          |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_bad_key_size              | 2 & 3         | Tests to ensure that the function                         |
+|                                       |               | cinder_utils#create_volume_encryption() raises a          |
+|                                       |               | BadRequest exception when the key_size attribute is -1    |
++---------------------------------------+---------------+-----------------------------------------------------------+
+
+cinder_utils_tests.py - CinderUtilsVolumeTypeCompleteTests
+----------------------------------------------------------
+
++---------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name                             |  Cinder API   | Description                                               |
++=======================================+===============+===========================================================+
+| test_create_with_encryption           | 2 & 3         | Tests the creation of a volume type with encryption       |
+|                                       |               | with the function cinder_utils#create_volume_type()       |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_with_qos                  | 2 & 3         | Tests the creation of a volume type with a QoS Spec       |
+|                                       |               | with the function cinder_utils#create_volume_type()       |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_with_invalid_qos          | 2 & 3         | Tests the creation of a volume type with an invalid QoS   |
+|                                       |               | Spec with the function cinder_utils#create_volume_type()  |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_with_qos_and_encryption   | 2 & 3         | Tests the creation of a volume type with a QoS Spec and   |
+|                                       |               | encryption with the function                              |
+|                                       |               | cinder_utils#create_volume_type()                         |
++---------------------------------------+---------------+-----------------------------------------------------------+
+
+cinder_utils_tests.py - CinderUtilsVolumeTests
+----------------------------------------------
+
++---------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name                             |  Cinder API   | Description                                               |
++=======================================+===============+===========================================================+
+| test_create_simple_volume             | 2 & 3         | Tests the creation of a simple volume with the function   |
+|                                       |               | cinder_utils#create_volume()                              |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_delete_volume             | 2 & 3         | Tests the creation of a volume with the function          |
+|                                       |               | cinder_utils#create_volume() then deletion with the       |
+|                                       |               | function cinder_utils#delete_volume()                     |
++---------------------------------------+---------------+-----------------------------------------------------------+
+
 nova_utils_tests.py - NovaUtilsKeypairTests
 -------------------------------------------
 
@@ -292,6 +431,25 @@ nova_utils_tests.py - NovaUtilsInstanceTests
 |                                       |               | nova_utils.create_server()                                |
 +---------------------------------------+---------------+-----------------------------------------------------------+
 
+nova_utils_tests.py - NovaUtilsInstanceVolumeTests
+--------------------------------------------------
+
++---------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name                             | Nova API      | Description                                               |
++=======================================+===============+===========================================================+
+| test_add_remove_volume                | 2             | Ensures that a VM instance can properly attach and detach |
+|                                       |               | a volume using the nova interface while waiting for       |
+|                                       |               | the update to fully occur                                 |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_attach_volume_nowait             | 2             | Ensures that the call to nova_utils.attach_volume raises  |
+|                                       |               | an exception when the timeout is too short to return an   |
+|                                       |               | properly updated VmInst object                            |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_detach_volume_nowait             | 2             | Ensures that the call to nova_utils.detach_volume raises  |
+|                                       |               | an exception when the timeout is too short to return an   |
+|                                       |               | properly updated VmInst object                            |
++---------------------------------------+---------------+-----------------------------------------------------------+
+
 create_flavor_tests.py - CreateFlavorTests
 ------------------------------------------
 
@@ -315,12 +473,151 @@ create_flavor_tests.py - CreateFlavorTests
 |                                       |               | a flavor properly with all supported settings             |
 +---------------------------------------+---------------+-----------------------------------------------------------+
 
-heat_utils_tests.py - HeatUtilsCreateStackTests
------------------------------------------------
+heat_utils_tests.py - HeatUtilsCreateSimpleStackTests
+-----------------------------------------------------
 
 +---------------------------------------+---------------+-----------------------------------------------------------+
-| Test Name                             | Glance API    | Description                                               |
+| Test Name                             | Heat API      | Description                                               |
 +=======================================+===============+===========================================================+
-| test_create_stack                     | 1             | Tests the heat_utils.create_stack() with a test template  |
+| test_create_stack                     | 1-3           | Tests the heat_utils.create_stack() with a test template  |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_stack_x2                  | 1-3           | Tests the heat_utils.create_stack() with a test template  |
+|                                       |               | and attempts to deploy a second time w/o actually         |
+|                                       |               | deploying any objects                                     |
 +---------------------------------------+---------------+-----------------------------------------------------------+
 
+heat_utils_tests.py - HeatUtilsCreateComplexStackTests
+------------------------------------------------------
+
++---------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name                             | Heat API      | Description                                               |
++=======================================+===============+===========================================================+
+| test_get_settings_from_stack          | 1-3           | Tests the heat_utils functions that are responsible for   |
+|                                       |               | reverse engineering settings objects of the types deployed|
+|                                       |               | by Heat                                                   |
++---------------------------------------+---------------+-----------------------------------------------------------+
+
+heat_utils_tests.py - HeatUtilsRouterTests
+------------------------------------------
+
++---------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name                             | Heat API      | Description                                               |
++=======================================+===============+===========================================================+
+| test_create_router_with_stack         | 1-3           | Tests ability of the function                             |
+|                                       |               | heat_utils.get_stack_routers() to return the correct      |
+|                                       |               | OpenStackRouter instance                                  |
++---------------------------------------+---------------+-----------------------------------------------------------+
+
+heat_utils_tests.py - HeatUtilsVolumeTests
+------------------------------------------
+
++---------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name                             | Heat API      | Description                                               |
++=======================================+===============+===========================================================+
+| test_create_vol_with_stack            | 1-3           | Tests ability of the function                             |
+|                                       |               | heat_utils.create_stack() to return the correct           |
+|                                       |               | Volume domain objects deployed with Heat                  |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_vol_types_with_stack      | 1-3           | Tests ability of the function                             |
+|                                       |               | heat_utils.get_stack_volumes_types() to return the correct|
+|                                       |               | VolumeType domain objects deployed with Heat              |
++---------------------------------------+---------------+-----------------------------------------------------------+
+
+heat_utils_tests.py - HeatUtilsKeypairTests
+-------------------------------------------
+
++---------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name                             | Heat API      | Description                                               |
++=======================================+===============+===========================================================+
+| test_create_keypair_with_stack        | 1-3           | Tests ability of the function                             |
+|                                       |               | heat_utils.get_stack_keypairs() to return the correct     |
+|                                       |               | Keypair domain objects deployed with Heat                 |
++---------------------------------------+---------------+-----------------------------------------------------------+
+
+heat_utils_tests.py - HeatUtilsSecurityGroupTests
+-------------------------------------------------
+
++---------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name                             | Heat API      | Description                                               |
++=======================================+===============+===========================================================+
+| test_create_security_group_with_stack | 1-3           | Tests ability of the function                             |
+|                                       |               | heat_utils.get_stack_security_groups() to return the      |
+|                                       |               | correct SecurityGroup domain objects deployed with Heat   |
++---------------------------------------+---------------+-----------------------------------------------------------+
+
+heat_utils_tests.py - HeatUtilsFlavorTests
+------------------------------------------
+
++---------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name                             | Heat API      | Description                                               |
++=======================================+===============+===========================================================+
+| test_create_flavor_with_stack         | 1-3           | Tests ability of the function                             |
+|                                       |               | heat_utils.get_stack_flavors() to return the correct      |
+|                                       |               | Flavor domain objects deployed with Heat                  |
++---------------------------------------+---------------+-----------------------------------------------------------+
+
+magnum_utils_tests.py - MagnumUtilsTests
+----------------------------------------
+
++---------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name                             | Magnum API    | Description                                               |
++=======================================+===============+===========================================================+
+| test_create_cluster_template_simple   | 1             | Tests ability of the function                             |
+|                                       |               | magnum_utils.create_cluster_template() to create a simple |
+|                                       |               | cluster template OpenStack object with minimal config     |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_cluster_template_all      | 1             | Tests ability of the function                             |
+|                                       |               | magnum_utils.create_cluster_template() to create a        |
+|                                       |               | cluster template OpenStack object with maximum config     |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_cluster_template_bad_image| 1             | Ensures the function                                      |
+|                                       |               | magnum_utils.create_cluster_template() will raise a       |
+|                                       |               | BadRequest exception when the image does not exist        |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_cluster_template_bad_ext  | 1             | Ensures the function                                      |
+| _net                                  |               | magnum_utils.create_cluster_template() will raise a       |
+|                                       |               | BadRequest exception when the external network does not   |
+|                                       |               | exist                                                     |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_cluster_template_bad      | 1             | Ensures the function                                      |
+| _flavor                               |               | magnum_utils.create_cluster_template() will raise a       |
+|                                       |               | BadRequest exception when the flavor does not exist       |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_cluster_template_bad      | 1             | Ensures the function                                      |
+| _master_flavor                        |               | magnum_utils.create_cluster_template() will raise a       |
+|                                       |               | BadRequest exception when the master flavor does not exist|
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_cluster_template_bad      | 1             | Ensures the function                                      |
+| _network_driver                       |               | magnum_utils.create_cluster_template() will raise a       |
+|                                       |               | BadRequest exception when the network driver is invalid   |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_cluster_template_bad      | 1             | Ensures the function                                      |
+| _volume_driver                        |               | magnum_utils.create_cluster_template() will raise a       |
+|                                       |               | BadRequest exception when the volume driver is invalid    |
++---------------------------------------+---------------+-----------------------------------------------------------+
+
+settings_utils_tests.py - SettingsUtilsNetworkingTests
+------------------------------------------------------
+
++---------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name                             | API           | Description                                               |
++=======================================+===============+===========================================================+
+| test_derive_net_settings_no_subnet    | Neutron 2     | Tests to ensure that derived NetworkConfig from an        |
+|                                       |               | OpenStack network are correct without a subnet            |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_derive_net_settings_two_subnets  | Neutron 2     | Tests to ensure that derived NetworkConfig from an        |
+|                                       |               | OpenStack network are correct with two subnets            |
++---------------------------------------+---------------+-----------------------------------------------------------+
+
+
+settings_utils_tests.py - SettingsUtilsVmInstTests
+--------------------------------------------------
++---------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name                             | API           | Description                                               |
++=======================================+===============+===========================================================+
+| test_derive_vm_inst_config            | Neutron 2     | Tests to ensure that derived VmInstanceSettings from an   |
+|                                       |               | OpenStack VM instance is correct                          |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_derive_image_settings            | Neutron 2     | Tests to ensure that derived ImageConfig from an        |
+|                                       |               | OpenStack VM instance is correct                          |
++---------------------------------------+---------------+-----------------------------------------------------------+