dpid: dpid hex string (or None to derive from name, e.g. s1 -> 1) opts: additional switch options listenPort: port to listen on for dpctl connections
( self, name, dpid=None, opts='', listenPort=None, **params)
| 920 | dpidLen = 16 # digits in dpid passed to switch |
| 921 | |
| 922 | def __init__( self, name, dpid=None, opts='', listenPort=None, **params): |
| 923 | """dpid: dpid hex string (or None to derive from name, e.g. s1 -> 1) |
| 924 | opts: additional switch options |
| 925 | listenPort: port to listen on for dpctl connections""" |
| 926 | Node.__init__( self, name, **params ) |
| 927 | self.dpid = self.defaultDpid( dpid ) |
| 928 | self.opts = opts |
| 929 | self.listenPort = listenPort |
| 930 | if not self.inNamespace: |
| 931 | self.controlIntf = Intf( 'lo', self, port=0 ) |
| 932 | |
| 933 | def defaultDpid( self, dpid=None ): |
| 934 | "Return correctly formatted dpid from dpid or switch name (s1 -> 1)" |
nothing calls this directly
no test coverage detected