63 Commits

Author SHA1 Message Date
Brian O'Connor
25b239c1b3 Fixing whitespace in onos.py
Change-Id: Icce94c3a5ffffdf5fb3bd8f56bd56c1df456a319
2018-11-08 23:40:05 +00:00
Bogdan
45932c7a9c bug 7773 fixed
Change-Id: Id16c36929c70ee3a5c42a8f9c490adafd4a40008
2018-11-08 18:07:00 +00:00
Carmelo Cascone
03ae0acdd8 Bump version of P4Runtime to 1.0.0rc3 and P4 tools
Change-Id: I3082b4bd772d692830bd5af8e326a0fd5fb2f167
2018-10-18 22:30:46 +00:00
Carmelo Cascone
76e6386d41 Bump version of BMv2 and disable nanomsg
To match what used in Stratum

Change-Id: Ic4b87bcad6c3da36030fa01ee4135f60c05fcd78
(cherry picked from commit 1a16f00d8ddfb47c6423e5bc70f5d362230debb7)
2018-09-05 05:17:19 +00:00
Carmelo Cascone
f6cb3e8fd9 Revert "Push driver with pipeconfId when available"
This reverts commit 4dd6cccad747066377830a4c50e7d5d14a41c613.

Change-Id: I4a8a01d332a40c80f5f4342c55ae6e03e64a1fa7
2018-08-24 00:00:41 +00:00
Charles Chan
232db0f5a3 Push driver with pipeconfId when available
Change-Id: I9dfebdd123c0efdf044bcc85177ef6b9658ee1af
(cherry picked from commit 4dd6cccad747066377830a4c50e7d5d14a41c613)
2018-08-23 23:22:00 +00:00
Carmelo Cascone
3c8d3d04cb Forward JVM debug port in onos.py
Change-Id: I51cf0a7dab154060afe7d8f919189d10f979eacf
2018-08-17 17:26:55 +00:00
Esin Karaman
971fb7fd1f ONOS-7251 - Initial implementation of fabric.p4 L2 broadcast feature.
Thrift client cherry-picked from the commit dd5792ac9ee38a702c3128a34224852b5c284687

Change-Id: I989f2b2074485a892195889a7c976b518510da88
2018-06-28 13:34:47 +00:00
Carmelo Cascone
44448a52cc Allow re-creating clients for the same P4Runtime addr-port
Change-Id: Ib3de10d047f52dd28511e71385773d4b4a9ad74f
2018-06-26 12:23:29 +00:00
Carmelo Cascone
3c216fa4f4 Fixed bmv2.py assigning gRPC/Thrift port already in use
Also handle Mininet exceptions by shutting down all BMv2 instances

Change-Id: I5a8d1a06441daa57c5dd3b0861f1b7484828174a
2018-06-22 14:52:15 +02:00
Carmelo Cascone
df32beae1e Fixed AttributeError when logging bmv2 crash in bmv2.py
Change-Id: Ia899a0e5090d3f27694b65f2a75f06500a0b6fec
2018-06-19 21:03:34 +00:00
Andrea Campanella
4f9085e2d7 Adding an STC scenario for fabric.p4
Change-Id: I3457ab67c2c97eab73623500ba3f6a75b9ed33a3
2018-06-04 10:24:55 +00:00
Carmelo Cascone
55965c6aae Allow arbitrary ONOS device ID in bmv2.py
Needed for SR functional tests

Change-Id: Ieec7d6ef72628b55787b0275d725c829230790da
2018-05-21 17:17:56 +00:00
Carmelo Cascone
c282133c31 Remove depenency on internal BMv2 device ID when starting bmv2.py
Needed to support TestON-based Segment Routing tests. All instances
started with internal ID = 0 (one PI/P4Runtime server procees is
executed for each simple_switch_grpc instance, i.e, there's no need to
use different internal IDs to distinguish between switch instances).
Log/conf files and bm-* commands are now based on switch name.

Change-Id: I34d3079d6dff5933ceb4d95f04863426af24eb81
2018-05-15 05:19:30 +00:00
Carmelo Cascone
eaa8b1dcf9 Simplified Mininet command line args when using bmv2.py
All lower case, easier to remember

Change-Id: I5093769263f8c282381e0f8f8bcd040268045809
2018-04-11 21:30:02 +00:00
jaegonkim
a1988f3fdf [ONOS-7600] Supporting debug mode in onos.py
Change-Id: I388114bfd2419181cca6e137a9cc9b84c62c90de
2018-04-10 18:37:35 +00:00
jaegonkim
4e360499cc [ONOS-7489] onos.py - killing onos, and restarting onos for onos cluster failover test.
Change-Id: I111ccc72ac5d7ae826973e613b2073e96099f3f9
2018-03-13 17:37:54 +00:00
Carmelo Cascone
4f985cd8c5 Disabled gNMI support in p4vm until it becomes more stable
Change-Id: If2085d5824a2b9d06b249bf8d82d92fd384de5af
2018-02-11 20:12:49 -08:00
Andrea Campanella
bf9e5ce3f5 [ONOS-7137] Interfaces Discovery through gNMI
Also, bumped version of gNMI proto as supported by PI

Change-Id: If2903b2dc483f545893daae77f993cc7dadee468
2018-01-24 16:54:21 +00:00
Carmelo Cascone
f11513d1bc Various improvements to P4 dev env
- Better handling of BMv2 crashes in bmv2.py (with watchdog and logging)
- bm-* commands for easy access to BMv2 log, CLI, etc

Change-Id: I1c79acda641171566d8e1162442c7f377bb273fe
2018-01-18 00:59:26 +00:00
Keesjan Karsten
8539f088f2 Mininet gRPC switch startup reachability check
Just a small change to make sure the gRPC port of simple_switch_grpc
is actually opened after startup, before ONOS gets the netcfg to try
to connect to the switch. Otherwise ONOS will receive a TCP RST from
the still closed port and the connection fails, rendering the switch
devices unavailable. Also included a timeout for port opening.

Change-Id: I1338a4ba24a14be57717f636e684c91c4cb12a7c
2018-01-04 16:08:15 +00:00
Carmelo Cascone
6ec8f8ff93 Minor refactoring of BMv2 mininet scripts
With options to delay pushing the netcfg for each device and generating
the full netcfg JSON for bmv2-demo.

Change-Id: I046a93a8c639f4bb4cf76cbd61b826473760bfb1
2017-11-23 00:49:04 +00:00
Carmelo Cascone
c3baa4cad9 Fixed onos.py
It now works also when no OpenFlow subsytem is loaded

Change-Id: If51f1ab654dad7c02a3f8744b53f4029abf1bd9f
2017-11-21 19:05:43 +00:00
Lyndon Fawcett
fbad2e75f8 ONOS-7040 added java options for configuring maximum and initial memory pool for JVM.
Change-Id: I87246759ffcd063497e2b522686f2028fe2c150a
2017-11-10 20:05:14 +00:00
Carmelo Cascone
6e85404b1c Minor changes to PI-ECMP demo
- Support devices with different pipeconfs (as in the HW testbed)
- Run UDP servers in Mininet hosts
- Wait before pushing config to ONOS

Change-Id: Ic400e0ac0949375a27aa9721b32dc57d5065fb1c
2017-09-11 22:02:57 +02:00
Carmelo Cascone
46d360bb63 Added option to run Bmv2 with valgrind in bmv2.py
Helpful to debug Bmv2 memory leaks.

Change-Id: I404914201c00203ab3050c439fd7af8a608774d2
2017-08-29 21:07:23 +02:00
Carmelo Cascone
3443325287 Allow bmv2-demo mininet topology with arbitrary size
+ made imbalanced striping optional
+ improved generated netcfg
+ various improvements to bmv2.py

Change-Id: Ic297a9d4571bc1987a9cf8fe7bec7c648fb86686
2017-08-29 15:28:50 +00:00
Yi Tseng
7875cb78bb [ONOS-6854] refactor bmv2-demo.py
Change-Id: I9b7460b15f6664363f2ff0b16110e2b3bc4dedeb
2017-08-22 19:32:12 +00:00
Carmelo Cascone
2cad9efec5 Various fixes to get a P4Runtime demo that works
Change-Id: Icab512fceeb6ec0faf1b402c1e325e055cdb2caf
2017-08-03 16:17:58 +02:00
Carmelo Cascone
aaf6d9821e Build BMv2 with debugger in onos-setup-p4-dev
Tested on Ubuntu 14.04, not 16.04.

Also, bumped version of PI and BMv2.

Change-Id: I00319f12f077608a66c7e07fd59a7f1ca835c391
2017-07-31 09:08:03 +00:00
Carmelo Cascone
fb76b04736 Fixed P4 tools build script for Ubuntu 14
+ bumped version of p4runtime and BMv2
+ minor update to bmv2.py

Change-Id: I7784b075b2e6015bb3eef1286011968303b66129
2017-07-18 13:41:32 +00:00
Carmelo Cascone
59f57decd1 ONOS-6561 BMv2 handshaker via P4Runtime
+ support fort device-specific default pipeconf
+ improvements to P4runtime and gRPC protocol stuff

Change-Id: I8986fce3959df564454ea3d31859860f61eabcae
2017-07-13 17:24:25 +00:00
Carmelo Cascone
569d4ad93f Bumped version of P4Runtime and P4 tools for dev VM
+fixed protobuf version according to p4c documentation.

Change-Id: I16471b70b9b2ebc0e0a30c733f1e6ce47d40e30b
2017-07-10 16:24:53 -04:00
Carmelo Cascone
9e6621ffb0 Fix for log handling in bmv2.py
Change-Id: Idf96ace58c4b1cb67c52e2c122ad644b945f4f99
2017-06-27 20:14:13 +00:00
Carmelo Cascone
a11279b3c2 Updated JSON config in bmv2.py for general device provider
+ fixed unhandled exception

Change-Id: I06057872e743a85a430980ed2b6a67942b61e58f
2017-06-22 11:10:33 +00:00
Brian O'Connor
71167f9e76 Updating bmv2.py to remove dependency on onos-netcfg
Change-Id: I4b98efe2d025a03925a6505ef387aac105af9aa0
2017-06-19 21:02:32 +02:00
Carmelo Cascone
b752427548 ONOS-6457 Improved bmv2.py mininet script
- Starts BMv2 with empty.p4 as when running with --no-p4 the switch
  crashes
- Automatically send a netcfg JSON to ONOS for each device
- Makefile to build all P4 programs (needed for empty.p4)

Change-Id: Ib872641751c543aac6c752610b1ce88a1a00d0d2
2017-06-06 12:48:02 +00:00
Carmelo Cascone
75e9799694 ONOS-6457 Updated bmv2.py to work with simple_switch_grpc target
Change-Id: I696daca118f631c73b747eaea8ce936cd4b1097a
2017-06-05 15:30:02 +00:00
Carmelo Cascone
c52a4b1b46 Run an ONOS cluster inside Mininet (via onos.py) with any demo script.
E.g. $ sudo -E python attmpls.py --cluster-size 3

Also, added option (--netcfg) to auto set netcfg at Mininet startup, and
added command to bring onos instances up/down to Mininet CLI.

Change-Id: Id02917fd5181af496b7d954da0ef3d5f2cbb970d
2016-11-30 21:19:47 +00:00
Jon Hall
2548559590 Add HA.py
A set of mininet based HA tests based on onos.py
Currently includes the following tests:
    - a control network partitioning test
    - A dynamic cluster scaling test

Change-Id: I9a8e1019dcc51666fee1d933afd66ff390592525
2016-09-12 17:56:20 +00:00
Bob Lantz
2ca9a35df9 Added README
Change-Id: I9bb92f93a88e113928a35196ac83954b9e069e5c
2016-09-07 23:07:11 +00:00
Bob Lantz
894eab5711 Add examples/ dir, README, and multicluster.py
multicluster.py creates two ONOS "clusters" (1 node by
default, though larger are possible), each of which
is responsible for a separate segment of the data network.

Change-Id: I233c9884b565bd6a28fa1a05e990e86207c88347
2016-08-30 17:34:32 +00:00
Bob Lantz
503a402e89 Multiple ONOSCluster support for ONOSCLI
Previously we were only passing the first ONOSCluster
into MininetFacade, but lo and behold it supports as
many networks as you like! So we pass them all in the
case where we have multiple ONOSClusters.

Change-Id: If848886b958aa47d3e4834c44adc98fffd90453c
2016-08-29 18:08:37 -07:00
Bob Lantz
8e576256fb Enable --custom files to import ONOSCLI
Since --custom files are execed, subsequently importing them
actually creates duplicate classes. This wouldn't be a problem
except that we depend on isinstance(). As a workaround, we allow
the class name to match if isinstance() fails, assuming it will
be a class that is compatible with ONOSCluster or ONOSNode.

Example: env PYTHONPATH=. mn --custom onos.py,mytest.py

where mytest.py imports onos

Change-Id: Ib4cda82fbdd612420de1e113ab768e2f137d5213
2016-08-29 17:56:11 -07:00
Bob Lantz
5763516eb6 Add portOffset for multiple ONOSCluster port forwarding
With multiple ONOS clusters, we want to make sure that the
forwarded port numbers don't collide. We add a portOffset
which is automatically incremented appropriately as more
ONOSClusters are created. It can also be specified explicitly.

Change-Id: I62977c3d4141668d9f541067db1a20ec0035489b
2016-08-30 00:55:39 +00:00
Jon Hall
a43d0334aa Add check for node status to onos.py startup
Change-Id: I8e6b103ef46a5bc5877507a7adef3eb6117adf64
2016-08-16 22:32:34 +00:00
Jon Hall
9b238aef36 Pass alertActions cli option to ONOSNode class in onos.py
Change-Id: I534cc0e22ac11018e6c5ec6f73a2f7259392b9e0
2016-08-16 22:30:35 +00:00
Bob Lantz
a2ccaa5672 unpackONOS: check for failure when extracting tar archive
Change-Id: Iad44ac863449afdbf21d8766479af569f9ba9b6e
2016-06-30 20:58:13 +00:00
Bob Lantz
930138e306 Enable global port forwarding in root namespace
This should fix the problem seen in VirtualBox where you
may have some random interface which is host-only which needs
to have port forwarding set up on it.

Change-Id: Iacdbb129d52529783bdab1c3d768131f6eaf0364
2016-06-30 01:16:53 +00:00
Carmelo Cascone
977ae3f42d Varius updates to BMv2 mininet scripts
Most notably:
- Added support for onos.py's ONOSCluster controller (it works with
	"mn --custom onos.py,bmv2.py --switch onosbmv2 ...")
- Randomly select an open port for the Thrift RPC server

Change-Id: Ifa974741dc4a3693777f01866b1f6203d0e7e75e
2016-06-29 20:53:05 +00:00