lantz
6def304585
Remove long tests from travis ( #993 )
2021-01-04 13:53:30 -08:00
lantz
e02e338e3c
intfoptions and test adjustments ( #992 )
...
* 2.3.0a1
* intfoptions and test_intfoptions tweaks
also added cleanup() to test_walkthrough fixture
2021-01-03 22:24:28 -08:00
lantz
b7c412073a
CI matrix build + 20.04 fixes ( #990 )
...
Ubuntu 20.04 fixes:
- fixes sshd test
- speeds up examples/{treeping64,tree1024}.py
- debugging hacks/output for testLinkChange
- removes cfs from examples/popen.py
- improves nat in nodelib (netplan fixes?)
- makes some tests executable
- waits for switches to connect in tests to
avoid race conditions
-- adds mn -w option and wait CLI command
Changes:
- REMOVES default "-v" argument for Controller()
and adds verbose(=False) option; avoiding logging
makes it faster
- CHANGES waitConnected to wait for 5 seconds
as documented; we may wish to implement an argument
to -w to set this timeout
Issues?
- There may still be an issue with the ovs-netplan-clean
service causing the boot to hang ;-(
2021-01-03 20:00:33 -08:00
lantz
afdf9fd571
Update for python 2.x and 3.x builds ( #988 )
2020-12-19 18:06:52 -08:00
lantz
336b01ae34
Add matrix build for ubuntu-16.04 and ubuntu-18.04 ( #987 )
2020-12-13 19:14:26 -08:00
lantz
cab8970b0a
Update run-tests.yaml
2020-12-13 18:13:27 -08:00
lantz
3625149356
Update run-tests.yaml
2020-12-13 18:00:44 -08:00
lantz
fd9e011277
Merge pull request #986 from lantz/github-actions
...
Initial support for github actions CI builds
2020-12-13 17:57:48 -08:00
Bob Lantz
591a961762
Initial support for github actions CI builds
2020-12-13 17:15:11 -08:00
lantz
bfc42f6d02
Merge pull request #921 from timgates42/bugfix/typo_updates
...
Fix simple typo: udpates -> updates
2020-04-15 18:22:28 -07:00
lantz
458d20e3fd
Merge pull request #928 from JuFil/master
...
Fix install.sh on Ubuntu 19.10: substitute cgroup-bin with cgroup-too…
2020-04-15 18:18:06 -07:00
lantz
73b2ecc5fe
Merge pull request #934 from ssikdar1/flake8-octal-number-positions
...
change to use 0o for octal numbers w/ file permissons for python2/3 compatibility
2020-04-15 18:17:19 -07:00
lantz
6a5adb48d2
Merge pull request #938 from JuFil/fix-poll
...
Fix usage of poll in mininet.utils.errRun
2020-04-15 18:13:39 -07:00
lantz
fa9fd770ca
Merge pull request #932 from ssikdar1/flake8-F632
...
change to fix flake8 F632 issues
2020-04-03 19:34:45 -07:00
lantz
2b8d254cc0
Merge pull request #873 from raingloom/patch-1
...
make it easier to set the compiler
2019-12-01 15:36:48 -08:00
lantz
8fc867b1f4
Merge pull request #897 from jadinm/fix-cli-stdin
...
Fix CLI constructor: stdin parameter was replaced
2019-12-01 15:34:08 -08:00
lantz
c0582b9c5e
Merge pull request #895 from jadinm/fix-topo-addLink
...
Return the new link key in Topo.addLink()
2019-11-29 16:00:38 -08:00
lantz
023c53aec6
Merge pull request #912 from lantz/fix-1604-install
...
Check for non-functional 'python'
2019-11-29 15:59:55 -08:00
lantz
6c17e1ade7
Update ISSUE_TEMPLATE
2019-11-24 18:11:28 -08:00
Bob Lantz
e56f6839f1
Improve Python version detection
...
Ubuntu 16.04 no longer includes a 'python' executable.
If none of {$PYTHON,python,python2,python3} are usable, we advise
the user to either set PYTHON or install a usable python.
2019-11-22 17:14:10 -08:00
Bob Lantz
e0436642ae
2.3.0d6
2019-07-11 17:16:46 -07:00
lantz
c5f626ce27
Merge pull request #891 from benfrankel/master
...
Use incremental utf-8 decoder for buffered reading
2019-07-11 17:15:37 -07:00
lantz
de28f67a97
Merge pull request #882 from stephanreiter/master
...
Don't pass 'loss 0' to tc as it will cause an error on newer versions
2019-06-09 15:52:33 -07:00
lantz
e203808a20
Merge pull request #872 from dsaucez/patch-2
...
change isShellBuiltin
2019-04-25 20:16:31 -07:00
lantz
c5f23b9f82
Merge pull request #815 from teto/fix_controller
...
fix "which" calls always returning true
2019-04-16 13:28:47 -07:00
Bob Lantz
cfb0a6d3f0
Silence warning for failing to stop ovs-testcontroller
2019-04-09 12:17:35 -07:00
Bob Lantz
664ba39383
NAT warning if IPv4 loopback address in /etc/resolv.conf
2019-04-04 16:40:04 -07:00
Bob Lantz
598d694058
2.3.0d5
2019-03-13 21:56:32 -07:00
Bob Lantz
f92e3d3432
2018 -> 2019
2019-03-13 21:52:13 -07:00
lantz
ce4f1e0c92
Merge pull request #863 from mininet/devel/fix-tclink
...
Change Link/TCLink to accept universal parameters
2019-03-06 16:17:31 -08:00
Bob Lantz
31f44e1856
Change Link/TCLink to accept universal parameters
...
This also enables us to specify IP addresses for both sides
of a TCLink, which enables LinuxRouter to work with TCLink.
fixes #854
fixes #634
2019-03-06 15:01:27 -08:00
lantz
36d2b21187
Merge pull request #852 from gabay/patch/rename_init_to_build
...
Replaced example topologies __init__ with build
2019-02-06 13:22:44 -08:00
lantz
cf6da391fa
Merge pull request #847 from yousong/poll-eintr
...
cli: ignore EINTR caused by SIGWINCH when calling poll()
2018-12-20 11:36:42 -08:00
Bob Lantz
fd96de6485
Add iproute back in for older dists
2018-12-07 17:08:41 -08:00
lantz
73f530b569
Merge pull request #841 from gabay/master
...
replaces isinstance(str) with isinstance(BaseString)
(note we define BaseString as str for python 3)
2018-11-15 06:40:28 -08:00
Bob Lantz
b7a6b8137f
Fix undefined variable and code check.
2018-10-19 13:38:06 -07:00
lantz
d072e531c2
Merge pull request #837 from theojepsen/master
...
intf.rename() also renames the intf name in the host
2018-10-11 15:51:48 -07:00
Bob Lantz
8139d7d1b4
Better IP address selection for controllers
...
Previously we looked for 'eth0', but linux has renamed interfaces.
Instead of looking by name, we now look for an interface which
is the appropriate gateway to a remote server address.
fixes #831
2018-10-11 15:46:57 -07:00
Bob Lantz
bfda33544a
code check
2018-08-28 18:48:50 -07:00
Bob Lantz
1f4525ed0a
Test for Node()/Host() pty leakage
2018-08-28 18:48:45 -07:00
Bob Lantz
1969669f51
pass code check
2018-08-23 13:06:16 -07:00
Bob Lantz
c639f342e5
2.3.0d4
2018-08-23 11:43:45 -07:00
Bob Lantz
6e887d0788
Close pty to avoid leak
2018-08-23 11:43:43 -07:00
Bob Lantz
092863f113
2.3.0d3
2018-08-15 23:13:20 -07:00
Bob Lantz
5100a38fcd
pmonitor() fixes
...
pmonitor() is hard to get right, but this seems like
a reasonable improvement:
1. non-blocking I/O so we can drain buffer with impunity
2. drain buffer after poll
3. unregister fd on POLLHUP
Note we may have a unicode splitting problem since we're
decoding chunks of bytes, but that is a problem for another
day I think.
2018-08-02 12:45:35 -07:00
Bob Lantz
3bcecd8e08
Fix popen() to work properly with shell=True
2018-08-02 06:56:18 -07:00
Bob Lantz
486676d617
2.3.0d2
2018-07-26 14:04:08 -07:00
lantz
9e5280b4d1
Python 3 Compatibility (Merge pull request #817 from lantz/py3-compat)
...
Changes for compatibility with Python 3.
The approach is to make as few changes as possible to maintain compatibility with both Python 2 and Python 3.
We use whatever python is installed, and also support a PYTHON environment variable for installing another version.
For simplicity, we provide mininet.util.pexpect which works out of the box with Python 3 utf-8 strings.
Thanks to @cuihantao for looking at this as well and also for changes to MiniEdit.
Closes #794
2018-07-26 14:03:34 -07:00
Bob Lantz
b70eed69d3
Fix typo (50s -> 50ms)
2018-07-26 13:52:15 -07:00
Bob Lantz
d96b35694a
Use appropriate python version
2018-07-26 13:40:12 -07:00
Bob Lantz
c7deeae11c
Add sanity check for python mn version
2018-07-26 13:40:12 -07:00
Bob Lantz
323989953b
Try to fix pylint errors ;-p
2018-07-26 13:40:12 -07:00
Bob Lantz
17f9756e5c
sudo interferes with travis python 3 environment
2018-07-26 13:40:12 -07:00
Bob Lantz
71f3931f2f
Remove redundancies in miniedit; pass code check
2018-07-26 13:40:12 -07:00
Bob Lantz
1e9ca5f7fc
Fix missing quote in .travis.yml
2018-07-26 13:40:12 -07:00
Bob Lantz
8933c996cb
Add python-tk/python3-tk
2018-07-26 13:40:06 -07:00
Bob Lantz
afa83cd5ae
Restore python 2 compatibility
2018-07-26 13:40:03 -07:00
Bob Lantz
8102704726
Pass code check (14.04)
2018-07-25 21:30:05 -07:00
Bob Lantz
f4490069ca
Add PYTHON and python2/python3 support
...
Perhaps we should have an option for py2/p3, but for
now we detect the default python version and it can
also be specified via the PYTHON env var.
2018-07-25 19:44:46 -07:00
Bob Lantz
2ac4f92af3
Add PYTHON variable for python2/python3 make install
2018-07-25 19:44:46 -07:00
Bob Lantz
f98154a323
Decode subprocess output for python3
2018-07-25 19:44:46 -07:00
Bob Lantz
7b48460e9e
Change pexpect hackery to use a custom class
...
So the original pexpect is unperturbed
2018-07-25 19:44:46 -07:00
Bob Lantz
3a0ef258d1
grep cgroup /proc/mounts in mountCgroup
2018-07-25 19:44:45 -07:00
Bob Lantz
0d9a6796df
Add Python 2.7 and Python 3.6
2018-07-25 19:44:45 -07:00
Bob Lantz
08a59783f4
Decode readline() and call cleanup() for python 3
...
Python 3.6 crashes if there are leftover processes, even
if they shut down later...
2018-07-25 19:44:45 -07:00
Bob Lantz
e37afe996b
First crack at Python 3 compatibility
...
Mostly we just use mininet.util.pexpect so that we can use
unicode strings without changing calls to pexpect.spawn()
2018-07-25 19:44:45 -07:00
Bob Lantz
6a387faa04
Fix whitespace error
2018-07-25 19:44:45 -07:00
Bob Lantz
1a134cb4d2
80 columns
2018-07-25 19:44:45 -07:00
Bob Lantz
af4921adc5
Minor changes for Python 3
...
items() vs. iteritems() and decode() bytes in monitorFiles
Probably not strictly correct if bytes are split - we still
need to deal with this properly.
2018-07-25 19:44:45 -07:00
Bob Lantz
f94ee8ec97
Redesign pmonitor()
...
This is tricky to get right, but I think it is correct
to drain the buffers like this.
2018-07-25 19:44:45 -07:00
Bob Lantz
356b024d6b
Wrap reads in pmonitor() for python3
2018-07-25 19:44:45 -07:00
Bob Lantz
2283bb01e6
Python3 compat and add timeout for connect
2018-07-25 19:44:45 -07:00
Bob Lantz
3eef584c6b
Python 3 compatibility
...
And some Ubuntu 18 compat:
- ifconfig's output has changed
- relaxing timing as it seems first ping is slower
2018-07-25 19:44:45 -07:00
Bob Lantz
2e00a7de97
Python 3 compatibility
2018-07-25 19:44:45 -07:00
Bob Lantz
e28348f6cd
Indent error.
2018-07-25 19:44:44 -07:00
Bob Lantz
4b744d1fb0
Fix dynamic Python items() in deleteIntfs()
2018-07-25 19:44:44 -07:00
Bob Lantz
2822998cad
A couple of missed py3 items: execfile, iteritems
2018-07-25 19:44:44 -07:00
Bob Lantz
853815500d
Create util.pexpect which is compatible with Python 3 strings
...
Unfortunately pexpect isn't compatible with Python 3 strings
unless you specify unicode encoding, which isn't the default.
With this helper code, you can import pexpect from mininet.util
and get default pexpect.spawn() behavior that works with Python 3
strings.
2018-07-25 19:44:44 -07:00
Bob Lantz
1a2925923f
translate() -> replace() for Python 3 compatibility
...
str.translate() works differently in Python 3
2018-07-25 19:44:44 -07:00
Bob Lantz
cac884a85e
Wait for Node() shell to exit on Python 3
...
I'm not a fan of this, but Python 3's subprocess module
complains otherwise.
For now we're only doing this on Python 3. We should probably
quantify the slowdown however.
2018-07-25 19:44:44 -07:00
Bob Lantz
f314a6626a
Missed one instance of basestring
2018-07-25 19:44:44 -07:00
Bob Lantz
bf83f4f343
Don't bother checking for negative delay/jitter
...
It's kind of pointless. However technically the argument should
be a number and not a string - it's always in ms.
2018-07-25 19:44:44 -07:00
Bob Lantz
1ef12e450a
Apparently Python 3 types aren't ordered
2018-07-25 19:44:44 -07:00
Bob Lantz
56fc6c3955
Close popen stdout and stderr
...
They should get cleaned up anyway, but Python 3 gives
us an error message. This silences it.
2018-07-25 19:44:44 -07:00
Bob Lantz
88cbf4ec42
Kinder, gentler Python 3 compatibility
...
Looking at trying to minimize code changes for Python 3.
For now we are keeping byte str() in py2 and unicode str()
in py3. It's a pain to rewrite all string code to usee
u'' for py2 compatibility. However we may need to revisit
this for pexpect().
Created compatibility wrappers in util.py:
BaseString (replacement for basestring)
decode() (optionally decode utf-8 for py3)
encode() (optionally encode utf-8 for py3)
Also we've switched from the .iter*() flavors to their
static alternatives for py2 (note they are iterators in py3!)
Changed util.errRun and clean.sh to call decode()
2018-07-25 19:44:44 -07:00
Bob Lantz
26b3959968
Fix keys parameter in edges_iter
...
Fixes #813
2018-07-11 23:36:11 +00:00
Bob Lantz
966dd20b4b
waitConnected: don't compare timeout if it is None
2018-07-11 23:29:19 +00:00
Bob Lantz
82998cac8b
waitConnected and debug output for testMultiPing
...
This test fails periodically on Travis (#714 )
Hopefully waiting for connection will make it more reliable,
and if not then the debug output will help.
2018-07-10 07:41:19 -07:00
lantz
34b1f4161a
Merge pull request #803 from teto/nixos_clean
...
Merge in nixos changes:
1. More flexible makefile
2. Fix problems from setting vi-ins-mode-string in .inputrc (fixes #799 )
2018-06-25 19:49:22 -07:00
lantz
dfb297901f
Update copyright date in LICENSE
...
It's 2018. ;-)
2018-06-18 09:59:11 -07:00
Bob Lantz
67236e9db3
Update ofsoftswitch build
...
Changed netbee URL.
Changed libxerces package for Ubuntu 18.04
2018-06-03 17:20:18 -07:00
Bob Lantz
8af3f28b67
iproute -> iproute2 for Ubuntu 18.04
...
This should also be backward compatible to 14.04.
2018-04-28 01:48:36 +00:00
lantz
c5b2efd839
Merge pull request #780 from nemethf/set_dp_desc
...
Set the datapath desciption (dp-desc) of OVS switches
2018-02-28 12:20:20 -08:00
lantz
f65e1ab936
Merge pull request #767 from juangascon/travis_yml
...
Remove '- dist: xenial' until Travis gets their act together and supports the current LTS
2017-10-10 16:12:50 -07:00
Bob Lantz
b142cf32ec
Pass code check (14.04 LTS: pyflakes 0.8.1, pylint 1.1.0)
...
Was no longer passing due to pyflakes.
2017-09-25 16:07:47 -07:00
Bob Lantz
87e26ef931
Restore CLI=MyCLI customization in --custom files
...
fixes #746
2017-06-02 14:11:36 -07:00
Bob Lantz
7366645c81
Fix plot() command for newer networkx
...
Networkx moved graphviz_layout, so we look for it in two different
places.
Also plot() should be fixed for regular Mininet(), which doesn't have
a .servers list.
2017-05-30 15:37:10 -07:00
Bob Lantz
2437aba984
Change to if to avoid breaking travis build on 16.04
2017-05-24 17:17:25 -07:00
Bob Lantz
a6627cd928
Don't call node.addIntf() if node is None
...
fixes #716
2017-05-24 15:11:03 -07:00
Bob Lantz
9d306ad53a
Allow passing mncmd to CPULimitedHost.popen()
...
This is not not really intended as an external API (and
it currently isn't documented) but this makes it consistent.
Fixes #743
2017-05-22 15:36:23 -07:00