Compare commits

...

4 Commits

Author SHA1 Message Date
lantz d7f399d7a1 2.3.0 (#1043)
- 2.3.0rc2 -> 2.3.0
- update copyright date in LICENSE
2021-02-10 12:30:36 -08:00
lantz 1c42632978 2.3.0rc2 (#1042) 2021-02-09 11:44:42 -08:00
lantz 5ef6e1dedc fix --twait (#1040)
- pass timeout correctly to waitConnected()
- handle surprising behavior that 1 == True in Python
- mn --test none does not call waitConnected()
2021-02-09 11:26:39 -08:00
lantz f8e54cad47 add pip uninstall -y (#1041)
This avoids hanging in scripts if pip uninstall decides
to ask for confirmation
2021-02-09 10:55:45 -08:00
6 changed files with 19 additions and 13 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
Mininet Installation/Configuration Notes
----------------------------------------
Mininet 2.3.0rc1
Mininet 2.3.0
---
The supported installation methods for Mininet are 1) using a
+2 -2
View File
@@ -1,6 +1,6 @@
Mininet 2.3.0rc1 License
Mininet 2.3.0 License
Copyright (c) 2013-2020 Open Networking Foundation
Copyright (c) 2013-2021 Open Networking Foundation
Copyright (c) 2009-2012 Bob Lantz and The Board of Trustees of
The Leland Stanford Junior University
+2 -1
View File
@@ -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 -2
View File
@@ -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.0
[![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.0 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
+5 -2
View File
@@ -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
View File
@@ -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.0"
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"