summaryrefslogtreecommitdiffstats
path: root/dovetail/container.py
AgeCommit message (Collapse)AuthorFilesLines
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>
2017-03-30Merge "dovetail tool: change function pull_image"hongbo tian1-18/+27
2017-03-30Merge "dovetail tool: set a unique build_tag for each DoveTail test"hongbo tian1-3/+4
2017-03-30dovetail tool: refstack testcase integrationMatthewLi1-0/+8
JIRA: DOVETAIL-370 Change-Id: I60c9f431358f848e24abcb865c4b2ca8c3b2d843 Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
2017-03-30dovetail tool: set a unique build_tag for each DoveTail testxudan1-3/+4
JIRA: DOVETAIL-379 1. create a uuid for each test, and set build_tag=daily-master-<uuid> 2. the reason it starts with "daily_master" is that it's the requirement of functest when push data to DB. Change-Id: I9a59d5695a9f0d83bf4330379f1949a2a04f876c Signed-off-by: xudan <xudan16@huawei.com>
2017-03-30dovetail tool: change function pull_imagexudan1-18/+27
JIRA: DOVETAIL-378 1. test_runner checks the result of cmd "pull image". If fail to pull, then break the running. 2. pull_image will return None when there are errors, otherwise return image name. 3. if there is an old image named the same as the new one, the old one's tag will be changed into <none>. In this case, the old image needs to be removed. 4. if there are some containers using this old image, the remove will be skipped rather than logging error. Change-Id: I940cb18911112d5e13f3c14f87ddbdbaced3538a Signed-off-by: xudan <xudan16@huawei.com>
2017-03-29dovetail tool: offline supportMatthewLi1-0/+6
JIRA: DOVETAIL-164 usage: dovetail run --testsuite <testsuite> --offline 1,if --offline given, can run offline by using local docker images (if there is no images, will get an error in log, images can be pulled from dockerhub or downloaded from artifacts.opnfv.org ) 2,if --offline not given, will run online, which means pull docker image from dockerhub Change-Id: I87ab35c82e59fb13a7a88c38d233e89285efc4d3 Signed-off-by: MatthewLi <matthew.lijun@huawei.com>
2017-03-25dovetail tool: Add an option cmd for pushing results into DBxudan1-25/+63
JIRA: DOVETAIL-373 1. add an option --report/-r to choose the report type. 2. "-r file" will store results with files. 3. "-r http://192.168.135.2:8000/api/v1" will push results into DB. The DB url can replaced by user's local DB or official DB. 4. Default report type is defined as "report_dest" in dovetail_config.yml. 5. Yardstick can't push results of one testcase into DB now, so both "-r file" and "-r http://..." will be regarded as "file". Change-Id: Ieaa017ab59c5b15235bf306ef57cdc56beb22af8 Signed-off-by: xudan <xudan16@huawei.com>
2017-03-22Merge "dovetail tool: Bugfix about the prepare_env of yardstick and get the ↵hongbo tian1-2/+5
yardstick.log"
2017-03-21dovetail tool: remove installer and CI related variablesxudan1-1/+21
JIRA: DOVETAIL-371 1. remove all the envs in functest_config.yml and yardstick_config.yml 2. remove all relative cmds in cmd_config.yml 3. remove all the envs when running a new functest/yardstick container 4. add some variables just for functest pushing results to db 5. get the external network name for yardstick 6. make --debug/-d just control the log level shown on the screen 7. set requests=2.10.0 since python-openstackclient needs 'requests!=2.12.2,!=2.13.0,>=2.10.0' Change-Id: I9f941e09d067fc95a14c3c9be1374f41df4a9a16 Signed-off-by: xudan <xudan16@huawei.com>
2017-03-21dovetail tool: Bugfix about the prepare_env of yardstick and get the ↵xudan1-2/+5
yardstick.log 1. For Fuel, yardstick prepare_env.sh will fail when pwd != /home/opnfv/repos/yardstick 2. Modify yardstick_config.yml in Dovetail to change pwd to that path. 3. Use log file /tmp/yardstick/yardstick.log created by cmd "yardstick task start" rather than redirecting the console output to yardstick.log. JIRA: DOVETAIL-363 Change-Id: Ie0475cfabc66e342be868f0924a5fccd6fa74b58 Signed-off-by: xudan <xudan16@huawei.com>
2017-03-20dovetail tool: change name of credentials from creds to openrcxudan1-6/+9
1. change file name from openstack.creds to openrc.sh 2. change the cmd --creds to --openrc/-o 3. now the path of --openrc can be relative path no restrict to abspath 4. remove the useless "work_dir" in dovetail_config.yml JIRA: DOVETAIL-369 JIRA: DOVETAIL-367 Change-Id: I2592438eef060f84132ff7fa226aea93ea947362 Signed-off-by: xudan <xudan16@huawei.com>
2017-01-20dovetail tool: use python new-style classes which inherit from objectxudan1-1/+1
JIRA: DOVETAIL-187 Change-Id: Id6fa50a3a3cec7a18d27ca8feb383b53836a339b Signed-off-by: xudan <xudan16@huawei.com>
2017-01-06dovetail tool: remove old image when pulling new one successfullyxudan1-10/+54
1. split function pull_image into four functions, get_image_id, pull_image_only, remove_image and pull_image. 2. after pulling new version of the image, remove the old one with tag <none>. JIRA: DOVETAIL-171 Change-Id: I2d2a9d6a8bc2308d434d0a3c76aa24bf5b39bfd7 Signed-off-by: xudan <xudan16@huawei.com>
2016-12-26Merge "dovetail tool: bugfix functest prepare_env fail"hongbo tian1-2/+8
2016-12-22dovetail tool: bugfix functest prepare_env failxudan1-2/+8
JIRA: DOVETAIL-169 Change-Id: I7ede8713c16b084255f691505a39db122fdbe8ea Signed-off-by: xudan <xudan16@huawei.com>
2016-12-22[dovetail tool]check and get results for each cmdLeo Wang1-4/+6
JIRA: DOVETAIL-166 Check the results of each cmds executed in test case 1. the results of pre_condition, post_condition, cmds need to be checked, so it can get a quick fail, dont need to go through the next step 2. it's more accurate to show where error occurred as early as possible 3. get results from shell scripts Change-Id: I5c1e59839c55b92de0e83e7e1eb552aa364b3f80 Signed-off-by: Leo Wang <grakiss.wanglei@huawei.com>
2016-12-21Merge "updated the process flow of function exec_cmd"hongbo tian1-2/+2
2016-12-19Merge "dovetail tool: move conf/dovetail_config.py into utils/"hongbo tian1-1/+1
2016-12-18[dovetail tool] fetch openstack rc files without installer infoLeo Wang1-2/+4
JIRA: DOVETAIL-157 dovetail tool must not depend on any installers or any SUT, so openstack rc files need to be provided to eliminate this dependency. 1. input parameters "SUT_IP"/"SUT_TYPE" must be optional, may be finally will be removed 2. new parameter "creds" to specify the file used to get access to openstack of SUT Change-Id: I877efb2a6abc198c32ed6d52b9418a35597d5867 Signed-off-by: Leo Wang <grakiss.wanglei@huawei.com>
2016-12-16updated the process flow of function exec_cmdRyan.RCS1-2/+2
separate the log expressions to other functions removed statements that not necessary output error detail info in exception Change-Id: I721611d61dee83eb5f40ee954d433073114e231a JIRA: DOVETAIL-161 Signed-off-by: Ryan.RCS <lihainong@huawei.com>
2016-12-15dovetail tool: move conf/dovetail_config.py into utils/xudan1-1/+1
1. move conf/dovetail_config.py into utils/ 2. change the open file path in dovetail_config.py 3. do some modification about all 'from conf.dovetail_config import ***' JIRA: DOVETAIL-158 Change-Id: I7670e6de993899e4e2a604cbc501dc3339896ef1 Signed-off-by: xudan <xudan16@huawei.com>
2016-12-14[dovetail tool] support shell scripts for testcase validationLeo Wang1-0/+2
JIRA: DOVETAIL-46 1. for now a testcase has two kinds of validation types(functest, yardstick), and it is not enough to check the complete funcionality 2. add new validation type(shell) for extra validation of the test case to make result more accurate and more convincing. Change-Id: I5c049a71f11cca71a7914f8af704c1983aba3dca Signed-off-by: Leo Wang <grakiss.wanglei@huawei.com>
2016-12-13Merge "[WIP] Migrate to tox based environment"hongbo tian1-1/+1