daemon: added option API TLVs so that per-interface parameters are kept for EMANE models when a single node has multiple interfaces of the same EMANE model type but different model parameters
This commit is contained in:
parent
46cd65c821
commit
68532cb818
2 changed files with 8 additions and 11 deletions
|
@ -11,6 +11,8 @@ vnet.py: PyCoreNet and LxBrNet classes that implement virtual networks using
|
|||
Linux Ethernet bridging and ebtables rules.
|
||||
'''
|
||||
|
||||
import traceback
|
||||
|
||||
import os, sys, threading, time, subprocess
|
||||
|
||||
from core.api import coreapi
|
||||
|
@ -345,6 +347,10 @@ class LxBrNet(PyCoreNet):
|
|||
''' Configure link parameters by applying tc queuing disciplines on the
|
||||
interface.
|
||||
'''
|
||||
|
||||
sys.stderr.write("enter linkconfig() ...\n")
|
||||
traceback.print_stack()
|
||||
|
||||
if devname is None:
|
||||
devname = netif.localname
|
||||
tc = [TC_BIN, "qdisc", "replace", "dev", devname]
|
||||
|
|
|
@ -14,7 +14,6 @@ that manages a CORE session.
|
|||
import os, sys, tempfile, shutil, shlex, atexit, gc, pwd
|
||||
import threading, time, random
|
||||
import traceback
|
||||
import subprocess
|
||||
|
||||
from core.api import coreapi
|
||||
if os.uname()[0] == "Linux":
|
||||
|
@ -290,16 +289,8 @@ class Session(object):
|
|||
self.warn("Error writing hook '%s': %s" % (filename, e))
|
||||
self.info("Running hook %s for state %s" % (filename, state))
|
||||
try:
|
||||
stdout = open(os.path.join(self.sessiondir,
|
||||
filename + '.log'), 'w')
|
||||
stderr = subprocess.STDOUT
|
||||
except:
|
||||
stdout = None
|
||||
stderr = None
|
||||
try:
|
||||
check_call(["/bin/sh", filename], stdin=open(os.devnull, 'r'),
|
||||
stdout=stdout, stderr=stderr, close_fds=True,
|
||||
cwd=self.sessiondir, env=self.getenviron())
|
||||
check_call(["/bin/sh", filename], cwd=self.sessiondir,
|
||||
env=self.getenviron())
|
||||
except Exception, e:
|
||||
self.warn("Error running hook '%s' for state %s: %s" %
|
||||
(filename, state, e))
|
||||
|
|
Loading…
Reference in a new issue