391 Commits

Author SHA1 Message Date
Boyuan Yan
1c27bc7f30 Changes to docker file and cluster creation, complete stc test on single instance, but not yet on multi-instances Alao, we add detailed checking for every step in ODTN testing.
Change-Id: Id074e2db89a8892ed263880cfa670c4861e011b9
2019-04-01 15:26:55 -07:00
Thomas Vachuska
5d80e4579e Eliminated references to deprecated ONOS_NIC environment variable.
Change-Id: I9b709920c1aa2e7c1c4cb1f28f920dd2820b86ba
2019-03-21 23:48:22 +00:00
Thomas Vachuska
97642361e7 Changing how ONOS_APPS value is used and defaulted; cleaned up cell defs.
Change-Id: Ie134bd61024738609ef1a02237c696438eff6024
2019-03-21 23:38:08 +00:00
Ray Milkey
f42f76e955 Handle the case where ONOS_APPS is not defined - needed for Jenkins
Change-Id: I66b08f25ebc9171653ae673ea5c562ecb53bcf8c
2019-03-21 10:04:02 -07:00
Ray Milkey
a79a1113c2 Handle the case where ONOS_APPS is not defined - needed for Jenkins
Change-Id: Ic587ebbb975b7ef285febfffd0e4414db0abc7ab
2019-03-21 09:19:54 -07:00
Ray Milkey
2673aaa4b5 temporary hack to get GUI working with existing cell infrastructure
Change-Id: I65caed2fec5cb6fb3187d32b5690a3c0c11ed199
2019-03-20 10:46:26 -07:00
Sean Condon
bf7ff4f3fa Change GUI and GUI2 to be apps rather than core features
Change-Id: I862e5bdbccc29fd78716159e168e7a14bc5053e1
2019-03-20 14:48:49 +00:00
Carmelo Cascone
34d116cbf9 Fix net-trellis-p4-smoke not working with latest stratum_bmv2
- Fix scenario files to use correct deviceId
- More robust liveness check in bmv2.py
- Use different ports for stratum internal server
- Longer switch startup timeout in bmv2.py
- Ignore number of flow rules when checking summary (make scenario
independent of trellis implementation)

Change-Id: I206e5339d2e78ae9a025caa5ec4862a9d4c24871
2019-03-14 06:10:59 +00:00
DongRyeol Cha
2803d30843 Add ipv6 address supporting for file transfer using scp
Some files's scp does not have supporting for ipv6 address.
So, I have added supporting for ipv6 address using scp.

Change-Id: Ie6db5c6988c708e4cec862f6b671dd64b457a69a
2019-03-13 18:40:15 +00:00
Carmelo Cascone
ab5d41e8ab Add support for enabling/disabling ports for gNMI devices
This change also includes:
- Refactoring of gNMI protocol+driver to take advantage of the recent
changes to the gRPC protocol subsystem (e.g. no more locking, start RPC
with timeouts, etc.).
- Fixed Stratum driver to work after GeneralDeviceProvider refactoring
- Updated bmv2.py to generate ChassisConfig for stratum_bmv2
- Fixed portstate command to use the same port name as in the store

Change-Id: I0dad3bc73e4b6d907b5cf6b7b9a2852943226be7
2019-03-07 07:45:32 +00:00
Carmelo Cascone
3977ea4d9e Refactor channel and mastership handling in P4Runtime
This (big) change aims at solving the issue observed with mastership flapping
and device connection/disconnection with P4Runtime.

Channel handling is now based on the underlying gRPC channel state. Before,
channel events (open/close/error) were generated as a consequence of P4Runtime
StreamChannel events, making device availability dependent on mastership. Now
Stream Channel events only affect mastership (MASTER/STANDBY or NONE when the
SteamChannel RPC is not active).

Mastership handling has been refactored to generate P4Runtime election IDs that
are compatible with the mastership preference decided by the MastershipService.

GeneralDeviceProvider has been re-implemented to support in-order
device event processing and to reduce implementation complexity. Stats polling
has been moved to a separate component, and netcfg handling updated to only
depend on BasicDeviceConfig, augmented with a pipeconf field, and re-using the
managementAddress field to set the gRPC server endpoints (e.g.
grpc://myswitch.local:50051). Before it was depending on 3 different config
classes, making hard to detect changes.

Finally, this change affects some core interfaces:
- Adds a method to DeviceProvider and DeviceHandshaker to check for device
availability, making the meaning of availability device-specific. This is needed
in cases where the device manager needs to change the availability state of a
device (as in change #20842)
- Support device providers not capable of reconciling mastership role responses
with requests (like P4Runtime).
- Clarify the meaning of "connection" in the DeviceConnect behavior.
- Allows driver-based providers to check devices for reachability and
availability without probing the device via the network.

Change-Id: I7ff30d29f5d02ad938e3171536e54ae2916629a2
2019-03-06 19:28:42 +00:00
Carmelo Cascone
25243d671f Missing changes from update install-p4-tools.sh to use P4Runtime v1.0
Change-Id: I89aca8b081bd05f10c6a8ad88322fd132316b581
2019-02-22 22:54:19 +00:00
Ray Milkey
ca840af1bd Fix error in expr call when there is only one node
Change-Id: Ic963df930bb5db368457d53aaa3d8691a28b121f
2019-02-22 18:00:59 +00:00
Carmelo Cascone
a4dc3c12bc Update install-p4-tools.sh to use P4Runtime v1.0
Includes also various improvements to the p4vm scripts, such as:
- Choose to build VM with Ubuntu 16.04 or 18.04 (experimental)
- Allow users to specify version of protobuf and grpc to use
- Avoid building protobuf and grpc if already installed in the system
- Install Bazel 0.22

Also:
- Remove check for invalid group member weights (now PI always returns
members with weight 1)
- Re-compiled all P4 programs and fixed missing padding in controller
packet headers

Change-Id: I0e672fcebbaba63354c749f0c774af251f3cbc6c
2019-02-21 23:24:26 +00:00
Carmelo Cascone
7c82bcf4a7 Add command to install stratum and its deps on a remote node
Also:
- update install-p4-tools.sh to build BMv2 and PI for Stratum, as
they need different configure options when used with Stratum
- improved build times (~4 minutes on cell machines)
- removed support for Ubuntu 14.0 and code related to old gnmi support
via sysrepo

Change-Id: Icf9cf936237e2815dee73bdc4370562f29616a23
2019-02-09 20:06:30 +00:00
Carmelo Cascone
499f320249 Update bmv2.py to run stratum_bmv2 plus various improvements
Also added alias to quickly run mininet with stratum in cell machines
and p4vm

Change-Id: Id10bf8f3de4fe14d77b5efe47b6129a8a28b5a89
2019-02-09 20:06:17 +00:00
Carmelo Cascone
92e7d87cc1 Remove additional_languages from generated .bazelproject file
Which might not be supported in IntelliJ community version

Change-Id: Ica6770a33769a47627bd1b0b871e7086fe1b2933
2019-02-08 23:03:25 +00:00
Carmelo Cascone
9d16ad8fe7 Add script to auto-generate Bazel project file
Which is much faster to sync since it reduces the scope of the IDE
targets to java libraries. Although, it requires one to execute the
script each time a new app/library is added to the source tree.

Example usage:
onos-gen-bazel-project > .bazelproject

Change-Id: Ia2911a323b66554f4c5ea588573343013c3c739b
2019-02-08 10:20:49 -08:00
Carmelo Cascone
4c289b731d New P4RuntimeClient implementation that supports batching and error reporting
The new client API supports batching and provides detailed response for
write requests (e.g. if entity already exists when inserting), which was
not possible with the old one.

This patch includes:
- New more efficient implementation of P4RuntimeClient (no more locking,
use native gRPC executor, use stub deadlines)
- Ported all codecs to new AbstractCodec-based implementation (needed to
implement codec cache in the future)
- Uses batching in P4RuntimeFlowRuleProgrammable and
P4RuntimeGroupActionProgrammable
- Minor changes to PI framework runtime classes

Change-Id: I3fac42057bb4e1389d761006a32600c786598683
2019-02-04 23:12:46 -08:00
Carmelo Cascone
e45902b280 Bumped P4Runtime to v1.0.0
Change-Id: Ie6419e45980a0394ce1e0439831f4b011a4d7487
2019-02-05 00:44:37 +00:00
Ray Milkey
a1f8e193e2 Fix ot command
Change-Id: Ia1fd6d03ae4bfd161aaea1f8f3ce85af4a1e4445
2019-01-23 22:35:24 +00:00
Ray Milkey
8705ccead8 Jacoco coverage support for bazel
Change-Id: Ic94304aa6fed0e18f16cecfdda388d421064d0b6
2019-01-23 09:16:54 -08:00
Charles Chan
9c938f87c9 Clean up Karaf environment variables to avoid issues when switching from ONOS 1.x to 2.x
Note: sourcing bash_profile is still required after switching between branches

Change-Id: I6d8df459f6fab630b5b11695bba728b37074120d
(cherry picked from commit 19ff8e374887de9a123beac58463248a6004c420)
2019-01-22 17:57:13 +00:00
Carmelo Cascone
bcb055e550 Generate tutorial p4vm with a specific ONOS version
Also:
- Updated Bazel version
- Removed non-working code to auto-login user and disable screen saver
- Reduce size by doing a shallow clone of ONOS

Change-Id: Ie6efc3ebd6766164e7051f28dff89046141afa7f
(cherry picked from commit 68a0a00b4f332cb1cc518dc9c76e587d70cb4492)
2019-01-09 00:11:44 +00:00
Thomas Vachuska
369e3fba2d Updating Apache Karaf to 4.2.2.
Change-Id: I346f21b8da7583c77e7b0612c7f2931aa63a67e0
2019-01-03 23:53:33 +00:00
Thomas Vachuska
b74fef2841 Making stc-set-openjdk11 non-destructive.
Change-Id: Icee7d34d3e00989e00a5b68a9d82dff7da1f6d96
2018-12-17 09:09:18 -08:00
Thomas Vachuska
1e39bd2f44 Allowing cell-stc to inherit stcOpenJDK env. variable.
Change-Id: Iff82642eee04654487245926ba4f3329ed3498cb
2018-12-14 14:47:53 -08:00
Carmelo Cascone
15693a23e8 Alias to quickly start Mininet with BMv2 in cell network machines
Also do not generate bmv-thrift netcfg in bmv2.py

Change-Id: Iebb84ab1b6f007ad42366ec676cce6b08e5fc27c
2018-12-12 22:19:38 -08:00
Andrea Campanella
d8bc03d90f Updating search for last commitId
Change-Id: Ia6380b718827c340e976ea51e9d985a297a83622
2018-12-12 17:37:41 +00:00
Carmelo Cascone
b5324e7168 Improve fabric.p4 to reduce pipeline resources and refactor pipeconf impl
This patch affects both the P4 pipeline implementation and the
Java pipeconf.

P4 PIPELINE
- Less tables and smarter use of metadata to reduce inter-tables
dependencies and favor parallel execution of tables.
- Removed unused actions / renamed existing ones to make forwarding
behavior clearer (e.g. ingress_port_vlan table)
- Remove co-existence of simple and hansed table. Hashed should be the
default one, but implementations that do not support action profiles
might compile fabric.p4 to use the simple one.
- Use @name annotations for match fields to make control plane
independent of table implementation.
- Use @hidden to avoid showing actions and table on the p4info that
cannot be controlled at runtime.
- First attempt to support double VLAN cross-connect (xconnect table).
- New design has been tested with "fabric-refactoring" branch of
fabric-p4test:
github.com/opennetworkinglab/fabric-p4test/tree/fabric-refactoring

JAVA PIPECONF
This patch brings a major refactoring that reflects the experience
gathered in the past months of working on fabric.p4 and reasoning on its
pipeconf implementation. Indeed, the FlowObjective API is
under-specified and sometimes ambiguous which makes the process of
creating and maintaining a pipeliner implementation tedious. This
refactoring brings a simplified implementation by removing unused/
unnecessary functionalities and by recognizing commonality when possible
(e.g. by means of abstract and utility classes). It also makes design
patterns more explicit and consistent. Overall, the goal is to reduce
technical debt and to make it easier to support new features as we
evolve fabric.p4

Changes include:
- Changes in pipeliner/interpreter to reflect new pipeline design.
- By default translate objective treatment to PiAction. This favors
debuggability of flow rules in ONOS.
- Support new NextObjective’s NextTreatment class.
- Remove lots of unused/unnecessary code (e.g. async callback handling
for pending objective install status in pipeliner as current
implementation was always returning success)
- Gather commonality in abstract classes and simplify implementation
for objective translator (filtering, forwarding, next)
- New implementation of ForwardingFunctionTypes (FFT) that looks at
criterion instance values along with their types (to avoid relying on
case-specific if-else conditions to recognize variants of an FFT)
- Adaptive translation of NextObjective based on presence of simple or
hashed table.
- Support DENY FilteringObjective

Also:
- Fix onos-p4-gen-constants to avoid generating conflicting
PiMatchFieldId variable names.
- Install Graphviz tools in p4vm to generate p4c graphs
- Generate p4c graphs by default when compiling fabric.p4
- Use more compact Hex string when printing PI values

Change-Id: Ife79e44054dc5bc48833f95d0551a7370150eac5
2018-12-11 14:48:06 -08:00
Thomas Vachuska
c4d037797d Allow ONOS to be built against locally built ONOS YANG Tools.
Change-Id: If4373245be901cae0f620aadcbea557fea35c4e7
2018-11-26 21:05:49 +00:00
Thomas Vachuska
8e676d9dac Changing default cell borrow to provide a 5+3+1 cell.
Change-Id: Ic993aaf2312c2aa149fac1fdff556fd3044bb95a
2018-11-21 18:17:40 +00:00
Jonghwan Hyun
bfb3a21a51 Update install-p4-tools.sh to support Ubuntu 18.04
Change-Id: I11b79bb87090aff0fc0ebaf945500391e47412fb
2018-11-20 21:13:05 +00:00
Carmelo Cascone
65aa829cd1 Various improvements to P4 tutorial
- Added steps to exercise 2 to use wireshark to capture MyTunnel packets
- Various formatting fix/improvements
- Fixed markdown link to use relative paths
- Fixed bm-cli command not to use sudo (not needed)

Change-Id: I514da99a6cfadd048294c610ba201503c0339e89
(cherry picked from commit 19ea89f8540eef0e41fdf7b4fd9a2a1950f2ade9)
2018-11-09 18:52:40 +00:00
Brian O'Connor
25b239c1b3 Fixing whitespace in onos.py
Change-Id: Icce94c3a5ffffdf5fb3bd8f56bd56c1df456a319
2018-11-08 23:40:05 +00:00
Ray Milkey
123f0e08ad Merge branch 'master' into dev-karaf-4.2.1
Change-Id: If6c7d5f1dc6434ac8ea2fd9716b8ebeee38daa50
2018-11-08 14:18:52 -08:00
Bogdan
45932c7a9c bug 7773 fixed
Change-Id: Id16c36929c70ee3a5c42a8f9c490adafd4a40008
2018-11-08 18:07:00 +00:00
Ray Milkey
d7bc06d641 Merge branch 'master' into dev-karaf-4.2.1
Change-Id: I06c540c539d7d12eb0b563884992a600c930897d
2018-11-01 10:48:18 -07:00
Carmelo Cascone
a252df1d9a Updated Ubuntu 16 desktop vagrant box for tutorial P4 VM
Change-Id: I4c3028a715d2a91cceaad44685285148f47d556b
(cherry picked from commit 4b9974fabf5393d53b99b70f88b577e4f3076c5e)
2018-11-01 01:05:48 +00:00
Thomas Vachuska
4b09a6f579 Removing CELL_SLAVE_4 from the environment.
Change-Id: I994c627335c43644345a6c62ce4c9cfa526a804c
2018-10-29 10:34:20 -07:00
Ray Milkey
d542568b21 Merge branch 'master' into dev-karaf-4.2.1
Change-Id: Iec1b8947c898b0bf10db8caece0c3a064d1c63ae
2018-10-23 10:50:43 -07: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
Ray Milkey
3f274d982b download karaf 4.2.1 from maven central
Change-Id: Icb7e0400ee5b34ed4be33afdda5074a6f6ec1f6d
2018-09-28 14:44:43 -07:00
Carmelo Cascone
fe59ba0a98 More concise test output when running tests
Print test errors to stdout, avoid scrolling due to passed tests results

Change-Id: I7ba4745e8de1ecbcb4f3cd3957623705a0fb69f8
2018-09-05 18:32:48 +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
ea2c110e4e Updated tutorial p4vm scripts to build upon Ubuntu Desktop
And not Lubuntu which had u=issues with VirtualBox guest additions

Change-Id: I47218b78ea3d6ae2574fa55166cc48c1de3989e7
2018-08-23 00:21:41 +00:00
Ray Milkey
761e80a427 Remove pom files from ONOS
Change-Id: I53e2395466cba10222d638736635b11380421d98
2018-08-21 18:11:58 +00:00
Charles Chan
84431b9aae Add Trellis dependency into p4vm
Change-Id: Ieddb3ffa9da620ea78e4538aae02869804e2d0d1
2018-08-17 15:27:00 -07:00