( self, name, inNamespace=False, command='controller',
cargs='ptcp:%d', cdir=None, ip="127.0.0.1",
port=6653, protocol='tcp', verbose=False, **params )
| 1418 | OpenFlow controller.""" |
| 1419 | |
| 1420 | def __init__( self, name, inNamespace=False, command='controller', |
| 1421 | cargs='ptcp:%d', cdir=None, ip="127.0.0.1", |
| 1422 | port=6653, protocol='tcp', verbose=False, **params ): |
| 1423 | self.command = command |
| 1424 | self.cargs = cargs |
| 1425 | if verbose: |
| 1426 | cargs = '-v ' + cargs |
| 1427 | self.cdir = cdir |
| 1428 | # Accept 'ip:port' syntax as shorthand |
| 1429 | if ':' in ip: |
| 1430 | ip, port = ip.split( ':' ) |
| 1431 | port = int( port ) |
| 1432 | self.ip = ip |
| 1433 | self.port = port |
| 1434 | self.protocol = protocol |
| 1435 | Node.__init__( self, name, inNamespace=inNamespace, |
| 1436 | ip=ip, **params ) |
| 1437 | self.checkListening() |
| 1438 | |
| 1439 | def checkListening( self ): |
| 1440 | "Make sure no controllers are running on our port" |
nothing calls this directly
no test coverage detected