aboutsummaryrefslogtreecommitdiffstats
path: root/functest/tests/unit/utils
AgeCommit message (Collapse)AuthorFilesLines
2021-08-18Update to Alpine 3.14Cédric Ollivier1-16/+17
It also fixes lots of new pylint warnings. Change-Id: I3376aee5649596c53bc2941ad4d8e0674a2967fe Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2021-05-17Detect OpenStack ussuriCédric Ollivier1-0/+16
Change-Id: I645913aba06fc87a89fbb5a1a7c090777ca1be7f Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-09-29Detect OpenStack TrainCédric Ollivier1-0/+8
It takes into account latest max nova microversions [1] [1] https://docs.openstack.org/nova/latest/reference/api-microversion-history.html Change-Id: Icb9838b09ad22f6e87e9d8fb3c47525bdc1e3307 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-07-27Switch to Python 3.7 and Alpine 3.10Cédric Ollivier1-2/+2
It also allows building docs as doc8 is broken due to latest OpenStack's upper-constraints. pylint is updated to 2.3.1 (lastest py3.7 version) It disables perm as umask is currently false on lf-virtual1. Change-Id: If09d4796d48b7d0591e7926621d3bbf5ca1b6c24 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-05-25Set utf-8 in decode and encode callsCédric Ollivier1-4/+4
It eases backporting in iruya and hunter as a few logs can't be decoded as ascii [1]. [1] https://build.opnfv.org/ci/job/functest-opnfv-functest-vnf-iruya-juju_epc-run/56/console Change-Id: I52a6f9a25130cbf62e8ce3b9972064ab73177665 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-05-13Update to Python3Cédric Ollivier1-55/+25
Functest containers leverage on Python3 instead of python2. https://mail.python.org/pipermail/python-dev/2018-March/152348.html It also updates robotframework librairies to latest release and Vmtp to master ([1] is needed) It patches cloudify rest client to support python3. Vmtp is currently disabled because it currently supports python2 only. [1] https://github.com/openstack/vmtp/commit/a5d062881d91bf4f547d92c6e289bea30feb5d6e#diff-b4ef698db8ca845e5845c4618278f29a Change-Id: I39964a212ec2d4dbf53c9ea7c63f02e0b6a05b48 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-04-20Add Stein in Nova API microversionsCédric Ollivier1-0/+8
Change-Id: I42e854122fde9495cb3472ccc78900eccb20670d Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-10-15Ease configuring extra specs via env varsDelia Popescu1-0/+3
Ease configuring flavor extra specs, as well as image extra specs. Set environment variables for image_properties and flavor extra_specs for ovs|fdio scenario from the start. Image extra_properties and flavor extra_specs will continue to get updates from functest config file but so will from IMAGE_PROPERTIES and FLAVOR_EXTRA_SPECS env variables. Change-Id: Ie1c69e66d2e2e158915d214402fe44d9991c56d3 Signed-off-by: Delia Popescu <delia.popescu@enea.com>
2018-10-14Fix image properties parsingCédric Ollivier1-0/+41
It removes useless spaces and now conforms with oslo.conf dict. New helpers and unit tests are available. Change-Id: I20335c5e5c3840cc872e158c6072d97a3f2cb98c Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-09-14Update get_openstack_version()Cédric Ollivier1-2/+2
It takes Rocky maximum version into account. Change-Id: I55469de4a63f1f824222660130a20d7fd8fa42c3 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-21Add helpers to detect OpenStack versionsCédric Ollivier1-1/+121
It leverages on Nova API Microversions [1]. [1] https://docs.openstack.org/nova/latest/reference/api-microversion-history.html Change-Id: I60abf9089036e56fcbcd6c2b734666ea20875ceb Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-06-30Inherit rally from VmReady1Cédric Ollivier1-66/+0
It also fixes clean(). Change-Id: I42d1305d5cdb5a717cfa7fce26798ac7102310f7 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-05-05Implement get_external_network via shadeCédric Ollivier1-0/+66
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-11Fix many pylint warningsCédric Ollivier1-8/+10
Only pylint warnings in vnf modules has to be fixed now. Change-Id: Ie71230072a51bb72ec0b1d4fef2652494d29948e Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-03-02Leverage on XtestingCédric Ollivier1-125/+0
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-85/+2
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-1784/+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-22Switch from CONST to CONFCédric Ollivier1-39/+0
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-16Get properly env vars or their default valuesCédric Ollivier2-1/+97
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-12Export env vars via os.environ in test_openstack_utils.pyCédric Ollivier1-2/+2
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-28/+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-29/+0
It's also renamed source_envfile(). Change-Id: I0e7c38c2def125961f86dc2bc9a63cfb6ad87c03 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-01-26Fix pylint errors in several utils modulesCédric Ollivier1-6/+6
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-21Disable all missing-docstring warnings in unit testsCédric Ollivier2-0/+4
Change-Id: I22b7bbdab5f000b4ade6c2ba3a4029c146887cbd Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-01-21Move push_results_to_db to TestCaseCédric Ollivier2-132/+34
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>
2017-12-21Merge "Remove logger_test_results"Cedric Ollivier1-32/+0
2017-12-20Remove logger_test_resultsCédric Ollivier1-32/+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-982/+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-12Mock time.sleep() to decrease test durationCédric Ollivier1-11/+24
It also returns None when getting floating ips after deleting them. It now runs 40 tests in 0.084s. Change-Id: If4b1032ab9890fd291d99beb57166ead8729d822 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-12-12Add python3 for Functest utilsCédric Ollivier3-4/+5
It also fixes test_utils RegexMatch and SubstrMatch. Change-Id: I124aa7d0c4110dcd2f50220aae7ba9b299799e93 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-09-11Remove volume type handlingJuha Kosonen1-64/+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-01Merge "Remove tacker library from functest"Morgan Richomme1-524/+0
2017-09-01Remove tacker library from functestManuel Buil1-524/+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-17/+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-23/+3
JIRA: FUNCTEST-763 Change-Id: Ic9fa3243b50a09de8a5e531fed8298997367dd84 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-08-17Obtain pod_name by CONST instead of get functionLinda Wang1-23/+3
JIRA: FUNCTEST-763 Change-Id: Id334745a1eac8b933d77f9cb36a506a02366d760 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-08-17Merge "Fix domain in tenant creation"Juha Kosonen1-0/+15
2017-08-15Fix domain in tenant creationJuha Kosonen1-0/+15
Use the ID of the domain when creating a tenant on keystone v3. Change-Id: Ic415237e2bb2d537f07ab2245816a575f977aaa0 Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
2017-08-15Obtain build_tag by CONST instead of get functionLinda Wang1-32/+10
JIRA: FUNCTEST-763 Change-Id: I86b0b515a3d51df20a35c2aeb461a95d0c5797fd Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-07-27Omit space line in openrc fileLinda Wang1-2/+0
For alpine testing in compass OSA, sourcing openrc failed due to space lines included. Change-Id: I23166090a2fa7c2ce0aa03be581231cbb3cea34a Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-06-29Remove BGPVPN utils in Functestjose.lausuch1-53/+0
These util functions should be under control of the SDNVPN project. After [1] and [2] it is safe to remove them in Functest [1] https://gerrit.opnfv.org/gerrit/#/c/36655/ [2] https://gerrit.opnfv.org/gerrit/#/c/36505/ Change-Id: I2f6596cd60678bb0c50adb9b4bc0d59545c3fb0a Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2017-06-26Fix floating ips issue in openstack_cleanjose.lausuch1-4/+9
floatingips is a list of dictionaries where the attributes are a bit different than in the previous implementation. Change-Id: I8e8429b1819bba35a4a829f274c60b77ab2eea7e Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2017-06-26Merge "Make rally support https insecure deployment"Jose Lausuch1-2/+4
2017-06-26Merge "Use glance to list images"Jose Lausuch3-3/+5
2017-06-26Change floating ips management from nova to neutronjose.lausuch2-13/+16
Nova does not longer support floating ip creation/deletion. This patch moves that logic to neutron client. Change-Id: I2c4146149fe5be534d9c50d78d831b5af1957ad7 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2017-06-24Make rally support https insecure deploymentLinda Wang1-2/+4
When running in https environment, rally should support insecure deployment if no cacert file is provided. JIRA: FUNCTEST-828 Change-Id: I29b0fc8c2e1b74a1ce08293706cd9f11f975b6d5 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-06-24Use glance to list imagesLinda Wang3-3/+5
1. Images list is not supported by novaclient 8.0.0 2. It moves images list out of nova and into glance Change-Id: I2a2d40a2ca3a0cf1ebfb55697b3c58af8748a805 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-06-20Remove all references to /home/opnfv/repos/functestCédric Ollivier1-13/+1
It also removes relative (and incomplete) references which could be defined in modules instead of this global configuration. Change-Id: Ie20dc3547e49b6224aa8100cd380d37b87ece5a9 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-06-19Stop getting git data from functest dirCédric Ollivier1-22/+0
Functest is no longer a git clone. Change-Id: Ieaceacaa820e9a7a3c64e8c1fbd2a8a9321f234d Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-06-19Remove module references __file__Cédric Ollivier1-2/+3
It allows functest to be run directly from a zip file [1]. [1] https://setuptools.readthedocs.io/en/latest/setuptools.html#setting-the-zip-safe-flag Change-Id: I596a71e8cf2bed6dd79655bd5beeb047876a188c Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>