Revision b69ef234 mininet/node.py

View differences:

mininet/node.py
810 810
        """Start OpenFlow reference user datapath.
811 811
           Log to /tmp/sN-{ofd,ofp}.log.
812 812
           controllers: list of controller objects"""
813
        controller = controllers[ 0 ]
813
        # Add controllers
814
        clist = ','.join( [ 'tcp:%s:%d' % ( c.IP(), c.port )
815
                           for c in controllers ] )
814 816
        ofdlog = '/tmp/' + self.name + '-ofd.log'
815 817
        ofplog = '/tmp/' + self.name + '-ofp.log'
816 818
        self.cmd( 'ifconfig lo up' )
......
819 821
            ' punix:/tmp/' + self.name + ' -d ' + self.dpid +
820 822
            ' 1> ' + ofdlog + ' 2> ' + ofdlog + ' &' )
821 823
        self.cmd( 'ofprotocol unix:/tmp/' + self.name +
822
            ' tcp:%s:%d' % ( controller.IP(), controller.port ) +
824
            ' ' + clist +
823 825
            ' --fail=closed ' + self.opts +
824 826
            ' 1> ' + ofplog + ' 2>' + ofplog + ' &' )
825 827

  
......
865 867
        intfs = [ str( i ) for i in self.intfList() if not i.IP() ]
866 868
        self.cmd( 'ovs-dpctl', 'add-if', self.dp, ' '.join( intfs ) )
867 869
        # Run protocol daemon
868
        controller = controllers[ 0 ]
870
        clist = ','.join( [ 'tcp:%s:%d' % ( c.IP(), c.port )
871
                           for c in controllers ] )
869 872
        self.cmd( 'ovs-openflowd ' + self.dp +
870
            ' tcp:%s:%d' % ( controller.IP(), controller.port ) +
873
            ' ' + clist +
871 874
            ' --fail=secure ' + self.opts +
872 875
            ' --datapath-id=' + self.dpid +
873 876
            ' 1>' + ofplog + ' 2>' + ofplog + '&' )

Also available in: Unified diff