Init. name: name for the switch dpopts: additional arguments to ofdatapath (--no-slicing)
( self, name, dpopts='--no-slicing', **kwargs )
| 994 | dpidLen = 12 |
| 995 | |
| 996 | def __init__( self, name, dpopts='--no-slicing', **kwargs ): |
| 997 | """Init. |
| 998 | name: name for the switch |
| 999 | dpopts: additional arguments to ofdatapath (--no-slicing)""" |
| 1000 | Switch.__init__( self, name, **kwargs ) |
| 1001 | pathCheck( 'ofdatapath', 'ofprotocol', |
| 1002 | moduleName='the OpenFlow reference user switch' + |
| 1003 | '(openflow.org)' ) |
| 1004 | if self.listenPort: |
| 1005 | self.opts += ' --listen=ptcp:%i ' % self.listenPort |
| 1006 | else: |
| 1007 | self.opts += ' --listen=punix:/tmp/%s.listen' % self.name |
| 1008 | self.dpopts = dpopts |
| 1009 | |
| 1010 | @classmethod |
| 1011 | def setup( cls ): |