Clarify comments and finally remove ControllerParams definition.
This commit is contained in:
+9
-29
@@ -607,12 +607,14 @@ class CPULimitedHost( Host ):
|
|||||||
|
|
||||||
# Some important things to note:
|
# Some important things to note:
|
||||||
#
|
#
|
||||||
# The "IP" address which we assign to the switch is not
|
# The "IP" address which setIP() assigns to the switch is not
|
||||||
# an "IP address for the switch" in the sense of IP routing.
|
# an "IP address for the switch" in the sense of IP routing.
|
||||||
# Rather, it is the IP address for a control interface if
|
# Rather, it is the IP address for the control interface,
|
||||||
# (and only if) you happen to be running the switch in a
|
# on the control network, and it is only relevant to the
|
||||||
# namespace, which is something we currently don't support
|
# controller. If you are running in the root namespace
|
||||||
# for OVS!
|
# (which is the only way to run OVS at the moment), the
|
||||||
|
# control interface is the loopback interface, and you
|
||||||
|
# normally never want to change its IP address!
|
||||||
#
|
#
|
||||||
# In general, you NEVER want to attempt to use Linux's
|
# In general, you NEVER want to attempt to use Linux's
|
||||||
# network stack (i.e. ifconfig) to "assign" an IP address or
|
# network stack (i.e. ifconfig) to "assign" an IP address or
|
||||||
@@ -620,16 +622,8 @@ class CPULimitedHost( Host ):
|
|||||||
# the IP and MAC addresses in the controller by specifying
|
# the IP and MAC addresses in the controller by specifying
|
||||||
# packets that you want to receive or send. The "MAC" address
|
# packets that you want to receive or send. The "MAC" address
|
||||||
# reported by ifconfig for a switch data port is essentially
|
# reported by ifconfig for a switch data port is essentially
|
||||||
# meaningless.
|
# meaningless. It is important to understand this if you
|
||||||
#
|
# want to create a functional router using OpenFlow.
|
||||||
# So, I'm trying changing the API to make it
|
|
||||||
# impossible to try this, since it will not work, since nobody
|
|
||||||
# ever makes separate control networks in Mininet, and indeed
|
|
||||||
# we don't even support running OVS in a namespace.
|
|
||||||
#
|
|
||||||
# Note if we have a separate control network, then it does
|
|
||||||
# make sense to have s1-eth0 as s1's control network interface,
|
|
||||||
# and we should set controlIntf accordingly.
|
|
||||||
|
|
||||||
class Switch( Node ):
|
class Switch( Node ):
|
||||||
"""A Switch is a Node that is running (or has execed?)
|
"""A Switch is a Node that is running (or has execed?)
|
||||||
@@ -898,20 +892,6 @@ class OVSController( Controller ):
|
|||||||
Controller.__init__( self, name, command=command, **kwargs )
|
Controller.__init__( self, name, command=command, **kwargs )
|
||||||
|
|
||||||
|
|
||||||
# BL: This really seems to be poorly specified,
|
|
||||||
# so it's going to go away!
|
|
||||||
|
|
||||||
class ControllerParams( object ):
|
|
||||||
"Container for controller IP parameters."
|
|
||||||
|
|
||||||
def __init__( self, ip, prefixLen ):
|
|
||||||
"""Init.
|
|
||||||
ip: string, controller IP address
|
|
||||||
prefixLen: prefix length, e.g. 8 for /8, covering 16M"""
|
|
||||||
self.ip = ip
|
|
||||||
self.prefixLen = prefixLen
|
|
||||||
|
|
||||||
|
|
||||||
class NOX( Controller ):
|
class NOX( Controller ):
|
||||||
"Controller to run a NOX application."
|
"Controller to run a NOX application."
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user