summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/how-to-use/APITests.rst278
-rw-r--r--docs/how-to-use/InstallSnaps.rst8
-rw-r--r--docs/how-to-use/IntegrationTests.rst323
-rw-r--r--docs/how-to-use/LibraryUsage.rst261
-rw-r--r--docs/how-to-use/UnitTests.rst204
-rw-r--r--docs/how-to-use/VirtEnvDeploy.rst529
6 files changed, 1332 insertions, 271 deletions
diff --git a/docs/how-to-use/APITests.rst b/docs/how-to-use/APITests.rst
index 4a8035a..50cd437 100644
--- a/docs/how-to-use/APITests.rst
+++ b/docs/how-to-use/APITests.rst
@@ -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
------------------------------------
@@ -157,22 +163,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
------------------------------------------------
@@ -186,12 +233,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 |
+---------------------------------------+---------------+-----------------------------------------------------------+
@@ -201,6 +242,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 |
+---------------------------------------+---------------+-----------------------------------------------------------+
@@ -256,6 +300,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
-------------------------------------------
@@ -295,6 +428,16 @@ 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 |
++---------------------------------------+---------------+-----------------------------------------------------------+
+
create_flavor_tests.py - CreateFlavorTests
------------------------------------------
@@ -324,9 +467,9 @@ heat_utils_tests.py - HeatUtilsCreateSimpleStackTests
+---------------------------------------+---------------+-----------------------------------------------------------+
| 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 | 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 |
+---------------------------------------+---------------+-----------------------------------------------------------+
@@ -337,21 +480,120 @@ heat_utils_tests.py - HeatUtilsCreateComplexStackTests
+---------------------------------------+---------------+-----------------------------------------------------------+
| Test Name | Heat API | Description |
+=======================================+===============+===========================================================+
-| test_get_settings_from_stack | 1 | Tests the heat_utils functions that are responsible for |
+| 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 NetworkSettings from an |
+| 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 NetworkSettings from an |
+| test_derive_net_settings_two_subnets | Neutron 2 | Tests to ensure that derived NetworkConfig from an |
| | | OpenStack network are correct with two subnets |
+---------------------------------------+---------------+-----------------------------------------------------------+
@@ -361,9 +603,9 @@ settings_utils_tests.py - SettingsUtilsVmInstTests
+---------------------------------------+---------------+-----------------------------------------------------------+
| Test Name | API | Description |
+=======================================+===============+===========================================================+
-| test_derive_vm_inst_settings | Neutron 2 | Tests to ensure that derived VmInstanceSettings from an |
+| 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 ImageSettings from an |
+| test_derive_image_settings | Neutron 2 | Tests to ensure that derived ImageConfig from an |
| | | OpenStack VM instance is correct |
+---------------------------------------+---------------+-----------------------------------------------------------+
diff --git a/docs/how-to-use/InstallSnaps.rst b/docs/how-to-use/InstallSnaps.rst
index dc53ef0..f5e9cf8 100644
--- a/docs/how-to-use/InstallSnaps.rst
+++ b/docs/how-to-use/InstallSnaps.rst
@@ -69,4 +69,12 @@ The "pip" command below needs to be executed as root, if you are not using a vir
sudo pip install -e <path to repo>/snaps/
(note: on CentOS 7 and Ubuntu 14.04 you may have to try the previous command several times)
+SNAPS is now hosted on the Python Package Manager (PyPI).
+
+::
+
+ pip install snaps
+
+This will install the stable Euphrates version.
+
The install should now be complete and you can start using the SNAPS-OO libraries.
diff --git a/docs/how-to-use/IntegrationTests.rst b/docs/how-to-use/IntegrationTests.rst
index f082f9b..59ec8a9 100644
--- a/docs/how-to-use/IntegrationTests.rst
+++ b/docs/how-to-use/IntegrationTests.rst
@@ -80,7 +80,7 @@ create_image_tests.py - CreateImageNegativeTests
| Test Name | Glance API | Description |
+=======================================+===============+===========================================================+
| test_bad_image_name | 1 & 2 | Ensures OpenStackImage.create() results in an Exception |
-| | | being raised when the ImageSettings.name attribute has |
+| | | being raised when the ImageConfig.name attribute has |
| | | not been set |
+---------------------------------------+---------------+-----------------------------------------------------------+
| test_bad_image_url | 1 & 2 | Ensures OpenStackImage.create() results in an Exception |
@@ -185,6 +185,18 @@ create_network_tests.py - CreateNetworkSuccessTests
| | | 'admin' project ID |
+---------------------------------------+---------------+-----------------------------------------------------------+
+create_network_tests.py - CreateNetworkIPv6Tests
+------------------------------------------------
+
++---------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name | Neutron API | Description |
++=======================================+===============+===========================================================+
+| test_create_network_one_ipv6_subnet | 2 | Ensures that a network can be created with an IPv6 subnet |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_network_ipv4_ipv6_subnet | 2 | Ensures that a network can be created with an IPv4 and |
+| | | IPv6 subnet |
++---------------------------------------+---------------+-----------------------------------------------------------+
+
create_router_tests.py - CreateRouterSuccessTests
-------------------------------------------------
@@ -229,38 +241,247 @@ create_router_tests.py - CreateRouterNegativeTests
| | | create a router to an external network that does not exist|
+----------------------------------------+---------------+-----------------------------------------------------------+
+create_qos_tests.py - CreateQoSTests
+------------------------------------
+
++----------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name | Cinder API | Description |
++========================================+===============+===========================================================+
+| test_create_qos | 2 & 3 | Tests the creation of a QoS Spec with the class |
+| | | OpenStackQoS |
++----------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_delete_qos | 2 & 3 | Tests the creation of a QoS Spec with the class |
+| | | OpenStackQoS, its deletion with cinder_utils.py the |
+| | | the attempts to use the clean() method to ensure an |
+| | | exception is not called |
++----------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_same_qos | 2 & 3 | Tests the creation of a QoS Spec with the class |
+| | | OpenStackQoS then instantiates another OpenStackQoS |
+| | | object with the same configuration to ensure the second |
+| | | instance returns the ID of the original |
++----------------------------------------+---------------+-----------------------------------------------------------+
+
+create_volume_type_tests.py - CreateSimpleVolumeTypeSuccessTests
+----------------------------------------------------------------
+
++----------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name | Cinder API | Description |
++========================================+===============+===========================================================+
+| test_create_volume_type | 2 & 3 | Tests the creation of a Volume Type with the class |
+| | | OpenStackVolumeType |
++----------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_delete_volume_type | 2 & 3 | Tests the creation of a Volume Type with the class |
+| | | OpenStackVolumeType, its deletion with cinder_utils.py, |
+| | | then attempts to use the clean() method to ensure an |
+| | | exception is not raised |
++----------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_same_volume_type | 2 & 3 | Tests the creation of a Volume Type with the class |
+| | | OpenStackVolumeType then instantiates another |
+| | | OpenStackVolumeType object with the same configuration to |
+| | | ensure the second instance returns the ID of the original |
++----------------------------------------+---------------+-----------------------------------------------------------+
+
+create_volume_type_tests.py - CreateSimpleVolumeTypeComplexTests
+----------------------------------------------------------------
+
++-----------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name | Cinder API | Description |
++=========================================+===============+===========================================================+
+| test_volume_type_with_qos | 2 & 3 | Tests the creation of a Volume Type with the class |
+| | | OpenStackVolumeType with a QoSSpec |
++-----------------------------------------+---------------+-----------------------------------------------------------+
+| test_volume_type_with_encryption | 2 & 3 | Tests the creation of a Volume Type with the class |
+| | | OpenStackVolumeType with encryption |
++-----------------------------------------+---------------+-----------------------------------------------------------+
+| test_volume_type_with_qos_and_encryption| 2 & 3 | Tests the creation of a Volume Type with the class |
+| | | OpenStackVolumeType with encryption and QoS Spec |
++-----------------------------------------+---------------+-----------------------------------------------------------+
+
+create_volume_tests.py - CreateSimpleVolumeSuccessTests
+-------------------------------------------------------
+
++----------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name | Cinder API | Description |
++========================================+===============+===========================================================+
+| test_create_volume_simple | 2 & 3 | Tests the creation of a Volume Type with the class |
+| | | OpenStackVolume |
++----------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_delete_volume | 2 & 3 | Tests the creation of a Volume with the class |
+| | | OpenStackVolume, its deletion with cinder_utils.py, then |
+| | | attempts to use the clean() method to ensure an |
+| | | exception is not raised |
++----------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_same_volume | 2 & 3 | Tests the creation of a Volume with the class |
+| | | OpenStackVolume then instantiates another |
+| | | OpenStackVolume object with the same configuration to |
+| | | ensure the second instance returns the ID of the original |
++----------------------------------------+---------------+-----------------------------------------------------------+
+
+create_volume_tests.py - CreateSimpleVolumeFailureTests
+-------------------------------------------------------
+
++----------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name | Cinder API | Description |
++========================================+===============+===========================================================+
+| test_create_volume_bad_size | 2 & 3 | Tests to ensure that attempting to create a volume with a |
+| | | size of -1 raises a BadRequest exception |
++----------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_volume_bad_type | 2 & 3 | Tests to ensure that attempting to create a volume with a |
+| | | type that does not exist raises a NotFound exception |
++----------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_volume_bad_image | 2 & 3 | Tests to ensure that attempting to create a volume with an|
+| | | image that does not exist raises a BadRequest exception |
++----------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_volume_bad_zone | 2 & 3 | Tests to ensure that attempting to create a volume with an|
+| | | invalid availability zone raises a BadRequest exception |
++----------------------------------------+---------------+-----------------------------------------------------------+
+
+create_volume_tests.py - CreateVolumeWithTypeTests
+--------------------------------------------------
+
++----------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name | Cinder API | Description |
++========================================+===============+===========================================================+
+| test_bad_volume_type | 2 & 3 | Tests to ensure the creation of a Volume with the |
+| | | OpenStackVolume#create() method raises a NotFound |
+| | | exception when attempting to apply a VolumeType that does |
+| | | not exist |
++----------------------------------------+---------------+-----------------------------------------------------------+
+| test_valid_volume_type | 2 & 3 | Tests to ensure the creation of a Volume with the |
+| | | OpenStackVolume#create() method properly creates the |
+| | | volume when associating with a valid VolumeType |
++----------------------------------------+---------------+-----------------------------------------------------------+
+
+create_volume_tests.py - CreateVolumeWithImageTests
+---------------------------------------------------
+
++----------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name | Cinder API | Description |
++========================================+===============+===========================================================+
+| test_bad_image_name | 2 & 3 | Tests to ensure the creation of a Volume with the |
+| | | OpenStackVolume#create() method raises a BadRequest |
+| | | exception when attempting to apply an image that does not |
+| | | exist |
++----------------------------------------+---------------+-----------------------------------------------------------+
+| test_valid_volume_image | 2 & 3 | Tests to ensure the creation of a Volume with the |
+| | | OpenStackVolume#create() method properly creates the |
+| | | volume when associating with a valid image |
++----------------------------------------+---------------+-----------------------------------------------------------+
+
create_stack_tests.py - CreateStackSuccessTests
-----------------------------------------------
+---------------------------------------+---------------+-----------------------------------------------------------+
-| Test Name | Neutron API | Description |
+| Test Name | Heat API | Description |
+=======================================+===============+===========================================================+
-| test_create_stack_template_file | 2 | Ensures that a Heat stack can be created with a file-based|
+| test_create_stack_template_file | 1-3 | Ensures that a Heat stack can be created with a file-based|
| | | Heat template file |
+---------------------------------------+---------------+-----------------------------------------------------------+
-| test_create_stack_template_dict | 2 | Ensures that a Heat stack can be created with a dictionary|
+| test_create_stack_template_dict | 1-3 | Ensures that a Heat stack can be created with a dictionary|
| | | Heat template |
+---------------------------------------+---------------+-----------------------------------------------------------+
-| test_create_delete_stack | 2 | Ensures that a Heat stack can be created and deleted |
+| test_create_delete_stack | 1-3 | Ensures that a Heat stack can be created and deleted |
| | | while having clean() called 2x without an exception |
+---------------------------------------+---------------+-----------------------------------------------------------+
-| test_create_same_stack | 2 | Ensures that a Heat stack with the same name cannot be |
+| test_create_same_stack | 1-3 | Ensures that a Heat stack with the same name cannot be |
| | | created 2x |
+---------------------------------------+---------------+-----------------------------------------------------------+
-| test_retrieve_network_creators | 2 | Ensures that an OpenStackHeatStack instance can return an |
+| test_retrieve_network_creators | 1-3 | Ensures that an OpenStackHeatStack instance can return an |
| | | OpenStackNetwork instance configured as deployed |
+---------------------------------------+---------------+-----------------------------------------------------------+
-| test_retrieve_vm_inst_creators | 2 | Ensures that an OpenStackHeatStack instance can return an |
+| test_retrieve_vm_inst_creators | 1-3 | Ensures that an OpenStackHeatStack instance can return an |
| | | OpenStackVmInstance instance configured as deployed |
+---------------------------------------+---------------+-----------------------------------------------------------+
+create_stack_tests.py - CreateStackVolumeTests
+----------------------------------------------
+
++---------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name | Heat API | Description |
++=======================================+===============+===========================================================+
+| test_retrieve_volume_creator | 1-3 | Ensures that an OpenStackHeatStack instance can return a |
+| | | OpenStackVolume instance that it was responsible for |
+| | | deploying |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_retrieve_volume_type_creator | 1-3 | Ensures that an OpenStackHeatStack instance can return a |
+| | | OpenStackVolumeType instance that it was responsible for |
+| | | deploying |
++---------------------------------------+---------------+-----------------------------------------------------------+
+
+create_stack_tests.py - CreateStackFloatingIpTests
+--------------------------------------------------
+
++---------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name | Heat API | Description |
++=======================================+===============+===========================================================+
+| test_connect_via_ssh_heat_vm | 1 | Ensures that an OpenStackHeatStack instance can create a |
+| | | VM with a floating IP that can be accessed via |
+| | | OpenStackVmInstance |
++---------------------------------------+---------------+-----------------------------------------------------------+
+
+create_stack_tests.py - CreateStackNestedResourceTests
+------------------------------------------------------
+
++---------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name | Heat API | Description |
++=======================================+===============+===========================================================+
+| test_nested | 1 | Ensures that an OpenStackHeatStack with an external |
+| | | resource file with VMs with floating IPs can be accessed |
+| | | in the class OpenStackVmInstance and return the associated|
+| | | initialized OpenStackVmInstance objects |
++---------------------------------------+---------------+-----------------------------------------------------------+
+
+create_stack_tests.py - CreateStackRouterTests
+----------------------------------------------
+
++---------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name | Heat API | Description |
++=======================================+===============+===========================================================+
+| test_retrieve_router_creator | 1 | Ensures that an OpenStackHeatStack instance can return a |
+| | | OpenStackRouter instance that it was responsible for |
+| | | deploying |
++---------------------------------------+---------------+-----------------------------------------------------------+
+
+create_stack_tests.py - CreateStackFlavorTests
+----------------------------------------------
+
++---------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name | Heat API | Description |
++=======================================+===============+===========================================================+
+| test_retrieve_flavor_creator | 1-3 | Ensures that an OpenStackHeatStack instance can return a |
+| | | OpenStackFlavor instance that it was responsible for |
+| | | deploying |
++---------------------------------------+---------------+-----------------------------------------------------------+
+
+create_stack_tests.py - CreateStackKeypairTests
+-----------------------------------------------
+
++---------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name | Heat API | Description |
++=======================================+===============+===========================================================+
+| test_retrieve_keypair_creator | 1-3 | Ensures that an OpenStackHeatStack instance can return a |
+| | | OpenStackKeypair instance that it was responsible for |
+| | | deploying |
++---------------------------------------+---------------+-----------------------------------------------------------+
+
+create_stack_tests.py - CreateStackSecurityGroupTests
+-----------------------------------------------------
+
++---------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name | Heat API | Description |
++=======================================+===============+===========================================================+
+| test_retrieve_security_group_creator | 1-3 | Ensures that an OpenStackHeatStack instance can return a |
+| | | OpenStackSecurityGroup instance that it was responsible |
+| | | for deploying |
++---------------------------------------+---------------+-----------------------------------------------------------+
+
create_stack_tests.py - CreateComplexStackTests
-----------------------------------------------
+---------------------------------------+---------------+-----------------------------------------------------------+
-| Test Name | Neutron API | Description |
+| Test Name | Heat API | Description |
+=======================================+===============+===========================================================+
-| test_connect_via_ssh_heat_vm | 2 | Ensures that two OpenStackHeatStack instances can return |
+| test_connect_via_ssh_heat_vm | 1-3 | Ensures that two OpenStackHeatStack instances can return |
| | | OpenStackVmInstance instances one configured with a |
| | | floating IP and keypair and can be access via SSH |
+---------------------------------------+---------------+-----------------------------------------------------------+
@@ -269,15 +490,25 @@ create_stack_tests.py - CreateStackNegativeTests
------------------------------------------------
+----------------------------------------+---------------+-----------------------------------------------------------+
-| Test Name | Neutron API | Description |
+| Test Name | Heat API | Description |
+========================================+===============+===========================================================+
-| test_missing_dependencies | 2 | Ensures that a Heat template fails to deploy when expected|
+| test_missing_dependencies | 1-3 | Ensures that a Heat template fails to deploy when expected|
| | | dependencies are missing |
+----------------------------------------+---------------+-----------------------------------------------------------+
-| test_bad_stack_file | 2 | Ensures that a Heat template fails to deploy when the Heat|
+| test_bad_stack_file | 1-3 | Ensures that a Heat template fails to deploy when the Heat|
| | | template file does not exist |
+----------------------------------------+---------------+-----------------------------------------------------------+
+create_stack_tests.py - CreateStackFailureTests
+-----------------------------------------------
+
++----------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name | Heat API | Description |
++========================================+===============+===========================================================+
+| test_stack_failure | 1-3 | Ensures that a Heat template fails to deploy when expected|
+| | | dependencies are missing |
++----------------------------------------+---------------+-----------------------------------------------------------+
+
create_instance_tests.py - CreateInstanceSimpleTests
----------------------------------------------------
@@ -323,6 +554,15 @@ create_instance_tests.py - CreateInstanceSingleNetworkTests
| test_ssh_client_fip_after_active | Nova 2 | Ensures that an instance can be reached over SSH when the |
| | Neutron 2 | floating IP is assigned after to the VM becoming ACTIVE |
+---------------------------------------+---------------+-----------------------------------------------------------+
+| test_ssh_client_fip_after_init | Nova 2 | Ensures that an instance can have a floating IP assigned |
+| | Neutron 2 | added after initialization |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_ssh_client_fip_reverse_engineer | Nova 2 | Ensures that an instance can be reverse engineered and |
+| | Neutron 2 | allows for a floating IP to be added after initialization |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_ssh_client_fip_after_reboot | Nova 2 | Ensures that an instance can be reached over SSH after |
+| | Neutron 2 | a reboot call has been issued |
++---------------------------------------+---------------+-----------------------------------------------------------+
| test_ssh_client_fip_second_creator | Nova 2 | Ensures that an instance can be reached over SSH via a |
| | Neutron 2 | second identical creator object |
+---------------------------------------+---------------+-----------------------------------------------------------+
@@ -378,14 +618,18 @@ create_instance_tests.py - CreateInstanceFromThreePartImage
| | Neutron 2 | delete it when using a 3-part image |
+-----------------------------------------------------+---------------+-----------------------------------------------------------+
-create_instance_tests.py - CreateInstancePubPrivNetTests
---------------------------------------------------------
+create_instance_tests.py - CreateInstanceIPv6NetworkTests (Staging)
+-------------------------------------------------------------------
+---------------------------------------+---------------+-----------------------------------------------------------+
| Test Name | API Versions | Description |
+=======================================+===============+===========================================================+
-| test_dual_ports_dhcp | Nova 2 | Ensures that a VM with two ports/NICs can have its second |
-| | Neutron 2 | NIC configured via SSH/Ansible after startup |
+| test_v4fip_v6overlay | Nova 2 | Expects a BadRequest exception to be raised when |
+| | Neutron 2 | attempting to add an IPv4 floating IP to a VM with an IPv6|
+| | | port |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_fip_v4and6_overlay | Nova 2 | Connects to a VM via a floating IP joined to a port that |
+| | Neutron 2 | has been confiured with both IPv4 and IPv6 addresses |
+---------------------------------------+---------------+-----------------------------------------------------------+
create_instance_tests.py - InstanceSecurityGroupTests
@@ -410,6 +654,19 @@ create_instance_tests.py - InstanceSecurityGroupTests
| | Neutron 2 | that has already been added to the instance |
+---------------------------------------+---------------+-----------------------------------------------------------+
+create_instance_tests.py - CreateInstanceVolumeTests
+----------------------------------------------------
+
++---------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name | API Versions | Description |
++=======================================+===============+===========================================================+
+| test_create_instance_with_one_volume | Nova 2 | Ensures that a VM instance can have one volume attached |
+| | Cinder 2 & 3 | to it |
++---------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_instance_with_two_volumes | Nova 2 | Ensures that a VM instance can have two volumes attached |
+| | Cinder 2 & 3 | to it |
++---------------------------------------+---------------+-----------------------------------------------------------+
+
ansible_utils_tests.py - AnsibleProvisioningTests
-------------------------------------------------
@@ -423,3 +680,35 @@ ansible_utils_tests.py - AnsibleProvisioningTests
| | Neutron 2 | apply a Ansible playbook containing Jinga2 substitution |
| | | values |
+---------------------------------------+---------------+-----------------------------------------------------------+
+
+cluster_template_tests.py - CreateClusterTemplateTests
+------------------------------------------------------
+
++----------------------------------------+---------------+-----------------------------------------------------------+
+| Test Name | Magnum API | Description |
++========================================+===============+===========================================================+
+| test_create_cluster_template | 1 | Tests the creation of a Cluster template with the class |
+| | | OpenStackClusterTemplate |
++----------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_delete_cluster_template | 1 | Tests the creation and deletiong of a Cluster template |
+| | | with the class OpenStackClusterTemplate |
++----------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_same_cluster_template | 1 | Tests the creation of a Cluster template 2x using the same|
+| | | config object to ensure it was only created once |
++----------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_cluster_template_bad_flavor| 1 | Tests to ensure OpenStackClusterTemplate#create() will |
+| | | raise an exception when the flavor is invalid |
++----------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_cluster_template_bad_master| 1 | Tests to ensure OpenStackClusterTemplate#create() will |
+| _flavor | | raise an exception when the master flavor is invalid |
++----------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_cluster_template_bad_image | 1 | Tests to ensure OpenStackClusterTemplate#create() will |
+| | | raise an exception when the image is invalid |
++----------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_cluster_template_bad | 1 | Tests to ensure OpenStackClusterTemplate#create() will |
+| _network_driver | | raise an exception when the network driver is invalid |
++----------------------------------------+---------------+-----------------------------------------------------------+
+| test_create_cluster_template_bad | 1 | Tests to ensure OpenStackClusterTemplate#create() will |
+| _volume_driver | | raise an exception when the volume driver is invalid |
++----------------------------------------+---------------+-----------------------------------------------------------+
+
diff --git a/docs/how-to-use/LibraryUsage.rst b/docs/how-to-use/LibraryUsage.rst
index 16cf446..aa7bf91 100644
--- a/docs/how-to-use/LibraryUsage.rst
+++ b/docs/how-to-use/LibraryUsage.rst
@@ -30,15 +30,16 @@ attributes are listed below:
- auth\_url
- project\_name (aka. tenant\_name)
- identity\_api\_version (for obtaining Keystone authorization token.
- Versions 2.0 & v3 only validated.)
-- image\_api\_version (Glance version 1 & 2 only validated)
+ default = 2, Versions 2.0 & v3 only validated.)
+- image\_api\_version (default = 2, Glance version 1 & 2 only validated)
- network\_api\_version (Neutron version 2 currently only validated)
- compute\_api\_version (Nova version 2 currently only validated)
- heat\_api\_version (Heat version 1 currently only validated)
+- volume\_api\_version (default = 2, Heat versions 2 & 3 currently only validated)
- user\_domain\_id (default='default')
-- user\_domain\_name (default='default')
+- user\_domain\_name (default='Default')
- project\_domain\_id (default='default')
-- project\_domain\_name (default='default')
+- project\_domain\_name (default='Default')
- interface (default='admin', used to specify the endpoint type for keystone: public, admin, internal)
- cacert (default=False, expected values T|F to denote server certificate verification, else value contains the path to an HTTPS certificate)
- region_name (The region name default=None)
@@ -78,7 +79,7 @@ Create User
-----------
- User - snaps.openstack.create\_user.OpenStackUser
- - snaps.openstack.create\_user.UserSettings
+ - snaps.openstack.user.UserConfig
- name - the username (required)
- password - the user's password (required)
@@ -88,11 +89,14 @@ Create User
- email - the user's email address (optional)
- enabled - flag to determine whether or not the user should be
enabled (default=True)
+ - roles - dict where key is the role's name and value is the name
+ the project to associate with the role (optional)
.. code:: python
- from snaps.openstack.create_user import UserSettings, OpenStackUser
- user_settings = UserSettings(name='username', password='password')
+ from snaps.config.user import UserConfig
+ from snaps.openstack.create_user import OpenStackUser
+ user_settings = UserConfig(name='username', password='password')
user_creator = OpenStackUser(os_creds, user_settings)
user_creator.create()
@@ -109,19 +113,20 @@ Create Project
--------------
- Project - snaps.openstack.create\_project.OpenStackProject
- - snaps.openstack.create\_project.ProjectSettings
+ - snaps.openstack.project.ProjectConfig
- name - the project name (required)
- domain - the project's domain (default='default')
- description - the project's description (optional)
- - enables - flag to determine whether or not the project should
+ - enabled - flag to determine whether or not the project should
be enabled (default=True)
.. code:: python
- from snaps.openstack.create_project import ProjectSettings, OpenStackProject
- project_settings = ProjectSettings(name='username', password='password')
+ from snaps.openstack.project import ProjectConfig
+ from snaps.openstack.create_project import OpenStackProject
+ project_settings = ProjectConfig(name='username', password='password')
project_creator = OpenStackProject(os_creds, project_settings)
project_creator.create()
@@ -135,7 +140,7 @@ Create Flavor
-------------
- Flavor - snaps.openstack.create\_flavor.OpenStackFlavor
- - snaps.openstack.create\_flavor.FlavorSettings
+ - snaps.config.flavor.FlavorConfig
- name - the flavor name (required)
- flavor\_id - the flavor's string ID (default='auto')
@@ -148,11 +153,13 @@ Create Flavor
if backend supports QoS extension (default=1.0)
- is\_public - flag that denotes whether or not other projects
can access image (default=True)
+ - metadata - freeform dict() for special metadata (optional)
.. code:: python
- from snaps.openstack.create_flavor import FlavorSettings, OpenStackFlavor
- flavor_settings = FlavorSettings(name='flavor-name', ram=4, disk=10, vcpus=2)
+ from snaps.config.flavor import FlavorConfig
+ from snaps.openstack.create_flavor import OpenStackFlavor
+ flavor_settings = FlavorConfig(name='flavor-name', ram=4, disk=10, vcpus=2)
flavor_creator = OpenStackFlavor(os_creds, flavor_settings)
flavor_creator.create()
@@ -166,27 +173,33 @@ Create Image
------------
- Image - snaps.openstack.create\_image.OpenStackImage
- - snaps.openstack.create\_image.ImageSettings
+ - snaps.config.image.ImageConfig
- name - the image name (required)
- image\_user - the default image user generally used by
OpenStackVMInstance class for obtaining an SSH connection
(required)
- - img\_format - the image's format (i.e. qcow2) (required)
+ - img\_format or format - the image's format (i.e. qcow2) (required)
- url - the download URL to obtain the image file (this or
image\_file must be configured, not both)
- image\_file - the location of the file to be sourced from the
local filesystem (this or url must be configured, not both)
+ - extra\_properties - dict() object containing extra parameters to
+ pass when loading the image (i.e. ids of kernel and initramfs images)
- nic\_config\_pb\_loc - the location of the ansible playbook
that can configure additional NICs. Floating IPs are required
- to perform this operation. (optional)
+ to perform this operation. (optional and deprecated)
+ - kernel\_image\_settings - the image settings for a kernel image (optional)
+ - ramdisk\_image\_settings - the image settings for a ramdisk image (optional)
+ - public - image will be created with public visibility when True (default = False)
.. code:: python
- from snaps.openstack.create_image import ImageSettings, OpenStackImage
- image_settings = ImageSettings(name='image-name', image_user='ubuntu', img_format='qcow2',
- url='http://uec-images.ubuntu.com/releases/trusty/14.04/ubuntu-14.04-server-cloudimg-amd64-disk1.img')
+ from snaps.openstack.create_image import OpenStackImage
+ from snaps.config.image import ImageConfig
+ image_settings = ImageConfig(name='image-name', image_user='ubuntu', img_format='qcow2',
+ url='http://uec-images.ubuntu.com/releases/trusty/14.04/ubuntu-14.04-server-cloudimg-amd64-disk1.img')
image_creator = OpenStackImage(os_creds, image_settings)
image_creator.create()
@@ -200,7 +213,7 @@ Create Keypair
--------------
- Keypair - snaps.openstack.create\_keypair.OpenStackKeypair
- - snaps.openstack.create\_keypair.KeypairSettings
+ - snaps.openstack.keypair.KeypairConfig
- name - the keypair name (required)
- public\_filepath - the file location to where the public key is
@@ -209,11 +222,16 @@ Create Keypair
file is to be written or currently resides (optional but highly
recommended to leverage or the private key will be lost
forever)
+ - key\_size - The number of bytes for the key size when it needs to
+ be generated (value must be >=512, default = 1024)
+ - delete\_on\_clean - when True, the key files will be deleted when
+ OpenStackKeypair#clean() is called (default = False)
.. code:: python
- from snaps.openstack.create_keypairs import KeypairSettings, OpenStackKeypair
- keypair_settings = KeypairSettings(name='kepair-name', private_filepath='/tmp/priv-kp')
+ from snaps.openstack.keypair.KeypairConfig
+ from snaps.openstack.create_keypairs import OpenStackKeypair
+ keypair_settings = KeypairConfig(name='kepair-name', private_filepath='/tmp/priv-kp')
keypair_creator = OpenStackKeypair(os_creds, keypair_settings)
keypair_creator.create()
@@ -228,7 +246,7 @@ Create Network
- Network - snaps.openstack.create\_network.OpenStackNetwork
- - snaps.openstack.create\_network.NetworkSettings
+ - snaps.config_network.NetworkConfig
- name - the name of the network (required)
- admin\_state\_up - flag denoting the administrative status of
@@ -242,8 +260,10 @@ Create Network
- network\_type - the type of network (i.e. vlan\|vxlan\|flat)
- physical\_network - the name of the physical network (required
when network\_type is 'flat')
+ - segmentation\_id - the id of the segmentation (required
+ when network\_type is 'vlan')
- subnet\_settings (list of optional
- snaps.openstack.create\_network.SubnetSettings objects)
+ snaps.config.network.SubnetConfig objects)
- cidr - the subnet's CIDR (required)
- ip\_version - 4 or 6 (default=4)
@@ -267,10 +287,11 @@ Create Network
.. code:: python
- from snaps.openstack.create_network import NetworkSettings, SubnetSettings, OpenStackNetwork
+ from snaps.config.network import NetworkConfig, SubnetConfig
+ from snaps.openstack.create_network import OpenStackNetwork
- subnet_settings = SubnetSettings(name='subnet-name', cidr='10.0.0.0/24')
- network_settings = NetworkSettings(name='network-name', subnet_settings=[subnet_settings])
+ subnet_settings = SubnetConfig(name='subnet-name', cidr='10.0.0.0/24')
+ network_settings = NetworkConfig(name='network-name', subnet_settings=[subnet_settings])
network_creator = OpenStackNetwork(os_creds, network_settings)
network_creator.create()
@@ -320,10 +341,12 @@ Create Security Group
.. code:: python
+ from snaps.config.network import SubnetConfig
+ from snaps.config.rule import RuleConfig
from snaps.openstack.create_security_group import SecurityGroupSettings, SecurityGroupRuleSettings, Direction, OpenStackSecurityGroup
- rule_settings = SubnetSettings(name='subnet-name', cidr='10.0.0.0/24')
- network_settings = NetworkSettings(name='network-name', subnet_settings=[subnet_settings])
+ rule_settings = RuleConfig(name='subnet-name', cidr='10.0.0.0/24')
+ network_settings = SubnetConfig(name='network-name', subnet_settings=[subnet_settings])
sec_grp_name = 'sec-grp-name'
rule_settings = SecurityGroupRuleSettings(name=sec_grp_name, direction=Direction.ingress)
@@ -343,7 +366,7 @@ Create Router
- Router - snaps.openstack.create\_router.OpenStackRouter
- - snaps.openstack.create\_router.RouterSettings
+ - snaps.openstack.router.RouterConfig
- name - the router name (required)
- project\_name - the name of the project (optional - can only be
@@ -356,30 +379,41 @@ Create Router
- internal\_subnets - list of subnet names to which this router
will connect (optional)
- port\_settings (list of optional
- snaps.openstack.create\_router.PortSettings objects) - creates
+ snaps.config.network.PortConfig objects) - creates
custom ports to internal subnets (similar to internal\_subnets
with more control)
- - name
- - network\_name
- - admin\_state\_up
+ - name - the port's display name
+ - network\_name - the name of the network on which to create the port
+ - admin\_state\_up - A boolean value denoting the administrative
+ status of the port (default = True)
- project\_name - the name of the project (optional - can only
be set by admin users)
- - mac\_address
- - ip\_addrs
- - fixed\_ips
- - security\_groups
- - allowed\_address\_pairs
- - opt\_value
- - opt\_name
- - device\_owner
- - device\_id
+ - mac\_address - the port's MAC address to set (optional and
+ recommended not to set this configuration value)
+ - ip\_addrs - list of dict() objects containing two keys 'subnet_name'
+ and 'ip' where the value of the 'ip' entry is the expected IP
+ address assigned. This value gets mapped to the fixed\_ips
+ attribute (optional)
+ - fixed\_ips - dict() where the key is the subnet ID and value is the
+ associated IP address to assign to the port (optional)
+ - security\_groups - list of security group IDs (not tested)
+ - allowed\_address\_pairs - A dictionary containing a set of zero or
+ more allowed address pairs. An address pair contains an IP address
+ and MAC address (optional)
+ - opt\_value - the extra DHCP option value (optional)
+ - opt\_name - the extra DHCP option name (optional)
+ - device\_owner - The ID of the entity that uses this port.
+ For example, a DHCP agent (optional)
+ - device\_id - The ID of the device that uses this port.
+ For example, a virtual server (optional)
.. code:: python
- from snaps.openstack.create_router import RouterSettings, OpenStackRouter
+ from snaps.config.router import RouterConfig
+ from snaps.openstack.create_router import OpenStackRouter
- router_settings = RouterSettings(name='router-name', external_gateway='external')
+ router_settings = RouterConfig(name='router-name', external_gateway='external')
router_creator = OpenStackRouter(os_creds, router_settings)
router_creator.create()
@@ -389,6 +423,122 @@ Create Router
# Cleanup
router_creator.clean()
+Create QoS Spec
+---------------
+
+- Volume Type - snaps.openstack.create\_qos.OpenStackQoS
+
+ - snaps.openstack.qos.QoSConfig
+
+ - name - the volume type's name (required)
+ - consumer - the qos's consumer type of the enum type Consumer (required)
+ - specs - freeform dict() to be added as 'specs' (optional)
+
+.. code:: python
+
+ from snaps.openstack.qos import QoSConfig
+ from snaps.openstack.create_qos import OpenStackQoS
+
+ qos_settings = QoSConfig(name='stack-name', consumer=Consumer.front-end)
+ qos_creator = OpenStackQoS(os_creds, vol_type_settings)
+ qos_creator.create()
+
+ # Perform logic
+ ...
+
+ # Cleanup
+ qos_creator.clean()
+
+Create Volume Type
+------------------
+
+- Volume Type - snaps.openstack.create\_volume\_type.OpenStackVolumeType
+
+ - snaps.config.volume\_type.VolumeTypeConfig
+
+ - name - the volume type's name (required)
+ - description - the volume type's description (optional)
+ - encryption - instance or config for VolumeTypeEncryptionConfig (optional)
+ - qos\_spec\_name - name of the QoS Spec to associate (optional)
+ - public - instance or config for VolumeTypeEncryptionConfig (optional)
+
+.. code:: python
+
+ from snaps.config.volume_type import VolumeTypeConfig
+ from snaps.openstack.create_volume_type import OpenStackVolumeType
+
+ vol_type_settings = VolumeTypeConfig(name='stack-name')
+ vol_type_creator = OpenStackHeatStack(os_creds, vol_type_settings)
+ vol_type_creator.create()
+
+ # Perform logic
+ ...
+
+ # Cleanup
+ vol_type_creator.clean()
+
+Create Volume
+-------------
+
+- Volume - snaps.openstack.create\_volume.OpenStackVolume
+
+ - snaps.config.volume.VolumeConfig
+
+ - name - the volume type's name (required)
+ - description - the volume type's description (optional)
+ - size - size of volume in GB (default = 1)
+ - image_name - when a glance image is used for the image source (optional)
+ - type\_name - the associated volume's type name (optional)
+ - availability\_zone - the name of the compute server on which to
+ deploy the volume (optional)
+ - multi_attach - when true, volume can be attached to more than one
+ server (default = False)
+
+.. code:: python
+
+ from snaps.config.volume import VolumeConfig
+ from snaps.openstack.create\_volume import OpenStackVolume
+
+ vol_settings = VolumeConfig(name='stack-name')
+ vol_creator = OpenStackVolume(os_creds, vol_settings)
+ vol_creator.create()
+
+ # Perform logic
+ ...
+
+ # Cleanup
+ vol_type_creator.clean()
+
+Create Heat Stack
+-----------------
+
+- Heat Stack - snaps.openstack.create\_stack.OpenStackHeatStack
+
+ - snaps.config.stack.StackConfig
+
+ - name - the stack's name (required)
+ - template - the heat template in dict() format (required when
+ template_path is None)
+ - template\_path - the location of the heat template file (required
+ when template is None)
+ - env\_values - dict() of strings for substitution of template
+ default values (optional)
+
+.. code:: python
+
+ from snaps.config.stack import StackConfig
+ from snaps.openstack.create_stack import OpenStackHeatStack
+
+ stack_settings = StackConfig(name='stack-name', template_path='/tmp/template.yaml')
+ stack_creator = OpenStackHeatStack(os_creds, stack_settings)
+ stack_creator.create()
+
+ # Perform logic
+ ...
+
+ # Cleanup
+ stack_creator.clean()
+
Create VM Instance
------------------
@@ -399,7 +549,7 @@ Create VM Instance
- name - the name of the VM (required)
- flavor - the name of the flavor (required)
- port\_settings - list of
- snaps.openstack.create\_network.PortSettings objects where each
+ snaps.config.network.PortConfig objects where each
denote a NIC (see above in create router section for details)
API does not require, but newer NFVIs now require VMs have at
least one network
@@ -434,17 +584,17 @@ Create VM Instance
- userdata - the cloud-init script to execute after VM has been
started
- - image\_settings - see snaps.openstack.create\_image.ImageSettings
+ - image\_settings - see snaps.config.image.ImageConfig
above (required)
- keypair\_settings - see
- snaps.openstack.create\_keypairs.KeypairSettings above (optional)
+ snaps.openstack.keypair.KeypairConfig above (optional)
.. code:: python
from snaps.openstack.create_instance import VmInstanceSettings, FloatingIpSettings, OpenStackVmInstance
- from snaps.openstack.create_network import PortSettings
+ from snaps.config.network import PortConfig
- port_settings = PortSettings(name='port-name', network_name=network_settings.name)
+ port_settings = PortConfig(name='port-name', network_name=network_settings.name)
floating_ip_settings = FloatingIpSettings(name='fip1', port_name=port_settings.name, router_name=router_settings.name)
instance_settings = VmInstanceSettings(name='vm-name', flavor='flavor_settings.name', port_settings=[port_settings],
floating_ip_settings=[floating_ip_settings])
@@ -503,7 +653,12 @@ an example of this pattern as this is the only API where SNAPS is
supporting more than one version)
- snaps.openstack.utils.keystone\_utils - for calls to the Keystone
- APIs
+ APIs (support for versions 2 & 3)
- snaps.openstack.utils.glance\_utils - for calls to the Glance APIs
+ (support for versions 1 & 2)
- snaps.openstack.utils.neutron\_utils - for calls to the Neutron APIs
-- snaps.openstack.utils.nova\_utils - for calls to the Nova APIs
+ (version 2)
+- snaps.openstack.utils.nova\_utils - for calls to the Nova APIs (version 2)
+- snaps.openstack.utils.heat\_utils - for calls to the Heat APIs (version 1)
+- snaps.openstack.utils.cinder\_utils - for calls to the Cinder APIs
+ (support for versions 2 & 3)
diff --git a/docs/how-to-use/UnitTests.rst b/docs/how-to-use/UnitTests.rst
index 5fb04db..5bd4f08 100644
--- a/docs/how-to-use/UnitTests.rst
+++ b/docs/how-to-use/UnitTests.rst
@@ -36,11 +36,17 @@ OSCredsUnitTests
Ensures that all required members are included when constructing a
OSCreds object
+SecurityGroupRuleConfigUnitTests
+--------------------------------
+
+Ensures that all required members are included when constructing a
+SecurityGroupRuleConfig object
+
SecurityGroupRuleSettingsUnitTests
----------------------------------
Ensures that all required members are included when constructing a
-SecurityGroupRuleSettings object
+deprecated SecurityGroupRuleSettings object
SecurityGroupRuleDomainObjectTests
----------------------------------
@@ -48,11 +54,17 @@ SecurityGroupRuleDomainObjectTests
Ensures that all required members are included when constructing a
SecurityGroupRule domain object
+SecurityGroupConfigUnitTests
+----------------------------
+
+Ensures that all required members are included when constructing a
+SecuirtyGroupConfig object
+
SecurityGroupSettingsUnitTests
------------------------------
Ensures that all required members are included when constructing a
-SecuirtyGroupSettings object
+deprecated SecuirtyGroupSettings object
SecurityGroupDomainObjectTests
------------------------------
@@ -60,11 +72,17 @@ SecurityGroupDomainObjectTests
Ensures that all required members are included when constructing a
SecurityGroup domain object
+ImageConfigUnitTests
+--------------------
+
+Ensures that all required members are included when constructing a
+ImageConfig object
+
ImageSettingsUnitTests
----------------------
Ensures that all required members are included when constructing a
-ImageSettings object
+ImageSettings object (deprecated see ImageConfigUnitTests)
ImageDomainObjectTests
----------------------
@@ -72,11 +90,17 @@ ImageDomainObjectTests
Ensures that all required members are included when constructing a
Image domain object
+FlavorConfigUnitTests
+---------------------
+
+Ensures that all required members are included when constructing a
+FlavorConfig object
+
FlavorSettingsUnitTests
-----------------------
Ensures that all required members are included when constructing a
-FlavorSettings object
+deprecated FlavorSettings object
FlavorDomainObjectTests
-----------------------
@@ -84,11 +108,17 @@ FlavorDomainObjectTests
Ensures that all required members are included when constructing a
Flavor domain object
+KeypairConfigUnitTests
+----------------------
+
+Ensures that all required members are included when constructing a
+KeypairConfig object
+
KeypairSettingsUnitTests
------------------------
Ensures that all required members are included when constructing a
-KeypairSettings object
+deprecated KeypairSettings object
KeypairDomainObjectTests
------------------------
@@ -96,11 +126,17 @@ KeypairDomainObjectTests
Ensures that all required members are included when constructing a
Keypair domain object
+UserConfigUnitTests
+-------------------
+
+Ensures that all required members are included when constructing a
+UserConfig object
+
UserSettingsUnitTests
---------------------
Ensures that all required members are included when constructing a
-UserSettings object
+deprecated UserSettings object
UserDomainObjectTests
---------------------
@@ -108,11 +144,17 @@ UserDomainObjectTests
Ensures that all required members are included when constructing a
User domain object
+ProjectConfigUnitTests
+----------------------
+
+Ensures that all required members are included when constructing a
+ProjectConfig object
+
ProjectSettingsUnitTests
------------------------
Ensures that all required members are included when constructing a
-ProjectSettings object
+deprecated ProjectSettings object
ProjectDomainObjectTests
------------------------
@@ -144,11 +186,17 @@ RoleDomainObjectTests
Ensures that all required members are included when constructing a
Role domain object
+NetworkConfigUnitTests
+----------------------
+
+Ensures that all required members are included when constructing a
+NetworkConfig object
+
NetworkSettingsUnitTests
------------------------
Ensures that all required members are included when constructing a
-NetworkSettings object
+deprecated NetworkSettings object
NetworkObjectTests
------------------
@@ -156,11 +204,17 @@ NetworkObjectTests
Ensures that all required members are included when constructing a
Network domain object
+SubnetConfigUnitTests
+---------------------
+
+Ensures that all required members are included when constructing a
+SubnetConfig object
+
SubnetSettingsUnitTests
-----------------------
Ensures that all required members are included when constructing a
-SubnetSettings object
+deprecated SubnetSettings object
SubnetObjectTests
-----------------
@@ -168,11 +222,17 @@ SubnetObjectTests
Ensures that all required members are included when constructing a
Subnet domain object
+PortConfigUnitTests
+-------------------
+
+Ensures that all required members are included when constructing a
+PortConfig object
+
PortSettingsUnitTests
---------------------
Ensures that all required members are included when constructing a
-PortSettings object
+deprecated PortSettings object
PortDomainObjectTests
---------------------
@@ -180,11 +240,17 @@ PortDomainObjectTests
Ensures that all required members are included when constructing a
Port domain object
+RouterConfigUnitTests
+---------------------
+
+Ensures that all required members are included when constructing a
+RouterConfig object
+
RouterSettingsUnitTests
-----------------------
Ensures that all required members are included when constructing a
-RouterSettings object
+deprecated RouterSettings object
RouterDomainObjectTests
-----------------------
@@ -198,11 +264,17 @@ InterfaceRouterDomainObjectTests
Ensures that all required members are included when constructing a
InterfaceRouter domain object
+StackConfigUnitTests
+--------------------
+
+Ensures that all required members are included when constructing a
+StackConfig object
+
StackSettingsUnitTests
----------------------
Ensures that all required members are included when constructing a
-StackSettings object
+deprecated StackSettings object
StackDomainObjectTests
----------------------
@@ -222,11 +294,83 @@ OutputDomainObjectTests
Ensures that all required members are included when constructing a
Output domain object (for Heat)
+VolumeConfigUnitTests
+---------------------
+
+Ensures that all required members are included when constructing a
+VolumeConfig object
+
+VolumeSettingsUnitTests
+-----------------------
+
+Ensures that all required members are included when constructing a
+deprecated VolumeSettings object
+
+VolumeDomainObjectTests
+-----------------------
+
+Ensures that all required members are included when constructing a
+Volume domain object (for Cinder)
+
+VolumeTypeConfigUnitTests
+-------------------------
+
+Ensures that all required members are included when constructing a
+VolumeTypeConfig object
+
+VolumeTypeSettingsUnitTests
+---------------------------
+
+Ensures that all required members are included when constructing a
+deprecated VolumeTypeSettings object
+
+VolumeTypeDomainObjectTests
+---------------------------
+
+Ensures that all required members are included when constructing a
+VolumeType domain object (for Cinder)
+
+VolumeTypeEncryptionObjectTests
+-------------------------------
+
+Ensures that all required members are included when constructing a
+VolumeTypeEncryption domain object (for Cinder)
+
+QoSConfigUnitTests
+------------------
+
+Ensures that all required members are included when constructing a
+QoSConfig object
+
+QoSSettingsUnitTests
+--------------------
+
+Ensures that all required members are included when constructing a
+deprecated QoSSettings object
+
+QoSSpecDomainObjectTests
+------------------------
+
+Ensures that all required members are included when constructing a
+QoSSpec domain object (for Cinder)
+
+VolumeDomainObjectTests
+-----------------------
+
+Ensures that all required members are included when constructing a
+Volume domain object (for Cinder)
+
+FloatingIpConfigUnitTests
+-------------------------
+
+Ensures that all required members are included when constructing a
+FloatingIpConfig object
+
FloatingIpSettingsUnitTests
---------------------------
Ensures that all required members are included when constructing a
-FloatingIpSettings object
+depecated FloatingIpSettings object
FloatingIpDomainObjectTests
---------------------------
@@ -234,14 +378,46 @@ FloatingIpDomainObjectTests
Ensures that all required members are included when constructing a
FloatingIp domain object
+VmInstanceConfigUnitTests
+-------------------------
+
+Ensures that all required members are included when constructing a
+VmInstanceConfig object
+
VmInstanceSettingsUnitTests
---------------------------
Ensures that all required members are included when constructing a
-VmInstanceSettings object
+deprecated VmInstanceSettings object
VmInstDomainObjectTests
-----------------------
Ensures that all required members are included when constructing a
VmInst domain object
+
+ClusterTemplateConfigUnitTests
+------------------------------
+
+Ensures that all required members are included when constructing a
+ClusterTemplateConfig object
+
+ClusterTemplateUnitTests
+------------------------
+
+Ensures that all required members are included when constructing a
+ClusterTemplate object
+
+SettingsUtilsUnitTests
+----------------------
+
+Ensures that the settings_utils.py#create_volume_config() function properly
+maps a snaps.domain.Volume object correctly to a
+snaps.config.volume.VolumeConfig object as well as a
+snaps.domain.VolumeType object to a
+snaps.config.volume.VolumeConfig object
+
+
+Ensures that the settings_utils.py#create_flavor_config() function properly
+maps a snaps.domain.Flavor object correctly to a
+snaps.config.flavor.FlavorConfig object \ No newline at end of file
diff --git a/docs/how-to-use/VirtEnvDeploy.rst b/docs/how-to-use/VirtEnvDeploy.rst
index dd95202..6c99992 100644
--- a/docs/how-to-use/VirtEnvDeploy.rst
+++ b/docs/how-to-use/VirtEnvDeploy.rst
@@ -3,9 +3,10 @@ Try an example
Use launcher.py to deploy and clean up example environments. These examples are described in YAML files.
-#. Add your OpenStack connection information to the deploy-complex-network.yaml.
+#. Add your OpenStack connection information.
- Edit <path to repo>/examples/complex-network/deploy-complex-network.yaml
+ Edit <path to repo>/examples/inst-w-volume/deploy-env.yaml with your OpenStack
+ credentials and authorization URL
- openstack: the top level tag that denotes configuration for the OpenStack components
@@ -16,8 +17,7 @@ Use launcher.py to deploy and clean up example environments. These examples are
- auth\_url: - the URL to the OpenStack APIs (required)
- project\_name: - the name of the OpenStack project for the user
(required)
- - http\_proxy: - the {{ host }}:{{ port }} of the proxy server the
- HTTPPhotoman01(optional)
+ - http\_proxy: - the {{ host }}:{{ port }} of the proxy server (optional)
#. Go to the examples directory.
@@ -29,13 +29,13 @@ Use launcher.py to deploy and clean up example environments. These examples are
::
- python launch.py -t ./complex-network/deploy-complex-network.yaml -d
+ python launch.py -t ./inst-w-volume/deploy-vm-with-volume.yaml -e ./inst-w-volume/deploy-env.yaml -d
#. Clean the deployment.
::
- python launch.py -t ./complex-network/deploy-complex-network.yaml -c
+ python launch.py -t ./complex-network/deploy-complex-network.yaml -e ./inst-w-volume/deploy-env.yaml -c
#. Customize the deployment by changing the yaml file.
@@ -46,183 +46,374 @@ Use launcher.py to deploy and clean up example environments. These examples are
- openstack: the top level tag that denotes configuration for the
OpenStack components
- - connection: - contains the credentials and endpoints required to
- connect with OpenStack
- - username: - the project's user (required)
- - password: - the tentant's user password (required)
- - auth\_url: - the URL to the OpenStack APIs (required)
- - project\_name: - the name of the OpenStack project for the user
- (required)
- - http\_proxy: - the {{ host }}:{{ port }} of the proxy server the
- HTTPPhotoman01(optional)
- - images: - describes each image
- - image:
-
- - name: The unique image name. If the name already exists for
- your project, a new one will not be created (required)
- - format: The format type of the image i.e. qcow2 (required)
- - download\_url: The HTTP download location of the image file
- (required)
- - nic\_config\_pb\_loc: The file location relative to the CWD
- (python directory) to the Ansible Playbook used to configure
- VMs with more than one port. VMs get their first NIC configured
- for free while subsequent ones are not. This value/script will
- only be leveraged when necessary. Centos has been supported
- with
- "provisioning/ansible/centos-network-setup/configure\_host.yml".
+ - connections: the different connections/credentials to be used by the
+ launcher application
+
+ - connection: the credentials and endpoints required to connect to an
+ OpenStack project/tenant
+
+ - name: the name of the credentials for use when creating objects (required)
+ - username: the project's user (required)
+ - password: the tentant's user password (required)
+ - auth\_url: the URL to the OpenStack APIs (required)
+ - project\_name: the name of the OpenStack project for the user
+ (required)
+ - identity\_api\_version: the Keystone client version to use (default = 2)
+ - image\_api\_version: the Glance client version to use (default = 2)
+ - network\_api\_version: the Neutron client version to use (default = 2)
+ - compute\_api\_version: the Nova client version to use (default = 2)
+ - heat\_api\_version: the Heat client version to use (default = 1)
+ - volume\_api\_version: the Cinder client version to use (default = 2)
+ - user\_domain\_id: the user domain ID to use (default = 'default')
+ - user\_domain\_name: the user domain name to use (default = 'Default')
+ - project\_domain\_id: the project domain ID to use (default = 'default')
+ - project\_domain\_name: the project domain name to use (default = 'Default')
+ - interface: Used to specify the endpoint type for keystone (default = 'public')
+ - cacert: True for https or the certification file location (default = False)
+ - region\_name: the region (default = None)
+ - proxy\_settings: for accessing APIs hidden behind an HTTP proxy
+
+ - host: hostname or IP of HTTP proxy host (required)
+ - port: port number of the HTTP proxy server (required)
+ - http\_host: hostname or IP of HTTPS proxy host (default = host)
+ - port: port number of the HTTPS proxy server (default = port)
+ - ssh\_proxy\_cmd: the OpenSSH command used to access the SSH port
+ of a VM (optional)
+
+ - projects: the projects/tenants to create
+
+ - project: a project/tenant to create (admin user credentials required)
+
+ - os\_creds\_name: the connection name (default = 'default'
+ required or use "os\_user" below instead)
+ - name: the project's name (required)
+ - domain or domain_name: the project's domain name (default = 'Default')
+ - description: the description (optional)
+ - users: a list of users to associate to the project (optional)
+ - enabled: when True the project will be enabled on creation (default = True)
+
+ - users: the users to create
+
+ - user: a user to create (admin user credentials required)
+
+ - os\_creds\_name: the connection name (required)
+ - name: the username (required)
+ - password: the user's password (required)
+ - project\_name: the user's primary project name (optional)
+ - domain\_name: the user's domain name (default = 'Default')
+ - email: the user's email address (optional)
+ - roles: dict where key is the role's name and value is the name
+ of the project to associate with the role (optional)
+
+ - flavors: the flavors to create
+
+ - flavor: a flavor to create (admin user credentials required)
+
+ - os\_creds\_name: the connection name (default = 'default'
+ required or use "os\_user" below instead)
+ - name: the name (required)
+ - flavor\_id: the string ID (default 'auto')
+ - ram: the required RAM in MB (required)
+ - disk: the size of the root disk in GB (required)
+ - vcpus: the number of virtual CPUs (required)
+ - ephemeral: the size of the ephemeral disk in GB (default 0)
+ - swap: the size of the dedicated swap disk in GB (default 0)
+ - rxtx\_factor: the receive/transmit factor to be set on ports if
+ backend supports QoS extension (default 1.0)
+ - is\_public: denotes whether or not the flavor is public (default = True)
+ - metadata: freeform dict() for special metadata (optional)
+
+ - qos_specs: the QoS Specs to create
+
+ - qos_spec: a QoS Spec to create (admin user credentials required)
+
+ - os\_creds\_name: the connection name (default = 'default'
+ required or use "os\_user" below instead)
+ - name: the name (required)
+ - consumer: enumerations: 'front-end', 'back-end', 'both' (required)
+ - specs: dict of custom values (optional)
+
+ - volume_types: the Volume Type to create
+
+ - volume_type: a Volume Type to create (admin user credentials required)
+
+ - os\_creds\_name: the connection name (default = 'default'
+ required or use "os\_user" below instead)
+ - name: the name (required)
+ - description: the description (optional)
+ - qos_spec_name: the name of the associate QoS Spec (optional)
+ - public: visibility (default - False)
+ - encryption: the encryption settings (optional)
+
+ - name: the name (required)
+ - provider_class: the provider class (required i.e. LuksEncryptor)
+ - control_location: enumerations: 'front-end', 'back-end' (required)
+ - cipher: the encryption algorithm/mode to use (optional)
+ - key_size: the size of the encryption key, in bits (optional)
+
+ - volumes: the Volume to create
+
+ - volume: a Volume to create
+
+ - os\_creds\_name: the connection name (default = 'default'
+ required or use "os\_user" below instead)
+ - os\_user: the connection from a new user defined in template
+ (required or use "os\_creds\_name" above
+
+ - name: the user's name (required)
+ - project\_name: the project name to use
+
+ - name: the name (required)
+ - description: the description (optional)
+ - size: the volume size in GB (default = 1)
+ - image_name: the image name to leverage (optional)
+ - type_name: the volume type name to associate (optional)
+ - availability_zone: the zone name on which to deploy (optional)
+ - multi_attach: when true, volume can be attached to more than one VM
+ (default = False)
+
+ - images: describes each image to create
+
+ - image:
+
+ - os\_creds\_name: the connection name (default = 'default'
+ required or use "os\_user" below instead)
+ - os\_user: the connection from a new user defined in template
+ (required or use "os\_creds\_name" above
+
+ - name: the user's name (required)
+ - project\_name: the project name to use
+
+ - name: The unique image name. If the name already exists for
+ your project, a new one will not be created (required)
+ - image\_user: the image's default sudo user (required)
+ - format or img\_format: the image format type (required i.e. qcow2)
+ - url or download\_url: The HTTP download location of the image file
+ (required when "image_file" below has not been configured)
+ - image\_file: the image file location (required when "url" has not
+ been configured)
+ - kernel\_image\_settings: the settings for a kernel image (optional)
+ - ramdisk\_image\_settings: the settings for a kernel image (optional)
+ - public: publically visibile when True (default = True)
- networks:
- - network:
-
- - name: The name of the network to be created. If one already
- exists, a new one will not be created (required)
- - admin\_state\_up: T\|F (default True)
- - shared: (optional)
- - project\_name: Name of the project who owns the network. Note:
- only administrative users can specify projects other than their
- own (optional)
- - external: T\|F whether or not network is external (default
- False)
- - network\_type: The type of network to create. (optional)
- - subnets:
- - subnet:
-
- - name: The name of the network to be created. If one already
- exists, a new one will not be created. Note: although
- OpenStack allows for multiple subnets to be applied to any
- given network, we have not included support as our current
- use cases does not utilize this functionality (required)
- - cidr: The subnet mask value (required)
- - dns\_nameservers: A list of IP values used for DNS
- resolution (default: 8.8.8.8)
- - ip\_version: 4\|6 (default: 4)
- - project\_name: Name of the project who owns the network.
- Note: only administrative users can specify projects other
- than their own (optional)
- - start: The start address for allocation\_pools (optional)
- - end: The ending address for allocation\_pools (optional)
- - gateway\_ip: The IP address to the gateway (optional)
- - enable\_dhcp: T\|F (optional)
- - dns\_nameservers: List of DNS server IPs
- - host\_routes: A list of host route dictionaries (optional)
- i.e.:
- ``yaml "host_routes":[ { "destination":"0.0.0.0/0", "nexthop":"123.456.78.9" }, { "destination":"192.168.0.0/24", "nexthop":"192.168.0.1" } ]``
- - destination: The destination for a static route (optional)
- - nexthop: The next hop for the destination (optional)
- - ipv6\_ra\_mode: Valid values: "dhcpv6-stateful",
- "dhcpv6-stateless", and "slaac" (optional)
- - ipv6\_address\_mode: Valid values: "dhcpv6-stateful",
- "dhcpv6-stateless", and "slaac" (optional)
+ - network:
+
+ - os\_creds\_name: the connection name (default = 'default'
+ required or use "os\_user" below instead)
+ - os\_user: the connection from a new user defined in template
+ (required or use "os\_creds\_name" above
+
+ - name: the user's name (required)
+ - project\_name: the project name to use
+
+ - name: The name of the network to be created. If one already
+ exists, a new one will not be created (required)
+ - admin\_state\_up: T\|F (default True)
+ - shared: (optional)
+ - project\_name: Name of the project who owns the network. Note:
+ only administrative users can specify projects other than their
+ own (optional)
+ - external: T\|F whether or not network is external (default False)
+ - network\_type: The type of network to create (optional)
+ - physical\_network: the name of the physical network
+ (required when network_type is 'flat')
+ - segmentation\_id: the id of the segmentation
+ (required when network_type is 'vlan')
+ - subnets:
+ - subnet:
+
+ - name: The name of the network to be created. If one already
+ exists, a new one will not be created. Note: although
+ OpenStack allows for multiple subnets to be applied to any
+ given network, we have not included support as our current
+ use cases does not utilize this functionality (required)
+ - cidr: The subnet mask value (required)
+ - dns\_nameservers: A list of IP values used for DNS
+ resolution (default: 8.8.8.8)
+ - ip\_version: 4\|6 (default: 4)
+ - project\_name: Name of the project who owns the network.
+ Note: only administrative users can specify projects other
+ than their own (optional)
+ - start: The start address for allocation\_pools (optional)
+ - end: The ending address for allocation\_pools (optional)
+ - gateway\_ip: The IP address to the gateway (optional)
+ - enable\_dhcp: T\|F (optional)
+ - dns\_nameservers: List of DNS server IPs (default = ['8.8.8.8']
+ - host\_routes: A list of host route dictionaries (optional)
+ i.e.:
+ ``yaml "host_routes":[ { "destination":"0.0.0.0/0", "nexthop":"123.456.78.9" }, { "destination":"192.168.0.0/24", "nexthop":"192.168.0.1" } ]``
+ - destination: The destination for a static route (optional)
+ - nexthop: The next hop for the destination (optional)
+ - ipv6\_ra\_mode: Valid values: "dhcpv6-stateful",
+ "dhcpv6-stateless", and "slaac" (optional)
+ - ipv6\_address\_mode: Valid values: "dhcpv6-stateful",
+ "dhcpv6-stateless", and "slaac" (optional)
+
+ - security_groups:
+
+ - security_group:
+
+ - os\_creds\_name: the connection name (default = 'default'
+ required or use "os\_user" below instead)
+ - os\_user: the connection from a new user defined in template
+ (required or use "os\_creds\_name" above
+
+ - name: the user's name (required)
+ - project\_name: the project name to use
+
+ - name: The name of the security group to be created (required)
+ - description: The security group's description (optional)
+ - project\_name: Name of the project who owns the security group (optional)
+ - rule\_settings: List of rules to place onto security group (optional)
+
+ - description: the rule's description (optional)
+ - protocol: rule's protcol ('icmp' or 'tcp' or 'udp' or 'null')
+ - ethertype: rule's ethertype ('4' or '6')
+ - port\_range\_min: The minimum port number in the range that is
+ matched by the security group rule. When the protocol is 'tcp'
+ or 'udp', this value must be <= 'port_range_max' (optional)
+ - port\_range\_max: The maximum port number in the range that is
+ matched by the security group rule. When the protocol is 'tcp'
+ or 'udp', this value must be <= 'port_range_max' (optional)
+ - remote\_ip\_prefix: The remote IP prefix to associate with this
+ metering rule packet (optional)
- routers:
- router:
- - name: The name of the router to be created. If one already
- exists, a new one will not be created (required)
- - project\_name: Name of the project who owns the network. Note:
- only administrative users can specify projects other than their
- own (optional)
- - internal\_subnets: A list of subnet names on which the router
- will be placed (optional)
- - external\_gateway: A dictionary containing the external gateway
- parameters: "network\_id", "enable\_snat",
- "external\_fixed\_ips" (optional)
- - interfaces: A list of port interfaces to create to other
- subnets (optional)
-
- - port (Leverages the same class/structure as port objects on
- VM instances. See port definition below for a
- full accounting of the port attributes. The ones listed
- below are generally used for routers)
-
- - name: The name given to the new port (must be unique for
- project) (required)
- - network\_name: The name of the new port's network
- (required)
- - ip\_addrs: A list of k/v pairs (optional)
- - subnet\_name: the name of a subnet that is on the port's
- network
- - ip: An IP address of the associated subnet to assign to
- the new port (optional but generally required for router
- interfaces)
+
+ - os\_creds\_name: the connection name (default = 'default'
+ required or use "os\_user" below instead)
+ - os\_user: the connection from a new user defined in template
+ (required or use "os\_creds\_name" above
+
+ - name: the user's name (required)
+ - project\_name: the project name to use
+
+ - name: The name of the router to be created (required)
+ - project\_name: Name of the project who owns the network (optional)
+ - external\_gateway: Name of the external network to which to route
+ (optional)
+ - admin\_state\_up: T\|F (default True)
+ - external\_fixed\_ids: Dictionary containing the IP address
+ parameters (optional)
+ - internal\_subnets: List of subnet names to which to connect this
+ router (optional)
+
+ - port_settings (Leverages the same class/structure as port objects on
+ VM instances. See port definition below for a
+ full accounting of the port attributes. The ones listed
+ below are generally used for routers)
+
+ - name: The name given to the new port (required and must be
+ unique for project)
+ - network\_name: The name of the network on which to create
+ the port (optional)
+ - admin\_state\_up: T\|F (default True)
+ - project\_name: Name of the project who owns the network (optional)
+ - mac\_address: The port's MAC address (optional)
+ - ip\_addrs: A list of k/v pairs (optional)
+ - security\_groups: a list of names of the the security groups
+ to apply to the port
+ - opt\_value: The extra DHCP option value (optional)
+ - opt\_name: The extra DHCP option name (optional)
- keypairs:
- keypair:
- - name: The name of the keypair to be created. If one already
- exists, a new one will not be created but simply loaded from
- its configured file location (required)
- - public\_filepath: The path to where the generated public key
- will be stored if it does not exist (optional but really
- required for provisioning purposes)
- - private\_filepath: The path to where the generated private key
- will be stored if it does not exist (optional but really
- required for provisioning purposes)
+
+ - os\_creds\_name: the connection name (default = 'default'
+ required or use "os\_user" below instead)
+ - os\_user: the connection from a new user defined in template
+ (required or use "os\_creds\_name" above
+
+ - name: the user's name (required)
+ - project\_name: the project name to use
+
+ - name: The name of the keypair to be created. If one already
+ exists, a new one will not be created but simply loaded from
+ its configured file location (required)
+ - public\_filepath: The path to where the generated public key
+ will be stored if it does not exist (optional but really
+ required for provisioning purposes)
+ - private\_filepath: The path to where the generated private key
+ will be stored if it does not exist (optional but really
+ required for provisioning purposes)
- instances:
- instance:
- - name: The unique instance name for project. (required)
- - flavor: Must be one of the preconfigured flavors (required)
- - imageName: The name of the image to be used for deployment
- (required)
- - keypair\_name: The name of the keypair to attach to instance
- (optional but required for NIC configuration and Ansible
- provisioning)
- - sudo\_user: The name of a sudo\_user that is attached to the
- keypair (optional but required for NIC configuration and
- Ansible provisioning)
- - vm\_boot\_timeout: The number of seconds to block waiting for
- an instance to deploy and boot (default 900)
- - vm\_delete\_timeout: The number of seconds to block waiting for
- an instance to be deleted (default 300)
- - ssh\_connect\_timeout: The number of seconds to block waiting
- for an instance to achieve an SSH connection (default 120)
- - ports: A list of port configurations (should contain at least
- one)
- - port: Denotes the configuration of a NIC
-
- - name: The unique port name for project (required)
- - network\_name: The name of the network to which the port is
- attached (required)
- - ip\_addrs: Static IP addresses to be added to the port by
- subnet (optional)
- - subnet\_name: The name of the subnet
- - ip: The assigned IP address (when null, OpenStack will
- assign an IP to the port)
- - admin\_state\_up: T\|F (default True)
- - project\_name: The name of the project who owns the network.
- Only administrative users can specify a the project ID other
- than their own (optional)
- - mac\_address: The desired MAC for the port (optional)
- - fixed\_ips: A dictionary that allows one to specify only a
- subnet ID, OpenStack Networking allocates an available IP
- from that subnet to the port. If you specify both a subnet
- ID and an IP address, OpenStack Networking tries to allocate
- the specified address to the port. (optional)
- - seurity\_groups: A list of security group IDs (optional)
- - allowed\_address\_pairs: A dictionary containing a set of
- zero or more allowed address pairs. An address pair contains
- an IP address and MAC address. (optional)
- - opt\_value: The extra DHCP option value (optional)
- - opt\_name: The extra DHCP option name (optional)
- - device\_owner: The ID of the entity that uses this port. For
- example, a DHCP agent (optional)
- - device\_id: The ID of the device that uses this port. For
- example, a virtual server (optional)
-
- - floating\_ips: list of floating\_ip configurations (optional)
-
- - floating\_ip:
- - name: Must be unique for VM instance (required)
- - port\_name: The name of the port requiring access to the
- external network (required)
- - subnet\_name: The name of the subnet contains the IP address on
- the port on which to create the floating IP (optional)
- - router\_name: The name of the router connected to an external
- network used to attach the floating IP (required)
- - provisioning: (True\|False) Denotes whether or not this IP can
- be used for Ansible provisioning (default True)
+
+ - os\_creds\_name: the connection name (default = 'default'
+ required or use "os\_user" below instead)
+ - os\_user: the connection from a new user defined in template
+ (required or use "os\_creds\_name" above
+
+ - name: the user's name (required)
+ - project\_name: the project name to use
+
+ - name: The unique instance name for project. (required)
+ - flavor: Must be one of the preconfigured flavors (required)
+ - imageName: The name of the image to be used for deployment
+ (required)
+ - keypair\_name: The name of the keypair to attach to instance
+ (optional but required for NIC configuration and Ansible
+ provisioning)
+ - sudo\_user: The name of a sudo\_user that is attached to the
+ keypair (optional but required for NIC configuration and
+ Ansible provisioning)
+ - vm\_boot\_timeout: The number of seconds to block waiting for
+ an instance to deploy and boot (default 900)
+ - vm\_delete\_timeout: The number of seconds to block waiting for
+ an instance to be deleted (default 300)
+ - ssh\_connect\_timeout: The number of seconds to block waiting
+ for an instance to achieve an SSH connection (default 120)
+ - ports: A list of port configurations (should contain at least
+ one)
+ - port: Denotes the configuration of a NIC
+
+ - name: The unique port name for project (required)
+ - network\_name: The name of the network to which the port is
+ attached (required)
+ - ip\_addrs: Static IP addresses to be added to the port by
+ subnet (optional)
+ - subnet\_name: The name of the subnet
+ - ip: The assigned IP address (when null, OpenStack will
+ assign an IP to the port)
+ - admin\_state\_up: T\|F (default True)
+ - project\_name: The name of the project who owns the network.
+ Only administrative users can specify a the project ID other
+ than their own (optional)
+ - mac\_address: The desired MAC for the port (optional)
+ - fixed\_ips: A dictionary that allows one to specify only a
+ subnet ID, OpenStack Networking allocates an available IP
+ from that subnet to the port. If you specify both a subnet
+ ID and an IP address, OpenStack Networking tries to allocate
+ the specified address to the port. (optional)
+ - seurity\_groups: A list of security group IDs (optional)
+ - allowed\_address\_pairs: A dictionary containing a set of
+ zero or more allowed address pairs. An address pair contains
+ an IP address and MAC address. (optional)
+ - opt\_value: The extra DHCP option value (optional)
+ - opt\_name: The extra DHCP option name (optional)
+ - device\_owner: The ID of the entity that uses this port. For
+ example, a DHCP agent (optional)
+ - device\_id: The ID of the device that uses this port. For
+ example, a virtual server (optional)
+
+ - floating\_ips: list of floating\_ip configurations (optional)
+
+ - floating\_ip:
+ - name: Must be unique for VM instance (required)
+ - port\_name: The name of the port requiring access to the
+ external network (required)
+ - subnet\_name: The name of the subnet contains the IP address on
+ the port on which to create the floating IP (optional)
+ - router\_name: The name of the router connected to an external
+ network used to attach the floating IP (required)
+ - provisioning: (True\|False) Denotes whether or not this IP can
+ be used for Ansible provisioning (default True)
- ansible: Each set of attributes below are contained in a list