aboutsummaryrefslogtreecommitdiffstats
path: root/vicn/resource/icn/nfd.py
diff options
context:
space:
mode:
Diffstat (limited to 'vicn/resource/icn/nfd.py')
-rw-r--r--vicn/resource/icn/nfd.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/vicn/resource/icn/nfd.py b/vicn/resource/icn/nfd.py
index c65fdeb8..1b7f39f7 100644
--- a/vicn/resource/icn/nfd.py
+++ b/vicn/resource/icn/nfd.py
@@ -22,6 +22,7 @@ import re
from vicn.core.exception import ResourceNotFound
from vicn.core.task import inline_task, BashTask
from vicn.core.task import ParseRegexTask
+from vicn.core.task import inherit_parent
from vicn.resource.icn.forwarder import Forwarder
from vicn.resource.icn.icn_application import ICN_SUITE_NDN
@@ -74,17 +75,20 @@ class NFD(Forwarder):
# Resource lifecycle
#--------------------------------------------------------------------------
+ @inherit_parent
@inline_task
def __get__(self):
# NFD is assumed not to exist
raise ResourceNotFound
+ @inherit_parent
def __create__(self):
# Modify the configuration file before running the forwarder service
conf = BashTask(self.node, CMD_SET_STRATEGY_CACHE, {'nfd': self})
- forwarder = Forwarder.__create__(self)
- return conf.then(forwarder)
+ forwarder = super().__create__()
+ return conf > forwarder
+ @inherit_parent
def __delete__(self):
raise NotImplementedError