summaryrefslogtreecommitdiffstats
path: root/snaps/openstack/utils/tests
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-06-11Added MTU network config and updated flavor_metadata test supportspisarski2-12/+19
JIRA: SNAPS-315 Change-Id: Ie4cbab24ea0af41e93c475e04c9440422617466f Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2018-05-22Extra changes on Flavor ConfigPanagiotis Karalis1-1/+1
JIRA: SNAPS-254 Change-Id: I4f18c0d11fe2e8456c0ebce0681f22e3e1daf6bf Signed-off-by: Panagiotis Karalis <pkaralis@intracom-telecom.com>
2018-05-09Patch to make flavor configuration for tests more flexible.spisarski1-4/+4
Also fixed potential issues with downloading images from https locations JIRA: SNAPS-254 Change-Id: Ib81569df499bbf0652c2025fc7de37af92525f7f Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2018-04-19Fixed bug with regards to subnet lookups.spisarski3-23/+47
Neutron returns all subnets regardless of visibility which cause problems within routers if there is another subnet with the same name attached to a different network. JIRA: SNAPS-304 In addition, this patch contains two other minor fixes. launch_utils.py - raise an exception when the creator is not properly instantiated network.py - allow fixed IPs to be none. Change-Id: Ib343074d925be4592a713727a03d5b531890eada Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2018-04-19Adding assertion message to test validation.spisarski1-3/+5
Change-Id: I609d09ed8b4f75baeb1ad5454c9ddde9e996a3fe Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2018-04-18Add flavor metadata for volume related testsMichael Polenchuk1-1/+2
These tests are very sensitive to the state of instance which might be active in terms of nova, but in fact still trying to get an ip address in case of dpdk scenarios. Change-Id: I739044c2edd360535ce1d3531549263163cfea19 Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
2018-04-17Add listing security groups functionalityManuel Buil1-0/+27
JIRA: SNAPS-302 Be able to list the available security groups Change-Id: I82e2daeb388f4eb3bc8cbc5fd02006b30b959c2f Signed-off-by: Manuel Buil <mbuil@suse.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.spisarski8-77/+187
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-03-08Ensure the project for volumes are handled properly.spisarski2-8/+14
Although this patch has added the project_name member to VolumeConfig, it does not work properly due to a cinder bug https://bugs.launchpad.net/cinder/+bug/1641982. However, the code will now allow for volumes with the same name to be created on the same pod just as long as they do not exist within the same project/tenant. JIRA: SNAPS-270 Change-Id: Ia6f98e9b66793a69c0205d2d8e38bb3d03f3333e Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2018-02-28Ensure project for routers are handled properly.spisarski1-12/+23
Routers should be able to be created by admin users to other projects. Routers without admin users should only be able to create ones to their default project. JIRA: SNAPS-266 Change-Id: I5ecfbcc2ed94bbab211751da9521f3ec1d4ff66d Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2018-02-22Changed pattern on how objects lookup themselves by name and project.spisarski5-106/+132
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-20openstack: nova_utils_tests: Wait for volume detachmentMarkos Chandras1-6/+14
The 'test_add_remove_volum' is supposed to wait for volume attachment and detachments. However, the code for the latter was missing. Moreover, we remove some code that checks for attached volumes since that should never happen when detaching the volume. Change-Id: I9ed54a467062d0ddc4efeddf03af7ebe6173e789 Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-02-20openstack: nova_utils_tests: Increase timeout for API callsMarkos Chandras1-2/+2
Patch I2245adb84d0e6d4e3350d17d0c2e44baf5202d51 increased the timeout for the API calls to 2 minutes which was then somewhat reverted in Iea3aeab59c378917fbd175d673113e8d30e2e4b9. However, the problem still persists on slow systems and 30 seconds may not be enough to confirm a volume attachment to the VM. Change-Id: I860b2a797917e13772e95c5d756919e9792b63a6 Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-02-16Ensure project IDs are handled correctly for Network/Subnetsspisarski4-36/+61
JIRA: SNAPS-265 Change-Id: If58f5817e52e21be377d2b06a5f7c3a413454350 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2018-02-15Added functionality for OpenStackSecurityGroup#initialize() not to acceptspisarski1-13/+19
security groups with the same name from a different project JIRA: SNAPS-264 Change-Id: I7c905e5588d5e503b47ea0e9f5997be89e841aec Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2018-02-06Fixed timeout logic when attaching/detaching volumes.spisarski1-14/+96
The timeout logic in nova_utils.attach_volume() and detach_volume() was not correct which may have been the root cause behind the issue FUNCTEST-927. Timeout in both attach and detach is no longer optional. Also added a test to attach and detach without timeout as that path was never tested. Updated associated test documentation as well. JIRA: SNAPS-263 JIRA: FUNCTEST-927 Change-Id: Iea3aeab59c378917fbd175d673113e8d30e2e4b9 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2018-02-01Merge "openstack: nova_utils_tests: Use API timeout argument instead of sleep()"Steven Pisarski1-6/+2
2018-01-31openstack: nova_utils_tests: Use API timeout argument instead of sleep()Markos Chandras1-6/+2
On slow environments, time.sleep(10) is not enough for attach/detach API calls to propage properly leading to failures like the following one (reduced api_check test) 2018-01-31 18:53:19,297 - functest.ci.run_tests - INFO - Running test case 'api_check'... 2018-01-31 18:54:27,434 - functest.ci.run_tests - INFO - Test result: +-------------------+------------------+------------------+----------------+ | TEST CASE | PROJECT | DURATION | RESULT | +-------------------+------------------+------------------+----------------+ | api_check | functest | 01:07 | FAIL | +-------------------+------------------+------------------+----------------+ We can workaround this by using the nova_utils.{de,at}tach_volume} 'timeout' argument to wait up to 2 minutes for the attach/detach call to complete. This doesn't affect normal exception whilst it helps get the test going on slow systems. WIth this change, the api_check (reduced test) passes as follows: 2018-01-31 18:48:35,469 - functest.ci.run_tests - INFO - Running test case 'api_check'... 2018-01-31 18:50:56,705 - functest.ci.run_tests - INFO - Test result: +-------------------+------------------+------------------+----------------+ | TEST CASE | PROJECT | DURATION | RESULT | +-------------------+------------------+------------------+----------------+ | api_check | functest | 02:20 | PASS | +-------------------+------------------+------------------+----------------+ Change-Id: I2245adb84d0e6d4e3350d17d0c2e44baf5202d51 Signed-off-by: Markos Chandras <mchandras@suse.de>
2018-01-31Changed invalid gateway IP to ensure fails with all OSspisarski1-1/+1
configurations. Change-Id: I35374ea5fa79974c43c2a474e43ff275b26dfc02 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2018-01-29Avoid checking Keystone v3 domains when using API v2.0Georg Kunz1-2/+5
Introducing a version check to avoid checking keystone domains, which are an auth API v3 feature, when only auth API v2.0 is being used. Change-Id: I220c6637e5f65124e5dbe7d5246490c3986b7a66 Signed-off-by: Georg Kunz <georg.kunz@ericsson.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.spisarski3-10/+14
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-12-14Added utility function to retrieve the names of all hosts with a hypervisor.spisarski1-0/+10
Change-Id: I25b91c6eee78ebf35785c4884dded7c9ab2cc412 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-29Cluster template cleanupspisarski1-13/+1
Removal of negative tests where an invalid keypair is being configured. This test was not operating consistently between pods Update testing documentation Updated some invalid class names in pydoc Change-Id: I7a392e9ed993450de40a20457044ba8294d45044 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-11-28Added cluster template creator/state machine class.spisarski1-0/+14
Created class and tests for creating and managing cluster templates. JIRA: SNAPS-235 Change-Id: Ia91aef9507fc39d1814dce03169aab0b784721a6 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-11-27Expanded the tests for ClusterTypesspisarski1-7/+130
JIRA: SNAPS-233 Change-Id: Ibba9b7046b95b5523cde525c4a4ed971f463a19d Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-11-22Implemented the ability to create Magnum Cluster Type objects.spisarski1-1/+125
This patch is the second of several necessary for the addition of Magnum support. This one implements a create and delete function to magnum_utils.py as well as the necessary config and domain classes for sending and receiving Cluster Type data to OpenStack. JIRA: SNAPS-233 Change-Id: Iad1959b98eaabc4ef5f41b70a23f6b1306259650 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-11-21Refactoring of SecurityGroupSettings to extend SecurityGroupConfigspisarski2-26/+24
SecurityGroupSettings, SecurityGroupSettings and neutron_utils have a runtime cyclical dependency. This patch reduces this dependency and deprecates the SecurityGroupSettings and SecurityGroupRuleSettings class with snaps.config.security_group SecurityGroupConfig and SecurityGroupRuleConfg classes JIRA: SNAPS-224 Change-Id: I6cd82ed5be31f4a24449be767b203e86489b1962 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-11-20Refactoring of VmInstanceSettings to extend VmInstanceConfigspisarski3-12/+13
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 NetworkConfigspisarski4-54/+54
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 VolumeSettings to extend VolumeConfigspisarski3-6/+8
VolumeSettings and cinder_utils have a runtime cyclical dependency. This patch reduces this dependency and deprecates the VolumeSettings class. JIRA: SNAPS-227 Change-Id: I3f93702ff836af365c811d44bfd0e59b76c3f1f5 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-11-20Refactoring of VolumeTypeSettings to extend VolumeTypeConfigspisarski2-15/+15
This also includes VolumeTypeEncryptionSettings extending to VolumeTypeEncryptionConfig which is a member of VolumeTypeConfig VolumeTypeSettings and cinder_utils have a runtime cyclical dependency. This patch reduces this dependency and deprecates the VolumeTypeSettings class. JIRA: SNAPS-228 Change-Id: Iaa9c7a1cd810cf63d1badb00f71bcdcefb527e12 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-11-20Refactoring of QoSSettings to extend QoSConfigspisarski2-11/+11
QoSSettings and cinder_utils have a runtime cyclical dependency. This patch reduces this dependency and deprecates the QoSSettings class. JIRA: SNAPS-222 Change-Id: I6385717b78db413c496b15b8c4b76ffabe9797c1 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 UserSettings to extend UserConfigspisarski1-3/+3
UserSettings and keystone_utils have a runtime cyclical dependency. This patch reduces this dependency and deprecates the UserSettings class. JIRA: SNAPS-226 Change-Id: Ifcc2a029463780e963b1afcf1de31baf9edded40 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-11-20Refactoring of ProjectSettings to extend ProjectConfigspisarski1-3/+3
ProjectSettings and keystone_utils have a runtime cyclical dependency. This patch reduces this dependency and deprecates the ProjectSettings class. JIRA: SNAPS-221 Change-Id: I9e39f09fb8bb03dbd725f44b7256bacb05f26afc Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-11-20Refactoring of KeypairSettings to extend KeypairConfigspisarski2-3/+4
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 FlavorConfigspisarski3-14/+15
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 ImageConfigspisarski2-5/+5
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-16Minor copy/paste logging value fixes.spisarski1-1/+1
Change-Id: I729265575583eec7fb7adc1fc49c6d91c06ad603 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-09Initial patch to begin adding support for Magnum.spisarski1-0/+50
JIRA: SNAPS-212 Change-Id: I5f72fe9c28fe5cdd61546eee828becd034f8aff9 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-11-08Adding tests for IPv6.spisarski1-105/+284
Included in patch: 1. Refactor Network domain object to include Subnet objects 2. Removed subnet members from OpenStackNetwork 3. Added exhausive IPv6 tests to neutron_utils_tests.py 4. Added two IPv6 integration tests to create_network_tests.py 5. Added two tests where VM instances have ports with IPv6 addresses 6. Updated docs JIRA: SNAPS-178 Change-Id: Id3e5448cb431d2acf47029244fe6773f3f29d368 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.spisarski3-3/+80
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.spisarski2-17/+74
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>