aboutsummaryrefslogtreecommitdiffstats
path: root/functest/core
AgeCommit message (Collapse)AuthorFilesLines
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>
2018-07-11Try to get Member or member roleCédric Ollivier1-1/+4
Keystone roles are case insensitive and Apex declares member which couldn't be detected. Then conflict occured when creating the mandatory role [1]. It now searches the default role in lower case too. [1] https://build.opnfv.org/ci/view/functest/job/functest-apex-baremetal-daily-master/141/console Change-Id: I687ecfe768ab4717fdb42a135c4bf9b76733ffd9 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-10Publish cloudify scenarioCédric Ollivier1-0/+77
It eases deploying any vnf via Cloudify. It also stops duplicating code between vims and vrouter. Co-Authored-By: Valentin Boucher <valentin.boucher@kontron.com> Change-Id: I5fe06d91804f4781f6b1301da12862bac793ffbb Signed-off-by: Cédric Ollivier <ollivier.cedric@gmail.com>
2018-07-06Fix delete_keypair argCédric Ollivier1-2/+3
It uses keypair name instead of id as expected by Shade. It also increases timers as it boots an ubuntu VM. Change-Id: I8cd131e7c7a94c8f6b0fcc54a4d75ef8af31b807 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-02Merge "Inherit rally from VmReady1"Cedric Ollivier2-4/+55
2018-07-01Create Member role if requiredCédric Ollivier1-1/+11
It seems there is no common role configuration between OPNFV installers. Then it creates/removes the expected role if required. Change-Id: I38a92e2522a401f46a59813b9e9443a11d6c7060 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-06-30Inherit rally from VmReady1Cédric Ollivier2-4/+55
It also fixes clean(). Change-Id: I42d1305d5cdb5a717cfa7fce26798ac7102310f7 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-06-25Fix role name for tenantnetworkDelia Popescu1-1/+1
Role name _member_ is no longer available The test returnes OpenstackCloudException that role _member_ is not found Change-Id: I37c8dfe6c4da04009ccabbc49e12c2123d92832b Signed-off-by: Delia Popescu <delia.popescu@enea.com>
2018-06-25Add dedug data when creating project/userCédric Ollivier1-0/+2
https://build.opnfv.org/ci/view/functest/job/functest-apex-baremetal-daily-master/127/console Change-Id: I233cef05560eba5f238b0eea3e2c56cb3c882931 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-06-24Force the use of public endpoints in shaker.pyCédric Ollivier1-7/+9
It now leverages on the new user created and gets the public endpoint. Change-Id: Iead106e614a73708cb13e33b49a2f438766a3056 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-06-24Improve scenarios to reduce duplicate codesCédric Ollivier1-49/+89
Change-Id: I71f79b9ac8314ac979d4b1009f662baa7c93a4fd Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-06-24Fix hardcoded valueCédric Ollivier1-1/+2
Change-Id: I070e1404a4b0dba4733f38e2de32e1fa77254ddc Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-06-23Decrease the log level when connecting in singlevmCédric Ollivier1-2/+2
https://build.opnfv.org/ci/view/functest/job/functest-compass-baremetal-daily-master/172/console Change-Id: I0fd3bb833d306626c0eb6393fff3d0fca0579100 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-06-23Fix user/project create operationsCédric Ollivier2-25/+31
os_client_config creates a singleton which forbids the previous processing. It also cleans remaining resources and allows publishing public images (needed by Tempest) Change-Id: I3a0ad8664b263d3ee8599efe2973465006d5750b Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-06-22Publish vmready scenariosCédric Ollivier2-118/+186
It will simplify code in juju_epc, tempest, etc. Change-Id: I195ae1d7d75f1c2f2eba76ae3c5307153e9b9759 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-06-21Publish singlevm scenariosCédric Ollivier2-0/+284
They ease creating all ressources to execute command in a new VM reachable via ssh. This scenarios should be reused by other more advanced ones (shaker, vping, cinder, etc.). Change-Id: If23866827c64a7afbdd8ff596dbc33710ee4ee20 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-06-20Publish tenantnetwork scenariosCédric Ollivier1-0/+197
They ease creating all tenant network ressources. These scenarios should be reused by other more complex ones. Change-Id: I4ce1872065bde92408d34f2ca8823ce98275d8d5 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-03-16Set project_name arg when creating usersCédric Ollivier1-0/+1
It also print snaps_creds to ease debugging [1]. [1] https://build.opnfv.org/ci/view/functest/job/functest-joid-baremetal-daily-master/22/console Change-Id: I5b0d0dcffe3e45d8fa7d1d7d8ce19172fc42aaa1 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-03-02Leverage on XtestingCédric Ollivier5-621/+8
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-28Merge "Support different user/project domain values"valentin boucher1-2/+18
2018-02-22Support different user/project domain valuesValentin Boucher1-2/+18
For the moment, VNF works well only if OS_PROJECT_DOMAIN_NAME=Default OS_USER_DOMAIN_NAME=Default It's now possible to use domain != Default JIRA: FUNCTEST-935 Change-Id: I779a93538662ff32906d91d7cf3b2c5c3e872765 Signed-off-by: Valentin Boucher <valentin.boucher@kontron.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-9/+7
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-15Add suffixes to OpenStack resource namesCédric Ollivier1-3/+4
All vnf testcases have to add suffixes in OpenStack resources names simply because the password is now generated before any run [1]. Snaps mainly creates the resource only if unfound in all tenants [2]. Then one remaining resource could easily raise permissions denied. It avoid conflicts between vrouter and cloudify_ims which are using the same names. [1] https://gerrit.opnfv.org/gerrit/#/c/50747/ [2] https://jira.opnfv.org/browse/SNAPS-257 Depends-On: If56cc44fe35ca06bc9033af620ddd3c0586877fe Change-Id: I1800886e575189b64fdc580a5ee6b59c81fcde5c Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-09Unlink robotframework from constantsCédric Ollivier1-3/+2
Change-Id: Ic2c6c84c3824ec3fa208824ae67f1769d4e18c4f Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-09Unlink feature from constantsCédric Ollivier1-3/+2
Saving results dir as class attribute seems better in the context of xtesting. Change-Id: If40303d07d3be9bdc09d990f560cbeda429fd642 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-09Unlink vnf from constantsCédric Ollivier1-26/+24
It generates a default description which all testcases can easily override. Change-Id: I81b97c394cf064088767cc934295602f01a7f739 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-07Add variablefile as possible robot.run() argsCédric Ollivier1-2/+4
Change-Id: Ic80840957b4d9c3c4a1615696a2851f3f5bf7bf4 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-05Stop printing data sent to DBCédric Ollivier1-1/+1
https://build.opnfv.org/ci/view/functest/job/functest-daisy-baremetal-daily-master/lastFailedBuild/console Change-Id: I0f794159d05fe21f659ecf3b5a9fa407620b723d Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-01Rename a common credential file for OS and K8SLinda Wang1-1/+1
Change-Id: Ib8d24be4b29ab1de00d5dd5e3442146b2437cb94 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2018-01-26Fix last Pylint error in FunctestCédric Ollivier1-2/+1
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-21Move push_results_to_db to TestCaseCédric Ollivier1-14/+57
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>
2018-01-20Configure password for the user in vnfLinda Wang1-1/+2
For some SUTs, the password for creating user is not allowed to be the same as user name, and some even is required to contain at least 8 characters and three types of characters for security. It also turns yamllint warnings into errors and fixes the remaining warnings. Change-Id: Icf25a7b9ff1c8cee55899198f1e519c9209877ff Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-12-27Execute feature command by subprocess directlyLinda Wang1-4/+7
Change-Id: I77e86af4e96310c6520d743e4d16c9a7b2e9adf5 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-12-20Remove logger_test_resultsCédric Ollivier1-3/+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-19Delete TestCase.create_snapshot()Cédric Ollivier1-11/+0
OSGC has been removed then this method can be safely removed. It also updates run_tests.py. Change-Id: I4030b7f0351d24d095313ae990b08e65d8f69115 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-12-19Remove OSGCTestCaseCédric Ollivier1-33/+2
This class is no longer used and must be removed before working on xtesting. JIRA: FUNCTEST-887 Change-Id: I3ac1db6ec90d9db301e5461cd79cfcf77291dffc Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-11-27Create RobotFramework classCédric Ollivier1-0/+125
It moves the capability to run any robot script from ODL TestCase into a new class: RobotFramework. It updates ODL TestCase and the related unit tests to inherit from the new parent class. Change-Id: I73e59ee9652fb63d9d89d7c75c58cce9cf62b0d7 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-11-21Removal of deprecated SNAPS-OO classes.spisarski1-4/+6
JIRA: SNAPS-202 Change-Id: I115b4927b287a5525f4c1b95128d91f5229c7856 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-10-10Complete framework documentation part for VNFMorgan Richomme1-11/+8
Change-Id: I4c59adfe1cfec278e0b267cc7a05e8addd45d034 Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
2017-09-06Create VNF user with admin roleAlex Yang1-6/+8
Change-Id: I9cdeedd90cacfdae10c498580493106a6cb727fb Signed-off-by: Alex Yang <yangyang1@zte.com.cn>