mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-17 18:32:28 +02:00
Fix rewriting of LINC-OE config for long controller IPs (ONOS-834).
Change-Id: I1e60ca4dc4d5d444eca905e13e234ad781009755
This commit is contained in:
parent
93356bcabc
commit
cb9c0ba6c5
@ -248,11 +248,11 @@ def startOE( net ):
|
||||
return False
|
||||
|
||||
info ('*** Setting multiple controllers in sys.config...\n' )
|
||||
searchStr = '{controllers,.*$'
|
||||
searchStr = '\[{"Switch.*$'
|
||||
ctrlStr = ''
|
||||
for index in range(len(net.controllers)):
|
||||
ctrlStr += '{"Switch%d-Controller","%s",%d,tcp},' % (index, net.controllers[index].ip, net.controllers[index].port)
|
||||
replaceStr = '{controllers,[%s]},' % ctrlStr[:-1] # Cut off last comma
|
||||
replaceStr = '[%s]},' % ctrlStr[:-1] # Cut off last comma
|
||||
sedCmd = 'sed -i \'s/%s/%s/\' sys.config' % (searchStr, replaceStr)
|
||||
output = quietRun( sedCmd, shell=True )
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user