528 Commits

Author SHA1 Message Date
Charles Chan
2ff1bac305 Routing/bridging rules on the same leaf pair should always be programmed by the same ONOS instance
Main change:
- Implement new logic for shouldHandleRouting, along with corresponding unit tests. Also rename it to shouldProgram

Side changes:
- Refactor revokeSubnet such that it is only invoked on the instance that should handle routing change
- Move the following methods to RoutingRulePopulator and follow the same design pattern as populate/revoke subnet/route
    - populateBridging, revokeBridging, updateBridging
    - updateFwdObj
- Make sure the following methods in RoutingRulePopulator are always invoked by DefaultRoutingHandler with shouldProgram check
    - populateRoute, revokeRoute
    - populateSubnet, revokeSubnet
    - populateBridging, revokeBridging, updateBridging
    - updateFwdObj

Change-Id: I903129271ede91c45ebf0d973e06faeae46c157a
2018-04-06 23:24:36 +00:00
Andreas Pantelopoulos
0616c56fa9 Use SRLinkWeigher in path computation.
This patch uses the SRLinkWeigher to compute paths in
order to avoid l-s-l-s paths and also paired leafs
paths.

Change-Id: Id532d66e9543e3c898d2e18ca53be4599e206935
2018-04-06 02:47:55 +00:00
Pier
2016288d8c Fix missing "s" in the master pom file
Change-Id: If872a1d65a6c9000ab504bd87f36664dd1bb2b22
2018-04-05 23:18:30 +00:00
Pier
b0328e4478 [CORD-2834] Handling of dual-homed sinks
Includes also McastUtils to move some code out of the McastHandler

Change-Id: I101637ee600c9d524f17e9f3fc29d63256844956
2018-04-05 11:44:03 +02:00
Pier
3ee2455530 [CORD-2838][CORD-2833] Revisit McastHandler and handle shortest paths with pair links
Includes also a refactoring of the path computation

Change-Id: Iff63780a3bb3e895e55c52211290c19d993e1905
2018-04-05 11:24:33 +02:00
Charles Chan
ba6c5751f7 Remove duplicated getPairDevice implementation
Change-Id: I10847d8909070ad75e0ccbcf432b80f460a4fed1
2018-04-04 22:49:37 +00:00
Saurav Das
604ab3a562 Improvements in route-path installation using bidirectional links.
Change-Id: I69875ba0dced1b0b7ec032edbe02a8cf380fadc2
2018-04-04 22:49:37 +00:00
Andreas Pantelopoulos
daf02c8c03 Fixed sonar suggestion in l2handler
Change-Id: Ia16e6197c36b3bebed4610c40624fa180a4b9385
2018-04-04 21:51:57 +00:00
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