aboutsummaryrefslogtreecommitdiffstats
path: root/functest/utils
AgeCommit message (Collapse)AuthorFilesLines
2018-05-05Implement get_external_network via shadeCédric Ollivier1-0/+19
It fixes the current issues as EXTERNAL_NETWORK is mainly unset by all Installers [1]. [1] https://build.opnfv.org/ci/view/functest/job/functest-fuel-armband-baremetal-arm-daily-fraser/31/console Change-Id: I8ee62623701c15b9ff962d0a0e07a77934ff03ac Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-03-07Add a new env var for nameserverLinda Wang1-1/+2
We should still consider that the nameserver must be handled by all installers instead [1]: - by configuring one or more DNS resolvers in dhcp_agent.ini - by asking a local resolv It eases setting the nameserver in testcases and then allows gating them. 8.8.8.8 is still defined by default. [1] https://docs.openstack.org/neutron/pike/admin/config-dns-res.html Co-Authored-By: Cédric Ollivier <cedric.ollivier@orange.com> Change-Id: Id58dd5ebee612a0fce2ebc40f089769e60899416 Signed-off-by: Linda Wang <wangwulin@huawei.com> Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-03-07Define a new env var for volume device nameCédric Ollivier1-1/+2
It eases modifying the volume device name written in tempest config. Fuel jobs should be adapted to set the right value (vdc) which differs from default (vdb). Change-Id: I09212018f94daa800ede815bd3586cceed0d54e7 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-03-02Leverage on XtestingCédric Ollivier3-67/+12
It removes all the files which have moved to Xtesting. Vnf inheritances and env management will be improved in other changes. It keeps the same tree thanks to a symlink to allow publishing artifacts. Change-Id: I551bbd3f344cdab0158a50b7b09e541576695631 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-26Remove obsolete Functest utilsCédric Ollivier1-98/+0
Only 3 functions are kept as part of our framework: - execute_command_raise() - execute_command() - get_parameter_from_yaml() Change-Id: I966a1d6122391dae85aa3c77813ad2f1698ceb45 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-26Remove openstack utilsCédric Ollivier1-1486/+0
They have been obsolete since we fully switched to snaps. The files are being moved to SDNVPN which is the last project using them [1]. [1] https://gerrit.opnfv.org/gerrit/#/c/52631/ Change-Id: I277b92a04cf6bc7b30015eed76f03f17830fad2b Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-24Set Energy default values to NoneCédric Ollivier1-2/+2
It conforms with the other default values. Change-Id: Id46110c5aedf244f94e83b5b0389b135f075ffc8 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-24Print env vars and env_fileCédric Ollivier1-0/+11
It simply eases detecting wrong inputs [1]. [1] https://build.opnfv.org/ci/view/functest/job/functest-apex-baremetal-daily-master/796/console Change-Id: I0784c29265c69a6ba4a049226196bcdd70b0a572 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-22Switch from CONST to CONFCédric Ollivier3-35/+2
It also removes constants.CONST and env.Environment which are now useless. Depends-On: I764a0a2a24447c941d1e726f3116593b29dd1c1e Depends-On: I6cfa832466dcefd737314633d807512e46267a69 Change-Id: Ife41c59d9f2e6ec4e49df38af962039f99554bc5 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-22Use constants for Functest config fileCédric Ollivier2-4/+10
env_file can't be defined in a config file simply because it's an entry point (Jenkins jobs, end users) Change-Id: Ie23c0ef90efc839d60f0f3a9754c58746b1f3a00 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-19Remove last CONST.__getattribute__()Cédric Ollivier1-3/+2
Change-Id: I82f6aa1e723c88eebd4c7410da4b9741a482e9bc Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-16Get properly env vars or their default valuesCédric Ollivier5-42/+48
It defines env.get() as an unique way to get Functest env vars or their default values. It can be considered as a wrapper above os.environ. It enforces backward compatibility via CONST which mustn't be used for that purpose. It should be noted that it also stops using CONST for getting OpenStack env vars. Change-Id: I333dc1afbc0123166a7eaff8b551370098efa341 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-13Remove INSTALLER_IP from FunctestCédric Ollivier1-1/+0
It's mandatory for testcases which are out of Functest. Change-Id: Ia5f5134334ad9f69d44409d817616fa9033fae95 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-13Remove obsolote env var IS_CI_RUNCédric Ollivier1-7/+0
Change-Id: I284e0ec97792620db08005a617f584b81a1eae63 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-13Improve the way of setting values in CONSTLinda Wang2-3/+3
Use setattr instead of internal method (__setattr__). It must be completed by patches fixing [1] [2] and [3]. [1] https://jira.opnfv.org/browse/FUNCTEST-930 [2] https://jira.opnfv.org/browse/FUNCTEST-931 [3] https://jira.opnfv.org/browse/FUNCTEST-932 Change-Id: I9558f33f5ed4559b6031d75951d5637c0c0ef8cb Signed-off-by: Linda Wang <wangwulin@huawei.com>
2018-02-13Simplify functest/cli/commands/cli_env.pyCédric Ollivier1-1/+0
CONST shouldn't be used for getting/setting env vars. It adds complexity and may raise side effects. It also removes the obsolete env var CI_DEBUG. Change-Id: I8a8fde0fa781351d5eabd2698ca8aae9dee76fb8 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-12Export env vars via os.environ in test_openstack_utils.pyCédric Ollivier1-1/+1
CONST shouldn't be used for getting/setting env vars. It adds complexity and may raise side effects. Change-Id: I8319748dd2f0abb95b82a2f65191cac8ccba7f5e Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-09Move get_dict_by_test() into run_tests.pyCédric Ollivier1-23/+0
It also removes functest_utils.get_criteria_by_test() Change-Id: I3f265642acd053755e32f8e92f1086b93517c247 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-08Move source_credentials() into run_tests.pyCédric Ollivier1-16/+0
It's also renamed source_envfile(). Change-Id: I0e7c38c2def125961f86dc2bc9a63cfb6ad87c03 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-01-31Merge "proper instance status handling"Juha Kosonen1-1/+4
2018-01-26Fix pylint errors in several utils modulesCédric Ollivier3-53/+45
All utils which are moving to xtesting are now fixed. It remains OpenStack and Functest utils (+ the related unit tests) which doesn't move to the new package. Change-Id: If13c627c8444c62d5c6bf9c8057d6413aa0e56c7 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-01-26Fix last Pylint error in FunctestCédric Ollivier1-30/+32
It also fixes all pylint warnings in router and the related unit tests. tox.ini is updated to ensure that no error is introduced. Change-Id: Iddd74b0dac7b6581d72b04369140006c9e19f998 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-01-26proper instance status handlingPeriyasamy Palanisamy1-1/+4
This would fix the exception happening in the SDNVPN CI testsuite. Example: http://artifacts.opnfv.org/logs/functest/lf-pod1/2018-01-21_17-18-06/bgpvpn.log Change-Id: Ie22dcdbba5299177d4e98e5995433553df5bfa68 Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@ericsson.com>
2018-01-24Delete functest_vacation.pyCédric Ollivier1-53/+0
Change-Id: Id0e2769a1989e6778ae41f67ed634e2e5002a83d Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-01-21Move push_results_to_db to TestCaseCédric Ollivier1-101/+0
It removes the link between TestCase and Functest utils (xtesting). It should be noted that testresults url can only be set by env var. Co-Authored-By: Cédric Ollivier <cedric.ollivier@orange.com> Change-Id: Ie072c675890d0ae2e63619c599d2684a8c7d762d Signed-off-by: Jose Lausuch <jalausuch@suse.com> Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-01-16Update set of region identity attributSamuel Bartel1-1/+2
Use OS_REGION_NAME environment variable if defined Change-Id: Ifcdfc468fa4931ab62ac0f3ead103e15af7c0de6 Signed-off-by: Samuel Bartel <samuel.bartel@orange.com>
2017-12-21Merge "Remove logger_test_results"Cedric Ollivier1-33/+0
2017-12-20Remove logger_test_resultsCédric Ollivier1-33/+0
It was only called in Feature which the result is already printed (see __str__()). It also eases moving Feature to xtesting as it breaks the link to functest_utils. Change-Id: Ib72d651dc7d89598704ff4d52d8b1ecb2bdade5b Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-12-19Remove openstack_[clean,snapshot]Cédric Ollivier2-597/+0
It also removes the related unit tests and updates docs and cli. Change-Id: Ie11f77402f2b5b7055a0c7c5d931c8ff21124482 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-12-15Inject all envs in openrc into CONSTLinda Wang1-0/+1
After "env_prepare" is removed, some specific vars in openrc (eg,."EXTERNAL_NETWORK") loaded to os.environ should be injected into CONST in one python process. Change-Id: Iaa5c6047033dc2a30c533174e2016111759aec31 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-12-12All patching config files in memoryLinda Wang2-19/+43
It adds the yaml content as Config attribute and allow patching it without modifying the file (and reimport constants or config). It also removes obsolete data in config_patch.yaml and moves several functions in the right modules (Config) JIRA: ARMBAND-334 Co-Authored-By: Cédric Ollivier <cedric.ollivier@orange.com> Change-Id: I5c9a574d3283828063154c977cdfbc2abfdc6777 Signed-off-by: Linda Wang <wangwulin@huawei.com> Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-12-12Add python3 for Functest utilsCédric Ollivier1-3/+3
It also fixes test_utils RegexMatch and SubstrMatch. Change-Id: I124aa7d0c4110dcd2f50220aae7ba9b299799e93 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-11-30Stop updating test_db_url in config file by env varLinda Wang1-1/+4
If TEST_DB_URL is declared in env variable, use it before considering the var in config file. Change-Id: I656ad8765287c48d60af7ab88b421805d76fb231 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-11-23Merge "Remove openstack utils calls in rally and tempest"Cedric Ollivier1-43/+0
2017-11-23Remove _set_others() from configJose Lausuch1-3/+0
Change-Id: I39e37ce9f8715e21fcfc4a053b83d508530fad5e Signed-off-by: Jose Lausuch <jalausuch@suse.com>
2017-11-23Remove openstack utils calls in rally and tempestLinda Wang1-43/+0
Mainly, update "rally deployment create --file=rally_conf.json" to "rally deployment create --fromenv" Change-Id: I6dd4c7ea2d9d6f47dee49a4fd416e62bd557f45e Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-11-22Remove prepare_envJose Lausuch1-3/+1
After moving the rally installation out of prepare_env It doesn't much sense to keep this script as it doesn't do useful things any more. Change-Id: I9ab3b2dd30c8ec0fbb825ee4302a83cce80f1cbe Signed-off-by: Jose Lausuch <jalausuch@suse.com>
2017-11-02Adopt new config schema for rally 0.10Linda Wang1-1/+2
The new config schema is used by Rally 0.10: https://raw.githubusercontent.com/openstack/rally/master/samples/deployments/existing-keystone-v3.json JIRA: FUNCTEST-883 Change-Id: I67c0081e23d7a763934ef2f8ce09f122c33af902 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-09-11Remove volume type handlingJuha Kosonen1-33/+0
Rally scenarios don't require volume type to exist as a precondition. Change-Id: Id735346e062af084635fd8f76f3686005b9b8add Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
2017-09-07Remove redundant tempest cleanup utilityLinda Wang2-63/+4
All the resources including the project, user, network, images and flavors to enable tempest running, are created by snaps-OO, which will definitely clean up those finally. Change-Id: Iea3e3f275cc6cfd2cee421fcafef90aaf2e6cf3e Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-09-01Add UEFI support in functestCatalina Focsa1-5/+15
Add extra properties to the cirros image for ARM architecture. In the glanceclient repository, the create method expects **kwargs as parameters, thus an extra_properties variable containing a dictionary of property-value pairs can be added (if given) to the image to be created. If the properties do not appear, the call should not affect the image properties because the dictionary is initialized as empty. Change-Id: I690da90e6c6f250bd0a3d99cce39aa250e19b9c2 Signed-off-by: Catalina Focsa <catalina.focsa@enea.com>
2017-09-01Merge "Remove tacker library from functest"Morgan Richomme1-317/+0
2017-09-01Remove tacker library from functestManuel Buil1-317/+0
This library is moved to the SFC repo https://gerrit.opnfv.org/gerrit/#/c/40265/2 Change-Id: I339337e4c2f17933a74bf85259e36f8f5742a17a Signed-off-by: Manuel Buil <mbuil@suse.com>
2017-08-29Remove get_installer_typeLinda Wang1-13/+0
JIRA: FUNCTEST-763 Change-Id: Ib05f699063393eb6eaa9f559854aca50b77aead3 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-08-28Obtain scenario by CONST instead of get functionLinda Wang1-15/+1
JIRA: FUNCTEST-763 Change-Id: Ic9fa3243b50a09de8a5e531fed8298997367dd84 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-08-24Merge "Obtain pod_name by CONST instead of get function"Morgan Richomme1-14/+1
2017-08-23Refactor resource creation and cleanup in TempestMartin Kulhavy2-4/+63
Use Snaps to create resources before running a testcase and to clean up afterwards. Use Tempest Cleanup utility to clean other resources. Change-Id: Ic0f69d3bafb60dfb283d18ac507e9f5992e9ae38 Signed-off-by: Martin Kulhavy <martin.kulhavy@nokia.com>
2017-08-21Merge "Specify valid external network as an env"Linda Wang1-1/+8
2017-08-20Allow defining CI_LOOP via envCédric Ollivier1-1/+2
CI_LOOP is more human-readable than BUILD_TAG and could be set by env. Weekly is still the default value even if it can be considered than daily is more relevant. Change-Id: Ia8e370fe0f967ba2c83d0212f8e045d815b4ddb3 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-08-17Specify valid external network as an envLinda Wang1-1/+8
In some deployments, the retrieved external network by the def get_external_net checked by "router:external" is not available. So it is necessary to specify the available external network as an env by user for some deployments. JIRA: FUNCTEST-865 Change-Id: I561bc7d57e06214516a4cdbebd67632cd9746fba Signed-off-by: Linda Wang <wangwulin@huawei.com>