14270 Commits

Author SHA1 Message Date
Jordan Halterman
0677d88e2d Fix NPE in flow store
Change-Id: If240d2f02c96b3f03398b8ec30a7feb7bb9240b4
2019-03-07 16:34:39 -08:00
Ray Milkey
b2e6be83e5 remove some driver apps from the restart test because they depend on the default drivers
Change-Id: Ia4a3b476c4e42f83199822f369df2ea32692c994
2019-03-07 14:43:51 +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
Ruchi Sahota
e4934e16fd Moving the device event handling to separate thread
Change-Id: Idfffee1ef46fda4248839854fa2d87f3db6008bb
2019-03-07 04:14:26 +00:00
Jordan Halterman
b81fdc1168 Optimize filtering flow rule counts by state
Change-Id: I1e1d80b8e618743ee449162a081cf42e71c99abf
2019-03-06 17:59:20 -08:00
Carmelo Cascone
3f731271d8 Fix cfg properties for GeneralDeviceProvider
Change-Id: Iedb71fc1bd9893e072cbb22cc557a589b9fb97d6
2019-03-07 01:00:21 +00:00
Ray Milkey
584fa13df8 REST specific provider is not ancillary, it should be a primary
Change-Id: I19f7076085709a79019c5b73ae361e819ff92ef7
2019-03-06 23:41:58 +00:00
Carmelo Cascone
6146946e16 Fix inconsistent update type during concurrent P4Runtime writes
This is achieved by optimistically updating the P4Runtime mirror using
the write request (instead of waiting for a response) and by serializing
building write requests for the same device.

This change requires updating the P4Runtime protocol classes to expose
the content of the write request.

It also includes:
- force member weight to 1 when reading groups (some server
implementation still fails to be compliant to the spec)
- remove unused operation timeout handling in GDP (now all RPCz have a
timeout)

Change-Id: Ib4f99a6085c1283f46a2797e0c883d96954e02e9
2019-03-06 19:28:42 +00:00
Carmelo Cascone
0bcbe26dd7 Use stratum in Trellis P4 STC scenario
Change-Id: I6e9b34c449ebaca51e8fd1673a470e564195e69e
2019-03-06 19:28:42 +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
Jian Li
e8a89b89c3 Fix: resolve the critical issues reported by sonarcube
Change-Id: I4b9d6bd1d4b947609575a82eea445aa6922a6fe4
2019-03-07 00:58:05 +09:00
nitinanand
f3f94c6468 multi event support for a worklet in workflow app
Change-Id: I3178110da75b26f96f8889acc0dd2c715fc567ec
2019-03-06 14:51:44 +00:00
Jian Li
5e8a22a987 Enforce to use unique group Id for k8s svc IP, port, proto combination
Change-Id: I6cad3b9ffac86ee0818e6317443c80f5791a9e74
2019-03-06 05:28:38 +00:00
Jian Li
1cf5188e7f [ONOS-7942] Implement k8s ingress service and watcher with unit tests
Change-Id: I8089336916e882bd31b40facf73c46c5ee541718
2019-03-06 05:28:38 +00:00
Jian Li
ca34c673c6 Support to print out k8s pod, service and endpoints in JSON format
Change-Id: I7f66fae528165e0570e416f6bdb75715cf0d38ab
2019-03-06 05:28:38 +00:00
Jian Li
004526d223 Implement k8s service IP to pod IP translation using Nicira load ext
Change-Id: I147a9adb68b2bf597c1876a64bf77dedca9698b3
2019-03-06 05:28:38 +00:00
Jian Li
2cc2b631f3 Initial implementation of svc IP to pod IP translation using DNAT
Change-Id: I6e2f6936636e929ad60150cc67aa6316eef32911
2019-03-06 05:28:38 +00:00
Jian Li
3d1111e2a8 Add a kubernetes port and pod mapper with sync/purge rules CLIs
Change-Id: I89ed29e4357b84345f95fddf81ab7156715d7c82
2019-03-06 05:28:38 +00:00
Jian Li
b1cd0b028f Add CLIs for k8s endpoins, pods and services, sync & purge states
Change-Id: I931ad76077639e80045f106c0014f113c76354d6
2019-03-06 05:28:38 +00:00
Jian Li
853877327a Implement kubernetes pod, service and endpoints watcher
Change-Id: I0c364f370de9599b124f0e85f093099e8b4d97f3
2019-03-06 05:28:38 +00:00
Jian Li
747e136c95 [ONOS-7935] Add k8s pod store and manager with unit tests
Change-Id: If4104a2800556bf9777c159eb3b5bd175bc141ae
2019-03-06 05:28:38 +00:00
Jian Li
3e1b887797 [ONOS-7934] Add k8s endpoints store and manager with unit tests
Change-Id: I4e67f5fd7d9859339b92f1816f52a092063dc2e4
2019-03-06 05:28:38 +00:00
Jian Li
965de27fa0 [ONOS-7933] Add k8s service store and manager with unit tests
Change-Id: I18ffd491dc4cf979a350acd50d3c7b1599fc229a
2019-03-06 05:28:38 +00:00
Jian Li
d893a66459 Add a set of interfaces for k8s pod, service, endpoint
Change-Id: Ie67c5d1a0678bdd651dac24363ab3feab5098919
2019-03-06 05:28:38 +00:00
Jian Li
1cee988ec6 Manage k8s API config life cycle, bootstrap k8s node using k8s client
Change-Id: I9926c6d4903da514b66a3bcbe05358c605c9cc1a
2019-03-06 05:28:38 +00:00
Jian Li
3defa842eb Import k8s client deps, support inject k8s API server config
Change-Id: Iaf246a06462b8a878e93ef3f98da399c3600b129
2019-03-06 05:28:38 +00:00
Jian Li
ec0f7483c3 Support to check the existence of k8s network through REST API
Change-Id: I2da687f1abcc54a33b44b3e48fd2dd5487bcbe29
2019-03-06 05:28:38 +00:00
Jian Li
9b1991696b [ONOS-7926] Implement IPAM service to allocate IP for Kubernetes POD
Change-Id: I32fd1fffb41ec728d0be092ac5a8f555179e7a9e
2019-03-06 05:28:38 +00:00
Jian Li
d89db46e2f Add Kubernetes API server invocation proxy handler
Change-Id: Iadcbe4c2969e36e1f7bf10caff4926c5662d0df6
2019-03-06 05:28:38 +00:00
Jian Li
4aa1764d35 Implement east-west communication for k8s network
Change-Id: Ibac91b7a856e35a26cf0e0f23d6d01f65197625d
2019-03-06 05:28:38 +00:00
Jian Li
bde20bfb14 [ONOS-7914] Hostprovider support for kubernetes network
Change-Id: I1bbc08b7c819875932d0b72fa4bdee4de47c35dd
2019-03-06 05:28:38 +00:00
Jian Li
a80b158430 Initial implementation of k8s networking REST API with unit tests
Change-Id: Ifb11204edb3c1e75b26810c0b104423941b0801d
2019-03-06 05:28:38 +00:00
Jian Li
66f6e3c263 [ONOS-7910] Add initial implementation for k8s flow rule manager
Change-Id: I4a419194b9e626d15be5c93b70af0d4c5005d814
2019-03-06 05:28:38 +00:00
Daniel Park
1099d14c95 Moves flat jump rules from OpenstackSwitchingHandler to OpenstackFlowRuleManager.
Change-Id: I88059fa5f2868bd5e9f08f2fafd5e3bd57d6f8f4
2019-03-06 01:58:38 +00:00
Jimo Jung
1bf5435ea4 [ONOS-7731] Add test code implementation of openstack vtap app
Change-Id: I2e7125ed3d1ae23366ba71c7e3d40acf96f91e5a
2019-03-06 01:21:11 +00:00
Jordan Halterman
c88c265637 Add debug logging of add/remove operations in flow rule store
Change-Id: Ib8bd911f223898cbbaf64304ad3307dae450838e
(cherry picked from commit f51293466d1cde735b3b11a7b5e18b3602c52c86)
2019-03-05 21:16:19 +00:00
Andrea Campanella
b65d99dc84 Reverting change to print for OCHSignal
Change-Id: Ia3c5bc20d0b139837323e9b37010bc803e9fad2f
2019-03-05 20:09:52 +00:00
Jordan Halterman
aeda275934 Reduce frequency of flow store replication
Change-Id: I32528623f7dbbf0e9ec4b091394126f28ac5ffe2
2019-03-05 19:59:16 +00:00
adibrastegarnia
b603ac2de8 FIX-minor changes in the BUILD file for protobuf models
Change-Id: Id2256c1e8c9d53a3aa45bee27ec55f748c789e00
2019-03-05 19:15:47 +00:00
hughkim
d64b23fa1a Replaced String with StringBuffer when convert decimal to string.
Change-Id: I0162b7d0fa377bf48060d275835f27738516e0e9
2019-03-05 19:14:46 +00:00
gyewan.an
3c99ee77c2 Changed the how to relay proxy message within cluster
*changed the commnunication way to 'unicast' from 'sendAndReceived'

Change-Id: I0207c074fd2ab7b8378d9b4ce0cf877fc9aeab29
2019-03-05 17:55:05 +00:00
gyewan.an
91d7e7e283 [ONOS-7566] Implementation of NetconfProxySession
Change-Id: I01cbe0b10ac36cb6db53127555b551f405acdeb1
2019-03-05 17:55:05 +00:00
Eric Tang
33747c18be ONOS-7784: get login user who invoked sudo
Change-Id: I6270c3e29ac9a352d889b635023fc3d329d2c9c3
2019-03-05 17:49:31 +00:00
Jordan Halterman
3e4dbef8b9 Use singleton primitives in transactions
Change-Id: Ibb29a3f10e9863e075a4aba9bc357ed1ca9dfcc1
(cherry picked from commit c1c057aa18b63ceb78f5a95166d8f83bc0967328)
2019-03-05 00:42:27 +00:00
Jordan Halterman
2ef1cf725e Support DNS storage discovery via cluster metadata
Change-Id: I62499cb8d6bff57d780e7aaaf07eaa84ec332192
2019-03-05 00:08:10 +00:00
Sean Condon
ae10293d63 [ONOS-7943] Error in topo layout overlay
Change-Id: If4d4fb999d85ea84cd911006f765fda45b11cb09
2019-03-04 22:16:20 +00:00
Thiago Santos
11d10626f0 OpenFlowPacketProviderTest: better tests for packet-out with output:all
Actually check the values of the OF message
OpenFlowPacketProvider: add inPort match for OF 1.5 version

Adds matching for inPort to indicate how the inPort of the packet should
be treated when packet processing happens. This is relevant for
ALL/FLOOD actions so that the switch ignores that inPort, making it
easier to do proper flooding from the controller.

Change-Id: Id7475741cffcb5fb4b05e4750d4af8fc128ce2d6
2019-03-04 11:34:38 -08:00
Thomas Szyrkowiec
6316e433da Fix for configuration files not being copied
The variable ONOS_HOME is defined a few lines later.
At this point ONOS_DIR needs to be used.

Change-Id: I01e8cd8db662f7f7bfbc9e70375a4bdceb7282dc
2019-03-04 18:39:38 +00:00
Thiago Santos
a4a17cb0b0 OutboundPacket: add inPort method
Allows to provide a different input port to be considered when emitting
the packet. It is useful on OpenFlow devices so one can use ALL or FLOOD
actions as output and not have the packet sent back on the input port.

Default is controller port, as it was before.

The required changes were also implemented in OpenFlowPacketProvider

Change-Id: I0a050b983b5de9935254599e8093dc59ad7a4ccf
2019-03-04 18:37:00 +00:00
pankajthor
1431c75129 ONOS-7855 Adding IPv6 matching field support for the ACL module
Change-Id: Ie0cbed7fababa1482408c2edddd088722df0223d
2019-03-04 18:20:11 +00:00