aboutsummaryrefslogtreecommitdiffstats
path: root/functest/utils/env.py
AgeCommit message (Collapse)AuthorFilesLines
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>
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-28Allow getting service via any endpointCédric Ollivier1-2/+1
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-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-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>
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 Popescu1-0/+1
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-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-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-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-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 Ollivier1-9/+10
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-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 Ollivier1-13/+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-22Use constants for Functest config fileCédric Ollivier1-2/+2
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-16Get properly env vars or their default valuesCédric Ollivier1-31/+32
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-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-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-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-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-07-05Enable refstack work on https without SSL checksLinda Wang1-1/+2
When refstack is run in https environment, SSL checks will be skipped if no cacert file is provided. JIRA: FUNCTEST-828 Change-Id: Ib44582b4f2f508c7a255a1510dbdc33110fe0f14 Signed-off-by: Linda Wang <wangwulin@huawei.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>
2017-05-19Set default value for CONFIG_FUNCTEST_YAMLCédric Ollivier1-1/+3
It calculates via the full path of env.py. Change-Id: Ief958833f5116cdb116d0153d85a0ae03063ec5c Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-05-17Conform constants.py with the minimal standardsCédric Ollivier1-2/+7
It adds the shebang to constants.py and its dependencies and stops importing from a relative path. It stops printing obsolete values too. It adds python3 support to them by the way. Change-Id: Ie7bddcf253eb245844d9e11c17acc69943c1ba63 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-02-20Undo setting CI_DEBUG to true by defaultRomanos Skiadas1-1/+1
Change-Id: I24ca35ada7591e93413cdda1905ee01f77131889 Signed-off-by: Romanos Skiadas <rski@intracom-telecom.com>
2016-12-22refactor cli module using new constants providerSerenaFeng1-1/+2
JIRA: FUNCTEST-673 Change-Id: I643fb16c694a8d7df45a13237f34b19a02906881 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2016-12-22Refactor tempest using new constants providerSerenaFeng1-1/+2
JIRA: FUNCTEST-673 Change-Id: Ibc274edd6bc9e8aea9e124fae84d7dec481982ab Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2016-12-21Refactor test run related modules using new constants providerSerenaFeng1-0/+15
JIRA: FUNCTEST-673 Change-Id: Ia37fb5a08c8fbc4a8acb666565ea887f9ae48b83 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2016-12-20Add default env variables in ENV classjose.lausuch1-1/+7
Change-Id: Ibca9c7a533796b5a2beae4e13b626f340969a567 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2016-12-15Unified way to provide configurations and env variables(proposal 1)SerenaFeng1-0/+18
In this proposal, everything in os.environ can be accessed directly using const, and with the exact name os.environ defined. The name of a configuration is totally decided by config_functest.yaml, which is the joint name of each level with '_'. This version requires us to naming each level in yaml in a little cleancode way, or else the configuration name would become ugly. Let me take the current defination of general.directories as instance, the configuration name will be 'directories_dir_repo_functest', looks not very good. But if we make some adaption: general: dir: repo_functest: it will become 'dir_repo_functest', looks a little better. For vIMs is well defined, let me take it for example, the configuration names will look like: vIMS_clearwater_blueprint_url vIMS_clearwater_blueprint_file_name vIMS_clearwater_blueprint_name vIMS_clearwater_blueprint_branch vIMS_clearwater_blueprint_destination_folder vIMS_clearwater_deployment-name Change-Id: I18ec8686d9cfb2b80a370d422c6ad81a8800585c Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>