git://git.onelab.eu
/
nodemanager-topo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6f3e93b
)
Fix bug caused by netns being a string
author
Andy Bavier
<acb@cs.princeton.edu>
Thu, 19 Feb 2009 19:32:56 +0000
(19:32 +0000)
committer
Andy Bavier
<acb@cs.princeton.edu>
Thu, 19 Feb 2009 19:32:56 +0000
(19:32 +0000)
topo.py
patch
|
blob
|
history
diff --git
a/topo.py
b/topo.py
index
fb9e33c
..
8174dbf
100755
(executable)
--- a/
topo.py
+++ b/
topo.py
@@
-125,7
+125,7
@@
def writeConf(slicename, value):
f.write("%s\n" % value)
f.close()
STATUS="OFF"
- if
int(value) >= 1
:
+ if
value
:
STATUS="ON"
logger.log("%s: network namespace %s\n" % (slicename, STATUS))
@@
-150,8
+150,8
@@
def GetSlivers(data):
for attribute in sliver['attributes']:
attrs[attribute['name']] = attribute['value']
if 'netns' in attrs:
-
writeConf(sliver['name'],
attrs['netns'])
- netns = attrs['netns']
+
netns = int(
attrs['netns'])
+ writeConf(sliver['name'], netns)
else:
netns = 0