aboutsummaryrefslogtreecommitdiffstats
path: root/functest/utils
AgeCommit message (Collapse)AuthorFilesLines
2023-03-13Detect OpenStack ZedCédric Ollivier1-1/+5
Change-Id: I3b0c9e030f2d31a6151d9ba44f2a06a627b3d913 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2021-11-15Update linters and fix all new issuesCédric Ollivier2-14/+14
It mostly add encoding in open calls and leverage f-strings. Change-Id: Ifead18fc724a452c1067dcf91dc577032edc9c59 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2021-08-18Update to Alpine 3.14Cédric Ollivier2-17/+16
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-1/+3
Change-Id: I645913aba06fc87a89fbb5a1a7c090777ca1be7f Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2020-11-14Allow connecting vm to the external networkCédric Ollivier1-1/+2
It fits the Airship deployment where there is neither tenant networks nor floating ips. It only updates the scenarios and must be completed by other changes for all the advanced testcases (Rally, Tempest, etc) Change-Id: Ia19f24d484b7b384c4aeeb3be35aac7aee31baab Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2020-06-18Allow listing hypervisors in VMTPCédric Ollivier1-1/+2
It allows listing the compute under tests via VMTP_HYPERVISORS. They are no additional log in Functest and the note in VMTP is still valid [1]. [1] https://opendev.org/x/vmtp/src/branch/master/vmtp/vmtp.py#L833 Change-Id: Ic9fbda3901d796c0ed94e42e2a14c468598f4311 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2020-04-30Update OpenStack release detectionCédric Ollivier1-1/+3
Change-Id: Icad13836d88583ee676525d4743f12a5b888ebe2 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2020-01-24Update Alpine to 3.11Cédric Ollivier1-2/+2
It also updates Python to 3.8 (default version). It selects arm32v6 et arm64v8 repos and switches multiarch binfmt. https://alpinelinux.org/posts/Alpine-3.11.0-released.html Change-Id: Ib41cf0ab805ce2137658f3ff656b0a88c7b4ebf5 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-11-21Conform with latest SUT updatesCédric Ollivier1-1/+1
Ceph is now used as backend which requires few adaptations for live migration. It differs from the main OpenStack gates but suits CNTT and most of the feedbacks received from enduser deployments. Change-Id: If6b76a7d4ec09f90467f3e63618c15a9b413bfbd Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-10-26Add healthcheck Horizon testsCédric Ollivier1-1/+2
It runs TestDashboardBasicOps as proposed by tempest-horizon [1]. It's skipped if DASHBOARD_URL is unset (default). [1] https://opendev.org/openstack/tempest-horizon Change-Id: I1b6b5609412770609f412da4927641588b173ed6 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-10-23Allow blacklisting tests if public endpoint onlyCédric Ollivier1-1/+2
It allows reusing the blacklisting system if only public endpoints are reachable (ONAP Openlab testing). It contains a first list of tempest-based tests which force the use of admin endpoints. Change-Id: Ic1ab07dec3ae1f2a0ca50b80e08cd0ac396f2e56 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-10-08Count all hypervisors by defaultCédric Ollivier1-1/+2
If one hypervisor is down, few tempest test fails. User is free to set SKIP_DOWN_HYPERVISORS if it's down on purpose. Change-Id: I7b6a4d0d8f67755d8c1550fd1bc6fd707634f68b Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-09-29Detect OpenStack TrainCédric Ollivier1-1/+4
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-09-28Fix falsy linksCédric Ollivier1-2/+2
It completes the previous commit "Allow getting service via any endpoint" [1]. [1] https://gerrit.opnfv.org/gerrit/c/functest/+/68542 Change-Id: Ib396ed75e2385f99bce51e09d37f7f05808b5b5e Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-09-28Allow getting service via any endpointCédric Ollivier2-2/+48
It overrides the default implementation provided by Shade. Change-Id: I3ad2f8ba543be4483f108c4bd7765018dddc5b19 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-09-12Allow skipping list_servicesCédric Ollivier1-1/+2
Shade forces the use of admin endpoints when listing services [1]. A new env var is added to allow running Functest when only public endpoints are reachable (e.g. testing from a VM as proposed for ONAP integration). It seems the best approach as list_services provides key data and we do avoid blocking requests. It seems easier and more generic than listing all calls in testcases.yaml. [1] https://github.com/openstack/shade/blob/master/shade/openstackcloud.py#L9956 Change-Id: Idcbe5d364f4230ffe1da34e7da0e99e863f15c5e Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-08-18Clean orphan security groupsCédric Ollivier1-1/+2
It removes all security groups which are not owned by a project. This approach seems suitable as it works even if dynamic accounts (tempest and rally). All other OpenStack resources are still removed by the underlying framework. It lists all orphan security groups in use as debug to avoid misunderstanding the testcase results (it could happen if cloud admin removes accounts without cleaning the virtual machines). Change-Id: I033d96e077b4277d59233a3de4ca6d41ed91f743 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-07-27Switch to Python 3.7 and Alpine 3.10Cédric Ollivier1-1/+1
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-06-14Update Xtesting to 0.70Cédric Ollivier1-3/+0
Change-Id: Ib2427112f1ec2e89aa349740c1bb82db1a3622f5 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-05-25Set utf-8 in decode and encode callsCédric Ollivier1-2/+2
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-2/+2
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-05-02Manage block_migration in RallyCédric Ollivier1-1/+2
It creates a new env var BLOCK_MIGRATION (True by default) to allow block migration for live migration in Rally. It updates scenarios and blacklisting to take that env vars into account. Change-Id: I41129432798ae9e40fe23bbe2c2162df4c0dff80 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-04-25Leverage on DEBUG env varCédric Ollivier1-0/+1
It allows muting debug logs. Change-Id: I291f3bb7e0a450724a34997c720bde01f72c8e50 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-04-20Add Stein in Nova API microversionsCédric Ollivier1-1/+3
Change-Id: I42e854122fde9495cb3472ccc78900eccb20670d Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-10-26Move tempest logics in tempest_conf.yamlCédric Ollivier1-2/+1
It allows removing OPNFV logics out of Functest (releng) and then simplifies conf_utils. tempest.conf is filled by the current default values. functest-alpine.sh will be updated to allow modifying the default values without breaking the OPNFV installers. It deprecates the only tempest-related env var (STORAGE_PROTOCOL) Change-Id: I14bcb715826ef2d85af87e7af600261a3c08e72c Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-10-15Ease configuring extra specs via env varsDelia Popescu2-1/+2
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/+32
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-10-06Merge "Rename IMG_PROP to IMAGE_PROPERTIES"Cedric Ollivier1-1/+1
2018-10-06Rename IMG_PROP to IMAGE_PROPERTIESCédric Ollivier1-1/+1
Any other env vars are reduced. Change-Id: Ic2c37d6efd543603a2495f9d2621b66d61710a54 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-10-06Merge "Use environment variable for image properties"Cedric Ollivier1-0/+1
2018-10-05Use environment variable for image propertiesDelia Popescu1-0/+1
Use IMG_PROP environment variable to read extra image properties. Set image_extra_properties for scsi volume types without file patch, but using IMG_PROP env variable IMG_PROP is defined through releng. Image extra_properties will continue to get updates from functest config file With this change, remove unnecessary parameters from arm patch Related to:https://gerrit.opnfv.org/gerrit/#/c/63203/ JIRA:ARMBAND-402 Change-Id: I64139240751b1e109bbe24ba32f487ccd98b9a92 Signed-off-by: Delia Popescu <delia.popescu@enea.com>
2018-09-20Allow overriding default storage protocolCédric Ollivier1-1/+2
It adds a new env var STORAGE_PROTOCOL to override storage_protocol in tempest. The default value is unchanged [1]. [1] https://docs.openstack.org/tempest/latest/sampleconf.html Co-Authored-By: Viktor Tikkanen <viktor.tikkanen@nokia.com> Change-Id: I19e4e25212b6f6176e3b967e01eb634c15e4d474 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-09-14Update get_openstack_version()Cédric Ollivier1-2/+4
It takes Rocky maximum version into account. Change-Id: I55469de4a63f1f824222660130a20d7fd8fa42c3 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-08-28Support pre-Provisioned credentialsCédric Ollivier1-1/+2
If USE_DYNAMIC_CREDENTIALS = False, Functest is expected for /home/opnfv/functest/data/accounts.yaml which contains the set of pre-existing credentials to use for testing [1]. It also sets admin_domain_scope and default_credentials_domain_name. [1] https://docs.openstack.org/tempest/latest/configuration.html Change-Id: Ie7b81f0c56049260ca99b8e3a6d58cb8a2660659 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-08-18Generate API doc rst filesCédric Ollivier1-4/+2
It also fixes few docstrings Change-Id: I10bae7b7fab40edd931dd55ab8859946e3b38a71 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-21Add helpers to detect OpenStack versionsCédric Ollivier1-1/+63
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-07-20Allow overriding the default roleCédric Ollivier1-1/+2
It allows testing controllers which implements other RBAC policies. Defining NEW_USER_ROLE=admin will easily raise side effects for orchestrators such as Juju and Cloudify. Change-Id: Ia78a25381aeb8aa81fd1872661629e1c08432b8f Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-15Define env vars for ODL inputsCédric Ollivier1-0/+4
It's linked to "Add default param for ODL password" [1]. [1] https://gerrit.opnfv.org/gerrit/#/c/59811/ Change-Id: Ib88d9371a2b6febb5c1af69ffda9b3c5024999e9 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-06-30Inherit rally from VmReady1Cédric Ollivier1-19/+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/+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>