aboutsummaryrefslogtreecommitdiffstats
path: root/vicn/core/task.py
diff options
context:
space:
mode:
authorMarcel Enguehard <mengueha+fdio@cisco.com>2017-05-23 10:50:17 +0200
committerMarcel Enguehard <mengueha+fdio@cisco.com>2017-05-23 08:57:12 +0000
commitbe0b435d307173598c30fcacc421b17112137099 (patch)
treeed8aae7eef796eb7381d21937b095a036733789a /vicn/core/task.py
parent895a6328d6e64948ed213e8fbbb3ab15aca0df43 (diff)
Introduced groups + lxd profiles + diverted control network handling to lxd + misc bug fixes
Change-Id: Iae26bc2994ac9704dde7dfa8fbe4be1b74cf9e6f Signed-off-by: Marcel Enguehard <mengueha+fdio@cisco.com>
Diffstat (limited to 'vicn/core/task.py')
-rw-r--r--vicn/core/task.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/vicn/core/task.py b/vicn/core/task.py
index 53321972..8346c65e 100644
--- a/vicn/core/task.py
+++ b/vicn/core/task.py
@@ -219,6 +219,14 @@ class PythonTask(Task):
fut = loop.run_in_executor(None, partial)
fut.add_done_callback(self._done_callback)
+ def execute_blocking(self, *args, **kwargs):
+ all_args = self._args + args
+ all_kwargs = dict()
+ all_kwargs.update(self._kwargs)
+ all_kwargs.update(kwargs)
+
+ return self._func(*all_args, **all_kwargs)
+
def __repr__(self):
s = _get_func_desc(self._func)
return '<Task[py] {}>'.format(s) if s else '<Task[py]>'