Run dpctl command
( self, *args )
| 1014 | moduleDeps( add=TUN ) |
| 1015 | |
| 1016 | def dpctl( self, *args ): |
| 1017 | "Run dpctl command" |
| 1018 | listenAddr = None |
| 1019 | if not self.listenPort: |
| 1020 | listenAddr = 'unix:/tmp/%s.listen' % self.name |
| 1021 | else: |
| 1022 | listenAddr = 'tcp:127.0.0.1:%i' % self.listenPort |
| 1023 | return self.cmd( 'dpctl ' + ' '.join( args ) + |
| 1024 | ' ' + listenAddr ) |
| 1025 | |
| 1026 | def connected( self ): |
| 1027 | "Is the switch connected to a controller?" |