aboutsummaryrefslogtreecommitdiffstats
path: root/functest/core
AgeCommit message (Collapse)AuthorFilesLines
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>
2018-07-20Minor change about subnet poolCédric Ollivier2-2/+2
It reverts the subnet pool to 192.168.120.0/24. It avoids conflicts with default CPE private subnets. It also increases cloudify spawning timeout. Change-Id: I70183cede0690c2cbc74f9c30a38892d829db2c9 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-20Allow overriding the default roleCédric Ollivier1-1/+1
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-18Increase timeout when creating serversCédric Ollivier2-3/+4
It takes times to prepare disk on compute nodes (spawning). The default value is enough for all cirros VMs but it has to be increased for all cloudify VMs (4.1G). Change-Id: I3f1fc0142a73c586e9219a2718bfc467cc48e275 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-18Force a GET operations on cloudify APICédric Ollivier1-0/+2
Cloudify is considered as running by the client but sometimes it failed when listing secrets right after. It adds that check in cloudify.py. Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/functest/core/singlevm.py", line 391, in run if not self.execute(): File "/usr/lib/python2.7/site-packages/functest/opnfv_tests/vnf/ims/cloudify_ims.py", line 119, in execute secrets_list = self.cfy_client.secrets.list() File "/usr/lib/python2.7/site-packages/cloudify_rest_client/secrets.py", line 113, in list response = self.api.get('/secrets', params=params) File "/usr/lib/python2.7/site-packages/cloudify_rest_client/client.py", line 252, in get 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: Ie1b25ff529cfbf9f7476821499da369a46126e81 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-17Leverage cloudify_ims on CloudifyCédric Ollivier2-2/+41
It also defines 2 new methods to avoid duplicating code: - TenantNetwork1.get_public_auth_url() - VmReady1.publish_image_alt() Shaker and Tempest are updated as well. Change-Id: Ie9095c57c580b95f067d5a8275ad71818b4df335 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-14Set swift_operator_role if requiredCédric Ollivier1-1/+12
Apex creates member as default role which conflicts with the default swift_operator_role [1]. It detects the default role in lowercase as well and write it in rally.conf if required. [1] https://build.opnfv.org/ci/view/functest/job/functest-apex-virtual-suite-master/116/console Change-Id: Ic4dc98c793207fc32ff35852472742c92db6699c Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-13Force new project.id when creating new usersCédric Ollivier1-0/+2
Else it raises side effects when both project.id and project.name are defined (see Apex [1]) [1] https://build.opnfv.org/ci/view/functest/job/functest-apex-baremetal-daily-master/148/console Change-Id: I98665ed55a55fdd02e25d8ad17b78d84548b0ec8 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-11Reuse the right detected role nameCédric Ollivier1-4/+8
It completes "Try to get Member or member role" [1][2]. [1] https://gerrit.opnfv.org/gerrit/#/c/59661/ [2] https://build.opnfv.org/ci/view/functest/job/functest-apex-baremetal-daily-master/144/console Change-Id: Ib38b513906b08d6f85834e03f5415e83b66b733b Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-11Clean all possible resourcesCédric Ollivier2-14/+25
It checks all openstack resources before cleaning. It allows removing images even if the test fail quickly. Change-Id: I1763b8a70fa7ffeb03c435e8e775c7afd1a7adac Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-11Check the status of inherited stepsCédric Ollivier1-2/+5
Change-Id: If63c228f2844194279b560515f4ab24a4ee88be0 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>