Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1c42632978 | |||
| 5ef6e1dedc | |||
| f8e54cad47 |
@@ -2,7 +2,7 @@
|
||||
Mininet Installation/Configuration Notes
|
||||
----------------------------------------
|
||||
|
||||
Mininet 2.3.0rc1
|
||||
Mininet 2.3.0rc2
|
||||
---
|
||||
|
||||
The supported installation methods for Mininet are 1) using a
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Mininet 2.3.0rc1 License
|
||||
Mininet 2.3.0rc2 License
|
||||
|
||||
Copyright (c) 2013-2020 Open Networking Foundation
|
||||
Copyright (c) 2009-2012 Bob Lantz and The Board of Trustees of
|
||||
|
||||
@@ -57,13 +57,14 @@ install-manpages: $(MANPAGES)
|
||||
|
||||
install: install-mnexec install-manpages
|
||||
# This seems to work on all pip versions
|
||||
$(PYTHON) -m pip uninstall mininet || true
|
||||
$(PYTHON) -m pip uninstall -y mininet || true
|
||||
$(PYTHON) -m pip install .
|
||||
|
||||
develop: $(MNEXEC) $(MANPAGES)
|
||||
# Perhaps we should link these as well
|
||||
install $(MNEXEC) $(BINDIR)
|
||||
install $(MANPAGES) $(MANDIR)
|
||||
$(PYTHON) -m pip uninstall -y mininet || true
|
||||
$(PYTHON) -m pip install -e . --no-binary :all:
|
||||
|
||||
man: $(MANPAGES)
|
||||
|
||||
@@ -2,7 +2,7 @@ Mininet: Rapid Prototyping for Software Defined Networks
|
||||
========================================================
|
||||
*The best way to emulate almost any network on your laptop!*
|
||||
|
||||
Mininet 2.3.0rc1
|
||||
Mininet 2.3.0rc2
|
||||
|
||||
[![Build Status][1]](https://github.com/mininet/mininet/actions)
|
||||
|
||||
@@ -70,7 +70,7 @@ Mininet includes:
|
||||
|
||||
### Python 3 Support
|
||||
|
||||
- Mininet 2.3.0rc1 supports Python 3 and Python 2!
|
||||
- Mininet 2.3.0rc2 supports Python 3 and Python 2!
|
||||
|
||||
- You can install both the Python 3 and Python 2 versions of
|
||||
Mininet side by side, but the most recent installation will
|
||||
|
||||
@@ -101,7 +101,6 @@ CLI = None # Set below if needed
|
||||
# Locally defined tests
|
||||
def allTest( net ):
|
||||
"Run ping and iperf tests"
|
||||
net.waitConnected()
|
||||
net.start()
|
||||
net.ping()
|
||||
net.iperf()
|
||||
@@ -131,7 +130,6 @@ def runTests( mn, options ):
|
||||
if callable( testfn ):
|
||||
testfn( mn, *args, **kwargs )
|
||||
elif hasattr( mn, test ):
|
||||
mn.waitConnected()
|
||||
getattr( mn, test )( *args, **kwargs )
|
||||
else:
|
||||
raise Exception( 'Test %s is unknown - please specify one of '
|
||||
@@ -389,6 +387,11 @@ class MininetRunner( object ):
|
||||
placement=PLACEMENT[ opts.placement ] )
|
||||
mininet.cli.CLI = ClusterCLI
|
||||
|
||||
# Wait for controllers to connect unless we're running null test
|
||||
if ( opts.test and opts.test != [ 'none' ] and
|
||||
isinstance( opts.wait, bool ) ):
|
||||
opts.wait = True
|
||||
|
||||
mn = Net( topo=topo,
|
||||
switch=switch, host=host, controller=controller, link=link,
|
||||
ipBase=opts.ipbase, inNamespace=opts.innamespace,
|
||||
|
||||
+7
-5
@@ -109,7 +109,7 @@ from mininet.util import ( quietRun, fixLimits, numCores, ensureRoot,
|
||||
from mininet.term import cleanUpScreens, makeTerms
|
||||
|
||||
# Mininet version: should be consistent with README and LICENSE
|
||||
VERSION = "2.3.0rc1"
|
||||
VERSION = "2.3.0rc2"
|
||||
|
||||
class Mininet( object ):
|
||||
"Network emulation with hosts spawned in network namespaces."
|
||||
@@ -183,8 +183,11 @@ class Mininet( object ):
|
||||
delay: seconds to sleep per iteration
|
||||
returns: True if all switches are connected"""
|
||||
info( '*** Waiting for switches to connect\n' )
|
||||
time = 0
|
||||
time = 0.0
|
||||
remaining = list( self.switches )
|
||||
# False: 0s timeout; None: wait forever (preserve 2.2 behavior)
|
||||
if isinstance( timeout, bool ):
|
||||
timeout = None if timeout else 0
|
||||
while True:
|
||||
for switch in tuple( remaining ):
|
||||
if switch.connected():
|
||||
@@ -193,8 +196,7 @@ class Mininet( object ):
|
||||
if not remaining:
|
||||
info( '\n' )
|
||||
return True
|
||||
# Still allow None to preserve 2.2 behavior
|
||||
if timeout not in ( None, True ) and time > timeout:
|
||||
if timeout is not None and time >= timeout:
|
||||
break
|
||||
sleep( delay )
|
||||
time += delay
|
||||
@@ -561,7 +563,7 @@ class Mininet( object ):
|
||||
started.update( { s: s for s in success } )
|
||||
info( '\n' )
|
||||
if self.waitConn:
|
||||
self.waitConnected()
|
||||
self.waitConnected( self.waitConn )
|
||||
|
||||
def stop( self ):
|
||||
"Stop the controller(s), switches and hosts"
|
||||
|
||||
Reference in New Issue
Block a user