remerged with git pending fix to distributed configuration problem

This commit is contained in:
Rod A Santiago 2016-10-19 16:21:06 -07:00
parent 5d0aa4ac1a
commit d17ed889d2
9 changed files with 348 additions and 345 deletions

View file

@ -116,7 +116,19 @@ class TunTap(PyCoreNetIf):
def nodedevexists():
cmd = (IP_BIN, 'link', 'show', self.name)
return self.node.cmd(cmd)
self.waitfor(nodedevexists)
count = 0
while True:
try:
self.waitfor(nodedevexists)
break
except RuntimeError:
# check if this is an EMANE interface; if so, continue
# waiting if EMANE is still running
if count < 5 and isinstance(self.net, EmaneNode) and \
self.node.session.emane.emanerunning(self.node):
count += 1
else:
raise
def install(self):
''' Install this TAP into its namespace. This is not done from the