git://git.onelab.eu
/
nodemanager.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3eeea60
)
add carriage return to lines
author
Faiyaz Ahmed
<faiyaza@cs.princeton.edu>
Mon, 24 Mar 2008 21:41:20 +0000
(21:41 +0000)
committer
Faiyaz Ahmed
<faiyaza@cs.princeton.edu>
Mon, 24 Mar 2008 21:41:20 +0000
(21:41 +0000)
codemux.py
patch
|
blob
|
history
diff --git
a/codemux.py
b/codemux.py
index
851fd24
..
62e9fe5
100644
(file)
--- a/
codemux.py
+++ b/
codemux.py
@@
-27,7
+27,7
@@
def GetSlivers(data):
for attribute in sliver['attributes']:
if attribute['name'] == 'codemux':
# add to conf. Attribute is [host, port]
for attribute in sliver['attributes']:
if attribute['name'] == 'codemux':
# add to conf. Attribute is [host, port]
- [host, port] = attribute['value'].split()
+ [host, port] = attribute['value'].split(
","
)
try:
# Check to see if sliver is running. If not, continue
if vserver.VServer(sliver['name']).is_running():
try:
# Check to see if sliver is running. If not, continue
if vserver.VServer(sliver['name']).is_running():
@@
-62,9
+62,9
@@
def GetSlivers(data):
def writeConf(slivers, conf = CODEMUXCONF):
'''Write conf with default entry up top. Restart service.'''
f = open(conf, "w")
def writeConf(slivers, conf = CODEMUXCONF):
'''Write conf with default entry up top. Restart service.'''
f = open(conf, "w")
- f.write("* root 1080")
- for (
host, slice, port
) in slivers.iteritems():
- f.write("%s %s %s
" % [host, slice, port]
)
+ f.write("* root 1080
\n
")
+ for (
slice, params
) in slivers.iteritems():
+ f.write("%s %s %s
\n" % (params['host'], slice, params['port'])
)
f.truncate()
f.close()
logger.log("codemux: restarting codemux service")
f.truncate()
f.close()
logger.log("codemux: restarting codemux service")