aboutsummaryrefslogtreecommitdiffstats
path: root/functest/utils
AgeCommit message (Collapse)AuthorFilesLines
2017-03-22Ignore certain modules for loggingjose.lausuch1-1/+12
Some modules are logged to functest.log or the console and are not relevant for us since they are already in the openstack logs. This causes a huge log which makes it unreadable. Change-Id: I3f0fb83e2080e41cd5bf815f8448f5bc25e3464a Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2017-03-20bug fix: version not retrieved on weekly jobsMorgan Richomme1-7/+1
a first fix had been done but the version was retrieved 2 times with the regex this patch removes the second regex and re-use get_version the associated unit tests has been removed because even if the build_tag is badly formated, it will not prevent the results to be pushed with version = unknown JIRA: FUNCTEST-765 Change-Id: I2cbe8ba1dd7278c3f3510a47c667c433f65e00f8 Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
2017-03-17Bug Fix: retrieve version from build tag in weekly jobsMorgan Richomme1-4/+3
- fix regex issue - add unit test to cover weekly and dummy build tags - remove useless logs JIRA: FUNCTEST-765 Change-Id: I7a8d40b4662f4557cd080669da46fb1c32d2ad6d Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
2017-03-15env variable support for test DB urlMorgan Richomme1-1/+9
So far DB url was retrieved from configuration file If you want to use the CI chain (jenkins, testapi, test DB, functest, ..) then you have a problem calling functest will systematically point to the configuration from the repo Supporting env variable allow to avoid post processing in the configuration file and as a consequence offer the possibility to create a local DB to host local results Change-Id: Ie64b8b265827d7f5724c7066a8c173de8cf012e2 Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
2017-03-10Merge "Add extra check to avoid double delete of instances"Morgan Richomme1-1/+6
2017-03-07delete ft_constants and file functest_constants.pySerenaFeng1-209/+0
delete no longer used ft_constants in run_test.py substitute ft_constants with CONST in foundation.py and remove useless str() finally delete not-used file functest_constants.py Change-Id: I109a5409e501b610f41aae7d75c55ca745a3d4c1 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-03-03Add extra check to avoid double delete of instancesCiprian Barbu1-1/+6
JIRA: FUNCTEST-748 Sometimes Openstack doesn't handle deletion in a timely manner which can lead to openstack_clean to think there are leftovers from a previous test when in fact the instances are pending deletion. This patch tries to better handle this kind of situation that would otherwise result in a double free and eventually <class 'nova.exception.InstanceInvalidState'> (HTTP 500) Change-Id: Id0d9b61d8380e9b12fc7acd46cd84260714f4baf Signed-off-by: Ciprian Barbu <ciprian.barbu@enea.com>
2017-03-01Merge "Adopt TestcaseBase for ONOS and ONOS SFC"Jose Lausuch1-9/+0
2017-03-01Adopt TestcaseBase for ONOS and ONOS SFChelenyao1-9/+0
1. Adopted TestcaseBase for ONOS and ONOS SFC 2. Removed the ONOS testcase from exec_test.sh This patch is not meant to refactor the code which can be improved in a later patch. Change-Id: Ib8ac47742f598648c7575c9a8968477307629d42 Signed-off-by: helenyao <yaohelan@huawei.com>
2017-03-01Merge "Fix bad log message when trying to create an existing sec group"Jose Lausuch1-26/+33
2017-03-01Merge "[odl-sfc] Add function to retrieve a resource from HEAT"Morgan Richomme1-0/+28
2017-03-01Fix bad log messageMorgan Richomme1-26/+33
when trying to create an existing sec group JIRA: FUNCTEST-741 Change-Id: I049cdbd854bf5c4fbc490fb0fd52689800159da5 Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
2017-03-01Merge "config_functest support muiltilevel query"Morgan Richomme1-8/+12
2017-02-28[odl-sfc] Add function to retrieve a resource from HEATJuan Vidal1-0/+28
Introduces function to retrieve a HEAT client. For the moment, the only wrapper function is the one to retrieve resources. Added unit tests to cover the new functions. python-heatclient is added to requirements.txt and test_requirements.txt. Change-Id: I547138141c6aad611f2353599fb70a013c83058a Signed-off-by: Juan Vidal <juan.vidal.allende@ericsson.com>
2017-02-25Merge "Bugfix:Added the adapter info for compass and joid"Jose Lausuch1-1/+1
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-1/+1
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-0/+7
2017-02-23Merge "[odl-sfc] Fix wait_for_vnf returning vnf_id on timeout"Jose Lausuch1-0/+5
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-0/+7
JIRA: FUNCTEST-727 Change-Id: I4d8e24c0cb6272d92dc777dc82d56490948598db Signed-off-by: helenyao <yaohelan@huawei.com>
2017-02-22Merge "Undo setting CI_DEBUG to true by default"Cedric Ollivier1-1/+1
2017-02-22Merge "Add deployment_handler printout to prepare env"Jose Lausuch1-0/+2
2017-02-21Add deployment_handler printout to prepare envjose.lausuch1-0/+2
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-21[odl-sfc] Fix wait_for_vnf returning vnf_id on timeoutJuan Vidal1-0/+5
If the VNF does not properly boot after timeout, wait_for_vnf should return "None" to flag the error. Also, refresh the VNF on every iteration. Change-Id: I9ed7c399e689dfbace7c5c8914552e77bf45fc8f Signed-off-by: Juan Vidal <juan.vidal.allende@ericsson.com>
2017-02-21[odl-sfc] Add function get_vnf and fix endless loop in get_vnf_idJuan Vidal1-13/+24
Change-Id: I1828242cec6449b36d09be21a62074b3c131af17 Signed-off-by: Juan Vidal <juan.vidal.allende@ericsson.com>
2017-02-20[odl-sfc] Add timeout to get_vnf_id and create_vnf functionsJuan Vidal1-18/+22
create_vnf function could end up in and endless loop if it is not able to retrieve the VNF id. Also, a timeout could help to detect problems when instantiation is too slow. Change-Id: I21744338a73f122d0c7a8fbe699738b11a7e2b76 Signed-off-by: Juan Vidal <juan.vidal.allende@ericsson.com>
2017-02-20Undo setting CI_DEBUG to true by defaultRomanos Skiadas1-1/+1
Change-Id: I24ca35ada7591e93413cdda1905ee01f77131889 Signed-off-by: Romanos Skiadas <rski@intracom-telecom.com>
2017-02-16config_functest support muiltilevel querySerenaFeng1-8/+12
Change-Id: I4b991e63b3eb21b7e8eec9fc40cdf082f715e238 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-02-16Merge "[odl-sfc] Fix bug when getting the params for create_vnf"Jose Lausuch1-0/+1
2017-02-16[odl-sfc] Add symmetric option for sfc_createGeorge Paraskevopoulos1-1/+4
Change-Id: Iead7767b936376c2f5b6c6a5584734ef074c1346 Signed-off-by: George Paraskevopoulos <geopar@intracom-telecom.com>
2017-02-16[odl-sfc] Fix bug when getting the params for create_vnfGeorge Paraskevopoulos1-0/+1
Change-Id: Iac1cce36a2f4a8965545507b67584a42c5ef775a Signed-off-by: George Paraskevopoulos <geopar@intracom-telecom.com>
2017-02-15Add parameterized vnfd capabilities on vnf createGeorge Paraskevopoulos1-1/+6
JIRA: SFC-73 We can pass parameters to vnfds when creating a vnf. We need this now to specify the availability zone Change-Id: I8d6533ca331361f1581059050aa773936b4dff66 Signed-off-by: George Paraskevopoulos <geopar@intracom-telecom.com>
2017-02-15Merge "update cloudify_ims case"valentin boucher1-1/+1
2017-02-15update cloudify_ims caseboucherv1-1/+1
bug fixes Provisional change of the ci loop var to daily for VNF testcase. JIRA: FUNCTEST-710 Change-Id: I6dc8072b4e56c96473a2b09f1881b96024259db5 Signed-off-by: boucherv <valentin.boucher@orange.com>
2017-02-15Merge "Put the Logger as Object oriented."Jose Lausuch1-32/+26
2017-02-14Merge "Limit the substitution of ' in env vars"Cedric Ollivier1-4/+6
2017-02-14Merge changes from topic 'revert_write_to_file'Jose Lausuch2-33/+39
* changes: Add can_dump_request_to_file decorator Revert "write test results to a local file"
2017-02-14Limit the substitution of ' in env varsCédric Ollivier1-4/+6
Only ' located and the beginning or at the end of the string are removed. It completes the first proposal [1]. [1] https://gerrit.opnfv.org/gerrit/#/c/28563/ Change-Id: Ic21cea4c6e98d92983f385c875c3e214411b5f2d Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-02-14Bugfix: remove double quotes from environment variablesjose.lausuch1-1/+2
JIRA: FUNCTEST-724 Change-Id: Iae248d710813a241752e1a06fb87d650caf3d188 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
2017-02-13Add can_dump_request_to_file decoratorCédric Ollivier2-0/+38
can_dump_request_to_file can be called to dump any request data to a local file as defined by test_db_url. If its scheme is file, Session.send() is patched. Else the behavior is kept unchanged. Change-Id: Id219dad274b5f02a05259a2ed13e882c04eea7b4 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-02-13Revert "write test results to a local file"Cédric Ollivier1-33/+1
This reverts commit ee21af78fbfc93e888acda121f08d2b216dd0159. Change-Id: If7c8d3b645073574862eb67225b1e11b0dd7a021 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-02-10Put the Logger as Object oriented.helenyao1-32/+26
There is no need to worry about adding duplicate handler as the logging has the ability to avoid it. Change-Id: I7198c1e1c05df347feb0d7192e80592e662314b1 Signed-off-by: helenyao <yaohelan@huawei.com>
2017-02-09Fix source_credentials in openstack_utilsCédric Ollivier1-7/+7
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-06Change log level when pod, scenario or build_tag cannot be retrievedMorgan Richomme1-5/+6
when using Functest out of CI, such env variables may not be set This shall not result in Error messages JIRA: FUNCTEST-716 Change-Id: I86d2023145480dfa9c8d593ea274acbd9e431ef7 Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
2017-02-03Fix template error logGeorge Paraskevopoulos1-7/+9
JIRA:SFC-70 Printing the VNFD template during VNFD creation was left on error level. Move it on info level and make printing prettier. Fix unit test for create_vnfd Change-Id: Ib04a43d72abcf9b6fbcaec9ea05d57b9f017b53f Signed-off-by: George Paraskevopoulos <geopar@intracom-telecom.com>
2017-02-03Merge "Get tacker client using session authentication"Jose Lausuch1-3/+3
2017-02-02Merge changes from topic 'convert_unix_format'Jose Lausuch1-0/+0
* changes: Change permissions of python files Convert files to Unix format
2017-02-02Get tacker client using session authenticationGeorge Paraskevopoulos1-3/+3
Update getting tacker client logic to use session for authentication Change-Id: Ibc46e3d6b749540e1a23d08f6635c323e4dcf08d Signed-off-by: George Paraskevopoulos <geopar@intracom-telecom.com>
2017-02-02Change permissions of python filesCédric Ollivier1-0/+0
Change-Id: I21826594ffa9b06a70664aa3512f0b5df8b546cd Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>