MCPcopy Create free account
hub / github.com/mininet/mininet / __init__

Method __init__

mininet/node.py:922–931  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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)"

Callers

nothing calls this directly

Calls 3

defaultDpidMethod · 0.95
IntfClass · 0.90
__init__Method · 0.45

Tested by

no test coverage detected