diff options
Diffstat (limited to 'zuul/driver/__init__.py')
-rw-r--r-- | zuul/driver/__init__.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/zuul/driver/__init__.py b/zuul/driver/__init__.py index 671996ac3..0c3105d1b 100644 --- a/zuul/driver/__init__.py +++ b/zuul/driver/__init__.py @@ -254,3 +254,27 @@ class ReporterInterface(object): """ pass + + +@six.add_metaclass(abc.ABCMeta) +class WrapperInterface(object): + """The wrapper interface to be implmeneted by a driver. + + A driver which wraps execution of commands executed by Zuul should + implement this interface. + + """ + + @abc.abstractmethod + def getPopen(self, **kwargs): + """Create and return a subprocess.Popen factory wrapped however the + driver sees fit. + + This method is required by the interface + + :arg dict kwargs: key/values for use by driver as needed + + :returns: a callable that takes the same args as subprocess.Popen + :rtype: Callable + """ + pass |