conforming to mininet python style
removing debugging messages
rearranged code for elegance
adding ovs version detection to fix port numbering bug
Add ability for for OVS switch start connect to controllers using protocols other than TCP.
net.addController( 'c0', protocol='ssl' )
This now allows OVS to connect to a controller using SSL. The default of protocol is 'tcp'as it currently is.
Merge pull request #286 from lantz/devel/ovsbatch
Enable batch startup/shutdown of OVS
Not perfect, but it moves us forward at least.
Merge pull request #290 from backb1/patch/netstatnumeric
Netstat: do not resolve addresses
IVSSwitch: wait for ivs to terminate before tearing down node
This was a problem when running IVS in a container. IVS would begin the processof closing controller connections on receiving SIGTERM, but often mininet wouldhave continued on and removed the control network interface from the container...
Use a single ovs-vsctl command for speed/atomicity
Fix default of in-band control for OVS.fixes #279
Add support for batch shutdown of OVS switches.
This saves about 10 seconds for a 200 switch network.
Minor tweak of return value.
Check (and canonicalize) dpid arguments to Switch()
This seems slightly ugly, but it has bitten many people.
Canonicalize dpid by removing colons and padding with zeroscloses #268
userspace switch can be reached on unix port by dpctl
don't crash when link is TCLink but without options
caused by optimized return in link.py#275 in TCIntf.config()
node: kill entire process group in terminate
mnexec already puts the shell into its own process group. Killing the entireprocess group cleans up after any background processes the user left running.
Do not resolve addresses
IVSSwitch: bring up lo interface
Merge pull request #210 from rlane/ivs-opts
IVSSwitch: support opts constructor parameter
This parameter is already supported by the other switch classes.
Check for `Connected` in checkListening()
changed CLI to MininetFacade; a great deal of logic also changed
Delete leftover TAP interface from OVS with datapath=userfixes #199
Removing test prints from user switch merge
Merge branch 'adf-userswitch-tclink' of github.com:adferguson/mininet into adferguson-adf-userswitch-tclinkOnly sleep and reapply if slicing is enabled
Merge branch 'ivs' of https://github.com/rlane/mininet into rlane-ivs
IVSSwitch: support running IVS in a namespace
This change uses the `Node.cmd` method instead of `Popen`. The `cmd` methodsends the input to a shell which may be in another namespace (if --innamespaceis in use), while `Popen` would always run in the root namespace.
Style changes in mininet/node.py and removing used import in mininet/link.py
CPULimitedHost cleanup() calls superclass methodfixes #161
Clean up intfs in root NS, and avoid deleting HW intfs
It appears that under certain conditions, such as when anamespace exits, both ends of a veth pair may get dumpedinto the root namespace. We therefore now remove an interfaceboth from its home namespace and from the root namespace.
IVSSwitch: remove namespace warnings
IVS works fine using --innamespace.
IVSSwitch: use ovs-ofctl for dpctl functionality
IVSSwitch: add support for dpctl
dpctl is not included with IVS. The user will need to obtain it from theOpenFlow reference repository.
add support for the IVS virtual switch
IVS is an open source virtual switch available for download athttps://github.com/floodlight/ivs. It uses the openvswitchkernel module.
Workaround: add default dpopts='--no-slicing' to UserSwitch
This disables slicing by default but fixes bandwidth limits.Eventually we want to enable both to work together, but for nowthis enables one or the other depending on the dpopts setting.
Workaround: add dpopts to UserSwitch
Currently, slicing on the user switch breaks bandwidth limits.We don't yet have a good way of using both of them at the same time.I'm inclined to turn off slicing by default, but I have to thinkabout it and also see if any one is using it...
Ensure dpid is a valid hex string in OVSSwitch
Fix some pylint messages.
Add Switch.connected() and OVSSwitch.controllerUUIDs()
Minor comment change and text change.
Clean up (and fix) OVSSwitch fast reconnect
Fix setDefaultRoute to work with passed parameters.
Merge pull request #150 from MurphyMc/ovs_fast_reconnect
node: Make OVS switches reconnect quickly
Don't flush ALL routes and enable OPTIONAL default route/gw
fixes #152 hopefully
Ordinarily, OVS switches back off when they can't reach their controllers.Under the type of scenarios where Mininet is used, I think this isprobably just inconvenient. This patch set controllers to attempt toreconnect every second.
node: Allow OVSSwitch to run in userspace mode
This adds a datapath parameter to OVSSwitch which allows one to tell OVS torun in userspace mode rather than kernel mode. From the commandline, thisis --switch=ovsk,datapath=user.
Note that this makes "ovsk" and the OVSKernelSwitch alias misnomers. Since...
Fix method name mismatch for setDefaultRoute.
Change OVSSwitch.dpctl() to call ovs-ofctl
This should fix the problem of dump-flows not showing the OpenFlowflow table flows and only showing cached kernel flow table flows.
allow user switch to be used with TCIntf's
Change popen() to detach from terminal/process group.This may or may not be the right thing to do - an alternativewould be to ignore SIGINT, but that would make the popen()job unkillable by normal means! So we'll try this and seehow well it works.Fixes #124
Tag node bash processes and add attach scriptTry invoking bash processes with -s mininet:host,for easy identification of hosts. This enableseasy attachment using the util/m script.closes #121
Fix Node.MAC to return intf.MAC rather than intf.IPFixes #89 ; Thanks to Nikhil S. Menon for the bug report
pass code check
node: verify telnet installation for controller checking
Reported-by: Julius Bachnick
Fix whitespace error.
Merge branch '2.0dev' into 2.0merge
Conflicts: .gitignore .pylint examples/miniedit.py mininet/node.py mininet/util.py util/install.sh util/vm/install-mininet-vm.sh
node: add OVS passive listening support
node: Use space, rather than comma, to separate controllersfor OVS
Otherwise, OVS thinks the second controller is a parameter of the first, andonly creates one controller entry as seen in 'ovs-vsctl show'.
Fix SSHD example by generalizing input intf args
A number of functions in node.py look like this: return self.intf( intf ).<other stuff>
Previously, self.intf(...) in Node would expect a string name for aninterface and return None if an object was passed in instead of a...
pep8: Fix E127 continuation line over-indented
There are a bunch of these remaining, but I don't think the right course isto 'fix' all of them to make pep8 happy, but instead to either changethe test in pep8 to consider that a continuation line may itself...
pep8: fix E128 continuation line under-indented errors
I wasn't sure this was worth fixing at first, but it does look more readablenow.
pep8: Fix E121/126, continuation line indention
pep8: Fix E121 continuation line indentation is not a multiple of four
pep8: Fix E203 whitespace before punctutation
Fix multi-controller/failover support on User, OVSLegacy switches
Fix typo in RemoteController.__init__ comment.Thanks to Isaku Yamahata.
Fix whitespace and change no controller exception to warning.
Override remote controller check to ensure that remote controller is contactable
Re-enable slicing in UserSwitch since it's fixed with newer kernels.
Workaround for openvswitch_mod rename and pass code check.
Change default controller for mn to ovsc (ovs-controller.)
Also add check to see if another controller is running -eventually we should really detect errors from starting thecontroller!!
Fix popen to allow popen( cmd, arg1, arg2, arg3 )
Fix pexec('echo foo', shell=True)
Set dpid on OVSSwitch.
Fix default dpid which should be 12 digits for reference user switch.
Fix RemoteController which was still using defaultIP rather than ip.
Improve error handling for defaultDpid()
I think it's worth considering how we want to specify dpids forswitches. One way would be to have Mininet (optionally) pick themautomatically. Another way, which I have currently implemented, isto intuit them from the name, for example s1 -> 1. The latter is...
White space edits for code check.
CPULimiteHost.popen(): set cgroup and (optionally) RT priority
Add popen() to regular hosts (cpu limited in progress)
Add default value mems=0 for memory placement.
Allow fail-mode to be set.Probably we should have a generic mechanism to specify OVS options.
Add static cpu (and memory) assignment.
Restore deleted deleteIntfs in OVSSwitch.stop()
Pass code check.
Change default period to 100 ms, which seems to help cfs at least...rt is still somewhat broken.
Fix OVS legacy switch.
Retry deleting cgroup for the moment because it seems flaky.
Ultimately we may wish to create a mininet/ cgroup and do a recursivedelete at the end.
Fix printing pid for background tasks.
Workaround: reapply tc config after OVS destroys it.
Make CPULimitedHost method sig friendlier, and make 'cfs' default sched.
Fix convenience configuration methods.
Add warning in defaultIntf() if host has no interfaces.
Possibly this should be in intf() instead, as intf() is assumedto always succeed.
Allow sendCmd( [ cmd, arg1, ... ] )
Clarify comments and finally remove ControllerParams definition.
Use port 0 for control interface on switches.
Fix CLI commands.
Fix codecheck and MininetWithControlNet.