openflowplugin.git
4 years agoMerge "Make model/pom.xml inherit from odlparent-lite"
Arunprakash D [Thu, 7 Nov 2019 05:45:32 +0000 (05:45 +0000)]
Merge "Make model/pom.xml inherit from odlparent-lite"

4 years agoMake model/pom.xml inherit from odlparent-lite 81/85381/2
Robert Varga [Fri, 25 Oct 2019 08:22:20 +0000 (10:22 +0200)]
Make model/pom.xml inherit from odlparent-lite

This 'parent' is really an aggregator, which is not adding anything
useful on top of OFP parent. Turn it into a pure aggregator and
adjust models to inherit from OFP parent instead.

The result is one fewer artifact to install as well as 3 seconds
shaved from build time.

Change-Id: I2a81635f43a5de1be87975bc0b193477b4fb0953
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoOPNFLWPLUG-1071 : Removal of javax.annotation.Nonnnull and replacement of javax.annot... 22/81722/13
Somashekhar Javalagi [Wed, 24 Apr 2019 04:16:57 +0000 (09:46 +0530)]
OPNFLWPLUG-1071 : Removal of javax.annotation.Nonnnull and replacement of javax.annotation.concurrent.GuardedBy
with org.checkerframework.checker.lock.qual.GuardedBy

Also please have close look at classes - AbstractStackedOutboundQueue, TransactionChainManager
and SimpleRatelimiter, @GuardedBy annotaion is removed  as it is not supporting on void methods.

Change-Id: I34ec33525415b355065fee581a90054bdd501e6c
Signed-off-by: Somashekhar Javalagi <somashekhar.manohara.javalagi@ericsson.com>
4 years agoSynchronize Flow and Group Remove events 44/82444/9
Gobinath [Tue, 9 Apr 2019 06:23:10 +0000 (11:53 +0530)]
Synchronize Flow and Group Remove events

Description:
The flow and group remove events have to be synchronized too along with
the add/update events which are already synchronized.If the flow/group
remove events aren't synchronized, it could result in the stale flows
when there are multiple flow updates and deleted (like in case of
bulk evacuation)

Fix:
Used the existing nodeconfigurator framework to synchronize the remove
events too (with nodeId as key)

Change-Id: I9b386e5c8db2c35e721d539fa11558a292214ec0
Signed-off-by: Gobinath <gobinath@ericsson.com>
4 years agoDrop flows with actions to non-existing group id 38/82438/12
Gobinath [Tue, 2 Apr 2019 12:42:19 +0000 (18:12 +0530)]
Drop flows with actions to non-existing group id

Drop the flows which has action pointing to non-existing group
id in both apply actions and write actions.

Change-Id: I63e000871fe8fb80b7d12d0779232cdd6433f9f8
Signed-off-by: Gobinath <gobinath@ericsson.com>
4 years agoCreating Empty Tables in datastore only when statistics polling is 67/83367/16
Somashekhar Javalagi [Fri, 7 Jun 2019 06:45:08 +0000 (12:15 +0530)]
Creating Empty Tables in datastore only when statistics polling is
enabled.

Change-Id: Ia651042e35ceba5d2aea5f0579573cc68d81c90b
Signed-off-by: Somashekhar Javalagi <somashekhar.manohara.javalagi@ericsson.com>
4 years agoRemove unused YANG imports 41/85341/1
Robert Varga [Wed, 23 Oct 2019 09:19:18 +0000 (11:19 +0200)]
Remove unused YANG imports

pyang is flagging these as unused, remove them.

Change-Id: Ib66f11a83e8c27be582fc299d7ec1cfde42d4356
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMerge "OPNFLWPLUG-1076 Migrate lldp-speaker, forwardingrules-sync and arbitratorrecon...
Arunprakash D [Mon, 21 Oct 2019 08:20:40 +0000 (08:20 +0000)]
Merge "OPNFLWPLUG-1076 Migrate lldp-speaker, forwardingrules-sync and arbitratorreconciliation to MD-SAL APIs"

4 years agoFix odlparent mis-bump 73/85073/1
Robert Varga [Fri, 11 Oct 2019 19:07:26 +0000 (21:07 +0200)]
Fix odlparent mis-bump

We have missed the upgrade of this feature, fix that up.

Change-Id: I55fa6052ea037dc5cebde12f9b086dd2bd7e1f28
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump mdsal to 5.0.3 68/85068/1
Robert Varga [Fri, 11 Oct 2019 14:12:53 +0000 (16:12 +0200)]
Bump mdsal to 5.0.3

This bumps mdsal to 5.0.3 to workaround issues with Blueprint
injection.

Change-Id: I848c9220ce06ec7b4af304ab64948bdc30257dbd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoOPNFLWPLUG-1076 Migrate lldp-speaker, forwardingrules-sync and 14/85014/2
Shweta Chaturvedi [Wed, 9 Oct 2019 10:12:20 +0000 (15:42 +0530)]
OPNFLWPLUG-1076 Migrate lldp-speaker, forwardingrules-sync and
arbitratorreconciliation to MD-SAL APIs

Signed-off-by: Shweta Chaturvedi <shweta.chaturvedi@ericsson.com>
Change-Id: I3309c2eef27224e3d3044c6b844f9eacab6fd03e

4 years agoBump mdsal to 5.0.2 44/84244/23
Robert Varga [Fri, 6 Sep 2019 07:04:45 +0000 (09:04 +0200)]
Bump mdsal to 5.0.2

This bumps mdsal to 5.0.2 as part of Magnesium MRI.

The change in uint{8,16,32,64} mapping necessitates quite a few
changes to protocol coding on both protocol-api and plugin-api
side, which are done in minimalistic fashion.

A follow-up patch will need to clean up unneeded conversions,
especially those from BigInteger.

Change-Id: Id9ab45edf28477dca8acf8f7538cfd26f237f6f4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump odlparent to 6.0.0 43/84243/13
Robert Varga [Fri, 6 Sep 2019 07:04:14 +0000 (09:04 +0200)]
Bump odlparent to 6.0.0

This bumps odlparent to 6.0.0 as part of Magnesium MRI.

Change-Id: I19505dd80b832cd6ed8b68daf471d9e90d3dfdd2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMerge "Update docs header to Magnesium in the master"
Anil Vishnoi [Mon, 30 Sep 2019 23:38:08 +0000 (23:38 +0000)]
Merge "Update docs header to Magnesium in the master"

4 years agoFix odlparent reference 48/84748/1
Robert Varga [Thu, 26 Sep 2019 13:41:38 +0000 (15:41 +0200)]
Fix odlparent reference

sodium code should use 5.0.x odlparent, fix that.

Change-Id: I73b8a0fae8eae267bba5b8c68911331c63a82369
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump mdsal to 4.0.6 29/84429/7
Robert Varga [Sat, 14 Sep 2019 02:17:29 +0000 (04:17 +0200)]
Bump mdsal to 4.0.6

This picks up the latest fixes.

Change-Id: I8ec178ca726c1df504efc4f19d2c9c80965d93be
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump odlparent to 5.0.2 42/84242/11
Robert Varga [Fri, 6 Sep 2019 07:03:51 +0000 (09:03 +0200)]
Bump odlparent to 5.0.2

This bumps odlparent to pick up latest references.

Change-Id: Ica16c98bd6eeeb2530bdc9cee4bb7f198e4a6ab0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFix checkstyle 46/84246/8
Robert Varga [Fri, 6 Sep 2019 07:09:43 +0000 (09:09 +0200)]
Fix checkstyle

Upgraded checkstyle is reporting issues, fix them up.

Change-Id: I5ef8369369265ee31c151376694d8fceb37fb813
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoEnhance debug logs in ofj 01/82301/18
Shweta Chaturvedi [Thu, 28 Mar 2019 11:27:06 +0000 (16:57 +0530)]
Enhance debug logs in ofj

Change-Id: I0529720235628687cf3ceeaa9af792fee0024c10
Signed-off-by: Shweta Chaturvedi <shweta.chaturvedi@ericsson.com>
4 years agoAdding Logs to log commit bundle errors 34/82334/16
gobinath [Thu, 21 Mar 2019 09:02:36 +0000 (14:32 +0530)]
Adding Logs to log commit bundle errors

Logging enhancement to log the commit bundle errors.

Change-Id: I587175acc52b184ff815452b1cd2dddc7e1b765d
Signed-off-by: gobinath <gobinath@ericsson.com>
4 years agoMerge "Use netconf-artifacts to get restconf version"
Anil Vishnoi [Thu, 22 Aug 2019 21:19:13 +0000 (21:19 +0000)]
Merge "Use netconf-artifacts to get restconf version"

4 years agoUse netconf-artifacts to get restconf version 11/83911/1
Robert Varga [Thu, 22 Aug 2019 14:52:37 +0000 (16:52 +0200)]
Use netconf-artifacts to get restconf version

restconf is not a separate ODL project, hence restconf-artifacts
is going away. Use netconf-artifacts to get (and use) the needed
declaration.

Change-Id: Iaf8274714b432a1dd6e3c2e981d14a32890f7a58
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMerge "Use QueuedNotificationManager for port message processing"
Arunprakash D [Thu, 22 Aug 2019 11:55:43 +0000 (11:55 +0000)]
Merge "Use QueuedNotificationManager for port message processing"

4 years agoUpdate docs header to Magnesium in the master 14/83814/1
Anushka Bhandari [Tue, 20 Aug 2019 16:53:10 +0000 (22:23 +0530)]
Update docs header to Magnesium in the master

Should be Magnesium on master and Sodium on stable/sodium.

Signed-off-by: Anushka Bhandari <anushka16134@iiitd.ac.in>
Change-Id: Ic3713a7cb4563b7ca212adec30f8024acd8a2812

4 years agoBump mdsal to 4.0.4 37/83737/1
Robert Varga [Thu, 15 Aug 2019 08:44:51 +0000 (10:44 +0200)]
Bump mdsal to 4.0.4

This brings in latest fixes.

Change-Id: I59f89ef4fe76ef16fcdc9b59f8d9b50aa0849847
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump versions by x.y.(z+1) 53/83553/1
jenkins-releng [Mon, 12 Aug 2019 16:14:13 +0000 (16:14 +0000)]
Bump versions by x.y.(z+1)

Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
Change-Id: Ie185860b8b00e07fe66f48fda9496c77f3ab0860

4 years agoUse QueuedNotificationManager for port message processing 50/83350/8
Shweta Chaturvedi [Thu, 1 Aug 2019 10:03:43 +0000 (15:33 +0530)]
Use QueuedNotificationManager for port message processing

Using queuedNotificationManager for port message processing to avoid datastore
operations in netty thread contex

Signed-off-by: Shweta Chaturvedi <shweta.chaturvedi@ericsson.com>
Change-Id: Ib3dc671b8dd5e6afcbe8d7b4751e8beec45651aa

4 years agoMerge changes from topic "mdsal-4.0.3"
Robert Varga [Fri, 2 Aug 2019 09:12:06 +0000 (09:12 +0000)]
Merge changes from topic "mdsal-4.0.3"

* changes:
  Bump mdsal to 4.0.3
  Bump odlparent to 5.0.1

4 years agoDo not store empty node list 67/82167/5
Robert Varga [Mon, 20 May 2019 06:36:52 +0000 (08:36 +0200)]
Do not store empty node list

Empty node list does not have a semantic meaning and will be
turned into a non-existent list when it becomes empty again.

Do not store it in the datastore.

Change-Id: I8d85650ffe51ec96e243482230c91da9f9e8f402
JIRA: OPNFLWPLUG-1052
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMerge "Printing failed flow/group details for the bundle based resync"
Arunprakash D [Thu, 1 Aug 2019 06:53:58 +0000 (06:53 +0000)]
Merge "Printing failed flow/group details for the bundle based resync"

4 years agoMerge "Sending each flow/group in separate bundle add rpc instead of adding all messa...
Arunprakash D [Thu, 1 Aug 2019 06:53:10 +0000 (06:53 +0000)]
Merge "Sending each flow/group in separate bundle add rpc instead of adding all messages and calling the bundle add rpc. This would allow for the echo message to be processed not waiting for all the bundle messages to be sent."

4 years agoBump mdsal to 4.0.3 41/83141/2
Robert Varga [Thu, 18 Jul 2019 16:18:30 +0000 (18:18 +0200)]
Bump mdsal to 4.0.3

This bumps mdsal to 4.0.3, bringing in latest fixes and improvements.

Change-Id: Ie8e03aab1f31edf80bc9f1d7896c334c9d83be8d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump odlparent to 5.0.1 40/83140/1
Robert Varga [Thu, 18 Jul 2019 16:14:06 +0000 (18:14 +0200)]
Bump odlparent to 5.0.1

This picks up the latest upgrades.

Change-Id: If6006a94197839a9718cd5eae16b0a025913af93
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoOPNFLWPLUG-1070 17/81317/12
nithi thomas [Fri, 29 Mar 2019 11:11:06 +0000 (16:41 +0530)]
OPNFLWPLUG-1070

OVS Based NA Responder for IPv6 default Gateway

Added support IPv6 NA responder fields as part of
odl-openflowplugin-eric-extensions feature.
As per the changes, below eric experimenter fields will be supported with
vendor ID 0X1000.
nd_reserved - OXM name: ERICOXM_OF_ICMPV6_ND_RESERVED(1)
nd_options_type - OXM name: ERICOXM_OF_ICMPV6_ND_OPTION_TYPE(2)
Yes this feature is  present in the OVS master with below patch detail.
https://github.com/openvswitch/ovs/commit/9b2b84973db76e1138d9234ff1b84bb6bb156011

Change-Id: I7e53b54097c6678046f5b216537129157081913c
Signed-off-by: nithi thomas <nithi.t@altencalsoftlabs.com>
4 years agoPrinting failed flow/group details for the bundle based resync 74/82274/26
Somashekhar Javalagi [Mon, 11 Mar 2019 09:39:25 +0000 (15:09 +0530)]
Printing failed flow/group details for the bundle based resync

Change-Id: I6dab8ef845e9cd2ef8fbadc02dc557cac5e2323c
Signed-off-by: Somashekhar Javalagi <somashekhar.manohara.javalagi@ericsson.com>
4 years agoSending each flow/group in separate bundle add rpc instead of adding all 64/82264/29
gobinath [Thu, 7 Mar 2019 08:57:44 +0000 (14:27 +0530)]
Sending each flow/group in separate bundle add rpc instead of adding all
messages and calling the bundle add rpc. This would allow for the echo
message to be processed not waiting for all the bundle messages to be
sent.

Change-Id: I9d0f4ca136b8d313a1b0804a009aa047555db9e3
Signed-off-by: gobinath <gobinath@ericsson.com>
4 years agoMerge "OPNFLWPLUG-1073 : Using ofppool executor for role change service request callb...
Arunprakash D [Tue, 9 Jul 2019 05:30:39 +0000 (05:30 +0000)]
Merge "OPNFLWPLUG-1073 : Using ofppool executor for role change service request callbacks"

4 years agoMerge "Cleanup JobEntry"
Anil Vishnoi [Mon, 8 Jul 2019 22:17:56 +0000 (22:17 +0000)]
Merge "Cleanup JobEntry"

4 years agoMerge "Simplify job NodeConfiguratorImpl dispatch"
Anil Vishnoi [Mon, 8 Jul 2019 20:27:21 +0000 (20:27 +0000)]
Merge "Simplify job NodeConfiguratorImpl dispatch"

4 years agoMerge "Add task termination traces"
Anil Vishnoi [Mon, 8 Jul 2019 19:16:50 +0000 (19:16 +0000)]
Merge "Add task termination traces"

4 years agoOPNFLWPLUG-644 : Documentation for openflowplugin event logging using 05/82205/6
Somashekhar Javalagi [Wed, 22 May 2019 04:42:32 +0000 (10:12 +0530)]
OPNFLWPLUG-644 : Documentation for openflowplugin event logging using
log4j

Change-Id: Ic85a0a2f212437af223a854ab6e7e162d9f46cd8
Signed-off-by: Somashekhar Javalagi <somashekhar.manohara.javalagi@ericsson.com>
4 years agoCleanup JobEntry 68/82568/4
Robert Varga [Wed, 19 Jun 2019 11:26:40 +0000 (13:26 +0200)]
Cleanup JobEntry

This is an implementation-private class, which is just a holder
DTO. The fields are not really mutable, hence make them final
and make sure we can communicate failures through it.

Change-Id: I5106329af0e193fb420ac0603033972bb56dea62
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoSimplify job NodeConfiguratorImpl dispatch 67/82567/4
Robert Varga [Wed, 19 Jun 2019 11:21:04 +0000 (13:21 +0200)]
Simplify job NodeConfiguratorImpl dispatch

This simplifies the logic by eliminating an unneeded indirection.

Change-Id: Ia254d64d783ed4d465d70d2df4b9aa03bef27be4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAdd task termination traces 66/82566/3
Robert Varga [Wed, 19 Jun 2019 10:57:35 +0000 (12:57 +0200)]
Add task termination traces

This adds trace messages to discern when execution of callbacks
is completed.

Change-Id: I61cee9098c9ef29e1e02b6e87edd06ade9178370
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoOPNFLWPLUG-1073 : Using ofppool executor for role change service request callbacks 46/82546/6
Somashekhar Javalagi [Tue, 18 Jun 2019 11:51:49 +0000 (17:21 +0530)]
OPNFLWPLUG-1073 : Using ofppool executor for role change service request callbacks

Change-Id: I79d24d1d12484e9859968fa3ab6e1b7f79f4e18d
Signed-off-by: Somashekhar Javalagi <somashekhar.manohara.javalagi@ericsson.com>
4 years agoMerge "Migrate to LoggingFutures"
Anil Vishnoi [Fri, 28 Jun 2019 19:01:56 +0000 (19:01 +0000)]
Merge "Migrate to LoggingFutures"

4 years agoMerge "Simplify DeviceContextImpl flow counting"
Anil Vishnoi [Fri, 28 Jun 2019 18:47:10 +0000 (18:47 +0000)]
Merge "Simplify DeviceContextImpl flow counting"

4 years agoMerge "Simplify DeviceFlowRegistryImpl streaming"
Anil Vishnoi [Fri, 28 Jun 2019 18:46:59 +0000 (18:46 +0000)]
Merge "Simplify DeviceFlowRegistryImpl streaming"

4 years agoMerge "Remove dead code from DeviceFlowRegistryImpl"
Anil Vishnoi [Fri, 28 Jun 2019 18:46:40 +0000 (18:46 +0000)]
Merge "Remove dead code from DeviceFlowRegistryImpl"

4 years agoMerge "Update flow during arbitrator reconciliation should be handled as delete bundl...
Anil Vishnoi [Fri, 28 Jun 2019 18:26:11 +0000 (18:26 +0000)]
Merge "Update flow during arbitrator reconciliation should be handled as delete bundle message for original flow followed by add bundle message for updated flow."

4 years agoMigrate to LoggingFutures 47/82547/2
Robert Varga [Tue, 18 Jun 2019 11:23:22 +0000 (13:23 +0200)]
Migrate to LoggingFutures

LoggingFutures provide more flexible method overrides, hence
allowing faster execution for known types (like ListenableFuture).

This migrates to use LoggingFutures instead of JdkFutures, also
eliminating unneeded temporary Future variables.

Change-Id: If2b1f99ffa6d09633706eb8c0ac323e116f3179e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoSimplify DeviceContextImpl flow counting 81/82581/5
Robert Varga [Thu, 20 Jun 2019 10:20:38 +0000 (12:20 +0200)]
Simplify DeviceContextImpl flow counting

The code to count flows for debugging purposes is a rather arcane
stream. Simplify it by transforming some amount of code from
functional to imperative programming and taking advantage of
nonnullFoo() methods.

Change-Id: Ifa61e38b4a4e4ac786d598ba6199ed2d55304407
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoSimplify DeviceFlowRegistryImpl streaming 80/82580/3
Robert Varga [Thu, 20 Jun 2019 10:12:01 +0000 (12:12 +0200)]
Simplify DeviceFlowRegistryImpl streaming

This patch takes advantage of Optional.ifPresent() and nonnullFoo()
methods to simplify the stream processing pipeline.

Change-Id: I9395a011fd7956d909b0b22d334aa9dcee601db6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove dead code from DeviceFlowRegistryImpl 78/82578/4
Robert Varga [Thu, 20 Jun 2019 10:03:06 +0000 (12:03 +0200)]
Remove dead code from DeviceFlowRegistryImpl

newReadOnlyTransaction() and read() do not return nulls, hence
the code checking for them is dead. Remove it and refactor the
code to close the transaction immediately after issuing the read.

Change-Id: I9f02a19358c2bb0019b66a5778e489d52159499f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMerge "Declare reconciliation artifacts"
Anil Vishnoi [Thu, 27 Jun 2019 01:18:01 +0000 (01:18 +0000)]
Merge "Declare reconciliation artifacts"

4 years agoMerge "Reduce use of JdkFutureAdapters"
Anil Vishnoi [Thu, 27 Jun 2019 01:15:46 +0000 (01:15 +0000)]
Merge "Reduce use of JdkFutureAdapters"

4 years agoMerge "Cleanup use of Guava Function"
Anil Vishnoi [Thu, 27 Jun 2019 00:57:22 +0000 (00:57 +0000)]
Merge "Cleanup use of Guava Function"

4 years agoMerge "Remove use of Objects.{is,non}Null"
Anil Vishnoi [Thu, 27 Jun 2019 00:41:50 +0000 (00:41 +0000)]
Merge "Remove use of Objects.{is,non}Null"

4 years agoMerge "Take advantage of nonnullFoo()"
Anil Vishnoi [Wed, 26 Jun 2019 17:38:15 +0000 (17:38 +0000)]
Merge "Take advantage of nonnullFoo()"

4 years agoUpdate flow during arbitrator reconciliation should be handled as delete 49/82249/20
Somashekhar Javalagi [Wed, 20 Feb 2019 09:18:49 +0000 (14:48 +0530)]
Update flow during arbitrator reconciliation should be handled as delete
bundle message for original flow followed by add bundle message for
updated flow.

This was not followed, so ended up in stale flows on computes after RBU.

Change-Id: Iff10dd6380a0636cf9f251ddd1e07c1bd88aad8f
Signed-off-by: Somashekhar Javalagi <somashekhar.manohara.javalagi@ericsson.com>
4 years agoRemove use of StringBuffer 37/82637/1
Robert Varga [Fri, 21 Jun 2019 05:24:12 +0000 (07:24 +0200)]
Remove use of StringBuffer

StringBuilder is the more modern replacement, use that.

Change-Id: If2a4cee7d41787b88800790830b09e4f6f01196d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove use of Objects.{is,non}Null 79/82579/2
Robert Varga [Thu, 20 Jun 2019 09:53:53 +0000 (11:53 +0200)]
Remove use of Objects.{is,non}Null

As noted in API documentation, these methods are to be used with
method handles. Replace their use with simple null checks.

Change-Id: Ifa02d42d5b38f62ab871be9768fffb1ea86d7463
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoReduce use of JdkFutureAdapters 26/80526/8
Robert Varga [Thu, 21 Feb 2019 18:01:20 +0000 (19:01 +0100)]
Reduce use of JdkFutureAdapters

All of our infra is on ListenableFuture these days, there is no
point in squashing that to Future and then going back to
ListenableFuture.

Change-Id: I887a4bab29465c90202a66a352b7ffe1f63d6e6e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoDeclare reconciliation artifacts 36/82136/3
Robert Varga [Thu, 16 May 2019 11:17:02 +0000 (13:17 +0200)]
Declare reconciliation artifacts

This reduces the use of project.version and publishes reconciliation
framework to artifacts, so it can be consumed without references to
features.

Change-Id: I79ed1ff4909d8e15aaed5a7adf6d71d239f8ec5d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoCleanup use of Guava Function 25/80525/6
Robert Varga [Thu, 21 Feb 2019 17:39:54 +0000 (18:39 +0100)]
Cleanup use of Guava Function

We do not need to explicitly reference Function, but can use
java.util.function.Function and lambdas.

Change-Id: Ic2c84ab14fc5e014d8aaba09274ebb3a45fd649f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoTake advantage of nonnullFoo() 68/82168/3
Robert Varga [Mon, 20 May 2019 06:50:49 +0000 (08:50 +0200)]
Take advantage of nonnullFoo()

Rather then having inline checks for nulls, take advantage of
built-in nonnullFull() method.

Change-Id: I20cc90de516ab8d335ad0a7353653218e5f47ae2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump mdsal to 4.0.2 69/82369/2
Robert Varga [Fri, 31 May 2019 14:18:45 +0000 (16:18 +0200)]
Bump mdsal to 4.0.2

This picks up latest fixes.

Change-Id: Ic8d7b12750d3335233905bfad5cf742d96a8ceac
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMerge "OPNFLWPLUG-1027 : Topology manager writes link information everytime topology...
Anil Vishnoi [Wed, 22 May 2019 16:12:53 +0000 (16:12 +0000)]
Merge "OPNFLWPLUG-1027 : Topology manager writes link information everytime topology-lldp-discovery publish the linkAdded/linkRemove notificaiton"

5 years agoOPNFLWPLUG-1056 : Default table flows missing 34/80434/22
SOMASHEKHAR MANOHARA JAVALAGI [Fri, 22 Mar 2019 01:45:23 +0000 (07:15 +0530)]
OPNFLWPLUG-1056 : Default table flows missing

FRM registers for ownership callback and will get notified once master
is elected for a device. In some cases, Rolecontext is taking time for
ownership election but deviceContext is going ahead and writing the node
information to the oper inventory. So, apps which listen for node DTCL
will go ahead and push default table flows which might be dropped by FRM
as it has not yet got ownership callback.

The new implementation would be for devicecontext to wait for mastership
election to go through and then write the switch information to the oper
inventory. This will make sure FRM always has the mastership details
when it receives flow information.

Change-Id: I55d467aae68219adc1dfa6ad980bc27342d65191
Signed-off-by: Somashekhar Javalagi <somashekhar.manohara.javalagi@ericsson.com>
5 years agoMerge "OPNFLWPLUG-644: Openflow Event logging using log4j"
Anil Vishnoi [Mon, 20 May 2019 15:48:01 +0000 (15:48 +0000)]
Merge "OPNFLWPLUG-644: Openflow Event logging using log4j"

5 years agoOPNFLWPLUG-1027 : Topology manager writes link information everytime topology-lldp... 75/74175/30
Andrej Leitner [Tue, 17 Jul 2018 22:23:30 +0000 (00:23 +0200)]
OPNFLWPLUG-1027 : Topology manager writes link information everytime topology-lldp-discovery publish the linkAdded/linkRemove notificaiton

 Send new notifications only when the links are discovered
 and ignore already present links.

Change-Id: I5ec6ae4d2cd8d2c83eb6e918f12cf12927056633
JIRA: OPNFLWPLUG-1027
Signed-off-by: Gobinath <gobinath@ericsson.com>
5 years agoOPNFLWPLUG-644: Openflow Event logging using log4j 15/75415/17
Somashekhar Javalagi [Thu, 23 Aug 2018 10:35:12 +0000 (16:05 +0530)]
OPNFLWPLUG-644: Openflow Event logging using log4j

Main events of openflowplugin can be logged using a separate common
logger, which will be using log4j logging framework. This can be
configured as a log appender in etc/org.ops4j.pax.logging file, through
which we can redirect main openflowplugin event logs to a separate file.
This can be helpful in debugging the problems with different phases of
device connection to the SDN controller.

The log appender can be configured as below:
========================================================================
log4j2.logger.ofp.name = OfEventLog
log4j2.logger.ofp.level = DEBUG
log4j2.logger.ofp.additivity = false
log4j2.logger.ofp.appenderRef.OfEventRollingFile.ref = OfEventRollingFile

log4j2.appender.ofp.type = RollingRandomAccessFile
log4j2.appender.ofp.name = OfEventRollingFile
log4j2.appender.ofp.fileName = \${karaf.data}/events/openflow/openflow.log
log4j2.appender.ofp.filePattern = \${karaf.data}/events/openflow/openflow.log.%i
log4j2.appender.ofp.append = true
log4j2.appender.ofp.layout.type = PatternLayout
log4j2.appender.ofp.layout.pattern = %d{ISO8601} | %m%n
log4j2.appender.ofp.policies.type = Policies
log4j2.appender.ofp.policies.size.type = SizeBasedTriggeringPolicy
log4j2.appender.ofp.policies.size.size = 10MB
log4j2.appender.ofp.strategy.type = DefaultRolloverStrategy
log4j2.appender.ofp.strategy.max = 10
========================================================================

Change-Id: I5e86e58fb4fcbd8048dae4fea92f2021bfdbdd04
Signed-off-by: Somashekhar Javalagi <somashekhar.manohara.javalagi@ericsson.com>
5 years agoBump mdsal to 4.0.1 43/81843/2
Robert Varga [Wed, 1 May 2019 11:40:32 +0000 (13:40 +0200)]
Bump mdsal to 4.0.1

This bumps mdsal to 4.0.1.

Change-Id: Id1c38ee68b29d240d8f7a1fc25851afa7bfec6be
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoMerge "Delete ScenarioService"
Anil Vishnoi [Wed, 1 May 2019 22:07:31 +0000 (22:07 +0000)]
Merge "Delete ScenarioService"

5 years agoMerge "Add IpConversionUtil.hasIpv4Prefix()"
Anil Vishnoi [Wed, 1 May 2019 20:27:32 +0000 (20:27 +0000)]
Merge "Add IpConversionUtil.hasIpv4Prefix()"

5 years agoMerge "Remove Optional.ofNullable() antipatterns"
Anil Vishnoi [Wed, 1 May 2019 20:23:21 +0000 (20:23 +0000)]
Merge "Remove Optional.ofNullable() antipatterns"

5 years agoMerge "Use ClassToInstanceMap instead of a HashMap"
Anil Vishnoi [Wed, 1 May 2019 20:16:36 +0000 (20:16 +0000)]
Merge "Use ClassToInstanceMap instead of a HashMap"

5 years agoMerge "Add NodeConfiguratorImpl enqueue trace"
Anil Vishnoi [Wed, 1 May 2019 20:15:50 +0000 (20:15 +0000)]
Merge "Add NodeConfiguratorImpl enqueue trace"

5 years agoMerge "OPNFLWPLUG-1062 Include additional LLDP fields in liblldp"
Anil Vishnoi [Wed, 1 May 2019 20:14:47 +0000 (20:14 +0000)]
Merge "OPNFLWPLUG-1062 Include additional LLDP fields in liblldp"

5 years agoDelete ScenarioService 34/77934/4
Stephen Kitt [Mon, 19 Nov 2018 10:22:38 +0000 (11:22 +0100)]
Delete ScenarioService

This isn’t used anywhere, if it’s not going to be then we might as
well delete it.

Change-Id: Iaec40bb9b96f8e8eb588370e3d45633af9596cc6
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoUpdate docs version for Sodium 05/81805/1
Luis Gomez [Mon, 29 Apr 2019 18:17:42 +0000 (11:17 -0700)]
Update docs version for Sodium

Change-Id: Id447d10f96ae7c59baf6c974ff3479d4cf27b2e8
Signed-off-by: Luis Gomez <ecelgp@gmail.com>
5 years agoAutorelease sodium-mvn35-openjdk11 failed to build 89/81789/3
Shweta Chaturvedi [Fri, 26 Apr 2019 07:13:27 +0000 (12:43 +0530)]
Autorelease sodium-mvn35-openjdk11 failed to build
openflowplugin-extension-api from openflowplugin

Change-Id: Ib0bccc0e2507cf0bd52b652ae990a3b7c640a9b1
Signed-off-by: Shweta Chaturvedi <shweta.chaturvedi@ericsson.com>
5 years agoBump mdsal to 4.0.0 82/81282/17
Robert Varga [Thu, 28 Mar 2019 21:46:26 +0000 (22:46 +0100)]
Bump mdsal to 4.0.0

This bumps mdsal to 4.0.0, adjusting for codegen changes.

Change-Id: If3d2e2c6ec1c70b95b3aae2105fe54de6c447000
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump odlparent to 5.0.0 81/81281/9
Robert Varga [Thu, 28 Mar 2019 21:46:57 +0000 (22:46 +0100)]
Bump odlparent to 5.0.0

This bumps odlparent to 5.0.0, adding JSR305 dependencies where
needed.

Useless annotations in methods specified by a contract
are removed, as SpotBugs reports them (rightfully) as errors,
namely NP_METHOD_PARAMETER_TIGHTENS_ANNOTATION, due to Guava
using checker.qual instead of JSR305.

Change-Id: I7646f5a01b9cf39f7eba316baa8d37c790630c29
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix spotbugs logging complaints 80/81280/7
Robert Varga [Thu, 28 Mar 2019 22:35:21 +0000 (23:35 +0100)]
Fix spotbugs logging complaints

Logging empty or sign-only messages, as well squashing exceptions
draws complaints from newer SpotBugs, fix them up.

Change-Id: I33e9e23c2c347f269517d293b99c1a80ef37f5d6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoDo not use deprecated Futures methods 83/81283/3
Robert Varga [Thu, 28 Mar 2019 23:04:51 +0000 (00:04 +0100)]
Do not use deprecated Futures methods

Futures require an executor, pass down directExecutor() to be
future-proof.

Change-Id: Ib68c29186ba3e57f4c59a4782f1604b17c4dae38
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoOPNFLWPLUG-1069 : Openflow service state is not marked as operational in showsvcstatus 35/81435/2
Somashekhar Javalagi [Mon, 8 Apr 2019 04:43:01 +0000 (10:13 +0530)]
OPNFLWPLUG-1069 : Openflow service state is not marked as operational in showsvcstatus

Openflow service status depends on OPENFLOW_SERVER_6633 and
OPENFLOW_SERVER_6653 services. As OPENFLOW_SERVER_6653 marked along with
ip address, there was problem in deciding openflow service state.
Removing ip address from OPENFLOW_SERVER_6653 service name.

Change-Id: I4b650310ae8ef925a2f1aeb6a5de236d57433c3f
Signed-off-by: Somashekhar Javalagi <somashekhar.manohara.javalagi@ericsson.com>
5 years agoAdd IpConversionUtil.hasIpv4Prefix() 43/80543/8
Robert Varga [Fri, 22 Feb 2019 12:09:35 +0000 (13:09 +0100)]
Add IpConversionUtil.hasIpv4Prefix()

This is a mirror method to the IPv6 case. The IPv6 version is
also optimized to prevent unnecessary reboxing via a shared internal
utility method.

JIRA: OPNFLWPLUG-1067
Change-Id: Ic32b95a52a197e5735f1740cbd7b2cb3530baa99
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove Objects.{is,non}Null abuse 42/80442/9
Robert Varga [Wed, 20 Feb 2019 23:31:31 +0000 (00:31 +0100)]
Remove Objects.{is,non}Null abuse

These utility methods are primarily destined for use with method
handles, not for use in if statements and the like. They also have
more concise representation in bytecode -- through IFNONNULL.

Remove the abuse, resulting in shorter code and bytecode.

JIRA: OPNFLWPLUG-1066
Change-Id: Iff9073d27f65defcfb5e31e8fdea7d7c02c03d0c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoPrevent Ipv4Address rewrap in OfToSalIpv4DstCase 42/80542/6
Robert Varga [Fri, 22 Feb 2019 11:59:16 +0000 (12:59 +0100)]
Prevent Ipv4Address rewrap in OfToSalIpv4DstCase

We have an Ipv4Address on input, there is no point in unwrapping
and then rewrapping it -- just use it as is.

Change-Id: I271f0886e904077b3193d65407963e327779090b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix IpConversionUtil.extractIpv4AddressMask() 46/80546/11
Robert Varga [Fri, 22 Feb 2019 14:08:04 +0000 (15:08 +0100)]
Fix IpConversionUtil.extractIpv4AddressMask()

The algorithm here is wrong when prefix length is 0, as it
returns 255.255.255.255, where it should be returning 0.0.0.0.
This turns out to be an error coming from the fact we use a long
bitmask and incorrect masks to mask out the topmost long bits.

Use an int bitmask and switch to non-sign-extending shifts, which
fixes the problem.

JIRA: OPNFLWPLUG-1063
Change-Id: Idd42ba510a3a9d2032646f07b0bde8061ecd2637
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoPre-construct prefix masks 45/80545/6
Robert Varga [Fri, 22 Feb 2019 14:03:26 +0000 (15:03 +0100)]
Pre-construct prefix masks

IPV4 can hold at most 33 different masks, which are being held
in immutable arrays. We can save significant amount of allocation
and parsing if we just pre-compute these quads.

JIRA: OPNFLWPLUG-1067
Change-Id: I8eb5507b9615373f0526e7bb2e8a1d7132634295
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoOptimize IpConversionUtil.extractIpv4AddressMask() 44/80544/7
Robert Varga [Fri, 22 Feb 2019 13:14:11 +0000 (14:14 +0100)]
Optimize IpConversionUtil.extractIpv4AddressMask()

Rather than going through String.format() use simple pre-allocated
StringBuilder.

Furthermore, Ipv4Prefix is guaranteed to always contain a slash,
hence we can use a simple indexOf/substring instead of splitting
the string.

Finally, if the prefix is 32, we can reuse the DottedQuad we keep
around for full arbitrary mask.

JIRA: OPNFLWPLUG-1067
Change-Id: I99f036c86606142a9f844507789293cd9822692f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoOptimize IpConversionUtil.isArbitraryBitMask() string splitting 41/80541/6
Robert Varga [Fri, 22 Feb 2019 11:48:06 +0000 (12:48 +0100)]
Optimize IpConversionUtil.isArbitraryBitMask() string splitting

We do not need two intermediate lists to iterate over the result
of splitting. We also can pre-compile the splitting pattern.

JIRA: OPNFLWPLUG-1067
Change-Id: I2ff6b50d203ef90d8953364368cbbbe289d34935
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove duplicate IpConversionUtil.isArbitraryBitMask() 40/80540/5
Robert Varga [Fri, 22 Feb 2019 11:35:18 +0000 (12:35 +0100)]
Remove duplicate IpConversionUtil.isArbitraryBitMask()

The ipv4 and ipv6 versions can be shared by passing an address
length argument, reducing code duplication.

JIRA: OPNFLWPLUG-1067
Change-Id: I11dcafa9823a05463164c343aa83f9f4826702a1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoOptimize IpConversionUtil.createArbitraryBitMask() 39/80539/4
Robert Varga [Fri, 22 Feb 2019 11:20:15 +0000 (12:20 +0100)]
Optimize IpConversionUtil.createArbitraryBitMask()

Refactor the method to use a constant DottedQuad for the no mask
case and clean up error logging.

JIRA: OPNFLWPLUG-1067
Change-Id: I377002d60d26d8a7c0c10e2a59de68186761326b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoOptimize splitter usage 38/80538/2
Robert Varga [Fri, 22 Feb 2019 11:06:18 +0000 (12:06 +0100)]
Optimize splitter usage

Do not instantiate short-lived splitters, but reuse shared
instances. Also use splitToList() instead of rolling our own
conversion.

JIRA: OPNFLWPLUG-1067
Change-Id: I515a30bbb2b2cbfbd165a593915151cb52dd6474
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoOptimize IpConversionUtil.extractIpv4Address() 37/80537/2
Robert Varga [Fri, 22 Feb 2019 11:04:08 +0000 (12:04 +0100)]
Optimize IpConversionUtil.extractIpv4Address()

Rather than instantiating Ipv4Address ourselves, use IetfInetUtil
just as we do in the IPv6 case.

JIRA: OPNFLWPLUG-1067
Change-Id: Ie6a4b0ffe57adef2d884f1b0a3987b31f9c0795b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove Ipv{4,6}Address-based splitToParts() methods 36/80536/2
Robert Varga [Fri, 22 Feb 2019 11:01:28 +0000 (12:01 +0100)]
Remove Ipv{4,6}Address-based splitToParts() methods

These methods are marked as abuse, are inefficient and are actually
not used anywhere. Remove them.

JIRA: OPNFLWPLUG-1067
Change-Id: I58a75c96fa057faafadc27b459ae2412c7ae3f1d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoRemove Optional.ofNullable() antipatterns 43/80443/4
Robert Varga [Wed, 20 Feb 2019 22:21:13 +0000 (23:21 +0100)]
Remove Optional.ofNullable() antipatterns

Use of Optional.ofNullable().{map,orElseGet,...} are an antipattern
which is inefficient (as it hides logic from the compiler) and
places burden on EA to prove the objects can actually not be allocated.

This patch eliminates the trivial uses, leaving some more complex
flows to be untangled later.

Change-Id: Id05292b125dcfac4f77d2ea0a70a01ef04a78a0c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>