From 1342eb17df248ec75cc57e9c380a7753fc432194 Mon Sep 17 00:00:00 2001 From: spisarski Date: Thu, 17 Aug 2017 15:21:37 -0600 Subject: Added method to return OpenStackVmInstance from Heat. OpenStackHeatStack now can introspect the VMs that the template was responsible for deploying and return an instanitated instance of OpenStackVmInstance for each VM deployed. When the VM has a Floating IP, these instances have the ability to connect via SSH just like one created from scratch. JIRA: SNAPS-172 Change-Id: I5a7ed3a09bb871afc55c718aa80a9069b1eb4da7 Signed-off-by: spisarski --- docs/how-to-use/APITests.rst | 46 +++++++++++++++++++++++++++++++++--- docs/how-to-use/IntegrationTests.rst | 18 ++++++++++++-- docs/how-to-use/UnitTests.rst | 10 ++++++-- 3 files changed, 67 insertions(+), 7 deletions(-) (limited to 'docs') diff --git a/docs/how-to-use/APITests.rst b/docs/how-to-use/APITests.rst index 0d4239f..4a8035a 100644 --- a/docs/how-to-use/APITests.rst +++ b/docs/how-to-use/APITests.rst @@ -318,12 +318,52 @@ create_flavor_tests.py - CreateFlavorTests | | | a flavor properly with all supported settings | +---------------------------------------+---------------+-----------------------------------------------------------+ -heat_utils_tests.py - HeatUtilsCreateStackTests ------------------------------------------------ +heat_utils_tests.py - HeatUtilsCreateSimpleStackTests +----------------------------------------------------- +---------------------------------------+---------------+-----------------------------------------------------------+ -| Test Name | Glance API | Description | +| Test Name | Heat API | Description | +=======================================+===============+===========================================================+ | test_create_stack | 1 | Tests the heat_utils.create_stack() with a test template | +---------------------------------------+---------------+-----------------------------------------------------------+ +| test_create_stack_x2 | 1 | Tests the heat_utils.create_stack() with a test template | +| | | and attempts to deploy a second time w/o actually | +| | | deploying any objects | ++---------------------------------------+---------------+-----------------------------------------------------------+ + +heat_utils_tests.py - HeatUtilsCreateComplexStackTests +------------------------------------------------------ + ++---------------------------------------+---------------+-----------------------------------------------------------+ +| Test Name | Heat API | Description | ++=======================================+===============+===========================================================+ +| test_get_settings_from_stack | 1 | Tests the heat_utils functions that are responsible for | +| | | reverse engineering settings objects of the types deployed| +| | | by Heat | ++---------------------------------------+---------------+-----------------------------------------------------------+ + +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 | +| | | OpenStack network are correct without a subnet | ++---------------------------------------+---------------+-----------------------------------------------------------+ +| test_derive_net_settings_two_subnets | Neutron 2 | Tests to ensure that derived NetworkSettings from an | +| | | OpenStack network are correct with two subnets | ++---------------------------------------+---------------+-----------------------------------------------------------+ + +settings_utils_tests.py - SettingsUtilsVmInstTests +-------------------------------------------------- ++---------------------------------------+---------------+-----------------------------------------------------------+ +| Test Name | API | Description | ++=======================================+===============+===========================================================+ +| test_derive_vm_inst_settings | 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 | +| | | OpenStack VM instance is correct | ++---------------------------------------+---------------+-----------------------------------------------------------+ diff --git a/docs/how-to-use/IntegrationTests.rst b/docs/how-to-use/IntegrationTests.rst index 8ef54ec..5b4830e 100644 --- a/docs/how-to-use/IntegrationTests.rst +++ b/docs/how-to-use/IntegrationTests.rst @@ -247,8 +247,22 @@ create_stack_tests.py - CreateStackSuccessTests | test_create_same_stack | 2 | Ensures that a Heat stack with the same name cannot be | | | | created 2x | +---------------------------------------+---------------+-----------------------------------------------------------+ -| test_create_same_stack | 2 | 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 | +| | | OpenStackNetwork instance configured as deployed | ++---------------------------------------+---------------+-----------------------------------------------------------+ +| test_retrieve_vm_inst_creators | 2 | Ensures that an OpenStackHeatStack instance can return an | +| | | OpenStackVmInstance instance configured as deployed | ++---------------------------------------+---------------+-----------------------------------------------------------+ + +create_stack_tests.py - CreateComplexStackTests +----------------------------------------------- + ++---------------------------------------+---------------+-----------------------------------------------------------+ +| Test Name | Neutron API | Description | ++=======================================+===============+===========================================================+ +| test_connect_via_ssh_heat_vm | 2 | Ensures that two OpenStackHeatStack instances can return | +| | | OpenStackVmInstance instances one configured with a | +| | | floating IP and keypair and can be access via SSH | +---------------------------------------+---------------+-----------------------------------------------------------+ create_stack_tests.py - CreateStackNegativeTests diff --git a/docs/how-to-use/UnitTests.rst b/docs/how-to-use/UnitTests.rst index 6f4dd6c..5fb04db 100644 --- a/docs/how-to-use/UnitTests.rst +++ b/docs/how-to-use/UnitTests.rst @@ -208,13 +208,19 @@ StackDomainObjectTests ---------------------- Ensures that all required members are included when constructing a -Stack domain object +Stack domain object (for Heat) ResourceDomainObjectTests ------------------------- Ensures that all required members are included when constructing a -Resource domain object +Resource domain object (for Heat) + +OutputDomainObjectTests +----------------------- + +Ensures that all required members are included when constructing a +Output domain object (for Heat) FloatingIpSettingsUnitTests --------------------------- -- cgit 1.2.3-korg