aboutsummaryrefslogtreecommitdiffstats
path: root/functest/ci/prepare_env.py
AgeCommit message (Collapse)AuthorFilesLines
2017-09-13Disable urllib3 warningsLinda Wang1-4/+5
1. When running in compass OSA, lots of SubjectAltNameWarnings are shown in console, so just disable the warnings here. See https://github.com/shazow/urllib3/issues/497 for details 2. Redirect warnings issued by the warnings module to the logging system via logging.captureWarnings(True) 3. But urllib3 warning is still there for two cmds about rally/tempest. Change-Id: Ic22cf8e2babc10c9d55a7ed46b841312a4e430a7 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-08-24Patch Read aarch64 architectureDelia Popescu1-1/+1
Architecture is exported as POD_ARCH Change-Id: I62631c165d1805163204a83d6019a4a3b0000855 Signed-off-by: Delia Popescu <delia.popescu@enea.com>
2017-08-23Read aarch64 architectureDelia Popescu1-1/+1
Read aarch64 architecture from env variable exported by changes from patch https://gerrit.opnfv.org/gerrit/#/c/38689/ Change-Id: If0fc94e8fe67871b94934c305c019b57872ecb07 Signed-off-by: Delia Popescu <delia.popescu@enea.com>
2017-07-12Switch to check_deployment instead of check_os.shjose.lausuch1-33/+5
Change-Id: Idcc67643f813068c3cd06f4c0dfd3289bb7df138 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2017-07-02Apply restrictive file permissionsCédric Ollivier1-4/+0
It conforms with [1] by creating a new venv which checks the unix permissions. As jjobs call Functest console scripts [2], all perms can be 644. Dockerfiles are updated as well. [1] https://security.openstack.org/guidelines/dg_apply-restrictive-file-permissions.html [2] https://gerrit.opnfv.org/gerrit/#/c/36805/ Depends-On: I9209e6efa1b493e24135402a46df72aaa14115d1 Change-Id: I31bc7f12b775928845e23b6b40288b0a50b87219 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-06-30Define download_images.sh and check_os.sh as scriptsCédric Ollivier1-3/+2
It also updates all python scripts which call check_os.sh. The former healthcheck.sh is removed. No shell script must be executable in git. Change-Id: If4e8deb50ebd635a9091e3bb79ef61c07b9660dc Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-06-30Define console_scriptsCédric Ollivier1-3/+7
Only prepare_env.py and run_tests.py remain executable to avoid breaking the gate. As soon as the jenkins jobs are updated to run them from $PATH, tox will be updated to protect against chmod a+x py files. Dockerfile will be simplified as well. Change-Id: Iac1a7ceb6b344e800177226ea39919826f6d3735 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-06-22Remove calls to deployment handler in prepare envjose.lausuch1-2/+0
The reason is that some installers have changed the mechanism and the adapters are not valid any more and the method to access the deployment information fails Fuel -> MCP Compass -> Containers This shall be deactivated to avoid errors in CI until the new installer adapters are implememnted. Change-Id: I995b914bf55d5da76f27e715d170dd22e84d677c Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2017-06-21Fix command in prepare env to execute check_os.shjose.lausuch1-2/+2
[1] introduced a bug when adding "sh" to the call. There is no need to use sh or bash in the command string. [1]: https://gerrit.opnfv.org/gerrit/#/c/36163/ Change-Id: I9ce443721b69945a4a749da0caa6c008cc8ca284 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2017-06-20Remove all references to /home/opnfv/repos/functestCédric Ollivier1-15/+16
It also removes relative (and incomplete) references which could be defined in modules instead of this global configuration. Change-Id: Ie20dc3547e49b6224aa8100cd380d37b87ece5a9 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-06-06Merge "Remove call to fetch_os_creds.sh"Jose Lausuch1-34/+10
2017-06-06Remove call to fetch_os_creds.shjose.lausuch1-34/+10
After [1], the openstack credentials are provided to Functest as a volume directly from CI. The same has to be done manually. Functest doesn't need the script fetch_os_creds.sh any longer. [1] https://gerrit.opnfv.org/gerrit/#/c/35199/ Change-Id: I0883ad7b248526cfe9df3fde984345bd41869e82 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2017-06-01Use CONST to retrieve db_url rather than getter functionLinda Wang1-3/+14
1. Remove get_db_url() 2. If TEST_DB_URL declared in env, update test_db_url in config_functest.yaml file during env preparation 3. No matter TEST_DB_URL declared in env or not, Result_DB = CONST.__getattribute__("results_test_db_url") JIRA: FUNCTEST-763 Change-Id: I20da7ef98bbcc56731e0ff7061b05c1dde6cbfc3 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-05-18Add a new directory to hold pre-downloaded imageshelenyao1-2/+9
Put all images in the new direcotry. If users want to use the local image, map the local directory to the ${HOME}/functest/images Change-Id: I0d309b93f52b3da23d6130056f1a19907313ef68 Signed-off-by: helenyao <yaohelan@huawei.com>
2017-05-05Replace CONST.* by getattribute/setattrjose.lausuch1-66/+80
Directories affected: - ci - core and respective unit tests Change-Id: I6a3d5aa68de29fc5a37ae543a067ff797eba33e6 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2017-05-04Delete functest.utils.functest_loggerCédric Ollivier1-2/+5
It deletes functest.utils.functest_logger and the related unit tests. Then it modifies all functest modules to get all loggers via logging.getLogger(). __name__ is mainly used as getLogger arg as proposed by logging [1]. All loggers and handlers are now defined via functest/ci/logging.ini instead of a dict loaded by an external json file. Now only warn messages and info messages from ci and core packages are printed in console. [1] https://docs.python.org/2/library/logging.html Change-Id: Ic192855e0f9bf94825d8f7ec73549a0f3b8d44c5 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-03-20Enable functest offline by installing tempest system wideLinda Wang1-1/+1
JIRA: FUNCTEST-764 1. When creating verifier via rally in functest env prepare, without the parameter "--system-wide", rally will install tempest and its dependent packages into the virtual env of rally. Thus, it needs to connect internet when installing tempest, which will not enable functest offline. 2. Some packages are needed for multisite testcase, and they are installed in virtual env of rally before. But if "--system-wide" is set, there packages should be installed addtionally. Change-Id: I340701e9ed4a0f8f278ff952f0dd61470c6deed1 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-03-01Bugfix: fix the CI failure for compass and joidhelenyao1-25/+33
The bug was induced by [1] 1. the key try logic is added back 2. the logic of patch_config_file is updated as NoneType error was thrown 3. refactored the patch_config_file to avoid calling the same function twice on every type of POD. For non-aarch64, only calling the function once is enough [1] https://gerrit.opnfv.org/gerrit/#/c/28945/ Change-Id: I2e9fdc5ac3c04800cfc898ea654ff24e2bdeaef4 Signed-off-by: helenyao <yaohelan@huawei.com>
2017-02-27Add aarch64 custom configCristina Pauna1-36/+63
In order to run functest on an aarch64 POD, some custom configuration is needed. Up until now that custom configuration was put on the arm jenkins slave. With this commit it is integrated in functest project. 1. In order to identify if the POD is aarch64 or x86 function get_arch() from https://gerrit.opnfv.org/gerrit/#/c/29099 is used 2. Changes to config_functest.yaml are made via a new patch file config_aarch64_patch.yaml which is applied for all scenarios. Function patch_config_file() is modified to be more generic. It now receives a file as parameter and merges any type of patch file 3. The aarch64 cirros images are downloaded into the data directory. Functest can be run from both an aarch64 or a x86 jenkins slave in order to test an aarch64 POD. So the images are downloded in both dockerfiles 4. Other custom config needs to be added to /etc/rally/rally.conf in the docker. The custom config is set in rally_aarch64_patch.conf and inserted in the needed file before the rally environment is set up JIRA: ARMBAND-60 Change-Id: I8e460cdf02d297c259cbbd9c05e7983367fd2bb9 Signed-off-by: Cristina Pauna <cristina.pauna@enea.com>
2017-02-25Merge "Bugfix:Added the adapter info for compass and joid"Jose Lausuch1-18/+23
2017-02-24Merge "Use new-style classes which inherit from object"Morgan Richomme1-1/+1
2017-02-23Bugfix:Added the adapter info for compass and joidhelenyao1-18/+23
CI for compass and joid failed as there is no key defined in installer_params.yaml Change-Id: I8d17d36d854974c0751d3fd3bab4994205f786bb Signed-off-by: helenyao <yaohelan@huawei.com>
2017-02-23Merge "Prepare env will exit when an error is raised"Jose Lausuch1-24/+27
2017-02-23Use new-style classes which inherit from objectLinda Wang1-1/+1
JIRA: FUNCTEST-707 Change-Id: Ieaa888375136eddbbe003a24b32bf09fd0f92923 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-02-22Prepare env will exit when an error is raisedhelenyao1-24/+27
JIRA: FUNCTEST-727 Change-Id: I4d8e24c0cb6272d92dc777dc82d56490948598db Signed-off-by: helenyao <yaohelan@huawei.com>
2017-02-21Add deployment_handler printout to prepare envjose.lausuch1-1/+30
Example virtual deployment apex: http://paste.openstack.org/raw/599536/ Example CI POD: http://paste.openstack.org/raw/599537/ Change-Id: I0711b45a525bc074a9c05f0ea3a194b2db05f2d9 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2017-02-16Revert "Add deployment_handler printout to prepare env"Jose Lausuch1-24/+0
This is causing some problems. https://build.opnfv.org/ci/view/functest/job/functest-fuel-baremetal-daily-master/1121/console This reverts commit 9886535d617d95e7d2c2f294e79a7cd994fcd685. Change-Id: I8524dff5deea073f0975df1e712766620002523e Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2017-02-14Add deployment_handler printout to prepare envjose.lausuch1-0/+24
Example output: http://pastebin.com/raw/xWTe9tAY Change-Id: Ib8100089318f807fb4d5d4fff2911179eb18216e Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2017-02-09Refactoring of args and parser variableashishk19941-38/+33
It also fixes one issue when printing summary for tiers and others induced by [1]. [1] https://gerrit.opnfv.org/gerrit/#/c/26587/ JIRA: FUNCTEST-438 Co-Authored-By: Cédric Ollivier <cedric.ollivier@orange.com> Change-Id: I821efaa7d62b208d797d19563f573d1e28da9df4 Signed-off-by: ashishk1994 <ashishk.iiit@gmail.com> Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-02-09Fix source_credentials in openstack_utilsCédric Ollivier1-4/+2
It fixes issues raised when an env var contains '=' (e.g. LS_COLORS). It now exports the vars listed in rc_file without creating a new process. Change-Id: I6e6a4e3ab9c45afe4d40015831acb283acbe564c Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-02-02Add flavor creation in functest env preparejose.lausuch1-0/+9
So far, healthcheck.sh was creating m1.tiny flavor. We are planning to remove that script and replace it by SNAPS api and connection check. Althought, a better approach to this would be that all the tests create the flavor if needed, but these are the tests that rely on this flavor: - vping ssh - vping userdata - rally - tempest - onos_sfc Change-Id: I537f68a55d733b24b6b15f5cf3710bca40fbc622 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2017-01-25Refactor Rally to adopt OOhelenyao1-5/+0
JIRA: FUNCTEST-541 Change-Id: Ife04f58dc31ca9ba6316cc31577f81a6bf0e0405 Signed-off-by: helenyao <yaohelan@huawei.com>
2017-01-18Merge "Rally keystone test scenarios for v3"Morgan Richomme1-15/+20
2017-01-16Rally keystone test scenarios for v3helenyao1-15/+20
JIRA: FUNCTEST-652 1. Updated the Rally repository to master the keystone test scenarios of TAG= 0.7.0 cannot run on Newton also, 0.7.0 is the last tag that exists 2. Update the Tempest installation with updated rally command Rally team said "there was no possibility to do it in backward compatible way(rally verify re-design)" 3. The `rally show` was deprecated[1] in the master and corresponding logic is updated 4. Update rally commands [1] https://github.com/openstack/rally/commit/f2fc3015beb4cfd8053db728765714500db6eeb2 Change-Id: Ief9e36a16dd92e4449c0f76579e7191a93aa3e21 Signed-off-by: helenyao <yaohelan@huawei.com>
2017-01-09Refactoring of args and parser variable in ci/run_tests, prepare_envashishk19941-11/+20
Can't import run_tests in test_run_tests.py (new unit test file). It is throwing error: nosetests: error: unrecognized arguments It is because of declaration of parser and args which are global in file, So to allow safe import of this file, we need to declare it into __main__ branch. Change-Id: Ie11ebcfd8a1b8e692bd8bf4260a54f752b67fd5e Signed-off-by: ashishk1994 <ashishk.iiit@gmail.com>
2016-12-21Refactor test run related modules using new constants providerSerenaFeng1-62/+61
JIRA: FUNCTEST-673 Change-Id: Ia37fb5a08c8fbc4a8acb666565ea887f9ae48b83 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2016-12-20Bugfix in passing parameters to logger_debug.ashishk19941-1/+5
JIRA: FUNCTEST-675 Change-Id: I342d51391323dd1ffe516d8dbc13b2d543374a3e Signed-off-by: ashishk1994 <ashishk.iiit@gmail.com>
2016-12-05Fix Pep8 issues related to \Morgan Richomme1-2/+1
JIRA: FUNCTEST-630 Change-Id: I2b6d3bec67c6fe290fb2ad795a54a2dd2e3c7a0b Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
2016-11-24Extracted all global parameters into functest_constants.pyhelenyao1-80/+78
JIRA: FUNCTEST-533 1. Extracted all global variables into functest_constants.py and updated all affected areas accordingly 2. Used os.path.join to replace '/' to come up with the path for better cross-platform support and improve the path accuracy 3. Removed unused variables 4. Updated the hardcoded path in Dockerfile by using variable reference 5. Removed "/" ending from all path variables 6. Updated the unit test Change-Id: Ib30a81d1f0c83fbaef042d63c187c27bd18301bb Signed-off-by: helenyao <yaohelan@huawei.com>
2016-11-10change path for python ci filesMorgan Richomme1-0/+299
JIRA: FUNCTEST-525 Change-Id: I6b09eaec55e42a3ee1474b21bc7ed87a71118e60 Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>