Refactor some common methods into utils 39/20739/3
authorRomanos Skiadas <rski@intracom-telecom.com>
Wed, 7 Sep 2016 12:35:52 +0000 (12:35 +0000)
committerRomanos Skiadas <rski@intracom-telecom.com>
Fri, 9 Sep 2016 09:30:35 +0000 (12:30 +0300)
commit4c2e5fb06be31502ab3476f25f6d1c2ef8d7b0f1
tree85273c61338a3bc25bab6f8b4a9663f85869740e
parentc12b86401ce7eec4ed3b546a6399a3a2599b7e79
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>
test/functest/testcase_1.py
test/functest/testcase_2.py
test/functest/testcase_4.py
test/functest/utils.py [new file with mode: 0644]