summaryrefslogtreecommitdiffstats
path: root/snaps/openstack/tests/os_source_file_test.py
AgeCommit message (Collapse)AuthorFilesLines
2018-04-18Add flavor metadata for volume related testsMichael Polenchuk1-6/+10
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-12Fixed bug when use_keystone parameter is False.spisarski1-7/+3
When false, the self.keystone member is None and now it is being used in many more places with some of the other changes during the Fraser release JIRA: SNAPS-299 Change-Id: I752afb127287036a16f3c9b00e6feae9cab80143 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2018-03-12Closing keystone sessions after done with them.spisarski1-1/+21
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-07Updated stack tests to only use an admin user when necessary.spisarski1-5/+8
Changed super test class OSIntegrationTestCase to allow subclasses to set the user roles when required. For all heat stack test, the user role will always be 'heat_stack_owner'. 'admin' will be used for tests requiring this role (i.e. heat template creates flavors) JIRA: SNAPS-268 Change-Id: I0ec01cfea6297547a6a158eec8e5c69af6d6c7d7 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2018-02-22Changed pattern on how objects lookup themselves by name and project.spisarski1-7/+1
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-1/+2
JIRA: SNAPS-265 Change-Id: If58f5817e52e21be377d2b06a5f7c3a413454350 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2018-02-15Added functionality for OpenStackSecurityGroup#initialize() not to acceptspisarski1-0/+4
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-01-02Configure physical_network when creating networkLinda Wang1-3/+8
When the network_type is vlan, configuring physical_network and segmentation_id should be supported by snaps. Here only testcase test_check_vm_ip_dhcp is changed, which is consumed by functest. JIRA: SNAPS-252 Change-Id: I12ae12f62f73f2ae66fe7ee12a49abf0394669cd Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-11-20Refactoring of UserSettings to extend UserConfigspisarski1-2/+2
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-6/+2
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-08-07Add domain name when creating projects and usersLinda Wang1-3/+6
Change-Id: Id06e20e3c87072531930130db66763f554b4649c Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-07-24Fixed problems when setting the OpenStack project ID.spisarski1-1/+2
There were several calls to retrieve the project ID that required named parameters which was causing the utility function to always return None. Additionally, when creating the dict() required by the Neutron create API 'body' parameter key 'project_id' is not supported and still uses 'tenant_id'. As these problems should have been found earlier, this patch also extends the tests for networks, subnets, ports, and security groups to use 'tenant_id' rather than 'project_id'. JIRA: SNAPS-143 Change-Id: Ic69e56145ea6070718d821edd22a1d0f9970995d 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-07-11Added ability to add a user to a role.spisarski1-38/+59
This functionality was requested as the SNAPS-OO integration tests currently have the ability to run these tests in custom projects with custom users and certain OpenStack installations are not allowing some of the integration tests functions unless the new user has been added to the 'admin' role. Change-Id: I255cfa089a14bbcb434a6cd33b2a1dfae66206b5 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-06-07Removed current working directory logic retrieving test file resources.spisarski1-1/+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-05-16Added support for offline testingspisarski1-5/+9
Expanded the image_metadata used by the tests for overriding default images for not only supporting 3part images but also to support offline testing as required by Functest. JIRA: SNAPS-67 Change-Id: I6975e7b51fa879fe984af64402939c465df95184 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-04-27Refactored multi-part images.spisarski1-5/+8
The logic used for creating multi-part images for the Danube release was copied all throughout the tests, which was not sustainable. This patch encapsulates the kernel and ramdisk images within the same OpenStackImage object as the disk image. JIRA: SNAPS-59 Change-Id: I45ec0ccc666accb4e768c41e249e6130dc07f6d1 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-04-12Refactored SNAPS tests to take in the actual OSCreds object.spisarski1-25/+36
The code previously had individual parameters for different aspects of the credentials. This change not only makes the method calls easier, but it also helps the logs from becoming too verbose as each test case was instantiating its own OSCreds instance. JIRA: SNAPS-23 Change-Id: I8860e7329b9ec59d78e5977af74f4d3073496f24 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-03-06Adapt simple health check to use 3-part imageCristina Pauna1-3/+5
This fix adds the possibility to pass custom imformation about the image via image_metadata variable. In SimpleHealthcheck it checks for this info and creates a 3-part image if the kernel_url and ramdisk_url are set. The fix also allows the default url to be overriden as well as passing extra-properties. All the metadata info comes from the app. The part in functest where the custom config is set for creating a 3-part image is https://gerrit.opnfv.org/gerrit/#/c/29851/ JIRA: ARMBAND-222 Change-Id: I11435d8bab4cf097b4079b6984741869f83aee2b Signed-off-by: Cristina Pauna <cristina.pauna@enea.com>
2017-03-06Added the ability to give the tests the ability to add in flavor metadata.spisarski1-6/+8
NFVI's configured for OVS/DPDK and fd.io scenarios required special metadata for flavors in order for VM instances to be activated. This patch allows for setting a value to be applied to all tests. With this change, the default value is being removed that only partially addressed this issue. JIRA: SNAPS-38 Change-Id: Ic42944a849f710f631fe7ac6fbefb720a73f0b77 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-02-15Initial patch with all code from CableLabs repository.spisarski1-0/+131
Change-Id: I70a2778718c5e7f21fd14e4ad28c9269d3761cc7 Signed-off-by: spisarski <s.pisarski@cablelabs.com>