Skip to content
Snippets Groups Projects
Commit 91261b27 authored by Rich Lane's avatar Rich Lane
Browse files

IVSSwitch: add support for dpctl

dpctl is not included with IVS. The user will need to obtain it from the
OpenFlow reference repository.
parent 812c91cc
No related branches found
No related tags found
No related merge requests found
...@@ -1055,6 +1055,8 @@ def start( self, controllers ): ...@@ -1055,6 +1055,8 @@ def start( self, controllers ):
args.extend( ['-i', intf.name] ) args.extend( ['-i', intf.name] )
for c in controllers: for c in controllers:
args.extend( ['-c', '%s:%d' % (c.IP(), c.port)] ) args.extend( ['-c', '%s:%d' % (c.IP(), c.port)] )
if self.listenPort:
args.extend( ['--listen', '127.0.0.1:%i' % self.listenPort] )
with open( '/tmp/ivs.%s.log' % self.name, 'w' ) as logfile: with open( '/tmp/ivs.%s.log' % self.name, 'w' ) as logfile:
with open( '/dev/null', 'w' ) as nullfile: with open( '/dev/null', 'w' ) as nullfile:
...@@ -1080,7 +1082,10 @@ def detach( self, intf ): ...@@ -1080,7 +1082,10 @@ def detach( self, intf ):
def dpctl( self, *args ): def dpctl( self, *args ):
"Run dpctl command" "Run dpctl command"
return "dpctl not supported\n" or args or self # satisfy pylint if not self.listenPort:
return "can't run dpctl without passive listening port"
return self.cmd( 'dpctl ' + ' '.join( args ) +
' tcp:127.0.0.1:%i' % self.listenPort )
class Controller( Node ): class Controller( Node ):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment