Committed by
Gerrit Code Review
Fix rewriting of LINC-OE config for long controller IPs (ONOS-834).
Change-Id: I1e60ca4dc4d5d444eca905e13e234ad781009755
Showing
1 changed file
with
2 additions
and
2 deletions
... | @@ -248,11 +248,11 @@ def startOE( net ): | ... | @@ -248,11 +248,11 @@ def startOE( net ): |
248 | return False | 248 | return False |
249 | 249 | ||
250 | info ('*** Setting multiple controllers in sys.config...\n' ) | 250 | info ('*** Setting multiple controllers in sys.config...\n' ) |
251 | - searchStr = '{controllers,.*$' | 251 | + searchStr = '\[{"Switch.*$' |
252 | ctrlStr = '' | 252 | ctrlStr = '' |
253 | for index in range(len(net.controllers)): | 253 | for index in range(len(net.controllers)): |
254 | ctrlStr += '{"Switch%d-Controller","%s",%d,tcp},' % (index, net.controllers[index].ip, net.controllers[index].port) | 254 | ctrlStr += '{"Switch%d-Controller","%s",%d,tcp},' % (index, net.controllers[index].ip, net.controllers[index].port) |
255 | - replaceStr = '{controllers,[%s]},' % ctrlStr[:-1] # Cut off last comma | 255 | + replaceStr = '[%s]},' % ctrlStr[:-1] # Cut off last comma |
256 | sedCmd = 'sed -i \'s/%s/%s/\' sys.config' % (searchStr, replaceStr) | 256 | sedCmd = 'sed -i \'s/%s/%s/\' sys.config' % (searchStr, replaceStr) |
257 | output = quietRun( sedCmd, shell=True ) | 257 | output = quietRun( sedCmd, shell=True ) |
258 | 258 | ... | ... |
-
Please register or login to post a comment