summaryrefslogtreecommitdiffstats
path: root/dovetail/container.py
AgeCommit message (Collapse)AuthorFilesLines
2019-03-28Fix VVP test caseStamatis Katsaounis1-1/+3
This patch adds check for no environment variables provided to container configuration. Furthermore, it changes the check results file to a list of check result files. Change-Id: I2112ee1fd4b3156608d8a27dd3b9c90dbe35a24c Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com> Co-Authored-By: Panagiotis Karalis <pkaralis@intracom-telecom.com>
2019-03-18Replace subprocess commands with Docker SDKStamatis Katsaounis1-66/+76
JIRA: DOVETAIL-752 This patch replaces all python subprocess commands with the Docker SDK relevant commands. Change-Id: Iac7caffd80a863a8a022247d735b2a7f2792e49d Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
2019-02-20Remove deprecated ONAP lifecycle test caseStamatis Katsaounis1-39/+1
This patch removes the ONAP lifecycle deprecated test case. Furthermore, it clears helper functions as well as unwanted configuration. Change-Id: Ib958457cf120ffb641a72be028d3a031741c44c6 Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
2019-02-01Add ONAP VVP Heat Template validation testsStamatis Katsaounis1-3/+11
Change-Id: I9a3d56932ce41191901381831013768d1c57a749 Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
2018-12-17make item 'extra_container' available for every projectxudan1-4/+4
The item 'extra_container' used to be available for Bottlenecks only. Make it open for Dovetail framework. Change-Id: If4f2c032924447b97e401d497aca0309c0f5d847 Signed-off-by: xudan <xudan16@huawei.com>
2018-11-23Integrate k8s test cassesxudan1-65/+4
In order to integrate k8s test cases, Dovetail framework should do some refactor and make it more general for k8s test cases as well as ONAP ones. Integrate 2 k8s test cases. JIRA: DOVETAIL-748 Change-Id: Ibd87754ffb5fb29f6b4ce79232af860c2ed2da9c Signed-off-by: xudan <xudan16@huawei.com>
2018-11-14Add missing unit tests for container fileStamatis Katsaounis1-3/+3
JIRA: DOVETAIL-724 This patch adds unit tests for container class methods of Dovetail which were missing. Change-Id: Iaba3bbfbb8838278e20ac9f63ef6e01f9ada1cbc Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
2018-10-31Update class in container.pyxudan1-98/+83
Change-Id: I4fb24f86c6d15aea5a62baaca20531b2891437ff Signed-off-by: xudan <xudan16@huawei.com>
2018-10-31CI verify jobs failed due to the update of toxxudan1-4/+3
The LF pod used to run the CI verify jobs have updated the version of tox. So the CI verify jobs failed. See https://build.opnfv.org/ci/view/dovetail/job/dovetail-merge-master/476/console Fix the python format errors Ignore error 'W503 line break before binary operator'. Change-Id: Ic2df070447bbea39c877ce7a394d733a95064bb1 Signed-off-by: xudan <xudan16@huawei.com>
2018-06-29Update licence headers to comply with guidelinesGeorg Kunz1-1/+3
Updating the licence headers to comply with the community guidelines [1] and anteater checks. [1] https://wiki.opnfv.org/display/DEV/Contribution+Guidelines#ContributionGuidelines-License Change-Id: Idec787e32daf76c0b1bd6108977b78828125da5e Signed-off-by: Georg Kunz <georg.kunz@ericsson.com>
2018-05-07Decoupling Bottlenecks Docker config items from source codexudan1-37/+24
There are some special Docker setting items when creating Bottlenecks Docker Cntainers. Move the special settings to config files. Disable the function to push results to DB. JIRA: DOVETAIL-645 Change-Id: Icc033222edf74c0fe4853dede2794f4226fd4252 Signed-off-by: xudan <xudan16@huawei.com>
2018-04-10Decoupling Yardstick Docker config items from source codexudan1-56/+11
There are some special Docker setting items when creating Yardstick Docker Containers. 1. Remove the extra settings which are required by Yardstick Danube. 2. Remove the settings for pushing results to DB because Dovetail plan to disable this function. 3. Move the other special Functest settings to config files. JIRA: DOVETAIL-640 Change-Id: Ic2d90393e227d7886b14d805eaa307b7aef56e4a Signed-off-by: xudan <xudan16@huawei.com>
2018-04-10Support to specify docker image for each test casexudan1-25/+20
1. Currently each type of test cases will use one docker image. 2. For example, Functest test cases use opnfv/functest-restapi:euphrates Yardstick uses opnfv/yardstick:opnfv-5.1.0 3. It needs to support to specify the docker image for each test case. 4. For example, vping test cases use opnfv/functest-smoke:euphrates sdnvpn uses opnfv/functest-features:euphrates 5. The benefit of this is that these docker images are well verified by Functest CI and from Functest plan, they may not support functest-restapi docker image in its future release. JIRA: DOVETAIL-638 Change-Id: I8a30eea2233aeff809af2e241b6c939194397832 Signed-off-by: xudan <xudan16@huawei.com>
2018-04-04Decoupling Functest Docker config items from source codexudan1-30/+8
There are some special Docker setting item when creating Functest Containers. 1. Remove the extra settings which are required by Functest Danube. 2. Remove the settings for pushing results to DB because Dovetail plans to disable this function. 3. Move the other special Functest settings to config files. JIRA: DOVETAIL-639 Change-Id: Ibc4090b5c0aafdf9ed64e65a9a92e34a12a16df5 Signed-off-by: xudan <xudan16@huawei.com>
2018-03-29Integrate dovetail with ONAPMoshe1-1/+37
Change-Id: I6a1fa5f27df2f5127eb00156b3135dc79caf5e77 Issue-ID: DOVETAIL-629 Signed-off-by: Moshe <moshehoa@amdocs.com>
2018-03-15Disable restricts of sdnvpn test casesxudan1-7/+0
1. The original testcases.yaml file of Functest restricts sdnvpn test cases to run on Fuel, Apex or Netvirt on bgpvpn scenario. https://github.com/opnfv/functest/blob/master/functest/ci/testcases.yaml#L278 2. Dovetail has a testcases.yaml file to allow sdnvpn test cases run on any commercial SUTs. https://github.com/opnfv/dovetail/blob/master/etc/userconfig/testcases.yaml#L113 Change-Id: I0d5ed5b22e55dc3dc0fe584dc57b28239334b7de Signed-off-by: xudan <xudan16@huawei.com>
2018-03-15substitute image copy with docker volumeSerenaFeng1-20/+9
Change-Id: Ie470d03bd168c909fd02c316523049c67a6bb095 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2018-03-01Bugfix: Dovetail tool will crash when hosts.yaml file with incorrect formatxudan1-15/+1
If the hosts.yaml file is like, — hosts_info: 192.168.141.101: it will raise an exception, File "/usr/local/lib/python2.7/dist-packages/dovetail/utils/dovetail_utils.py", line 227, in add_hosts_info names=hostnames) File "/usr/local/lib/python2.7/dist-packages/python_hosts/hosts.py", line 54, in _init_ raise Exception('Address and Name(s) must be specified.') Exception: Address and Name(s) must be specified. If the hosts.yaml file is empty, it will crash with, File "/usr/local/lib/python2.7/dist-packages/dovetail/container.py", line 174, in create if hosts_yaml['hosts_info']: TypeError: 'NoneType' object has no attribute '_getitem_' JIRA: DOVETAIL-621 Change-Id: I547928e514b3294c048379459c07df89879fbb03 Signed-off-by: xudan <xudan16@huawei.com>
2018-02-24Adapt Bottlenecks Euphrates frameworkxudan1-0/+4
Bottlenecks stress test needs some adaptions about Bottlenecks Euphrates release. JIRA: DOVETAIL-587 Change-Id: Ia447143c8f08924ac1b190ee0173f39e462c5dfa Signed-off-by: xudan <xudan16@huawei.com>
2018-02-24Add Functest cloudify_ims test case into proposed_tests test suitexudan1-8/+7
Add cloudify_ims test case into proposed_tests test suite. Then this test case can be run by Dovetail on CI. JIRA: DOVETAIL-603 Change-Id: I5ab832002388f0916e04beef9d630de2cb37df59 Signed-off-by: xudan <xudan16@huawei.com>
2018-02-19Add 3 new HA test cases into proposed_tests test suitexudan1-2/+5
Add 3 new HA test cases into proposed_tests test suite and running them on CI. For the current 8 HA test cases and 3 other HA test cases plans to add, do some adaptions for the Yardstick Euphrates release. 1. Don't need the bugfix patch anymore. 2. The data format has changed, and has done some adaptions. 3. For Yardstick Euphrates, if setting OS_INSECURE=True, it needs to set OS_CACERT=False 4. Test case tc011 needs a image and flavor to create the stack. JIRA: DOVETAIL-614 JIRA: DOVETAIL-586 Change-Id: I9da8c8316246b9edee0d81ad18422ae6018becaf Signed-off-by: xudan <xudan16@huawei.com>
2018-02-16Add a function to check the cacert filexudan1-17/+13
1. Currently it won't pass the cacert file to other containers if the OS_AUTH_URL is http not https. 2. However, even though the OS_AUTH_URL is http, it still needs cacert file somewhere for Functest and Rally. 3. This problem is found on Fuel Euphrates. 4. Add a function to check whether the cacert file exists. 5. If exists, pass it to testing project containers. JIRA: DOVETAIL-616 Change-Id: Ied7bcc72e8f1c738bbce32c18096ca13641d3cd7 Signed-off-by: xudan <xudan16@huawei.com>
2018-02-16Add Functest test case snaps_smoke into proposed_tests test suitexudan1-0/+4
Add snaps_smoke into proposed_tests test suite. Then this test case can be run by Dovetail on CI. JIRA: DOVETAIL-596 Change-Id: I8fc4bb656bcac551ae4b693dbc4d817b665c6111 Signed-off-by: xudan <xudan16@huawei.com>
2017-11-20bugfix: hosts info is wrongly processedSerenaFeng1-7/+9
changes: 1. add usage example in hosts.yaml.sample 2. fix /etc/hosts from wrong format {'hostname': 'ip'} to the right 'ip hostnames' 3. fix --add-hosts from wrong usage --add-host {'hostname': 'ip'} to the right --add-host='hostnames':ip 4. support per ip mapping mutiple hostnames, which is also in line with /etc/hosts schema JIRA: DOVETAIL-556 Change-Id: I92e8cb0fd3476b61f5c73a69e34c4a66aef51d6e Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-09-28Bugfix: sdnvpn test cases failed due to wrong module namexudan1-5/+9
SDNVPN test cases failed due to wrong module name. The module name needs to be changed into "sdnvpn.test.functest.testcase_1" Refer to patch https://gerrit.opnfv.org/gerrit/#/c/41385/ Currently Dovetail uses functest:cvp.0.5.0 which uses module name "testcase_1". JIRA: DOVETAIL-510 Change-Id: I3232760d3af34125c7da71a5d2c62ca32693c82b Signed-off-by: xudan <xudan16@huawei.com>
2017-09-26Make Yardstick log level can be set by CLIxudan1-6/+7
1. Currently, the log level of yardstick is DEBUG and cannot be modified. 2. Make it can be changed from CLI. 3. When use dovetail run --debug, can see all Yardstick logs (including DEBUG) in dovetail.log. 4. When run without debug option, cannot see Yardstick debug logs in dovetail.logs. 5. yardstick.log always doesn't include debug logs. JIRA: DOVETAIL-506 Change-Id: Iaafb61232a22e16fff2fa4605bf7e262b022085e Signed-off-by: xudan <xudan16@huawei.com>
2017-09-07Modify logsxudan1-4/+4
JIRA: DOVETAIL-498 Change-Id: Ie98fc89cc840b557aa4186c6c2bee2d610432af0 Signed-off-by: xudan <xudan16@huawei.com>
2017-08-31Bugfix: the config files in useeconfig will cover user's configxudan1-16/+17
1. Now there are 2 sample files tempest_conf.yaml and hosts.yaml in userconfig, and thet will cover user's tempest_conf.yaml and hosts.yaml in $DOVETAIL_HOME/pre_config. 2. Rename the files in userconfig to be tempest_conf.yaml.sample and hosts.yaml.sample. 3. Add the hosts info in file /etc/hosts in Dovetail Container. JIRA: DOVETAIL-492 Change-Id: I2b5694a8058b864b510925eec595d6f2bd1062ff Signed-off-by: xudan <xudan16@huawei.com>
2017-08-15Adapt Functest cvp.0.5.0 docker imagexudan1-0/+7
In order to use functest cvp.0.5.0, Dovetail tool needs some adaptions. Change-Id: I9d0a23791c246a6c4961f229eaeb1f52f9b4995a Signed-off-by: xudan <xudan16@huawei.com>
2017-08-03Add resiliency test caes into proposed_testsxudan1-6/+34
JIRA: DOVETAIL-474 Add Bottlenecks resiliency test case "posca_factor_ping" into proposed_tests. Change-Id: I76aea651014fb4722ddae07559f417d3f840eee2 Signed-off-by: xudan <xudan16@huawei.com>
2017-07-21Merge "Delete the ERROR log when it is not https"Leo wang1-1/+1
2017-07-19Adapt Yardstick to copy yardstick.conf to /etc/yardstickxudan1-8/+21
JIRA: DOVETAIL-466 1. Yardstick danube.3.1 needs a yardstick.conf file in /etc/yardstick 2. Copy the file /home/opnfv/repos/yardstick/etc/yardstick/yardstick.conf.sample to /etc/yardstick/yardstick.conf 3. If user wants to store the results in the local file, set the dispatcher to be 'file'. 4. If user wants to push the results into the DB, set the dispatcher to be 'http' and target to be the api url getting from the user. Change-Id: I39c30883b471ab7cb29ed6d63ba8c232da39c135 Signed-off-by: xudan <xudan16@huawei.com>
2017-07-17Delete the ERROR log when it is not httpsxudan1-1/+1
JIRA: DOVETAIL-462 1. If it is not https, Dovetail will give a error log 2017-07-13 21:58:30,409 - container.Container - ERROR - The command 'openstack catalog show identity |awk '/public/ {print $4}'| grep 'https'' failed. 2. Remove this error log becuase it is not an error. Change-Id: I5791b1925cad8606d70eefd4940dd9bf46956305 Signed-off-by: xudan <xudan16@huawei.com>
2017-06-28Modify Dovetail logsxudan1-24/+30
JIRA: DOVETAIL-450 Change-Id: I795679c9559d1bead3aecefff28d21b6567aac2f Signed-off-by: xudan <xudan16@huawei.com>
2017-06-27https enabled checkingMatthewLi1-11/+17
JIRA: DOVETAIL-456 before to check OS_CACERT and OS_INSECURE when using https + credential or + no credential, there's a need to check if https enabled. error log https://build.opnfv.org/ci/view/dovetail/job/dovetail-fuel-baremetal-proposed_tests-danube/37/console Change-Id: Icdf17541fe6cf64b2f000d424c8d4dcc28cfd371 Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
2017-06-22Bugfix: Move userconfig directory into dovetail/dovetailxudan1-1/+1
JITA: DOVETAIL-449 1. Dovetail cvp.0.1.0 link dovetail/dovetail to /usr/local/lib/python2.7/dist-packages/dovetail/ 2. The directory dovetail/userconfig is lost in this image 3. Move dovetail/userconfig into dovetail/dovetail/userconfig Change-Id: I9da8389e02d92f35879ff5c6a1db1b7d984dd862 Signed-off-by: xudan <xudan16@huawei.com>
2017-06-09Merge "https+credential support"hongbo tian1-3/+17
2017-06-08https+credential supportMatthewLi1-3/+17
JIRA: DOVETAIL-440 Change-Id: I69fb96673755545e8e0d78d940870195dbf20a0b Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
2017-06-06Merge "Support Yardstick to push results to database"Leo wang1-2/+3
2017-05-30sdnvpn offline support in dovetailMatthewLi1-0/+7
JIRA: DOVETAIL-441 Change-Id: I709c62a36c65ef0b4da69c5508f7a8273e68dc2b Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
2017-05-25Change the directories of results and some files to DOVETAIL_HOMExudan1-14/+19
JIRA: DOVETAIL-438 1. Need an env variable DOVETAIL_HOME in env_config.sh 2. env_config.sh, pod.yaml and id_rsa should be put in path DOVETAIL_HOME/pre_config 3. the results will also be put in this path 4. no need to give the path of openstack credential file while running a testsuite 5. if running with the code, source the env_config.sh file before running source $DOVETAIL_HOME/env_config.sh dovetail run --testsuite <testsuite_name> 6. if running with Dovetail docker image docker run -it --privileged=true -e DOVETAIL_HOME=<dovetail_home_path> -v <dovetail_home_path>:<dovetail_home_path> -v /var/run/docker.sock:/var/run/docker.sock opnfv/dovetail:latest /bin/bash Change-Id: Ia23078f27a34e293d0075e49c673930f41069cb6 Signed-off-by: xudan <xudan16@huawei.com>
2017-05-24SDNVPN test cases failed in CIxudan1-1/+1
JIRA: DOVETAIL-439 1. SDNVPN test cases run in CI failed, because the file /home/opnfv/repos/sdnvpn/sdnvpn/test/functest/config.yaml is empty. 2. copy the file userconfig/sdnvpn_config_testcase1/2/4/8.yaml to /home/opnfv/repos/sdnvpn/sdnvpn/test/functest/config.yaml in Functest container Change-Id: Ie904f83c755efc0d9e0abe5dcd44fe4a5056123e Signed-off-by: xudan <xudan16@huawei.com>
2017-05-19hosts info config in containerMatthewLi1-2/+19
JIRA: DOVETAIL-435 in some SUT, there's a need to config hosts <domain name>:<ip> info in container /etc/hosts, ortherwise, SUT service will not be used. usage: 1,for dovetail directly running, cd ${DOVETAIL_HOME}/userconfig vim hosts.yaml sth like hosts_info: - domain_nameA:192.168.33.101 - domain_nameB:<some IP> 2,for dovetail container running, first get inside the container, cd /home/opnfv/dovetail/userconfig vim hosts.yaml same as 1. Change-Id: Ic5d87df3d78c0fa1d08c4e972c0fc97e61b906e9 Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
2017-05-09Support Yardstick to push results to databasexudan1-2/+3
JIRA: DOVETAIL-421 1. Yardstick is working on supporting push results to mongoDB. see https://gerrit.opnfv.org/gerrit/#/c/34091/ 2. make Dovetail supporting push results to database too when user choose to report to database. Change-Id: Iee06ad6be59dad62ac4f985f4a982fb5ff93a592 Signed-off-by: xudan <xudan16@huawei.com>
2017-05-07vpn testcases added in proposed_testsMatthewLi1-4/+11
JIRA: DOVETAIL-212 after communicating with Tim/jose, help to add vpn testcase into proposed_tests reference: https://wiki.opnfv.org/display/sdnvpn/SDNVPN+Testing#SDNVPNTesting-TestcompliancetemplateforDovetail Change-Id: Id34a2cadba625abbdbc59ef11affeccba24fa10c Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
2017-04-27support HA test cases to run with keyxudan1-5/+12
JIRA: DOVETAIL-409 1. HA test cases need a file pod.yaml, in this file it can use the password or the key. 2. If use key, Dovetail need to pass the key file $DOVETAIL_HOME/dovetail/userconfig/id_rsa to yardstick Container. 3. Add a directory $DOVETAIL_HOME/dovetail/userconfig and a sample_pod.yaml 4. ha.tc001 tc003 tc005 tc006 tc009 are ready. Change-Id: I391cc211dba2cf0740dd0dcaee8a5c2d712eaee1 Signed-off-by: xudan <xudan16@huawei.com>
2017-04-25Bugfix: All HA testcases are SSH timeout in CI jobsxudan1-5/+8
JIRA: DOVETAIL-405 1. All HA test cases running in CI are SSH timeout. 2. The reason is that HA test cases need a file pod.yaml providing the info of each node of Openstack. 3. This pod.yaml should be put in $DOVETAIL_HOME/dovetail/userconfig by users. 4. Dovetail's CI jobs should also do some adaptions. JIRA: DOVETAIL-407 5. modify file .gitignore to ignore directories results/ and userconfig/. Change-Id: I5c681445ec83c9d67a0151370f5b56840ffe444c Signed-off-by: xudan <xudan16@huawei.com>
2017-04-21use Functest tempest_custom test cases to run all Ipv6 test casesxudan1-6/+8
JIRA: DOVETAIL-401 1. modify all Ipv6 test cases, change tempest_smoke_serial/tempest_full_parallel into tempest_custom, add ID of each sub-testcases. 2. Some sub-testcases in ipv6.tc002, ipv6.tc003, ipv6.tc004 and ipv6.tc005 can not be found in the full tempest test case list. 2. disable testcases' script_result_acquired to enable tempest_custom run multiple times. 3. use build_tag-testcase_name(such as daily-master-79a6e392-28bb-4c40-9d88-a03bed99da2d-dovetail.ipv6.tc025) as the unique ID of each testcase. 4. comment out the progress bar, because it has some problems when print the report text. 5. Functest has changed the TEST_DB_URL from http://<testapi>:<port>/apv/v1 to http://<testapi>:<port>/apv/v1/results. 6. Functest has changed the TEST_DB_URL to file://<file_path>/<file_name>. see https://gerrit.opnfv.org/gerrit/#/c/33511/ Change-Id: I524f6702377f215f526158214842481eb44565be Signed-off-by: xudan <xudan16@huawei.com>
2017-04-10refstack: add manually method to let user can set its tempest.conf and ↵MatthewLi1-2/+10
defcore.txt JIRA: DOVETAIL-394 for refstack, userguide is listed in https://gerrit.opnfv.org/gerrit/#/c/33049/ in CI, use the automate way to generate tempest.conf to let refstack run against SUT, i.e., defcore.tc001.yml will provide a way to let user can let refstack run against SUT manually, i.e. defcore.tc002.yml since the tempest.conf autometely generated may not satisfied with SUT, users can adjust its tempest.conf to let the defcore testcases pass. Change-Id: I5ed212c9c6d864d352d1c497ea039cc553461158 Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
2017-04-01refstack result parseMatthewLi1-5/+5
JIRA: DOVETAIL-375 1, together with other testsuite from functest, such as tempest etc. this should merge after https://gerrit.opnfv.org/gerrit/#/c/31313/ 2, delete some unnecessary definition 3, bugfix of docker cp inside container, see https://build.opnfv.org/ci/view/dovetail/job/dovetail-compass-baremetal-debug-master/361/console 4, disable tempest testcaes since changed to refstack_defcore Change-Id: I67503e348af4a3f697f1b4106bfe81c05add8aa0 Signed-off-by: MatthewLi <matthew.lijun@huawei.com>