summaryrefslogtreecommitdiffstats
path: root/snaps/openstack/utils/tests/heat_utils_tests.py
AgeCommit message (Collapse)AuthorFilesLines
2018-07-13Switch to OS::Neutron::FloatingIPAssociationCédric Ollivier1-1/+1
OS::Nova::FloatingIPAssociation is hugely deprecated and doesn't work with latest OpenStack Queens deliverables. Change-Id: Icc43ba8a3466efbcc03e190b7e56f84eb69b7e51 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-03-12Added support for running tests in parallel.spisarski1-2/+2
JIRA: SNAPS-215 Change-Id: I94923a9f184b0d370159b499919e8fc20a2fef90 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2018-03-12Closing keystone sessions after done with them.spisarski1-25/+59
By not closing all of the keystone sessions being created when running all of the tests, this may be the root cause to the IOError occasionally being observed: IOError: [Errno 24] Too many open files JIRA: SNAPS-285 Change-Id: I7fc7ab0c6cdd02f1ae32bb3ae4f121cb465d5693 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2018-02-22Changed pattern on how objects lookup themselves by name and project.spisarski1-8/+14
The pattern being replaced has unwittingly added the requirement that all creator credentials must be of type 'admin' as when looking up the associated project ID required a call to keystone.projects.list(). As the SNAPS integration tests were always creating users with an 'admin' role, this issue was not caught. As part of this patch, integration test users will no longer be admin. JIRA: SNAPS-274 Change-Id: I02957f69e31a9d4dfa63362d371f061687e59fbf Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2018-02-16Ensure project IDs are handled correctly for Network/Subnetsspisarski1-4/+5
JIRA: SNAPS-265 Change-Id: If58f5817e52e21be377d2b06a5f7c3a413454350 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2018-01-11Fixed vm instance instantiation from Heat when using nested resourcesspisarski1-2/+2
* Simplified the configuration of file resources * Added integration test JIRA: SNAPS-255 Change-Id: I1065d9352865d7a9f946a5d9947e32e7340f20bc Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-12-18Refactored VmInst domain class for Ports.spisarski1-3/+3
Removed network dict and replaced with a list of Port domain objects. The old network member was directly copied into the VmInst object from neutron meaning that Neutron implementation details were leaking through. This refactor not only makes VmInst objects easier to use, it also ensures that future Neutron API changes will not break the library. JIRA: SNAPS-251 Change-Id: I3e5e811e433bf7670ecd80405186ac2ac0739def Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-11-30Deactivated test heat template's volume encryption.spisarski1-8/+9
Removed volume encryption from the test volume heat template as it is no longer operating properly against a Pike pod. Created the ticket SNAPS-245 to address this issue sometime in the future. JIRA: SNAPS-240 Change-Id: I610dbba4ebadd5dfb360a665b7a543be6ef5fb1c Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-11-20Refactoring of VmInstanceSettings to extend VmInstanceConfigspisarski1-1/+1
VmInstanceSettings, FloatingIPSettings and nova_utils have a runtime cyclical dependency. This patch reduces this dependency and deprecates the VmInstanceSettings and FloatingIPSettings class with snaps.config.vm_inst VmInstanceConfig and FloatingIpConfg classes JIRA: SNAPS-218 Change-Id: I95688130256bca1df4a5c347bdb741019ae0937e Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-11-20Refactoring of NetworkSettings to extend NetworkConfigspisarski1-1/+1
This also includes SubnetSettings extending to SubnetConfig and PortSettings extenting to Portconfig and neutron_utils have a runtime cyclical dependency. This patch reduces this dependency and deprecates the NetworkSettings, SubnetSettings, and PortSettings classes. JIRA: SNAPS-220 Change-Id: I996d73d9b910c075a6511a423f01d966f5b6fb74 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-11-20Refactoring of StackSettings to extend StackConfigspisarski1-19/+20
StackSettings and heat_utils have a runtime cyclical dependency. This patch reduces this dependency and deprecates the StackSettings class. JIRA: SNAPS-225 Change-Id: I8dc7a4d80efce93452908563730babf14c17e615 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-11-20Refactoring of KeypairSettings to extend KeypairConfigspisarski1-2/+2
KeypairSettings and glance_utils have a runtime cyclical dependency. This patch reduces this dependency and deprecates the KeypairSettings class. JIRA: SNAPS-219 Change-Id: I92f51ecb77238444697e922c8f089e78d1c643aa Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-11-20Refactoring of FlavorSettings to extend FlavorConfigspisarski1-2/+3
FlavorSettings and glance_utils have a runtime cyclical dependency. This patch reduces this dependency and deprecates the FlavorSettings class. JIRA: SNAPS-216 Change-Id: Ie9532fcbe16377d4ab608bdacd1982c3c6628fe9 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-11-16Refactoring of ImageSettings to extend ImageConfigspisarski1-3/+3
ImageSettings and glance_utils have a runtime cyclical dependency. This patch reduces this dependency and deprecates the ImageSettings class. JIRA: SNAPS-217 Change-Id: I09f34531366f2a5bd3202c9cbbdef878b2542abe Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-11-09Deleting files created when obtaining keypair settings from heat.spisarski1-6/+23
When Heat creates a keypair and SNAPS-OO attempts to generate a KeypairSettings object, the private key is getting stored into a file that was not getting cleaned up in some of the tests. JIRA: SNAPS-177 Change-Id: I50759a74efbd1d0df4de0780da43b9e56432d28c Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-11-06Added method to OpenStackHeatStack to return OpenStackSecurityGroup objects.spisarski1-7/+82
Continuation of the story SNAPS-153 for adding creator/state machine instances for OpenStack objects deployed via Heat. JIRA: SNAPS-207 Change-Id: Id479b69c2b166ab38724c3886096d8483998f819 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-11-02Added method to OpenStackHeatStack to return OpenStackRouter objects.spisarski1-0/+79
Continuation of the story SNAPS-153 for adding creator/state machine instances for OpenStack objects deployed via Heat. JIRA: SNAPS-173 Change-Id: Iac9138ef7827c10db1637447d3a909e714a0301b Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-10-31Added method to OpenStackHeatStack to return OpenStackFlavor objects.spisarski1-16/+57
Continuation of the story SNAPS-153 for adding creator/state machine instances for OpenStack objects deployed via Heat. JIRA: SNAPS-174 Change-Id: I791e427efc487045c0f72cd836dabd9a66a4f60f Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-10-30Added method to OpenStackHeatStack to return OpenStackKeypair objects.spisarski1-80/+93
Continuation of the story SNAPS-153 for adding creator/state machine instances for OpenStack objects deployed via Heat. JIRA: SNAPS-175 Change-Id: I7196279086b1935b4ec4a01483d46921cc567b15 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-10-27Return OpenStackVolume and OpenStackVolumeType instances from heat.spisarski1-1/+119
Added a methods to OpenStackHeatStack to return any OpenStackVolume and OpenStackVolumeType objects it was responsible for spawning. Changes include all of the necessary changes to the heat and settings utilities and associated tests. JIRA: SNAPS-199, SNAPS-200 Change-Id: I6da4bce1e90f080e22c96ab1b46eca8b85991ebf Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-10-23Added ext_net_name into template substitution variable.spisarski1-1/+1
Without the change, the template would always leverage the external network name of 'external'. Also am now creating a security group for the VM with the floating IP so the test will always be able to access. Fixed another test that used the same heat template that was changed to add in security groups. JIRA: SNAPS-206 Change-Id: I19b09e91a844f88bd473ea25b2bba71ae19b0aa1 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-10-12Improved creator/state machine classes class hierarchy.spisarski1-1/+1
Created abstract superclasses for all classes responsible for deploying and maintaining the state of objects deployed to OpenStack which should help developers better understand the library. JIRA: SNAPS-183 Change-Id: I7651bd338f0d4e4086abbc11755e6be4f19058bd Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-09-07Merge "Added method to return OpenStackVmInstance from Heat."Steven Pisarski1-21/+211
2017-08-28Fixed test names.spisarski1-3/+3
Copy/paste issue changed nova to heat. Change-Id: Ib75fcea4c87375f615862e0542569c8e3d9675e8 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-08-24Added method to return OpenStackVmInstance from Heat.spisarski1-23/+213
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 <s.pisarski@cablelabs.com>
2017-08-09SNAPS Stack creators can now return SNAPS network creators.spisarski1-6/+24
As Heat Stacks are responsible for spawning objects in OpenStack, the class OpenStackHeatStack which is responsible for applying and managing the state of a stack now can retrieve OpenStackNetwork objects for the networks created in the stack for clients who would like to query the networks and subnets or update them outside of Heat. JIRA: SNAPS-171 Change-Id: I9bf0b81d4f7bfeb1b6392f345022c7d9a57d0415 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-08-08Configure requirements for AAVMF(UEFI) with Cirros image on AArch64 Delia Popescu1-1/+1
Cirros image on AArch64 with AAVMF(UEFI) requires at least 256MB RAM. The default 128MB was changed to 256MB. Change-Id: I7414de519dcb53337f83690d1470ea672cec739b Signed-off-by: Delia Popescu <delia.popescu@enea.com> JIRA: ARMBAND-279
2017-07-31Changed heat_utils#get_stack_by_name to get_stack.spisarski1-20/+113
Added stack_settings parameter to allow for more robust queries based on the known settings as required. JIRA: SNAPS-158 Change-Id: I538826f822307365b1afe997b71280b9ea500eab Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-25Added region support.spisarski1-13/+26
Added region_name attribute to OSCreds Added region_name to neutron, nova, glance, heat, and keystone client retrieval Fixed false positive heat connection test. JIRA: SNAPS-50 & SNAPS-146 Change-Id: If3471ed7a2bdd0e6bfc281455c996386d031235d Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-20Changes required for running CI tests (Pike pod).spisarski1-0/+3
Added support for HTTPS proxies HTTPS OSCreds settings for both RC file and os_env.yaml OSCreds 'cacert' T/F and cert file path support OSCreds API version support cleanup including the addition of heat Added more OSCreds test validations Disabling of InsecureRequestWarning PEP8 line width refactoring heat_utils_test.py fix when stack status is error test suite for CI removed default flavor metadata of mem_page_size: Any to None JIRA: SNAPS-80 Change-Id: I333e83ca79d7403bf43a9b74da4c072b4da976ba Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-06-14Need to move file resources required by tests.spisarski1-1/+2
Functest was not installing the heat resource files required by the snaps tests being run by Functest as the heat template file used by the tests as it was under the repository's root directory which is causing tests to fail. Change-Id: I214d2e61e92f7dfa2e9859dded1e7ea08706314d Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-06-11Fixed problems found in Functest after implementing offline testing.spisarski1-1/+1
JIRA: FUNCTEST-809 Change-Id: I5e579b141eb513b0f9db36959014b8f945afe6a0 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-06-07Removed current working directory logic retrieving test file resources.spisarski1-2/+3
Some of the SNAPS tests leverage file resources contained within the project. These resources were being accessed via relative paths which required the test clients to ensure that the CWD was the <repo>/snaps directory. Replaced that logic to leverage the import pkg_resources making the tests much more flexible and robust. JIRA: SNAPS-89 Change-Id: Ic9c429ee53e4dd785641e11e1ed4de5aeeab54d1 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-06-05Added support for applying Heat Templatesspisarski1-0/+143
Second patch expanded support to both files and dict() objects. Third patch exposes new accessor for status and outputs. JIRA: SNAPS-86 Change-Id: Ie7e8d883b4cc1a08dbe851fc9cbf663396334909 Signed-off-by: spisarski <s.pisarski@cablelabs.com>