aboutsummaryrefslogtreecommitdiffstats
path: root/utils
AgeCommit message (Collapse)AuthorFilesLines
2016-07-28Add region name to OpenStack credentialsDimitri Mazmanov1-0/+4
Currently functest doesn't account for regions when it tries to instantieate OpenStack clients. As a result, the code fails when functest is used in a multi-region environment. The fix forces functest account for region name. Signed-off-by: Dimitri Mazmanov <dimitri.mazmanov@ericsson.com> Change-Id: Iebbd20042548c02da9d5ed7e58a454347a555778
2016-07-28Add endpoint type support on functestboucherv1-6/+31
By default public endpoint was used but now you can use internal or admin JIRA: FUNCTEST-387 Change-Id: If1adaa88248d379ad6d74b20f2dffd76278b67b9 Signed-off-by: boucherv <valentin.boucher@orange.com>
2016-07-27Make openstack_clean be aware of the names and not only the IDsjose.lausuch1-8/+16
Sometimes, when using the same container for a different deployment, the IDs of the openstack resources are different but the names are the same. This will avoid cleaning for example the user 'admin' regardless of the ID it has. JIRA: FUNCTEST-383 Change-Id: If27603f8f6d0cb7ad0aeba6e3c89ca19e2b8aed2 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-07-22Fix execute_command function to show all the outputjose.lausuch1-8/+6
This function wasn't showing anything for some commands, like 'rally show images' and 'rally show flavors' JIRA: FUNCTEST-348 Change-Id: I75bf5f3504ea8ffea42c2fb237d6863c655259e1 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-07-20Remove logger as input parameter of functions in openstack_utilsjose.lausuch1-7/+5
JIRA: FUNCTEST-376 Also some fixes to get rid of flake8 violations in onos-sfc Change-Id: I52c2fd30a6b81af20ea779db2d73b9386524f7ce Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-07-19Add logger to openstack_utils to output error messagesjose.lausuch1-92/+109
This will help to see the exception error when something fails JIRA: FUNCTEST-376 Change-Id: Ibaa6954fc63af00d552ac32b3cf903b9218200d1 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-07-19Show real time tempest test executionjose.lausuch1-1/+2
JIRA: FUNCTEST-375 Change-Id: I4f0cb68639b927f2980389d9331ec260605c8caf Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-07-18Don't take openstack snapshot when "-n" option is setjose.lausuch1-10/+10
JIRA: FUNCTEST-236 Change-Id: I37bfa4ebe88a8cf02f2cddc8fc4cce70ad87b775 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-07-14Use common way to get the openstack clientsjose.lausuch3-48/+21
Instead of repeating the code in all the scripts and importing the openstack libraries, the clients shall be given by openstack utils, which is its purpose JIRA: FUNCTEST-163 Change-Id: I1ccc05a3af44ee1ab5938ea9e4e01dbe55f4816d Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-07-12Chmod 755 all py files which can be executedCédric Ollivier2-0/+0
All files where __main__ is checked can now be executed by everyone. It results from [1]. [1] find . -name "*.py" |xargs grep __main__ |cut -d\: -f 1 |xargs chmod 755 Change-Id: I9ad153cfdde0447213e35dac102e668d9e754cf9 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2016-07-11Add fixed_ip and files parameters in openstack_utils in create_instancejose.lausuch1-10/+20
This is needed i.e. for sdnvpn test case Change-Id: I235a6871a86b7a0c4a9ab27a3aef4bfd62ba4d43 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-07-08Add delete bgpvpn function in openstack utilsjose.lausuch1-0/+5
JIRA: FUNCTEST-99 Change-Id: I0d28e5d07c857f4e80d7cf96a2ff4dbf87075abe Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-07-07Fix function get_hypervisors in openstack utilsjose.lausuch1-1/+2
JIRA: FUNCTEST-99 Change-Id: I23fd3fae08255d36ec158e5a522640615b5d8a10 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-07-07Added 'vacation' test casevitikkan1-0/+52
Running this test case illustrates how Functest code base and performance tend to grow when trying to catch more and more bugs in OPNFV environment. The case is not bound to any tier. Change-Id: Ib3c2f3f3d9d78c1251fbb35e6ea6afd3cf1afbdb Signed-off-by: vitikkan <viktor.tikkanen@nokia.com>
2016-07-07[SDNVPN] Bugfix bgpvpn functions in openstack utilsjose.lausuch1-5/+4
JIRA: FUNCTEST-99 Change-Id: Ia3fd91ec1dff5283edc3df098bb5cec342f87aea Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-07-07[SDNVPN] Add helper functions to create bgpvpn and associationsNikolas Hermanns1-0/+19
JIRA: FUNCTEST-99 These functions are used by sdnvpn test cases to create vpns and network associations Change-Id: I2fb25c84d8d02ea1cc92677e6a33e469a5d3ddc3 Signed-off-by: Nikolas Hermanns <nikolas.hermanns@ericsson.com>
2016-07-06Add support functions for SDNVPN test casesjose.lausuch1-5/+22
JIRA: FUNCTEST-99 Get availability zones from nova client and give the possibility to create an instance on a specific hypervisor (availability zone) Change-Id: Ieb2d26764c50ea4f4403818bb73a238236e03ee4 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-07-04Add example script creating an instancejose.lausuch1-22/+81
This is to be used by feature projects or newcomers to functest. SFC or BGPVPN test cases can be based on this one. The script creates an instance and assigns a floating IP to it. Change-Id: If35495631031187bfb5382ba8c0a8884dfaa3d7f Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com> Depends-On: Ie10d55872bc8c5a404b0d0156ee49a9d94482008
2016-07-04Add openstack clients and create instance in openstack_utilsjose.lausuch2-7/+89
JIRA: FUNCTEST-346 Change-Id: Ie10d55872bc8c5a404b0d0156ee49a9d94482008 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-07-04Change OpenStack clean behaviourjose.lausuch3-52/+80
JIRA: FUNCTEST-236 The openstack snapshot generation is now triggered before running a test case and removed from prepare_env Change-Id: I4d1bc95dedd7f59d4b1d5866f288e1c1a70ec69e Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-06-16Remove default values if the os credentials are not setjose.lausuch1-5/+12
If the creds are not sourced, then exit. Change-Id: I55c9cd3a5a0885b81df4ce14502ba816546bcbaa Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-06-13Fix bug: use right format for date when pushing to DBMorgan Richomme1-2/+5
JIRA: FUNCTEST-303 Change-Id: I53e7c8f963ef0fa248d76e0d1c5f04326a750dcc Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
2016-06-08Adapt functest testcase to APi refactoringMorgan Richomme1-6/+24
JIRA: FUNCTEST-303 Change-Id: Ia276d9ca6e8d62b496c3b5f81561b14b02c43fd7 Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
2016-06-02Merge "Add criteria in testcases.yaml and Test class"Morgan Richomme1-0/+18
2016-06-01Fix duplicated output when using the functest loggerjose.lausuch1-0/+1
JIRA: FUNCTEST-275 Change-Id: I49c66521652b31d5bb398ea4013ac061f320d725 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-06-01Add criteria in testcases.yaml and Test classjose.lausuch1-0/+18
JIRA: FUNCTEST-257 Added example of usage in vping_ssh Change-Id: Iac143b811db163f0f86682b0688948c20843ede5 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-05-31Avoid tuples when printing multiple stringsCédric Ollivier2-29/+29
It fixes bugs induced by [1]. [1] https://gerrit.opnfv.org/gerrit/#/c/12623 Change-Id: I0232b14bed767b3ff857192146551a7963699bb9 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2016-05-19Preserving Nova instances from os_defaults.yamlvitikkan1-12/+18
Previously clean_openstack deleted all the existing instances even if they were included into os_defaults.yaml. Change-Id: Id7c17ec86a5616c44bd2965844a4a8545054358b Signed-off-by: vitikkan <viktor.tikkanen@nokia.com>
2016-05-16BGPVPN test case refactoredvitikkan1-0/+26
BGPVPN test case is refactored and moved into bgpvpn.py module. JIRA: FUNCTEST-234 Change-Id: Ib0dd6e11f3c568470d9c3837ca192da767c64843 Signed-off-by: vitikkan <viktor.tikkanen@nokia.com>
2016-05-10Merge "CLI implementation"jose.lausuch2-47/+48
2016-05-09CLI implementationjose.lausuch2-47/+48
JIRA: FUNCTEST-243 Change-Id: Ibf0ef9bcc5f3aeda96b050827b954ce060317613 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-05-09Generic Function to create a private networkjose.lausuch1-0/+56
This is to be used by all the tests which need a private network to work, for example Tempest, Rally, vPing, ssh.. Added example for vPing and promise scripts. Change-Id: I5d79e7b60b81b0f34230ea3ef2f3076697a1958c Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-05-05Don't exit on error when destroying rally deploymentjose.lausuch1-13/+28
Also, some improvements in execute_command function Change-Id: I8271d55202b8859701275d5f7322a7bd4894e475 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-05-04Refactor, add logger handler to collect all the logs to a file as welljose.lausuch2-122/+27
JIRA: FUNCTEST-190 Also: - remove old code that are not used any more - improve execute_command function - fix logger output for run_tempest Change-Id: Ib268738ada1b9de2a418ef01e684a90e6f4e02ed Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-05-04Refactor improvementsjose.lausuch3-5/+6
JIRA: FUNCTEST-190 - Deleted unnecessary old scripts - Fixed healtcheck logging - Moved config_functest.yaml to /ci/ - Created env var CONFIG_FUNCTEST_YAML pointing to that new location - Modified all scripts which open config_functest.yaml using the new env var Change-Id: Ic4f0e40a70c02ac08287a1d621956f602bdee177 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-05-02Enhance output when showing tiers and testcases infojose.lausuch1-0/+0
JIRA: FUNCTEST-190 Change-Id: I43e26700ee3c92be64d79243c6762a3ccd5d42d3 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-04-28Create run_test.py using the tier mechanism to run the testsjose.lausuch2-75/+53
JIRA: FUNCTEST-227 JIRA: FUNCTEST-190 Change-Id: I5445ad36ec65e62d48c8f5b16352caea2e51e3c9 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-04-27Create prepare_env.py from prepare_env.sh and config_functest.pyjose.lausuch4-3/+640
JIRA: FUNCTEST-227 Change-Id: I1aa890b9f91ec524c766ba3c460666ed227f2126 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-04-26Move functest_utils and openstack_utils to directory /utilsjose.lausuch2-0/+1085
JIRA: FUNCTEST-226 Change-Id: I74d09f6322844b25ab45a02156317ae76ab40d8a Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-04-26Add Functest Logger centralized Classjose.lausuch2-0/+49
JIRA: FUNCTEST-228 This is to be used by all the scripts using logging mechanisms. Usage: import functest_logger as fl logger = fl.Logger("<script_name>").getLogger() # treat it as a normal logger object, as before: logger.info("message to be shown with - INFO - ") logger.debug("message to be shown with - DEBUG -") Change-Id: I94e248523bc9bc148c9d171c978804b5d1865dd9 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>