aboutsummaryrefslogtreecommitdiffstats
path: root/functest/core
AgeCommit message (Collapse)AuthorFilesLines
2019-10-08Merge "Switch to Tempest password generator"Cedric Ollivier1-5/+2
2019-10-08Switch to Tempest password generatorCédric Ollivier1-5/+2
Functest depends on Tempest (master) then we can safely leverage on its password generator. '%' is forbidden in our logic then it's replaced by '!' (extra random logic seems overkilled). Change-Id: Ie1d1b78401999efbbb5aec4500c14595bde87987 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-10-08Count all hypervisors by defaultCédric Ollivier1-0/+9
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-30Count all active hypervisorsCédric Ollivier1-0/+8
Else tempest_slow fails if one hypervisor is down (detected in ONAP Openlab). It also improves Shaker, Rally and Vmtp which count them. Change-Id: Iee7c20e0357d9237501c5c451580d8f6409ac86b Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-09-28Allow getting service via any endpointCédric Ollivier1-1/+2
It overrides the default implementation provided by Shade. Change-Id: I3ad2f8ba543be4483f108c4bd7765018dddc5b19 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-09-15Add punctuations in password generatorCédric Ollivier1-1/+3
It adds a subset of string.punctuation to conform with a few password rules (see ONAP Openlab). Change-Id: I7751031bcb9b908d4162d70f8acaa4bdc87e3c79 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-08-18Clean orphan security groupsCédric Ollivier1-0/+21
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 Ollivier3-10/+8
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-07-10Allow scenarios without external networkCédric Ollivier1-2/+5
It allows creating testcases leveraging on Functest scenarios without external network. Then Rally can verify network providers by only skipping NovaServers.boot_server_associate_and_dissociate_floating_ip Change-Id: I07a9348214f7557195c7201466f7e37b2b980206 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-04-24Refactor modules to avoid duplicated codeCédric Ollivier2-0/+58
It also increases number of lines to warm about duplicated codes. Change-Id: I3914da8a90cbfe8fd024e9944c3adc8a617330d3 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-03-16Print monit summary before running IMS testingCédric Ollivier1-3/+4
Change-Id: I94310aa609d2c56609e0a5f0e46932af4aee02eb Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-03-01Change password generatorCédric Ollivier1-1/+4
It adds lower and upper letters JIRA: DOVETAIL-747 Change-Id: I4bdfcbf31a6dae4aa555fca3d42bbdec514a2b6b Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-02-24Ease copying/pasting the private keys from logsCédric Ollivier1-1/+1
Change-Id: I8f1ccdb709dbb3e7a22a404c036714dd848dd87d Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-02-23Stop downloading Cloudify containerCédric Ollivier1-1/+10
It selects the Docker image archive as proposed by Cloudify. Change-Id: I88b5333625a8d2cab140291552c1c8ca5bac3a36 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-02-12Increase timeout to reach vnf APICédric Ollivier1-1/+1
It increases the timeout in cloudify-based and clearwater-based testcases to allow running them in parallel (functest-virtual) [1]. [1] https://build.opnfv.org/ci/job/functest-latest-gate/54/ Change-Id: Ic637cb46a1380a683cb1e2b633cb97ac3be6affa Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-02-11Update and enable Cloudify-based testcasesCédric Ollivier1-4/+16
It switches from the Cloudify virtual machine to the community container which allows deploying vyos_vrouter and cloudify_ims. Last stable Cloudify OpenStack plugin (2.4.17) is now deployed. It also updates the Cloudify python package to latest release. It adds a delay before deleting the blueprint which may be improved in a second change (it allows enabling the testcase in the stable release). Change-Id: Ie48a2c9d2badab0d7ba0b9e7845f453fad335ef7 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-02-02Update Cloudify imagesCédric Ollivier1-1/+1
The former image can't be downloaded and then breaks all gates. It will be completed by changes in vnf if needed. Change-Id: Ie364aa2315257157a5e09eb4ba121926a60e7b26 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-01-07Check if key exists instead of leveraging on update_if_existsCédric Ollivier1-5/+12
It seems falsy (see line 72) 2019-01-07 11:50:32,550 - functest.core.cloudify - DEBUG - try 9: Cloudify Manager isn't up and running Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/functest/core/cloudify.py", line 72, in execute "foo", "bar", update_if_exists=True) File "/usr/lib/python2.7/site-packages/cloudify_rest_client/secrets.py", line 86, in create response = self.api.put('/secrets/{0}'.format(key), data=data) File "/usr/lib/python2.7/site-packages/cloudify_rest_client/client.py", line 263, in put timeout=timeout) File "/usr/lib/python2.7/site-packages/cloudify_rest_client/client.py", line 224, in do_request verify=self.get_request_verify(), timeout=timeout) File "/usr/lib/python2.7/site-packages/cloudify_rest_client/client.py", line 158, in _do_request self._raise_client_error(response, request_url) File "/usr/lib/python2.7/site-packages/cloudify_rest_client/client.py", line 119, in _raise_client_error response=response) File "/usr/lib/python2.7/site-packages/cloudify_rest_client/client.py", line 131, in _prepare_and_raise_exception status_code, error_code=error_code, response=response) CloudifyClientError: 409: <Secret id=`foo` tenant=`default_tenant`> already exists on <Tenant name=`default_tenant`> Change-Id: I6f4e2719ad2e55e997ebbd158dce4c6a204b2c36 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-01-07Print traceback as debug during cloudify triesCédric Ollivier1-2/+4
The traceback is printed as debug to avoid priting the first unsuccessful tries in console. It will ease debugging issues as for [1] [1] https://gerrit.opnfv.org/gerrit/#/c/66253/ Change-Id: I89992ea4452b24788cc06dec4c384a263b704efb Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-01-07Prevent from CloudifyClientError (key already exists)Cédric Ollivier1-1/+2
It has rarely occured in Orange Openlab [1]. Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/functest/core/cloudify.py", line 70, in execute self.cfy_client.secrets.create("foo", "bar") File "/usr/lib/python2.7/site-packages/cloudify_rest_client/secrets.py", line 86, in create response = self.api.put('/secrets/{0}'.format(key), data=data) File "/usr/lib/python2.7/site-packages/cloudify_rest_client/client.py", line 263, in put timeout=timeout) File "/usr/lib/python2.7/site-packages/cloudify_rest_client/client.py", line 224, in do_request verify=self.get_request_verify(), timeout=timeout) File "/usr/lib/python2.7/site-packages/cloudify_rest_client/client.py", line 158, in _do_request self._raise_client_error(response, request_url) File "/usr/lib/python2.7/site-packages/cloudify_rest_client/client.py", line 119, in _raise_client_error response=response) File "/usr/lib/python2.7/site-packages/cloudify_rest_client/client.py", line 131, in _prepare_and_raise_exception status_code, error_code=error_code, response=response) CloudifyClientError: 409: <Secret id=`foo` tenant=`default_tenant`> already exists on <Tenant name=`default_tenant`> Change-Id: Ic61d0c729f13caa552a0b0a00dad35e50d130e01 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-12-06Remove duplicated code in vnfsCédric Ollivier1-0/+65
It mainly leverages on functest_utils instead of duplicating. Change-Id: I97dc9215a835d3e7f1527b565132f667f09f2b7e Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-11-23Stop cleaning roleCédric Ollivier1-6/+3
Functest may create default role if member doesn't exist. It cannot be removed at the end of the testcase as it raises side effects when testing in parallel. Change-Id: Ief552f450a34b4aeda045b0c5d5f237ed77f3643 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-10-15Ease configuring extra specs via env varsDelia Popescu1-0/+8
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-6/+5
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-8/+10
2018-10-06Rename IMG_PROP to IMAGE_PROPERTIESCédric Ollivier1-8/+10
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/+9
2018-10-05Use environment variable for image propertiesDelia Popescu1-0/+9
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-24Protect if default secgroup not createdCédric Ollivier1-3/+5
https://build.opnfv.org/ci/view/functest/job/functest-compass-virtual-daily-master/lastFailedBuild/console Change-Id: I2b5f1dc577f98773ad40ed3bcfff609d8d6c4b93 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-09-23List default secgroup via orig userCédric Ollivier1-1/+1
Else the generated account can be already removed [1]. [1] https://build.opnfv.org/ci/view/functest/job/functest-apex-baremetal-daily-master/324/console Change-Id: I93d88763cdc67cd38286c24ad830244e0c12e019 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-09-22Clean the default security groupCédric Ollivier1-0/+4
It's not removed when deleting the users and the projects. Change-Id: Ib5de0885dcbfb558a48cdd20ae3ccc47b7f23748 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-09-03Create network via admin userCédric Ollivier2-5/+11
It creates the network via admin user as segmentation id may be set. Change-Id: I853f40e09aee9a658fc2373cd7e8bf00e3c0c3ad Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-08-30Ensure len(project_name) < 64Cédric Ollivier1-1/+1
https://build.opnfv.org/ci/view/functest/job/functest-apex-baremetal-daily-master/259/console https://build.opnfv.org/ci/view/functest/job/functest-fuel-baremetal-daily-master/428/console Change-Id: Ib64878962a71b6b45ef039fce8bfaa43172b2498 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-08-20Typos (ressources)Cédric Ollivier2-14/+14
Change-Id: Ifcf1d4bd48b64bc9175c3b0d594f897f4f3f5e7d Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-08-18Generate API doc rst filesCédric Ollivier1-0/+1
It also fixes few docstrings Change-Id: I10bae7b7fab40edd931dd55ab8859946e3b38a71 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-08-13Allow setting two image extra properties per testcaseCédric Ollivier1-13/+17
It conforms with the flavor extra specs model [1]. [1] https://gerrit.opnfv.org/gerrit/#/c/60713/ Change-Id: I1555a313aaf56ae47f9ad2a4529eb8b94e636c00 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-08-13Update all patch configsCédric Ollivier1-4/+5
It takes all new testcases into account. It allows running vnfs vs dpdk scenarios too. Change-Id: I789f6bb1c3df891b1a94f2a674c15085f81f2f23 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-08-10Test OpenStack vGPU featureValentin Boucher1-3/+12
XCI will be able to deploy this feature on top of pharos lab with GPU so we have test it This test can be improved in the future with OpenCL tests etc | DEPLOY_SCENARIO | os-nosdn-vgpu-ha | +-------------------+-------------------+------------------+----------------+ | TEST CASE | PROJECT | DURATION | RESULT | +-------------------+-------------------+------------------+----------------+ | vgpu | functest | 01:00 | PASS | +-------------------+-------------------+------------------+----------------+ Change-Id: I50618f47097a0257b1834b3966054d20458715df Signed-off-by: Valentin Boucher <valentin.boucher@kontron.com>
2018-08-04Make synchronous Shade callsCédric Ollivier1-10/+14
It makes difficult to find the issues (floating ip, boot, ssh connection, etc...) for a small benefit regarding the current testcase implementations. It increases the default floating ip timeout because it has been reached when running Functest multiple times in parallel. It may be the root cause when running singlevm vs XCI (in that case, neutron api and agents are hosted in a nested vm). Change-Id: Ia97e04902321644c207c59987283754318aee5e5 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-08-03Merge "Fix timeout (switch to synchronous calls)"Cedric Ollivier1-2/+1
2018-08-03Protect VMTP vs cidr conflictsCédric Ollivier1-2/+9
It now runs vtmp via a new admin member. Else it fails due to cidr already used. It only creates a router and both tenant networks are still created by VMTP. Change-Id: I05ed41a3b7a01ee97c720176c404929bf8ea97a0 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-08-03Fix timeout (switch to synchronous calls)Cédric Ollivier1-2/+1
It completes "Switch create_server timeout to default value" [1] which forbids waiting more that 180s (create_server was asynchronous). [1] https://gerrit.opnfv.org/gerrit/#/c/60423/2 Change-Id: Icbf9ee48024fe9e10571c2bb7ca895d5828fb561 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-08-03Fix typo (ressources)Cédric Ollivier1-2/+2
Change-Id: Ibe131e0cf02493f0f3a82c1e179848605bd0a292 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-08-03Increase Cloudify create_server_timeoutCédric Ollivier1-1/+1
The timeout has been reached when running multiple vnfs in parallel. Only few additional seconds seemed required here. Change-Id: I0d6e38e827c581edb617bb0cc13249645468a2aa Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-31Print stderr in logs when calling cmd over sshCédric Ollivier1-1/+2
Change-Id: I152ac898661a0e99a6232df86689c70c468ceaa5 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-31Switch create_server timeout to default valueCédric Ollivier1-2/+2
60s was successfully reached when running all containers (3 containers * 3 branches) in parallel. It also removes the wait attribute (the current impl will meet a possible next asynchronous design) which is useless here. For the time being, only cloudify needs an extra timeout. Change-Id: Ic7741b4c1a3223be076fb69ef70a3cb6c05456c2 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-30Remove VnfOnBoardingCédric Ollivier1-187/+0
All the vnfs are now inherating from scenarios. Change-Id: I63509102067676ca0676b773db542086caa02d84 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-24Reduce cloudify manager disk sizeValentin Boucher1-1/+1
40 Gb is enough Change-Id: Iae6a72fcf91fda67bbd036f478e344478d48264f Signed-off-by: Valentin Boucher <valentin.boucher@kontron.com>
2018-07-22Add secrets operations in cloudify.pyCédric Ollivier1-2/+5
It tries to prevent race conditions when running cloudify_ims. Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/functest/core/singlevm.py", line 411, in run if not self.execute(): File "/usr/lib/python2.7/site-packages/functest/opnfv_tests/vnf/ims/cloudify_ims.py", line 120, in execute self.cfy_client.secrets.create(k, val) File "/usr/lib/python2.7/site-packages/cloudify_rest_client/secrets.py", line 86, in create response = self.api.put('/secrets/{0}'.format(key), data=data) File "/usr/lib/python2.7/site-packages/cloudify_rest_client/client.py", line 263, in put timeout=timeout) File "/usr/lib/python2.7/site-packages/cloudify_rest_client/client.py", line 233, in do_request 'SSL, but the client does'.format(e) ConnectionError: ('Connection aborted.', BadStatusLine("''",)) Change-Id: Id2603bbda462b50d3140b6f45894c8810d542e4c Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-22Add helper to find string in consoleCédric Ollivier1-0/+21
It allows checking when cloud-init is finished (see heat_ims). Change-Id: I951aabff29457d7b7544a809f9fce1f83706035e Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>