Refactor some common methods into utils 77/20777/1
authorRomanos Skiadas <rski@intracom-telecom.com>
Wed, 7 Sep 2016 12:35:52 +0000 (12:35 +0000)
committerJose Lausuch <jose.lausuch@ericsson.com>
Fri, 9 Sep 2016 13:35:05 +0000 (13:35 +0000)
commite0095c0f7bc359910633fda491013e9c1fae3408
tree85273c61338a3bc25bab6f8b4a9663f85869740e
parent75589404a758145d18bdcb7f5813c818f12b3729
Refactor some common methods into utils

- generete_ping_userdata(): This method was exactly the same in two
  tests
- create_instance(): The various implementations of this method had
  almost the same signature, but not quite. This was fixed by adding
  extra arguments as needed. Also a global variable was used in the
  function, which was converted into a parameter.
- create_network(): The three implementations of create_network had
  three different signatures and returned different variables. They
  were all unified in a single create_network class and the calls to
  create_network were adjusted accordingly.

Revision 1: Fix flake8 violations
Revision 2: Rename logger in utils

Change-Id: Ib6cfe798dc561a69eb50c901e3aa71c19d465821
Signed-off-by: Romanos Skiadas <rski@intracom-telecom.com>
(cherry picked from commit 4c2e5fb06be31502ab3476f25f6d1c2ef8d7b0f1)
test/functest/testcase_1.py
test/functest/testcase_2.py
test/functest/testcase_4.py
test/functest/utils.py [new file with mode: 0644]