aboutsummaryrefslogtreecommitdiffstats
path: root/sfc/lib/utils.py
AgeCommit message (Collapse)AuthorFilesLines
2017-02-15Modify run_cmd to return exit codes as well as stdout and stderrJuan Vidal1-12/+14
The old implementation of run_cmd returned different things in different situations, so the simplified new version broke some functions relying on boolean values instead of stdout. Change-Id: Ie94e529d2abfad171b9707df169925c6f5f47dfc Signed-off-by: Juan Vidal <juan.vidal.allende@ericsson.com>
2017-02-15Refactor utils using installer adaptersGeorge Paraskevopoulos1-63/+13
JIRA: SFC-65 JIRA: SFC-71 Use the new library in releng to talk to fuel. This allows for correct configuration of the compute hosts to resolve SFC-71 Also since https://gerrit.opnfv.org/gerrit/#/c/28281/ was merged it allows to run in multienv deployments so it resolves SFC-65 Change-Id: I5e6beb90d9c5108c21acb8d898f07cd2f4ae34f3 Signed-off-by: George Paraskevopoulos <geopar@intracom-telecom.com>
2017-02-14Extend the logging in the utils lib“Manuel Buil”1-0/+2
To learn about some of the bugs I saw, I added these lines to know what is going on. It was very useful to me and I thought that perhaps we can add it to the code to help in the future Change-Id: I070077749d2086489a536c9a7b7ecca4a05bb0a1 Signed-off-by: “Manuel Buil” <mbuil@suse.com>
2017-02-13Fix bugs when setting up computes“Manuel Buil”1-2/+3
JIRA: SFC-71 1 - dev br-int was missing when adding the route 2 - grep exits with 1 when nothing is found triggering an ERROR log even though there was not error Change-Id: Ib65d74d4b01021dcabb5af9068451b97c0170f75 Signed-off-by: “Manuel Buil” <mbuil@suse.com>
2017-02-08Merge "Avoid looking for VMs from tenants different from the one running the ↵Manuel Buil1-1/+1
testcase"
2017-02-08Merge "Simplify run_cmd"Manuel Buil1-11/+5
2017-02-08Merge "Modification of the ofctl_time counter"Manuel Buil1-2/+17
2017-02-07Simplify run_cmdGeorge Paraskevopoulos1-11/+5
sfc.lib.utils.run_cmd has a lot of unnecessary options which are never used. This patch simplifies this function and also fixes the returncode checking (commands have terminate with errors on returncode != 0 not on return code < 0) Also change the return value on error to None instead of False Change-Id: I5f1068ffd1bc6091e866a002b1afcb2507d30981 Signed-off-by: George Paraskevopoulos <geopar@intracom-telecom.com>
2017-02-06Avoid looking for VMs from tenants different from the one running the testcaseJuan Vidal1-1/+1
- The testcase should only retrieve servers from its tenant, not from other ones. Trying to access other tenant's VMs makes failures in subsequent parts of the test. Change-Id: I0779f1e159573162db59272142bc8773dcbafa2f Signed-off-by: Juan Vidal <juan.vidal.allende@ericsson.com>
2017-02-03Bug fix: prepare all computes not only one“Manuel Buil”1-12/+11
JIRA:SFC-71 Not all compute nodes were prepared with the right config to run SFC-NSH Change-Id: I3187020daecf0a90e5f7314dea3fefbf8fe470be Signed-off-by: “Manuel Buil” <mbuil@suse.com>
2017-02-03Modification of the ofctl_time counter“Manuel Buil”1-2/+17
If ODL is fast and changes the class. flow too quick, this function considers it as coming from an old deployment and thus never detects that the flows changed Change-Id: I0d6d1c27b325fb832d9ed6d4849f830eeea70185 Signed-off-by: “Manuel Buil” <mbuil@suse.com>
2017-01-17Merge "Get Fuel environment id from configuration"Manuel Buil1-1/+2
2017-01-12Sanitize sfc.lib.utilsGeorge Paraskevopoulos1-20/+5
- Remove unused (and unnecessary) wrapper function get_compute_nodes - Rename capture_err_logs to descriptive capture_ovs_logs - Rename compute_node argument in create_instance to av_zone - Rename capture_time_logs to more accurate wait_for_classification_rules Change-Id: Iab06eae0aa35b25ef7d5bf41a1e684f38b26430c Signed-off-by: George Paraskevopoulos <geopar@intracom-telecom.com>
2017-01-11Get Fuel environment id from configurationGeorge Paraskevopoulos1-1/+2
JIRA: SFC-65 Get the id of the fuel environment from config.yaml instead of an environmental variable Change-Id: I39e61200986b407ae19cc9f7c1384c34c8410c8b Signed-off-by: George Paraskevopoulos <geopar@intracom-telecom.com>
2016-12-15Make SFC installable as a python modulejose.lausuch1-0/+413
New directory structure: <root>/sfc <root>/sfc/lib/ <root>/sfc/tests <root>/sfc/tests/functest JIRA: SFC-60 After installing sfc, the imports would be: import sfc.tests.functest.x import sfc.lib.x Change-Id: Ib15172239aefdef65056d6598210a1b28a4b2eff Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>