git://git.onelab.eu
/
nodemanager.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make usage of sliver auth configurable from the _default slice attribute
[nodemanager.git]
/
net.py
diff --git
a/net.py
b/net.py
index
2d02905
..
be4e16e
100644
(file)
--- a/
net.py
+++ b/
net.py
@@
-11,7
+11,9
@@
import os, string, time, socket
import sioc, plnet
# local modules
import sioc, plnet
# local modules
-import bwlimit, logger, iptables
+import bwlimit, logger, iptables, tools
+
+dev_default = tools.get_default_if()
def start(options, conf):
logger.log("net plugin starting up...")
def start(options, conf):
logger.log("net plugin starting up...")
@@
-22,7
+24,7
@@
def GetSlivers(data, config, plc):
if 'OVERRIDES' in dir(config):
if config.OVERRIDES.get('net_max_rate') == '-1':
logger.log("net: Slice and node BW Limits disabled.")
if 'OVERRIDES' in dir(config):
if config.OVERRIDES.get('net_max_rate') == '-1':
logger.log("net: Slice and node BW Limits disabled.")
- if len(bwlimit.tc("class show dev
eth0"
)):
+ if len(bwlimit.tc("class show dev
%s" % dev_default
)):
logger.verbose("*** DISABLING NODE BW LIMITS ***")
bwlimit.stop()
else:
logger.verbose("*** DISABLING NODE BW LIMITS ***")
bwlimit.stop()
else: