import functest.core.feature_base as base
from sfc.tests.functest import run_tests


class OpenDaylightSFC(base.FeatureBase):

    def __init__(self):
        super(OpenDaylightSFC, self).__init__(project='sfc',
                                              case='functest-odl-sfc',
                                              repo='dir_repo_sfc')

    def execute(self):
        return run_tests.main()

import functest.core.feature_base as base


class OpenDaylightSFC(base.FeatureBase):

    def __init__(self):
        super(OpenDaylightSFC, self).__init__(project='sfc',
                                              case='functest-odl-sfc',
                                              repo='dir_repo_sfc')
        dir_sfc_functest = '{}/sfc/tests/functest'.format(self.repo)
        self.cmd = 'cd %s && python ./run_tests.py' % dir_sfc_functest

Revert "Make SFC test a python call to main()"
Revert "Make SFC test a python call to main()"

This reverts commit d5820bef80ea4bdb871380dbfe41db12290fc5f8.

Robot test runs before SFC test and it imports
https://github.com/robotframework/SSHLibrary
which does a monkey patching in 
the python runtime / paramiko.
Untill now sfc run in a new python process (clean)
because it run using the bash command.
But when importing it as a module and call main()
from python, it will run in the patched runtime 
and it will error out.
https://hastebin.com/iyobuxutib.py


Change-Id: I54237c32c957718b363d302efe84e01bc78e4f47
Signed-off-by: George Paraskevopoulos <97fa9f4b61869a8ee92863df90135c882f7b3aa0@intracom-telecom.com>

  import functest.core.feature_base as base
- from sfc.tests.functest import run_tests
  
  
  class OpenDaylightSFC(base.FeatureBase):
  
      def __init__(self):
          super(OpenDaylightSFC, self).__init__(project='sfc',
                                                case='functest-odl-sfc',
                                                repo='dir_repo_sfc')
+         dir_sfc_functest = '{}/sfc/tests/functest'.format(self.repo)
+         self.cmd = 'cd %s && python ./run_tests.py' % dir_sfc_functest
  
-     def execute(self):
-         return run_tests.main()
- 
Revert "Make SFC test a python call to main()"
## Code Before:
import functest.core.feature_base as base
from sfc.tests.functest import run_tests


class OpenDaylightSFC(base.FeatureBase):

    def __init__(self):
        super(OpenDaylightSFC, self).__init__(project='sfc',
                                              case='functest-odl-sfc',
                                              repo='dir_repo_sfc')

    def execute(self):
        return run_tests.main()

## Instruction:
Revert "Make SFC test a python call to main()"
## Code After:
import functest.core.feature_base as base


class OpenDaylightSFC(base.FeatureBase):

    def __init__(self):
        super(OpenDaylightSFC, self).__init__(project='sfc',
                                              case='functest-odl-sfc',
                                              repo='dir_repo_sfc')
        dir_sfc_functest = '{}/sfc/tests/functest'.format(self.repo)
        self.cmd = 'cd %s && python ./run_tests.py' % dir_sfc_functest
