summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2017-05-22Merge "Fixed error in ansible_utils_tests.py and added ansible helper method ↵Steven Pisarski3-8/+19
to the OpenStackVMInstance class."
2017-05-20Fix typo in setup.pyCédric Ollivier1-1/+1
It forbids gating in functest. Change-Id: I3f0b943678ee4af869073b56ca1235da23d98b1a Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-05-19Fixed error in ansible_utils_tests.py and added ansible helperspisarski3-8/+19
method to the OpenStackVMInstance class. Test error was due to the image configuration having the incorrect user applied. The helper method will make it easier for adhoc ansible playbooks to be applied to running instances. JIRA: SNAPS-83 Change-Id: I6b229e0adb836dd3d5ea7b468d38d93f880589a2 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-05-19Add the function of getting endpointLinda Wang2-7/+62
Functest is trying to leverage SNAPS-OO library to replace some utility functions, in which def get_endpoint is called by testcases onos, odl, multisite and cloudify_ims. JIRA: SNAPS-78 Change-Id: Icb2778e0337a5d4246762ac3037773b39d5d554d Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-05-17bugfix: get_security_group_by_id always return first elementMorgan Richomme2-22/+46
add check on id before return value fixed kwarg into the neutron.list_security_groups to the correct one 'id' added unit test to ensure this function always works as designed JIRA: SNAPS-82 Change-Id: I965e1dd54fd1efa8c2d7f6efb87c78ab24cca0e5 Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
2017-05-16Added support for offline testingspisarski18-391/+1174
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-05-16Ensure creators' constructors cannot raise exceptions.spisarski9-49/+56
While creating unit tests for vPing that is using SNAPS, exceptions can be raised when retrieving their respective OpenStack clients with incorrect credentials. Moved client retrieval to the create() method which one should expect exceptions to be raised. JIRA: SNAPS-81 Change-Id: Id8e4279f60b97704b25a89c6312dcf2ebdc3f459 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-05-08Merge "Restricted dependency of the novaclient."Steven Pisarski1-1/+1
2017-05-08Merge "Modified code to support both Python 2.7 and 3.x"Steven Pisarski29-685/+704
2017-05-08Fixed some redundant dict() key checks that can cause runtime errors.spisarski1-7/+7
Change-Id: I9d05e6cc69526b7424b65e171da1fa4e99e02149 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-05-08Modified code to support both Python 2.7 and 3.xspisarski29-685/+704
* Tested on Python 2.7.10 and 3.4.4 * Updated installation documentation JIRA: SNAPS-30 Change-Id: I94a37d218be8ea47bbbcfb560197737430fcb3ba Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-05-04Restricted dependency of the novaclient.spisarski1-1/+1
The 8.0.0 version is not backwards compatible with 7.1 JIRA: SNAPS-73 Change-Id: I76f52e0e1e212e1e4053ade6279b1117ab740cde Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-05-03Changed image metadata to support cirros, ubuntu, and centos.spisarski5-96/+114
The image metadata that was designed for multi-part form support did not take into account tests that require ubuntu or centos tests. JIRA: SNAPS-76 Change-Id: I95c7b74b8f7d7b78c3842b5e716fd7b466107c9c Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-05-03Merge "Refactored multi-part images."Steven Pisarski6-671/+387
2017-05-02Merge "Matching test_check_vm_ip_dhcp on ip only"Steven Pisarski1-8/+3
2017-05-02Matching test_check_vm_ip_dhcp on ip onlyDan Radez1-8/+3
No nee dto look for the string surrounding the ip that's being looked for in this test. simplifying the code to only look for the ip Change-Id: I80e6336c58573e5970eafe2608daf7c61e43b717 Signed-off-by: Dan Radez <dradez@redhat.com>
2017-04-27Merge "Fixed test for security groups when checking for project/tenant ID"Steven Pisarski1-3/+11
2017-04-27Refactored multi-part images.spisarski6-671/+387
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-27Fixed issue caused previous patch which did not merge correctly.spisarski1-4/+2
JIRA: SNAPS-57 Change-Id: I60e7cf2fea37fc337ac7adc01283476a00aca99c Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-04-26Fixed the Glance connection test routines.spisarski1-5/+6
test_glance_connect_success gave a false positive and test_glance_connect_fail gave a false negative. Both were calling incorrect APIs due to copying from the equivalent nova_utils.py test. JIRA: SNAPS-57 Change-Id: I1246d535f8bd376c163315dc889ff5bacebb12ec Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-04-26Fixed test for security groups when checking for project/tenant IDspisarski1-3/+11
This problem has only been observed on the WindRiver pod during the OPNFV Plug/Hackfest JIRA: SNAPS-72 Change-Id: I59f4c10129007efe11cce7272b6690125057e266 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-04-26Added support for Glance v2spisarski14-101/+369
Updated copyright date on new and edited files to current year. JIRA: SNAPS-66 Change-Id: I491157d6ced8bd9322f99272fc14e00168faaf29 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-04-14Merge "Run all test suites when none chosen."Steven Pisarski1-4/+11
2017-04-13Run all test suites when none chosen.spisarski1-4/+11
Changed the test_runner.py to run all four suites of tests when none have been chosen. JIRA: SNAPS-10 Change-Id: I9f8f543f9aca07d01911bd8812478bf470673575 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-04-13Ensuring each port manipulation test waits for the instance to become activespisarski2-5/+6
The problem with OpenStack is that when one attempts to delete an instance that is still spawning, it can take an inordinate amount of time for OpenStack to complete the request resulting in artifacts being left. JIRA: SNAPS-64 Change-Id: I39f33291e650c00a8b5a40cb0051b99b71923acf Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-04-12Refactored SNAPS tests to take in the actual OSCreds object.spisarski3-160/+146
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-04-12Merge "Renamed test application and added new command line arguments."Randy Levensalor2-35/+67
2017-04-12Renamed test application and added new command line arguments.spisarski2-35/+67
JIRA: SNAPS-10 Change-Id: I809a93f67ee0931df9601a0095775fe6303bbfbb Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-04-11Merge "Fixed two tests that never had their networks removed on tearDown()"Randy Levensalor1-4/+10
2017-04-11Fixed two tests that never had their networks removed on tearDown()spisarski1-4/+10
JIRA: SNAPS-56 Change-Id: I43d47f59f5b15805dce425f148ec5c990055ca73 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-04-10Problem found while working on FUNCTEST-577 where instances withspisarski1-1/+5
security groups need to be active before application. JIRA: FUNCTEST-577 Change-Id: I0d31b6afe4a378b3be85b335ba5f1568a0b26708 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-04-10Merge "Check for kernel_url and ramdisk_url keys in dict"Steven Pisarski3-76/+90
2017-04-06Call to ansible_utils.apply_playbook needed named paramteters.spisarski1-2/+3
Change-Id: I4454a0598df4e630a4588f7c0d4af108e8747a46 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-03-29Fixed cleanup after failed deployrandyl1-6/+11
Added exception handling when performing a cleanup after a failed deploy. This is a temporay fix, that will not impact FuncTest. Router and network clean calls will eventually need to be updated. JIRA : SNAPS-55 Change-Id: I24d79802f02357015ada20726e170dd5128754f1 Signed-off-by: randyl <r.levensalor@cablelabs.com>
2017-03-29Correcting minor issues with the documentationrandyl4-23/+20
Correcting some formatting and minor content changes. Change-Id: Idf75e8c6985bae9a2df26c54c559a20d46b6ac1f Signed-off-by: randyl <r.levensalor@cablelabs.com>
2017-03-23Check for kernel_url and ramdisk_url keys in dictCatalina Focsa3-76/+90
Need to check if the above keys exist in image_metadata before checking for their assigned values in case they are not declared (e.g. obsolete when creating a one part image) Change-Id: I22fa259b320a425d6ad030eeb9bf68b4c06b667f Signed-off-by: Catalina Focsa <catalina.focsa@enea.com>
2017-03-10Merge "Add DEBUG logs to SimpleHealthCheck for VM console output."Steven Pisarski1-19/+45
2017-03-10Add DEBUG logs to SimpleHealthCheck for VM console output.spisarski1-19/+45
The test in the class SimpleHealthCheck uses the console output to determine whether or not the VM obtains a DHCP lease which contains a very image-specific check. When a client changes the image from what the test was designed for, the console output can change causing the test to fail unless it is simply timing out. This patch will output the full console log on failure or on success when the logger is configured as DEBUG. JIRA: SNAPS-47 Change-Id: I2041ca1aed8bd1e2fb65932591f4acbd4d3cd720 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-03-10reduce instance's memory sizeSerenaFeng1-7/+7
when using snaps to test small OpenStack env(devstack or all-in-one), testcase will fail due to not enough memory for a vm. As a basic test using cirros, only allocating ip and test the connectivity is needed, 128M should be enough. the error msg is: File "/usr/local/lib/python2.7/dist-packages/novaclient/client.py", line 80, in request raise exceptions.from_response(resp, body, url, method) ClientException: Unknown Error (HTTP 504) Change-Id: Ibfb27018ffd25292bcf80f69e8cb205b2c9c334b Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-03-08Merge "Adapt integration tests to use custom image config"Steven Pisarski4-113/+450
2017-03-08Adapt integration tests to use custom image configCristina Pauna4-113/+450
This fix uses the possibility to pass custom imformation about the image via image_metadata variable. In the integration tests 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/29987 Change-Id: Ib2ad823705dbea68d672514c7c89b150c9c6dc63 Signed-off-by: Cristina Pauna <cristina.pauna@enea.com>
2017-03-06Add check that SSH validate returns truerandyl1-2/+2
The SSH Validate call needs to be checked before passing tests. test_ssh_client_fip_before_active and test_ssh_client_fip_after_active run the SSH Verify function, but do not check the return value. You will see an error in the test log file, but the test will appear to have passed. JIRA: SNAPS-45 Added an Assert True test to the SSH Validate return. Change-Id: Ib86ec38c7b5a64061a1ace4293336e3021c59013 Signed-off-by: randyl <r.levensalor@cablelabs.com>
2017-03-06Adapt simple health check to use 3-part imageCristina Pauna3-19/+43
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-06Merge "Added the ability to give the tests the ability to add in flavor ↵Steven Pisarski7-55/+84
metadata."
2017-03-06Added the ability to give the tests the ability to add in flavor metadata.spisarski7-55/+84
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-03-03Fixed docs build and examplesrandyl11-93/+598
Modified index.rst to include the other docs. Removed redundnat items. Cleaned up the examples. JIRA: SNAPS-41 Change-Id: I7058f1604135f6a2af0376d7b3d2ebc7bafd63e7 Signed-off-by: randyl <r.levensalor@cablelabs.com>
2017-03-03Removed test class in question from the test builder.spisarski1-2/+14
test_suite_builder#add_openstack_integration_tests() which is being used to add SNAPS-OO tests to Functest.snaps_smoke test case. JIRA: SNAPS-39 Change-Id: Ib9d7fea3a132ac29078ce052b5e334c7e5076b61 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-03-01Added new 3-part image tests to test_suite_builder.py and documented themspisarski2-2/+30
in IntegrationTests.rst. JIRA: SNAPS-32 Change-Id: I20b3917840b5caf26f1a12caf0231f5f0801999d Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-03-01Merge "Add support for extra properties in an image"Steven Pisarski5-16/+330
2017-03-01Add support for extra properties in an imageCristina Pauna5-16/+330
This patch adds a new setting for images, extra_properties. This field is a dict and can be used to create a 3-part image by setting the kernel_id and the ramdisk_id of the main image. Unit tests have been added to set some generic property, for creation of the 3-part image, and for creating an instance with that 3-part image JIRA: SNAPS-32 Change-Id: Ifb53d1da1085fcd6429ddc0607c905522db5e8bb Signed-off-by: Cristina Pauna <cristina.pauna@enea.com>