From cb9c0ba6c5d96a003dccfbd99751bb63c92b42ef Mon Sep 17 00:00:00 2001 From: Marc De Leenheer Date: Thu, 22 Jan 2015 14:50:04 -0800 Subject: [PATCH] Fix rewriting of LINC-OE config for long controller IPs (ONOS-834). Change-Id: I1e60ca4dc4d5d444eca905e13e234ad781009755 --- tools/test/topos/opticalUtils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/test/topos/opticalUtils.py b/tools/test/topos/opticalUtils.py index f0c78fa9a7..b645c14d81 100644 --- a/tools/test/topos/opticalUtils.py +++ b/tools/test/topos/opticalUtils.py @@ -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 )