420 Commits

Author SHA1 Message Date
Laszlo Papp
c5e85bbfd9 Use apache commons Pair instead of javafx
It looks like javafx does not have Pair when using OpenJDK.

Change-Id: I3379dc87e0515185714b28ca0832a36b76b0772f
2018-04-04 16:58:06 +00:00
Charles Chan
f433f95e1b Duplicated flow obj requests are sent in occasion of ROUTE_REMOVED event
Change-Id: I7ad9aa8f27203684921356689805b4092f138d78
2018-04-04 16:32:52 +00:00
Andreas Pantelopoulos
935d59d367 Moved validity checks inside l2TunnelHandler.
Moved every validity check for pseudowires inside the handler
itself, this simplified the usage of handler methods from within
the SegmentRoutingManager. Further, improved the api for removing
pseudowires of the l2tunnel handler.

Change-Id: Idb2607aa546b0734add29d446cbedfd3b23c46bb
2018-04-04 00:16:14 +00:00
Andreas Pantelopoulos
ffe69743e0 Better error handling in pseudowire implementation.
I refactored the pw handler to return meaningful very specific
errors for failures. As a result, I modified also the cli and rest
api implementations to use these fine grain errors accordingly.

Change-Id: I2429532f747c4560378c40be325b039ca0f5c925
2018-04-04 00:16:14 +00:00
Andreas Pantelopoulos
6692fdd828 Better validity checks for paths chosen for pws.
As per Saurav's suggestion, checking the size of the path
could lead to unwanted scenarions. From now on, we check the
devices on the path, if they are edge or not, and according
to the type of pseudowire we validate the path.

Change-Id: I2e3a76524a12244199e0a8f409dd95fc1a3c2b2e
2018-04-04 00:16:14 +00:00
Ray Milkey
86ee5e8711 Upgrade fasterXML libraries for OS-9
Upgrade fasterXML to version 2.9.5 to address security vulnerability
Wrap calls to treeRead(InputStream) to handle new behavior of null streams

Change-Id: Id199cfacd0cf9e5371dc33de9f1e058c2e72eaa5
2018-04-03 16:49:03 +00:00
Charles Chan
e5e0c9ae38 Better error handling
Change-Id: Iac5934a89b177f4e0207a6ecc2e2f0731aca115e
2018-04-02 01:09:01 +00:00
Pier
37db369c64 [CORD-2828] Multicast support for H-AGG
Change-Id: I637465bcff6454f414c349a0ab054d66e3d17a05
(cherry picked from commit 4e9a7ce2f70a21a71f828335a6041101f2bf833e)
2018-03-23 20:00:28 +00:00
Charles Chan
7a888e878e Move all event handler to a different executor
Change-Id: I8e9f84b8f4cab5a5b1746f5279b462a5a2322ac5
2018-03-22 14:42:18 -07:00
Charles Chan
9c44ec7e9d Avoid ConcurrentModificationException
Change-Id: I0cadfb3a49a67e3d21d6749c923af55d36589d5c
2018-03-22 14:40:27 -07:00
Andreas Pantelopoulos
811bbaef85 Pseudowire enhancements :
- Fix bug for transporting l-s-s pws tagged.
  - Refactored and cleaned code.
  - Refactored cli commands.
  - Fixed bug in bulk rest api when the same pseudowires were tried
    to be added.

Change-Id: I28ded776266a08110922b93a8b330d0b343d470d
2018-03-15 20:02:52 -07:00
Charles Chan
b39777cfc5 Fix NPE caused by RoutingRulePopulator not initiated before linkHandler.init()
Change-Id: If21a2628c9d4e7687c26fda467240093dbc723c8
2018-03-14 23:49:22 -07:00
Ray Milkey
b994f8d06e Sonar wants switch cases to end with a break statement
Change-Id: I6d21404114460b19177d3865f9e3b0eba016bc6d
2018-03-14 09:55:13 -07:00
Andreas Pantelopoulos
ff691b7f63 Implemented the following PW features and fixes:
- PW support for H-AGG topologies. Support for leaf-spine-spine
     leaf-spine-spine-leaf pseudowires.
   - Renamed pw commands with sr-pw-* pattern and also removed redundant output
    from them.
   - Enabled bulk addition / removal of pws from the rest api.
   - Modified diagnostics tool with the updated command name.

Change-Id: I708db9281d0082b160cbd713910b420ef7df9da3
2018-03-14 00:55:56 +00:00
Pier
e5bff48f20 [CORD-2811] Fix VLAN cases in Mcast
Change-Id: I0b051a4502e48b4278723a1b782f49e0d6a2dffa
(cherry picked from commit 3cc7e66059ac9be3cdfbd266563690ec53badc9b)
2018-03-13 19:37:55 +00:00
Charles Chan
c9e92242dd CORD-2803 Correctly reply to ICMPv6 echo request that targets link-local address of the switch interface
Change-Id: Id17f07bff6097b3bceb13b3cabcec15f446829bd
2018-03-07 21:35:55 +00:00
Saurav Das
e0d4c87ccc Bugfix for stale state not being cleared up when switch goes down.
Change-Id: Ieee11bbc4253789779c6cf2cc29d18c3173d9ec3
2018-03-06 11:35:41 -08:00
Charles Chan
45b69ab951 QMX switches require the unicast flow being installed before multicast flow in TMAC table
Change-Id: I2258f7ecceb9a151c4ce65518e9553fe371cf3ac
2018-03-06 11:35:40 -08:00
Pier Luigi
b87b8ab7dc [CORD-2798] Fix defects in Mcast
Change-Id: I2854c1b67b112495874c2525aeb1f07635e33643
2018-03-06 18:40:49 +00:00
Pier Luigi
05514fd960 [CORD-2739] Caching in McastHandler
Change-Id: I7cb2aa98f55ce96e5c1992bcada3d29a19b6526c
2018-03-06 18:40:49 +00:00
Ray Milkey
1c5467b629 Sonar suggestion - possible NPEs
Change-Id: I235cdb3ade09a774749a320a6399c9dd38761c4d
2018-03-06 17:44:15 +00:00
Charles Chan
2ea68ff47f Address Sonar warning
Change-Id: Ie665024ddc3cd9989a348d3e33e66db6b215f19b
2018-03-06 17:21:30 +00:00
Charles Chan
50d900c835 Minor OFDPA refactoring according to IntelliJ code analysis
Change-Id: I75bd19f11c4500aafe1e6050fec46e70fd01da15
2018-03-05 10:21:47 -08:00
Saurav Das
a402038459 Handling multiple layers of spines.
Also in this commit:
     - Triggering swap group creation and accounting for it in DestinationSet
     - Fixes in ofdpa2 and ofdpa3 pipeline to allow SR Continue operation
     - Renaming mplsSet in DestinationSet to notBos
     - Removing unused RandomDestinationSet
     - Bug fix in ofdpa driver for swap group chain creation
     - Bug fix in ofdpa driver for verify group operation
     - Better internal bookeeping of device ports and associated neighbors

Change-Id: I2b8f1c4c0b305ef847d57ca7a5320943e06d190d
2018-03-02 16:20:53 -08:00
Pier Luigi
96fe077402 [CORD-2785] Refactor McastHandler and move to separated folder
Change-Id: I1f8ef7d51d57c90c4d29d79fa7e1ac9d0dbd4676
(cherry picked from commit 004d7cf78bf0228e23cbd17d19b2856c339c53e8)
2018-03-01 22:03:52 +00:00
Pier Luigi
57d417971e [CORD-2748] Multicast flows are not properly updated when changing source
Change-Id: Ia4a9e9f132156e4b9a7eb56dd943f1fd13bc1560
2018-03-01 21:16:05 +00:00
Pier Luigi
f7049c5cbc [CORD-2746] Avoid pair links during path computation
Change-Id: Ibd60c350e5a0f9116732cd7a4057d7fb242b22a6
2018-03-01 21:16:05 +00:00
Pier Luigi
83f919b9c2 [CORD-2740] Listening for topology events
Change-Id: I25fc2880e7e78439652c5c6a41ac940396e28045
2018-03-01 21:16:05 +00:00
Andreas Pantelopoulos
e1c8e450be Removed package-info.java from segmentrouting/web.
This file was useless and created problems in Eclipse.
mvn was not building all the project in my machine, however,
segmentrouting built just fine.

Change-Id: I8c2832249c3d3c28db59daa6ffbadc8cdd3669ec
2018-02-28 17:55:01 +00:00
Charles Chan
dd33be5598 Only remove TMAC flow when it is the last port within the same VLAN if TMAC doesn't support in_port matching
- Address an edge case that was not considered in 16418
- Add some unit tests

Change-Id: Ie999850ce0101b528391d45989390924411817f9
2018-02-27 23:37:09 +00:00
Jonghwan Hyun
f810a7a2e7 [CORD-2721] Implement group bucket modification
Change-Id: I0f637ec4ff2b0c12db53d70fed195ea28e542535
2018-02-27 20:45:06 +00:00
Ray Milkey
35d748c2d5 Fix SONAR issue - mutable public variables
Change-Id: Ic6189c14c7976ab3cb664ddc2fc6fb28103f9c7a
2018-02-27 08:56:30 -08:00
Andreas Pantelopoulos
cd3395992d REST API for pseudowire addition / deletion.
Refactored pseudowire code to use REST in order
to add or delete pseudowires individually. Previous implementation
used the network configuration, which is now completely
removed from the code. Further, I re-organized the code
and create a utility class that holds all the necessary
functionality for verifying pseudowires.

Further, I removed all mastership checks in the pw code
since now a specific pseudowire creation is sent to a single
instance, which will handle the call.

Change-Id: I1eb5e7cc7730ad792ea84dd389475768153e2b68
2018-02-27 00:24:24 +00:00
Ray Milkey
067c44bcba Fix SONAR problems
Change-Id: Id79866971b7b2c894babe45a69f22f44cf3584db
2018-02-26 22:04:06 +00:00
Andreas Pantelopoulos
8500118d79 Maven build for sr application.
Added pom.xml files for building sr with maven after
refactoring the code of the application.

Change-Id: If903b03e00fa953ba0cc12f4b9c3ed5c5367f3cf
2018-02-26 20:12:18 +00:00
Ray Milkey
c6c9b17b7b Fix some small SONAR issues
Change-Id: I5accbeb3895e5a5e679146c9eb688232fbf0a6b6
2018-02-26 09:36:31 -08:00
Andreas Pantelopoulos
4e6d8b2d94 Refactored sr app to enable rest api.
The segment routing application structure has been refactored
to the following structure :
	sr
	 ---- app
 	 ---- web

web folder contains the rest cli implementations while app folder
contains everything else. Originally I tried to split the application
in api / app / web, where api would contain all the interfaces. However,
that was not possible due to the fact that most of the classes do not implement
any interfaces and app -- api would result in circular dependencies and we would
not be able to build them.

Change-Id: Ifaaeefe2c5061c8457924ccd01678fb18966c44f
2018-02-23 11:34:39 -08:00
Andreas Pantelopoulos
1e61db58f9 Inner vlan for encoding l2intf group id.
Now using outer vlan id of encapsulating packet for encoding l2 group id in the termination point

Change-Id: Iecf4462c37937b5dcf724410001c0930f9fbee79
(cherry picked from commit 0dbf8e2cf5deb452047319ffa170cde7443b10f9)
2018-02-23 09:04:25 +00:00
Andreas Pantelopoulos
b21547d0c9 Refactored pseudowire code.
This refactoring is needed in order to be able to further
refactor the sr application in api / app / web, where api contains
the interfaces, used by other modules, app contains the implementations
and web contains rest related code.

Change-Id: I147442e5d1248941a6c3c4df2715b01e72c40b3f
2018-02-23 00:14:32 +00:00
Andreas Pantelopoulos
77031718ea Different vlan-id for leaf spine pws.
With this patch we introduce a special vlan for transporting
traffic for leaf-spine pseudowires. Each l-s pw is assigned
a different vlan from the range 4000-2000. This information is
kept internally and exposed to the user with the "pseudowires"
cli command.

Leaf-Leaf pseudowire traffic is still transported untagged, but
we will probably soon need to use special transport vlans there
also.

Change-Id: If6d0b7176a9bd4b89fb7d46db2a49e048bd953ee
2018-02-22 01:20:18 +00:00
Charles Chan
9272613b40 Skip unconfigured devices rather than aborting the entire process
Change-Id: Iae0c165dc4b15798a53b9aa269f0304f2d610fdf
2018-02-21 22:26:54 +00:00
Pier Luigi
b29144d350 [CORD-2486] Improve Mcast CLI APIs
It adds following commands:
- sr-mcast-tree which shows the mapping group-tree
- sr-mcast-next which shows the mapping device-next
- mcast-routes which is similar to the unicast command (routes)

It improve following commands:
- mcast-join adds completer and improves output
- mcast-delete adds completer and improves output
- mcast-show improves output and adds completer

Change-Id: I4e273ac23b05142026b6b77317b0c9b7af76c3ec
2018-02-16 11:57:10 -08:00
Pier Luigi
9930da54a6 [CORD-2484] Deleting multicast route does not clean flows and groups
Change-Id: I6b669b6c202430af070a8977c23d63e2d072bf51
2018-02-16 11:57:10 -08:00
Pier Luigi
b72201bcda [CORD-2607] Mcast buckets correction
Change-Id: Ib47b2d8e40babdbb2ccdba61b48365a141752016
2018-02-16 11:57:09 -08:00
Pier Luigi
eefa276e54 [CORD-2734] Protect SR executor from exceptions
Change-Id: I8a6f98aa242243bf45797aa690a2b90d2b61dd4d
2018-02-14 17:37:09 +00:00
Saurav Das
e7f5101319 Ensures internal link state is up to date on a restarted ONOS instance. Also fixes an NPE in FpmManager.
Change-Id: Idb0df0ef961c6bb2f3b2c3dc72957af8a4987e1b
2018-02-13 09:10:30 -08:00
Yuta HIGUCHI
0eb68e14ed Fix issue reported by error-prone
Change-Id: Ide991f2b91fbd4d7652da6ff8e5a1868dd62dc22
2018-02-09 18:05:23 -08:00
Pier Luigi
d1be7b1317 [CORD-2483] Deleting multiple sinks does not clean all flows and groups
Rationale: Let's assume we have a working group with
multiple sinks. We try to delete the sinks all together,
also in this case for each sink a sink removed event is
generated. For each event we create a new next objective
removing the ports no more needed.

Solution is related to the previous patch (group editing).
Failure scenario:

Sink1 removed -> fwdObj A -> Next B

McastHandler store has been updated at this point.

Sink2 removed -> remove fwdObj A

The remove operations is executed immediately but
the Next B could not exist at this point -> flow
installation failed

Change-Id: Icf568b26b2f3ae3feb935b13038db6195125a5c4
2018-02-09 14:37:07 -08:00
Pier Luigi
21fffd29a4 [CORD-2483] Mcast does not forward traffic to all the sinks
Rationale: if we add more than one sink a number
of sink add events are generated. For each event
we create a mcast path, right now we do not support
Mcast group editing. This means that a new nextobjective
will be created for each sink.

In particular, this patch enables the mcast group editing
to solve the following issue:

Sink1 arrives -> fwdObj A -> Next B (this has one output)
Sink2 arrives -> fwdObj A -> Next C (this has two outputs)

Next B and Next C shares a part of the chain. Reordering happens
during the creation of the Nexts:

Next C created -> flow A -> Group C
Next B created -> flow A -> Group B

Failure, traffic does not reach all the sinks. Other side effect is the
disalignment between SR app and flow/group because McastHandler believes
mcast group is associated to the Next C

It includes minor refactoring of the group handler

Change-Id: Ib59ba6b63ff411ed46ca8216677046a78cc92ac6
2018-02-09 14:37:06 -08:00
Pier Luigi
bad6d6c953 [CORD-2480] Implement logic for dual-link in McastHandler
Change-Id: Iddffc3a03e2fb68e70b957b232cb033c6752d3eb
2018-02-09 14:37:06 -08:00