Added a Vagrant directory for building a mininet VM
[openflowplugin.git] / vagrant / mininet-2.1.0-of-1.3 / node.py.patch
1 --- /usr/share/pyshared/mininet/node.py 2013-12-06 02:54:41.079577722 +0000
2 +++ new_node.py 2013-12-06 02:54:20.139578272 +0000
3 @@ -952,6 +952,10 @@
4             datapath: userspace or kernel mode (kernel|user)"""
5          Switch.__init__( self, name, **params )
6          self.failMode = failMode
7 +       protKey = 'protocols'
8 +       if self.params and protKey in self.params:
9 +               print 'have protocol params!'
10 +               self.opts += protKey + '=' + self.params[protKey]
11          self.datapath = datapath
12  
13      @classmethod
14 @@ -1024,12 +1028,13 @@
15          # Annoyingly, --if-exists option seems not to work
16          self.cmd( 'ovs-vsctl del-br', self )
17          self.cmd( 'ovs-vsctl add-br', self )
18 +       print 'OVSswitch opts: ',self.opts
19          if self.datapath == 'user':
20              self.cmd( 'ovs-vsctl set bridge', self,'datapath_type=netdev' )
21          int( self.dpid, 16 ) # DPID must be a hex string
22          self.cmd( 'ovs-vsctl -- set Bridge', self,
23 -                  'other_config:datapath-id=' + self.dpid )
24 -        self.cmd( 'ovs-vsctl set-fail-mode', self, self.failMode )
25 +               self.opts+' other_config:datapath-id=' + self.dpid )
26 +       self.cmd( 'ovs-vsctl set-fail-mode', self, self.failMode )
27          for intf in self.intfList():
28              if not intf.IP():
29                  self.attach( intf )