bgpcep.git
13 months agoRelease bgpcep v0.17.10
jenkins-releng [Thu, 6 Apr 2023 20:01:13 +0000 (20:01 +0000)]
Release bgpcep

13 months agoBump versions to 0.17.10-SNAPSHOT 69/105069/2
Robert Varga [Mon, 27 Mar 2023 19:06:26 +0000 (21:06 +0200)]
Bump versions to 0.17.10-SNAPSHOT

This starts the next development iteration.

Change-Id: I451b9965fa8fd2cb5e4818b0e6b6467f1e625177
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoUse Uint32.saturatedOf() 57/105057/1
Robert Varga [Fri, 31 Mar 2023 14:39:13 +0000 (16:39 +0200)]
Use Uint32.saturatedOf()

We are receiving a splat when the sum ends up being negative. While the
underlying cause needs to be investigated, we also should be properly
defensive. Uint32.saturatedOf() catches negative values and squashes
them to 0.

JIRA: BGPCEP-1021
Change-Id: Ia376305aa677ebd05a41629c5083f8829891615f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit cc71ea45a8e373d50b063a61966245c5e90d4aa8)
(cherry picked from commit ea0c792364c98451ded28448d30a2905569e788e)

13 months agoBump upstream versions 48/105048/1
Robert Varga [Mon, 27 Mar 2023 19:04:54 +0000 (21:04 +0200)]
Bump upstream versions

Adopt:
- odlparent-10.0.6
- infrautils-3.0.5
- yangtools-8.0.10
- mdsal-9.0.8
- controller-5.0.9
- aaa-0.15.9
- netconf-3.0.9

Change-Id: I07a2c18f4ab3ddb3c5324193680a466129bb1026
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoFixup manve-dependency-plugin configuration 55/103755/1
Robert Varga [Wed, 4 Jan 2023 15:11:38 +0000 (16:11 +0100)]
Fixup manve-dependency-plugin configuration

We have a bunch of violations that surface with newer plugin, clean them
up.

Change-Id: I9f1071f61ae13568daaf3c4a4261264df7803ae3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit f25411eee2cae95c95521bfc10a49e86c3682e6c)

17 months agoBump versions to 0.17.9-SNAPSHOT 49/103549/1
Robert Varga [Sat, 3 Dec 2022 18:01:22 +0000 (19:01 +0100)]
Bump versions to 0.17.9-SNAPSHOT

This starts the next development iteration.

Change-Id: I118d245d4d2879c66cd41e6fdb83c7c9522d28a1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 months agoUpdate LSP: check LSP presence in payload 62/103262/2
Ivan Hrasko [Wed, 16 Nov 2022 15:38:10 +0000 (16:38 +0100)]
Update LSP: check LSP presence in payload

Check if LSP object is present in update-lsp RPC payload.

If not immediately return error of type 6 with value 8
and do no send PCUpd message to PCC.

JIRA: BGPCEP-1015
Change-Id: I7e10c2c534f6cc29326a4e01732def70d41f9997
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
(cherry picked from commit db6dd4df10cc0a5bc9c784eb7c084589e2d3cba3)

17 months agoBump upstream versions 45/103545/1
Robert Varga [Sat, 3 Dec 2022 12:44:17 +0000 (13:44 +0100)]
Bump upstream versions

Adopt:
- odlparent-10.0.5
- infrautils-3.0.4
- yangtools-8.0.9
- mdsal-9.0.7
- controller-5.0.8
- aaa-0.15.8
- netconf-3.0.8

Change-Id: I33f2db283d13336b818e74e171c4945b319faa61
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoBump versions to 0.17.8-SNAPSHOT 63/103063/1
Robert Varga [Thu, 3 Nov 2022 12:19:44 +0000 (13:19 +0100)]
Bump versions to 0.17.8-SNAPSHOT

This starts the next development iteration.

Change-Id: I246c6484c55f2702d3309261ee692534254e5a57
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
18 months agoBump upstream versions 57/103057/1
Robert Varga [Thu, 3 Nov 2022 10:22:09 +0000 (11:22 +0100)]
Bump upstream versions

Adopt:
- odlparent-10.0.4
- infrautils-3.0.3
- yangtools-8.0.8
- mdsal-9.0.6
- controller-5.0.7
- aaa-0.15.7
- netconf-3.0.7

Change-Id: I6c273a6467a7bbb21c149b4242cf450299f2b2b6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
20 months agoBump versions to 0.17.7-SNAPSHOT 29/102229/2
Robert Varga [Fri, 26 Aug 2022 16:19:55 +0000 (18:19 +0200)]
Bump versions to 0.17.7-SNAPSHOT

This starts the next development iteration.

Change-Id: I7d8b876a62f5b7a3c334d8b1bae162772aef99d2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
20 months agoBump upstream versions 28/102228/2
Robert Varga [Fri, 26 Aug 2022 16:18:46 +0000 (18:18 +0200)]
Bump upstream versions

Adopt:
- odlparent-10.0.3
- infrautils-3.0.2
- yangtools-8.0.6
- mdsal-9.0.5
- controller-5.0.6
- aaa-0.15.6
- netconf-3.0.6

Change-Id: I13d9f1498e23e06e6f6e4aab312a31f16ffde2d2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
21 months agoRemove an unneeded synchronized block 25/101825/1
Robert Varga [Mon, 1 Aug 2022 10:42:18 +0000 (12:42 +0200)]
Remove an unneeded synchronized block

updateStats() is already synchronized, there is no need to synchronize
further.

Change-Id: I961a5a40d75e376e216e903fbd3a28cfaa4dab00
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit f6673b59b50588d7c7e3358f43a1f30ab80dda90)

21 months agoCorrect ReachTlvParser to handle IPv6 prefix 20/101820/1
Olivier Dugeon [Tue, 12 Jul 2022 07:52:40 +0000 (09:52 +0200)]
Correct ReachTlvParser to handle IPv6 prefix

ReachTlvParser class supports Ipv6 prefix only in serialization
methods. ParseTlvBody handles only IPv4 prefix. Thus, if a peer
BGP Link State router sends an Update Message with an IPv6
prefix in IP Reachability Information NLRI, ParseTlvBody
method fails to parse the IPv6 prefix and assert a
BGPDocumentedException.

This patch looks to the length of the buffer to be parsed to
determine if the prefix is an IPv4 or an IPv6 one. SerializeModel
method has been also updated to avoid exception to determine
if the prefix is an IPv4 or an IPv6 one.

JIRA: BGPCEP-1009
Change-Id: Ia5bac0fb2a6087e5c5cfbca0e3eee7d8fd7b822c
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit a98dcd4eb1d794f45117fa5e70beda9e4189d48d)

23 months agoBump versions to 0.17.6-SNAPSHOT 55/101555/1
Robert Varga [Thu, 9 Jun 2022 21:01:00 +0000 (23:01 +0200)]
Bump versions to 0.17.6-SNAPSHOT

This starts the next development iteration.

Change-Id: I5ef65428dc793a1537546e09d52cb41b0573e91f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
23 months agoBump jxr plugin to 3.2.0 54/101554/1
Robert Varga [Thu, 9 Jun 2022 20:57:58 +0000 (22:57 +0200)]
Bump jxr plugin to 3.2.0

https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12317527&version=12344185
https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12317527&version=12330848

Change-Id: I52c2c3e98aa495fb893e35104bfe46d74d31cecb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
23 months agoBump netconf to 3.0.5 53/101553/1
Robert Varga [Thu, 9 Jun 2022 20:57:13 +0000 (22:57 +0200)]
Bump netconf to 3.0.5

Pick up fixes from upstream.

Change-Id: Ie539d179b8461c211d8c8862bb40cc58cd5d7525
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
23 months agoBump versions to 0.17.5-SNAPSHOT 06/101506/1
Robert Varga [Wed, 8 Jun 2022 14:43:06 +0000 (16:43 +0200)]
Bump versions to 0.17.5-SNAPSHOT

This starts the next development iteration.

Change-Id: I616cf75e83dec4a13ab1733089dfdde1f1338b32
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
23 months agoBump upstream versions 02/101502/1
Robert Varga [Wed, 8 Jun 2022 13:30:24 +0000 (15:30 +0200)]
Bump upstream versions

Adopt:
- yangtools-8.0.6
- mdsal-9.0.4
- controller-5.0.5
- aaa-0.15.5
- netconf-3.0.4

Change-Id: I16403efb1fe225739842a67a457393339f5ec72b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump versions to 0.17.4-SNAPSHOT 30/101130/1
Robert Varga [Sat, 14 May 2022 09:39:28 +0000 (11:39 +0200)]
Bump versions to 0.17.4-SNAPSHOT

This starts the next development iteration.

Change-Id: I535e71f4fed5b7e64c49128900b00585a7048dcb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump upstream versions 07/101107/12
Robert Varga [Fri, 13 May 2022 08:08:03 +0000 (10:08 +0200)]
Bump upstream versions

Adopt:
- odlparent-10.0.2
- infrautils-3.0.1
- yangtools-8.0.5
- mdsal-9.0.3
- controller-5.0.5
- aaa-0.15.4
- netconf-3.0.3

Change-Id: I7682592c13171ac85e20127018732dd20a632f35
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix checkstyle 16/101116/1
Robert Varga [Fri, 13 May 2022 13:47:47 +0000 (15:47 +0200)]
Fix checkstyle

There are unneeded qualifiers, fix them.

Change-Id: I1c83aa40d35e76f9a61ea3653de62e6b2555d5ef
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump versions to 0.17.3-SNAPSHOT 90/100790/2
Robert Varga [Mon, 25 Apr 2022 12:22:50 +0000 (14:22 +0200)]
Bump versions to 0.17.3-SNAPSHOT

This starts the next development iteration.

Change-Id: I18a4fccc5194bfc4d9312f5450384bb77f266672
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCleanup ietf-p2mp-te-lsp 11/101111/1
Robert Varga [Fri, 13 May 2022 11:06:10 +0000 (13:06 +0200)]
Cleanup ietf-p2mp-te-lsp

protocol.util is only needed for tests, clean that up.

Change-Id: I61ea64d21390ede2c314c15a5f385e1cc07e7db3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCleanup bgp-parser-spi dependency 06/101106/1
Robert Varga [Fri, 13 May 2022 10:51:35 +0000 (12:51 +0200)]
Cleanup bgp-parser-spi dependency

The yang-data-impl dependency is only needed for tests, add proper
scope.

Change-Id: I289959de2587f9b08b479a16dcee3b332a5a03fc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump upstream versions 89/100789/1
Robert Varga [Mon, 25 Apr 2022 09:52:05 +0000 (11:52 +0200)]
Bump upstream versions

Adopt:
- controller-5.0.3
- aaa-0.15.3
- netconf-3.0.2

Change-Id: I22abe120f318afa8ecae7e751c4bbe186470f41c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoDrop synchronization from ServerSessionManager.{bind,unbind} 16/100716/3
Robert Varga [Thu, 21 Apr 2022 23:12:28 +0000 (01:12 +0200)]
Drop synchronization from ServerSessionManager.{bind,unbind}

We are not touching any state, there is no point in synchronizing
here.

Change-Id: Ia5f39ec274a2b26bd94c4375506043acb63ff7f1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoReplace per-request j.u.Timer with a Netty Timer 05/100705/6
Robert Varga [Fri, 22 Apr 2022 17:20:05 +0000 (19:20 +0200)]
Replace per-request j.u.Timer with a Netty Timer

We are currently spawning a full java.util.Timer for every request we are
sending out. That is rather wasteful in terms of resources: each such
timer costs us a thread.

Rather than doing that, use Netty's HashedWheelTimer, which can easily
cope with a large number of timeouts.

JIRA: BGPCEP-1006
Change-Id: I4f3b6bf6a435170c8a054aa0e012418c60b17e96
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoTerminate outstanding requests on clean shutdown 27/100727/1
Robert Varga [Fri, 22 Apr 2022 17:20:05 +0000 (19:20 +0200)]
Terminate outstanding requests on clean shutdown

When we initiate session shutdown we need to cancel all requests. Update
tests to disable RPC timeouts to expose the fact we have been failing to
do that.

JIRA: BGPCEP-1007
Change-Id: I4159de8fa4c69041608032cd172e2f66afd2060c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCleanup PCETriggeredInitialSyncProcedureTest 26/100726/1
Robert Varga [Fri, 22 Apr 2022 16:41:33 +0000 (18:41 +0200)]
Cleanup PCETriggeredInitialSyncProcedureTest

Remove useless override and use List.of() instead of
Collections.emptyList().

Change-Id: I505904047331d0a7f862b825d20b3c323cbd94f1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCleanup StateSynchronizationAvoidanceProcedureTest 25/100725/1
Robert Varga [Fri, 22 Apr 2022 16:40:48 +0000 (18:40 +0200)]
Cleanup StateSynchronizationAvoidanceProcedureTest

Use List.of() instead of Collections and prettify builder invocation.

Change-Id: I87d77a51b5fef07e0b9bdb70c1ce19ddc7a896cc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCleanup SyncOptimizationTest 24/100724/1
Robert Varga [Fri, 22 Apr 2022 16:36:36 +0000 (18:36 +0200)]
Cleanup SyncOptimizationTest

Use MockitoJUnitRunner and prettify builder use.

Change-Id: Ie421464b5941aeb026b4b6b290c05ef81c1ed094
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCleanup TopologyStatsRpcServiceImplTest 22/100722/1
Robert Varga [Fri, 22 Apr 2022 16:32:48 +0000 (18:32 +0200)]
Cleanup TopologyStatsRpcServiceImplTest

Use List.of() instead of Collections.{empty,singleton}List and
Arrays.asList().

Change-Id: I07c83de4b59c53645a35e20b4d11ba67db286e7c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoProperly inject Ticker into PCEPSessionImpl 21/100721/4
Robert Varga [Fri, 22 Apr 2022 14:35:14 +0000 (16:35 +0200)]
Properly inject Ticker into PCEPSessionImpl

Rather than having a mutable static field with the potential pitfalls
from that, use an explicit field to hold the associated ticker and
inject it from tests. Also cleanup the class and do not leak
ChannelFuture. The new field's overhead is eliminating by using a shared
constant for the keepalive message.

Change-Id: Id6f5cd263ea71b50e8a942c804a26ebb047edcc2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoModernize PCEPSessionImplTest 20/100720/2
Robert Varga [Fri, 22 Apr 2022 14:24:45 +0000 (16:24 +0200)]
Modernize PCEPSessionImplTest

Use static imports and proper hamcrest assertions.

Change-Id: I4f1c24a0d0d72554d688f9f7f71dc9d8ac9001ca
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoModernize PCEPDispatcherImplTest 19/100719/2
Robert Varga [Fri, 22 Apr 2022 14:10:42 +0000 (16:10 +0200)]
Modernize PCEPDispatcherImplTest

Use assertThrows() and hamcrest assertions for exceptions. Also use
static imports for assertions.

Change-Id: Iac6f30f1290d2653af9615468658b36f12ab3b56
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoSimplify Mockito.any() reference 18/100718/1
Robert Varga [Fri, 22 Apr 2022 11:44:02 +0000 (13:44 +0200)]
Simplify Mockito.any() reference

We have a static import of this method, just use that.

Change-Id: I73f93fa579942231de3901f118716154048aabde
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCleanup PCEPTopologySessionListenerTest 17/100717/1
Robert Varga [Fri, 22 Apr 2022 11:42:29 +0000 (13:42 +0200)]
Cleanup PCEPTopologySessionListenerTest

Restructure a builder and use List.of() instead of Lists and
Collections.

Change-Id: Ieda2c92034c95c7f06c2f39ba49098d10f129c5e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoTopologySessionListener is not AutoCloseable 14/100714/1
Robert Varga [Thu, 21 Apr 2022 17:28:52 +0000 (19:28 +0200)]
TopologySessionListener is not AutoCloseable

Using AutoCloseable hides internal callers. We also will need an
asynchronous shutdown facility, so let's just define a close() method
we can evolve.

JIRA: BGPCEP-1005
Change-Id: I95be847237ad38644e57bc6400bb38be64af2784
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUse RpcResult.buildFuture() 13/100713/1
Robert Varga [Thu, 21 Apr 2022 17:28:14 +0000 (19:28 +0200)]
Use RpcResult.buildFuture()

We can simplify our code a bit, use utility future builder.

Change-Id: I5eb8566528421f4286376fb5d2bffe5c3d6346f0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoDo not use Stopwatch in PCEPRequest 08/100708/4
Robert Varga [Thu, 21 Apr 2022 14:38:22 +0000 (16:38 +0200)]
Do not use Stopwatch in PCEPRequest

While a Stopwatch is useful, we are not using its Ticker-based utility.
Use System.nanoTime() directly to keep track of our elapsed time,
improving our memory footprint slightly.

Change-Id: I12cb3c6070dcac56ab4d80ec18b9be3a647e9f00
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUse atomic state transitions in PCEPRequest 06/100706/3
Robert Varga [Thu, 21 Apr 2022 13:58:08 +0000 (15:58 +0200)]
Use atomic state transitions in PCEPRequest

PCEPRequest is has only three logical states it can go to and performs
callouts only once it's done. Use a VarHandle and its atomic operations
to perform transitions between these states.

Change-Id: I8b858b129da96a17499ff68ec90a04b83faab490
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoMove MISSING_XML_TAG and MESSAGE_HEADER 11/100711/3
Robert Varga [Thu, 21 Apr 2022 15:29:05 +0000 (17:29 +0200)]
Move MISSING_XML_TAG and MESSAGE_HEADER

The only users of these fields are in PCEPTopologySessionListener,
move and hide them there, reducing clutter.

JIRA: BGPCEP-1005
Change-Id: I3090c3a4c0947ec1ab78259ef23be1f9f15b4a27
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoClean up createUpdateMessageSync() a bit 10/100710/3
Robert Varga [Thu, 21 Apr 2022 15:21:48 +0000 (17:21 +0200)]
Clean up createUpdateMessageSync() a bit

We can use a simple fluent builder if we just shuffle the code around
a bit.

Change-Id: I72d0d23cd89fdb8cf38da900275a5caca85c827f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoDo no use Optional to pass down null 09/100709/3
Robert Varga [Thu, 21 Apr 2022 15:10:21 +0000 (17:10 +0200)]
Do no use Optional to pass down null

We have a complicated way of passing null to tested method, fix that.

Change-Id: I10e7c5a812d0b5cdc3b29130d15418d5e5ac7971
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix ClassCastExceptions in TopologyProgrammingTest 12/100712/1
Robert Varga [Thu, 21 Apr 2022 16:57:07 +0000 (18:57 +0200)]
Fix ClassCastExceptions in TopologyProgrammingTest

e000cc610f7b12f91b7df4221c582f96b5d9864c mocked the method returns
using an Optional rather than with an OperationResult, resulting in
CCEs being reported. Fix that up.

Change-Id: Idd724d448bc4237edac7436f41abfd291476088d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoImplement TopologySessionStats in AbstractTopologySessionListener 86/100686/4
Robert Varga [Wed, 20 Apr 2022 21:33:42 +0000 (23:33 +0200)]
Implement TopologySessionStats in AbstractTopologySessionListener

Pull down more state tracking down into the superclass, eliminating
the need for an upcall when the session is up.

JIRA: BGPCEP-1005
Change-Id: If2ca511ef65a65c7fc1b4cc8b07b1825d3b94e7a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAbstractTopologySessionListener is not generic 85/100685/3
Robert Varga [Wed, 20 Apr 2022 20:23:46 +0000 (22:23 +0200)]
AbstractTopologySessionListener is not generic

We have exactly one subclass, remove generic arguments to make coupling
more obvious.

JIRA: BGPCEP-1005
Change-Id: Icc18d6dfa3b101e892dcb969bfa5fc5651f70804
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoreleaseNodeState() should not care about the PCEPSession 84/100684/2
Robert Varga [Wed, 20 Apr 2022 20:04:59 +0000 (22:04 +0200)]
releaseNodeState() should not care about the PCEPSession

We only need the InetAddress, make sure to reduce exposure.

Change-Id: Id89623db74544253a0ff096f8ff61dd41261136d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove superfluous 'this.' qualifiers 83/100683/3
Robert Varga [Wed, 20 Apr 2022 19:50:26 +0000 (21:50 +0200)]
Remove superfluous 'this.' qualifiers

This is completely unneeded verbosity, remove it.

Change-Id: I6a64c01e9eada84e968e6f3e9020e1f3272b264d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoIntegrate pcep-topology-stats with pcep-topology-provider 53/100653/9
Robert Varga [Tue, 19 Apr 2022 18:42:08 +0000 (20:42 +0200)]
Integrate pcep-topology-stats with pcep-topology-provider

These two components are tightly coupled and are tripping over each
other. Remove the unneccessary indirections to reign in the lifecycle.

JIRA: BGPCEP-1005
Change-Id: I65bcee1d8cb756e774ce0ecd6df92bcf743cd06c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoDo not propagate PCEPSession in onSessionUp 76/100676/3
Robert Varga [Wed, 20 Apr 2022 15:45:36 +0000 (17:45 +0200)]
Do not propagate PCEPSession in onSessionUp

We have only a single implementation and that implementation is just
filling the builder. Make sure do not allow it to do anything with
the incoming session -- allowing us to better reason about state
transitions here.

JIRA: BGPCEP-1005
Change-Id: I784120c4232036dc846e2e3c60dedffe13731b3a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove isLspDbRetreived 81/100681/1
Robert Varga [Wed, 20 Apr 2022 18:20:29 +0000 (20:20 +0200)]
Remove isLspDbRetreived

We are calling this method only from a place where we have
syncOptimization initialized. Eliminate the method and cache its
result in a local boolean.

Change-Id: Id5ebb0fe3d5564c58888d41048d65e9b17a3e840
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRe-enable dependency enforcement 71/100671/3
Robert Varga [Wed, 20 Apr 2022 12:31:31 +0000 (14:31 +0200)]
Re-enable dependency enforcement

We should have artifacts in good enough shape now, make sure we
enforce them being clean.

Change-Id: I18437afc1d884a96c71c3019e96714a9851d38c7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoMinimize storeNode() locking 69/100669/2
Robert Varga [Wed, 20 Apr 2022 12:19:24 +0000 (14:19 +0200)]
Minimize storeNode() locking

Locking only covers transaction interactions, callbacks should be
invoked without the lock being held.

JIRA: BGPCEP-1005
Change-Id: I21ca6ae62ba1936e8c8109fc6e09d733cc054ad0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoClarify putTopologyNode() locking 68/100668/3
Robert Varga [Wed, 20 Apr 2022 12:03:59 +0000 (14:03 +0200)]
Clarify putTopologyNode() locking

This method is always invoked with the lock held, make sure we document
this. Also add FIXME for other oddities we have in this class.

JIRA: BGPCEP-1005
Change-Id: I51f1f54bf62c4f952486ba2c9478e98514a1a78c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoMove onSessionUp()/onMessage() method declarations 67/100667/2
Robert Varga [Wed, 20 Apr 2022 11:50:39 +0000 (13:50 +0200)]
Move onSessionUp()/onMessage() method declarations

There is a completely superfluous suppression here, co-locate methods
to fix the reported violation.

Change-Id: I7aa045870b1b0539ad36de0c0e8d267e97de5400
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoSimplify session/state references 66/100666/2
Robert Varga [Wed, 20 Apr 2022 11:33:49 +0000 (13:33 +0200)]
Simplify session/state references

While we are update our object's state, make sure we use local variables
to it is clear that things cannot change. This makes invariants a bit
more visible.

JIRA: BGPCEP-1005
Change-Id: I1b3b1bd2b6a12822685acd4651f4ead4e769f175
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove TopologyStatsRpcServiceImpl.init() 64/100664/3
Robert Varga [Wed, 20 Apr 2022 08:00:51 +0000 (10:00 +0200)]
Remove TopologyStatsRpcServiceImpl.init()

There is just no point in splitting initialization here, remove the
method and initialize in the constructor.

JIRA: BGPCEP-1005
Change-Id: I4fae3966888cc589e994106dc0d58014dd6ccf15
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoServerSessionManager is not TopologySessionStatsRegistry 51/100651/1
Robert Varga [Tue, 19 Apr 2022 18:04:35 +0000 (20:04 +0200)]
ServerSessionManager is not TopologySessionStatsRegistry

We have an indirection going on here, where really there is only
one implementation.

JIRA: BGPCEP-1005
Change-Id: Ia4bfafa37830e4b148373d2d5a0d82e3836224c7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoTopologyNodeState is not AutoCloseable 50/100650/1
Robert Varga [Tue, 19 Apr 2022 18:02:54 +0000 (20:02 +0200)]
TopologyNodeState is not AutoCloseable

This is an internal class, making it AutoCloseable buries callers
of close() method. Lower the visibility of the close() method.

JIRA: BGPCEP-1005
Change-Id: Ia1c25a8aa4b39af573bac94b88915d94cafa2a3c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump versions 0.17.2-SNAPSHOT 18/100618/1
Robert Varga [Thu, 14 Apr 2022 15:36:18 +0000 (17:36 +0200)]
Bump versions 0.17.2-SNAPSHOT

This starts the next development iteration.

Change-Id: Icdca6a3df91b86a58fac3ace7949a789352eb10f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump upstream versions 16/100616/1
Robert Varga [Thu, 14 Apr 2022 15:21:24 +0000 (17:21 +0200)]
Bump upstream versions

Adopt:
- yangtools-8.0.3
- mdsal-9.0.2
- controller-5.0.2
- aaa-0.15.2
- netconf-3.0.1

Change-Id: I24b22db2b13946ede303ba01c9a3aa7c4935eda5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUse UTF-8 to format output 41/100441/1
Robert Varga [Thu, 7 Apr 2022 08:30:54 +0000 (10:30 +0200)]
Use UTF-8 to format output

jline seems to pick a different charset with JDK17, make sure we use
UTF-8.

Change-Id: Id8a2bf9fa22f67a8d387bf16c93af28fc474e9cc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix NPE message asserts of JDK15+ 40/100440/1
Robert Varga [Wed, 6 Apr 2022 18:55:38 +0000 (20:55 +0200)]
Fix NPE message asserts of JDK15+

When we are running on JDK15+, the NPE encountered will have a
meaningful message. Adjust asserts accordingly.

JIRA: BGPCEP-1003
Change-Id: Id92070a75fa906de21a2de4d12970664e872ea7b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove unused dependency declarations 39/100439/1
Robert Varga [Wed, 6 Apr 2022 16:57:35 +0000 (18:57 +0200)]
Remove unused dependency declarations

Generated Builders no longer reference concepts.Builder, which means
a number of our artifacts do not need this dependency anymore.

Change-Id: I06d9254074966b9398292906ad88552ccdfbbcce
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoDo not declare hamcrest-core dependency 37/100437/1
Robert Varga [Wed, 6 Apr 2022 15:22:52 +0000 (17:22 +0200)]
Do not declare hamcrest-core dependency

hamcrest is provided with scope=test by default, do not mention
it explicitly.

Change-Id: I7392151f992634148739246a025d3a7dcccd6a8f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoDo not pull checker-qual into runtime 36/100436/1
Robert Varga [Wed, 6 Apr 2022 15:19:38 +0000 (17:19 +0200)]
Do not pull checker-qual into runtime

We are using only annotations here, there is no need to pull them into
runtime. Use scope=provided.

Change-Id: I4436d183eb04e72870595e6cc30f93d47ce79210
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUse sphinx keep-going option in docs tox jobs 31/100431/2
guillaume.lambert [Wed, 6 Apr 2022 08:59:02 +0000 (10:59 +0200)]
Use sphinx keep-going option in docs tox jobs

Without this option, sphinx stops at the first warning found
when -W option is enabled.
This prevents users from troubleshooting their contributions in 1 pass.

Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Change-Id: I8969729095227566f161fc32b2b53cfd33b50399

2 years agoFix raw type warnings in bgp/bmp 15/100415/7
Robert Varga [Tue, 5 Apr 2022 11:41:44 +0000 (13:41 +0200)]
Fix raw type warnings in bgp/bmp

Notification is now a generic, adjust interfaces referencing it.

Change-Id: I2f32f995573b0f7778501f26c6cbe81cd1754f52
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump versions to 0.17.1-SNAPSHOT 00/100300/1
Robert Varga [Thu, 31 Mar 2022 06:39:55 +0000 (08:39 +0200)]
Bump versions to 0.17.1-SNAPSHOT

This starts the next development iteration.

Change-Id: I7dadb1ee3aa01b82a295a32f1ae6fda30390ef44
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdd Graph mapping to PCEP topology 83/100283/4
Olivier Dugeon [Mon, 28 Mar 2022 16:10:42 +0000 (18:10 +0200)]
Add Graph mapping to PCEP topology

PCEP implementation is able to manage several pcep-topology.
For each topology, a new PCEP Session Manager is started as
well as a dedicated PCE server. However, each PCE server
uses the same Graph Topology for Path Computation which
could be useless.

This patch adds a new key in the pcep-config yang model to
configure the associated TED i.e. the name of the Connected
Graph that provides it. This allows a possible mapping
between different PCEP Topology and Graph Topology.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Change-Id: I90ee70a63c22f2a0ece2f7731ef90dac0c05225e

2 years agoFix CI docs-linkcheck dead URLs false positives 85/100285/2
guillaume.lambert [Tue, 29 Mar 2022 16:10:40 +0000 (18:10 +0200)]
Fix CI docs-linkcheck dead URLs false positives

Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Change-Id: Iafed90c9df8f69214a836ad9b76ae174e29f530e

2 years agoAdd Exclude and Include Route for Path Computation 47/100247/4
Olivier Dugeon [Thu, 24 Mar 2022 17:53:16 +0000 (18:53 +0100)]
Add Exclude and Include Route for Path Computation

Exclude Route Object (XRO) and Include Route Object (IRO) are
part of RFC5440. Both objects have for goal to add constraints
on path computation: XRO to exclude some nodes or links and
IRO to force inclusion of them i.e. force some points for the
path description.

This new patch enhance the path-computation.yang model as well
as Path Computation algorithms to support both Exclude and
Include routes. If Exclude Route could be express without any
specific order, Include Route must be an ordered list of point:
i.e. to through A, then B and C, list should be <A, B, C> and
not <C, A, B> or other order.

Change-Id: I254086146ed03c8591d54bce3f7c527372ac9134
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2 years agoAdd Close loop mechanism to PCE Server 06/100206/7
Olivier Dugeon [Fri, 11 Mar 2022 17:58:38 +0000 (18:58 +0100)]
Add Close loop mechanism to PCE Server

To ease the management of TE Path, this patch adds a new mechanism
to the Connected Graph in order to automatically trigger actions
when an Edge or Vertex is added, updated or removed.

This allows the PCE server to register triggers on Edges and Vertices
which belong to a Managed TE Path. In case of problem, failure or
TE attributes modification, the PCE server could detect them and apply
correction e.g. re-route the path if new delay on Edge exceeded the
constraints.

JIRA: BGPCEP-979

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Change-Id: I3071d324fc8c678da439258bee79202fa6c39267

2 years agoBump upstream versions 57/100057/18
Robert Varga [Thu, 10 Mar 2022 09:52:27 +0000 (10:52 +0100)]
Bump upstream versions

Adopt:
- odlparent-10.0.0
- infrautils-3.0.0
- yangtools-8.0.2
- mdsal-9.0.1
- controller-5.0.1
- aaa-0.15.1
- netconf-3.0.0

Also adjust for leaf-list mapping changing by switching to
ImmutableSets, which retain iteration order.

Change-Id: Ib184e4bfd162755788c2e8185a71a25a8eb49af0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCorrect Bugs in Path Manager 05/100205/4
Olivier Dugeon [Mon, 21 Mar 2022 13:53:16 +0000 (14:53 +0100)]
Correct Bugs in Path Manager

Some major bugs are corrected with this patch:
- METRIC Object is not sent to PCC during creation or Update
  due to a redundant setting in yang model. The patch suppress
  the 'routing-method' and deduce the type of metric from what
  metric has been set in constraint (like for Algorithm)
- After closing ODL, previous updated configuration on delegated
  LSP are considered as Initiated LSP letting the possibility
  to delete LSP while it is not initiated. The patch overwrites
  the LSP type with one provided by the PcReport if there is
  mismatch between Initiated type
- Saved Managed TE Path are not applied to PCCi at startup.
  Indeed, saved configuration are read before the Graph is
  available. Thus, no valid paths are computed and Managed TE
  Paths are marked with NO_PATH. Give a chance to compute a
  valid path when PCC goes in SYNC to validate configured LSP
  and thus applied modification on PCC.
- Change the HashMap of Managed TE Node to store the TE Managed
  Path to a ConcurrentHashMap. This is mandatory when removing
  the Managed TE Node in order to safetly loop other all Managed
  TE Paths attached to this Managed TE Node.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Change-Id: Ie737cafe7938e6ec0886c75d9f76f9f00f7163a9

2 years agoAlgo API impl slight refactoring 95/100095/2
guillaume.lambert [Sat, 12 Mar 2022 13:57:14 +0000 (14:57 +0100)]
Algo API impl slight refactoring

JIRA: BGPCEP-979
Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com>
Change-Id: I7a77c2a1f8073d63e8727d129a4e0f744f0b5836

2 years agoUpdate algo path-computation YANG model rev date 94/100094/2
guillaume.lambert [Sat, 12 Mar 2022 13:40:25 +0000 (14:40 +0100)]
Update algo path-computation YANG model rev date

Both previous commits modified YANG the algo API path-computation YANG
models to introduce new computation status for failures and a deicated
type for address-family.
Its revision date should have been changed and the code + other YANG
imports adapted accordingly.

Note that:
- even if there is no ODL guidelines on the topic,
  this is IETF YANG recommendation.
- The RESTCONF payload will remain the same for end-users.
- JAVA API and Datastore contents may be affected
  (potential upgrade compatibility issue from existing instances)

$ find . -name '*.java' | grep -v target \
| xargs grep -l 'yang.path.computation.rev200120' \
| xargs sed -i 's/yang.path.computation.rev200120/\
yang.path.computation.rev220310/g'

JIRA: BGPCEP-979
Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com>
Change-Id: I08aed0b463545a464315ce439a6991f9f6101927

2 years agoAdd Bandwidth Reservation in PCE server 59/100059/5
Olivier Dugeon [Thu, 10 Mar 2022 13:39:16 +0000 (14:39 +0100)]
Add Bandwidth Reservation in PCE server

With RSVP-TE, bandwidth on links belonging to the LSP are automatically
adjusted by the routers and re-advertised by the IGP.
However, due to lack of signalling in Segment Routing this bandwidth
adjustement does not occur.
Thus, the PCE server should manage by itself the reserved bandwidth of
Segment Routing path. In addition, routers do not behave the
same way regarding UnReservedBandwidth attributes.

This patch provides an internal mechanism to manage Bandwidth
Reservation to the PCE Server. It concerns 4 main parts:
- ConnectedEdge: add new Reserved Bandwidth attributes with
  dedicated method to get, add and remove bandwidth
- AbstractPathComputation: Adjust pruneEdge method to take
  care of this new Reserved Bandwidth attributes
- ManagedTePath: methods to add, update and delete bandwidth
  of the LSP on edges belonging to the computed path
- PathManagerProvider: Manage reserved bandwidth by calling
  new ManagedTePath methods when needed.

JIRA: BGPCEP-979
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Change-Id: I45534f43478a4605165fbe4b9190cf3feccd6380

2 years agoAdd new status for Path Computation Algorithm 14/100014/5
Olivier Dugeon [Tue, 8 Mar 2022 11:04:02 +0000 (12:04 +0100)]
Add new status for Path Computation Algorithm

The YANG model for path computation algorithm proposed only one failure
status up to now. This path adds 4 more indications about failure.

JIRA: BGPCEP-979
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Change-Id: I73bb7ca012bac65c60fc6a1c8895b098aa48d227

2 years agoAdd Path Manager to PCE Server Provider 76/97076/18
Olivier Dugeon [Tue, 3 Aug 2021 17:24:46 +0000 (19:24 +0200)]
Add Path Manager to PCE Server Provider

The goal of the new Path Manager is to improve the PCE Server.
Its main objectives are as follow:
- Ease the management of LSPs, in particular to update them without
  the need to manually compute a path
- Allow the possibility to provide an ERO to reported LSPs without
  a valid path
- Provide persistency of Initiated and Updated LSPs accross PCC and or
  PCE reboot

JIRA: BGPCEP-979
Change-Id: I0ea42958c5e46511c83d5b4c0c23bdc0a5321ed4
Co-authored-by: Guillaume Lambert <guillaume.lambert@orange.com>
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2 years agoFix dead URLs pointed by tox docs-linkcheck 11/100011/1
guillaume.lambert [Wed, 9 Mar 2022 06:53:23 +0000 (07:53 +0100)]
Fix dead URLs pointed by tox docs-linkcheck

Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Change-Id: Ic69c0ef711f38381971dd303d5c962d7d73702ae

2 years agoAdd and run some linters via tox and pre-commit 09/100009/2
guillaume.lambert [Wed, 9 Mar 2022 06:09:32 +0000 (07:09 +0100)]
Add and run some linters via tox and pre-commit

Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Change-Id: I65157317eeb512449e5a4de8c682d274aec2bde4

2 years agoBump controller to 4.0.10 45/99745/1
Robert Varga [Mon, 14 Feb 2022 20:01:36 +0000 (21:01 +0100)]
Bump controller to 4.0.10

Controller misaligned yangtools versions, pick up the fix.

Change-Id: If601dc3eb5e4a1e113b7a0c7476af8a95fa5d511
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit afdadfb933f4d8de18272155e19199bff795be82)

2 years agoBump upstreams 13/99413/2
Robert Varga [Thu, 20 Jan 2022 17:45:58 +0000 (18:45 +0100)]
Bump upstreams

Adopt:
- odlparent-9.0.13
- infrautils-2.0.13
- mdsal-8.0.11
- controller-4.0.9
- aaa-0.14.9
- netconf-2.0.13

Change-Id: I0a70a8728d53377907b71e596bf6fd0875d696a6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix IPv6 leafs descriptions 71/99571/1
Ivan Hrasko [Thu, 3 Feb 2022 18:57:51 +0000 (19:57 +0100)]
Fix IPv6 leafs descriptions

Change-Id: I4b9cd6dbb750aa661fc7cfeb489a3941aade567a
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 years agoalgo: Fix NPE if ClassType is not specified 42/98742/3
Olivier Dugeon [Tue, 23 Nov 2021 16:38:22 +0000 (17:38 +0100)]
algo: Fix NPE if ClassType is not specified

Path computation algorithms failed during edge pruning if ClassType
is not specified raising a NPE.

In addition, setting ClassType to 0 by default ito handle the NPE is
not conform to RFC5455.

This patch modify edge pruning when ClassType is not specified (set
to 0) and remove default setting to avoid problem when enforcing LSP
with a ClassType equal 0.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Change-Id: I8930393359960dc9406fb9cc112bc194049cb35a

2 years agoBump versions to 0.17.0-SNAPSHOT 05/98705/3
Robert Varga [Fri, 26 Nov 2021 12:19:13 +0000 (13:19 +0100)]
Bump versions to 0.17.0-SNAPSHOT

This starts the next major development iteration.

Change-Id: I3d743d8a08015465d7c8f0f4abfa7bebb73059cb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove DefaultTopologyReference service entry 71/98671/8
marekzatko [Wed, 24 Nov 2021 16:21:04 +0000 (17:21 +0100)]
Remove DefaultTopologyReference service entry

Another case of service being registered, but
never accessed, remove it, making
pcep-topology-provider viable to non OSGi users.

JIRA: BGPCEP-960
Change-Id: I3f69f176891c845c1f399430ffb0a7c20fdb2cc6
Signed-off-by: marekzatko <Marek.Zatko@pantheon.tech>
2 years agoSimplify pcep-stats blueprint 02/98702/4
marekzatko [Fri, 26 Nov 2021 12:15:02 +0000 (13:15 +0100)]
Simplify pcep-stats blueprint

We don't need to subclass Timer, use
TimerTask instead, ditch factory-ref since we can
instantiate the normal way.

Change-Id: I5cb047408392a51424bdb5356f18ad0095043f74
Signed-off-by: marekzatko <Marek.Zatko@pantheon.tech>
2 years agoBump versions to 0.16.14-SNAPSHOT 91/98691/1
Robert Varga [Thu, 25 Nov 2021 15:26:55 +0000 (16:26 +0100)]
Bump versions to 0.16.14-SNAPSHOT

This starts the next development iteration.

Change-Id: Ie41875192aafd7ffb36a07b8131b780f330e9aca
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump netconf to 2.0.11 90/98690/1
Robert Varga [Thu, 25 Nov 2021 13:38:48 +0000 (14:38 +0100)]
Bump netconf to 2.0.11

Adopt latest release.

Change-Id: I8781955f9c98a80d4b868a8ae6dc6de7ce3fbbc1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove unused service registry entry 37/97837/23
marekzatko [Mon, 22 Nov 2021 09:05:41 +0000 (10:05 +0100)]
Remove unused service registry entry

TopologyReference service is registered into
service registry but never accessed, remove
the registration, making bgp-topology-provider
viable to non OSGi users.

JIRA: BGPCEP-980
Change-Id: I384ec2749e7f53873b1a0bf10f8d15316131b00a
Signed-off-by: marekzatko <Marek.Zatko@pantheon.tech>
2 years agoBump versions to 0.16.13-SNAPSHOT 51/98651/1
Robert Varga [Tue, 23 Nov 2021 11:07:07 +0000 (12:07 +0100)]
Bump versions to 0.16.13-SNAPSHOT

This starts the next development iteration.

Change-Id: I482b4d90b9e07f1e2cd0dcb398afbee200ce6753
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump netconf to 2.0.10 50/98650/1
Robert Varga [Tue, 23 Nov 2021 11:06:15 +0000 (12:06 +0100)]
Bump netconf to 2.0.10

Pick up a regression fix.

Change-Id: If4ae1a645dd66053c1b0c770e9706cf76ad1231b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUse DTCL to maintain LSPDB versions 22/98622/6
Robert Varga [Fri, 19 Nov 2021 18:56:40 +0000 (19:56 +0100)]
Use DTCL to maintain LSPDB versions

Rather than issuing synchronous writes, use a DTCL to acquire
versions populated in the datastore. This eliminates a failure code
path and makes connections a tad faster.

JIRA: BGPCEP-989
Change-Id: I90c45dfac9a610f1d153eec1d95fbb50bad86800
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump versions to 0.16.12-SNAPSHOT 26/98626/1
Robert Varga [Sun, 21 Nov 2021 14:26:15 +0000 (15:26 +0100)]
Bump versions to 0.16.12-SNAPSHOT

This starts the next development iteration.

Change-Id: I78005a23985fed60956f413c67396d54c879a5b5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove ClusterSingletonServiceRegistrationHelper 25/98625/4
Robert Varga [Sun, 21 Nov 2021 11:05:40 +0000 (12:05 +0100)]
Remove ClusterSingletonServiceRegistrationHelper

This class is no longer useful, remove it.

Change-Id: Id04af866ca273e306845e5efe26de80f6185c2fa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix closing of peers and rib 44/98444/25
marekzatko [Fri, 12 Nov 2021 10:29:45 +0000 (11:29 +0100)]
Fix closing of peers and rib

Migration to OSGi DS has the side effect that we get proper component
restarts based on their dependencies changing. This exposes the fact
we are not properly shutting down our singleton instances.

Since RibImpl has a captive RIBImpl instance, which undergoes lifecycle,
we have to synchronize all access to it. This is unfortunate, but
addressing this (as well as their naming) will be subject to a separate
effort.

Properly track peers, so we understand when we need to restart them.
While doing such restarts, wait for each peer to properly go down before
starting it up again.

While we are in the area, also improve BGPClusterSingletonService method
names so their intent is a tad more readable. The same goes for BgpPeer,
which is now a package-private abstract class to hide internal machinery
from the outside world.

Also ditch use of ClusterSingletonServiceRegistrationHelper -- it is a
remnant of a bygone era where ClusterSingletonServiceProvider was
incorrectly managing state -- that issue has been resolved a few years
ago. Cutting it out allows us to properly manage our lifecycle,
especially with regards to multiple registrations/instantiations.

JIRA: BGPCEP-988
Change-Id: Idb6748042ddb9a5765c3cea80f15ef319c13368b
Signed-off-by: marekzatko <Marek.Zatko@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>