bgpcep.git
2 years agoRelease Silicon release/silicon-sr4
jenkins-releng [Fri, 28 Jan 2022 10:33:18 +0000 (10:33 +0000)]
Release Silicon

2 years agoBump netconf to 1.13.8 12/99512/1
Robert Varga [Fri, 28 Jan 2022 08:59:09 +0000 (09:59 +0100)]
Bump netconf to 1.13.8

Previous patch failed to bump it, fix that up.

Change-Id: I460669991707f40649f1bd08b0bce4d80dc95cee
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump MRI upstreams 79/99479/2
Robert Varga [Thu, 27 Jan 2022 09:03:55 +0000 (10:03 +0100)]
Bump MRI upstreams

Adopt following versions:
- odlparent-8.1.9
- infrautils-1.9.15
- yangtools-6.0.12
- mdsal-7.0.14
- controller-3.0.16
- aaa-0.13.11
- netconf-1.13.8

Change-Id: If10cbec8ad23472da6e8d4e1054b744cc85fe336
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump MRI upstreams 90/99390/1
Robert Varga [Wed, 19 Jan 2022 16:29:31 +0000 (17:29 +0100)]
Bump MRI upstreams

Adopt following versions:
- odlparent-8.1.8
- infrautils-1.9.14
- yangtools-6.0.11
- mdsal-7.0.13
- controller-3.0.15
- aaa-0.13.10
- netconf-1.13.7

Change-Id: Idc30aedcdd83f9c8f8b51ef89c551714afd07a63
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump MRI upstreams 54/99254/5
Robert Varga [Mon, 10 Jan 2022 13:17:10 +0000 (14:17 +0100)]
Bump MRI upstreams

Adopt following versions:
- odlparent-8.1.6
- infrautils-1.9.12
- yangtools-6.0.10
- mdsal-7.0.12
- controller-3.0.14
- aaa-0.13.9
- netconf-1.13.6

Change-Id: I8ce167fc92f91c8072d40de1f194ca69718ecac5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump versions by x.y.(z+1) 35/98335/1
jenkins-releng [Sun, 7 Nov 2021 22:52:00 +0000 (22:52 +0000)]
Bump versions by x.y.(z+1)

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

2 years agoBump MRI upstreams 40/98040/2
Robert Varga [Fri, 22 Oct 2021 05:29:50 +0000 (07:29 +0200)]
Bump MRI upstreams

Adopt following versions:
- odlparent-8.1.4
- infrautils-1.9.10
- yangtools-6.0.8
- mdsal-7.0.10
- controller-3.0.12
- aaa-0.13.7
- netconf-1.13.5

Change-Id: Ib13947b7f4cb89b966be3b3b9feca656a0e12dac
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRecognized Extended Administrative Group TLV 23/97823/1
Robert Varga [Thu, 21 Oct 2021 13:29:02 +0000 (15:29 +0200)]
Recognized Extended Administrative Group TLV

Recognize TLV 1173 and print a milder message when we encounter it.
Also change 'invalid' to 'unrecognized' in the warning we do print
for things we do not recognize.

JIRA: BGPCEP-987
Change-Id: I3eb8f903bbf4842fc00549f2afdc6548f85be6e3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoClose read-only transaction in BgpDeployerImpl 20/97820/1
Robert Varga [Thu, 21 Oct 2021 12:47:03 +0000 (14:47 +0200)]
Close read-only transaction in BgpDeployerImpl

We are not closing the transaction, which is rather inefficient. Fix
that through a simple try-with-resources.

Change-Id: I2cdfa734e83daef9a968031a289b6406eb031e4a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdd source of incoming message to the log 10/97810/1
Kostiantyn Nosach [Wed, 13 Oct 2021 13:42:26 +0000 (16:42 +0300)]
Add source of incoming message to the log

Add source's socket address of incoming message to the log

JIRA: BGPCEP-984
Change-Id: I614c8406f770b7253706f860c5f240d7158263c6
Signed-off-by: Kostiantyn Nosach <kostiantyn.nosach@pantheon.tech>
(cherry picked from commit c06d5991def1caace2ea6088921727d5bf98a5fe)

2 years agoImprove InitiatedPCInitiateMessageParser diagnostics 76/97676/1
Robert Varga [Tue, 28 Sep 2021 12:37:20 +0000 (14:37 +0200)]
Improve InitiatedPCInitiateMessageParser diagnostics

Unlike everywhere else we are just stomping over the object queue
here, leading to the cryptic CCE. Add a simple utility which turns
mismatches into properly-reported exceptions.

JIRA: BGPCEP-981
Change-Id: I0edcde9e285bab2926cdcc6f368db487e2b18bef
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 3895a10f1aad6ed1855cfd03e689399bfc5e8fb8)

2 years agoFormat PCEPErrors in UnknownObject.toString() 75/97675/1
Robert Varga [Tue, 28 Sep 2021 16:40:49 +0000 (18:40 +0200)]
Format PCEPErrors in UnknownObject.toString()

Rather than printing a binding DTO, use the well-known enum, which
has symbolic names.

JIRA: BGPCEP-981
Change-Id: I1e458c25cce265a5fb0d8499bcb5343af51c8bcd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 91cf609efa04f94f68ba4bbf0dce2de6acf55aba)

2 years agoImprove UnknownObject observability 74/97674/1
Robert Varga [Tue, 28 Sep 2021 12:36:15 +0000 (14:36 +0200)]
Improve UnknownObject observability

Add an UnknownObject.toString() method, so that UnknownObjects expose
their state for debugging purposes.

JIRA: BGPCEP-981
Change-Id: I414e5cbd6967811bb6174f6d289f88fba1d1db08
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 16f67cf0edb124d5b2d6ba0d55a4164dfd848a11)

2 years agoFix parsing issue of PcReport Objects 35/97435/1
Olivier Dugeon [Wed, 21 Jul 2021 16:52:23 +0000 (18:52 +0200)]
Fix parsing issue of PcReport Objects

StatefulPCReportMessageParser() class assumes that PCEP Objects in the
PcReport message are sent in a certain order. However, the order of
Object in the PcReport has changed between old draft version and final
RFC8231.

Indeed, as per RFC8231, the PcReport is composed of:
 - [SRP], <LSP>, <path> where:
   - <path> = <intended-path>
              [<actual-attribute-list><actual-path>]
              <intended-attribute-list>
   - <intended-path> = ERO
   - <actual-attribute-list> = BANDWIDTH, METRICS & <actual-path> = RRO
   - <intended-attribute-list> = LSPA, BANDWIDTH, METRICS, IRO

While in old draft version, <intended-attribute-list> was placed just
right after the <intended-path>.

Thus, the state machine should be flexible enough to accommodate to
PCCs that continue to use old draft and PCCs that are compliant to the
RFC8231.

JIRA: BGPCEP-974

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Change-Id: I97c4e339d8fe66d5e6a10fbb7055c91941351eda
(cherry picked from commit ea833a352533c0a0643dc9ee79a87477e2c33be4)

2 years agoBump versions by x.y.(z+1) 68/97268/1
jenkins-releng [Fri, 20 Aug 2021 07:13:43 +0000 (07:13 +0000)]
Bump versions by x.y.(z+1)

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

2 years agoBump MRI upstreams 81/97181/1
Robert Varga [Wed, 11 Aug 2021 19:29:46 +0000 (21:29 +0200)]
Bump MRI upstreams

Adopt following versions:
- mdsal-7.0.9
- controller-3.0.10
- aaa-0.13.5
- netconf-1.13.4

Change-Id: If21a41bd9d0f14ea3be265a5aff83aca266f7dfe
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix LinkstateGraphBuilder.ipv6toKey() 74/96974/1
Robert Varga [Tue, 20 Jul 2021 19:04:08 +0000 (21:04 +0200)]
Fix LinkstateGraphBuilder.ipv6toKey()

We are picking 8 most significant bytes of the address, which is
contrary to what the comment says. Add an explicit test and fixup
the implementation.

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

2 years agoDo not copy Ipv{4,6}Addresses 73/96973/1
Robert Varga [Tue, 20 Jul 2021 18:53:57 +0000 (20:53 +0200)]
Do not copy Ipv{4,6}Addresses

Ipv{4,6}InterfaceIdentifier are specializations of Ipv{4,6}Address, hence
we do not need to copy them.

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

2 years agoImprove Ipv{4,6}Address handling 72/96972/1
Robert Varga [Tue, 20 Jul 2021 18:17:07 +0000 (20:17 +0200)]
Improve Ipv{4,6}Address handling

Ipv4Address can actually contain a zone, which would break prefix
creation. Use IetfInetUtil to convert address to prefix.

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

2 years agoSimplify LinkstateGraphBuilder.getLinkAttributes() 71/96971/1
Robert Varga [Tue, 20 Jul 2021 18:09:17 +0000 (20:09 +0200)]
Simplify LinkstateGraphBuilder.getLinkAttributes()

If have too many if/else statements here and a blind cast. Refactor
checks and use a simple return.

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

2 years agoImprove withdrawn routes parsing 59/96959/1
Robert Varga [Tue, 20 Jul 2021 15:46:06 +0000 (17:46 +0200)]
Improve withdrawn routes parsing

We are using readBytes() and release() to synchronously process a
buffer. Use readSlice(), which side-steps refcount manipulation,
making things a tad faster.

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

2 years agoFix potential ByteBuf leak in bgp-inet 58/96958/1
Robert Varga [Tue, 20 Jul 2021 15:43:14 +0000 (17:43 +0200)]
Fix potential ByteBuf leak in bgp-inet

We are using ByteBuf.readBytes() to frame a parsing chunk, but
we do not call ByteBuf.release() on it. Use ByteBuf.readSlice()
instead.

JIRA: BGPCEP-973
Change-Id: Ib0e6be0d8bca3518f0f318f137ca1a05196f84d6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 766073df92d59d588d42bb98c031c2c5e65909be)

2 years agoFix potential ByteBuf leaks in bgp-l3vpn 57/96957/1
Robert Varga [Tue, 20 Jul 2021 15:35:32 +0000 (17:35 +0200)]
Fix potential ByteBuf leaks in bgp-l3vpn

We are using ByteBuf.readBytes() to skip over some content and also
to frame it for parsing. Use ByteBuf.skipBytes() in the case of former
and ByteBuf.readSlice() in case of latter. This speeds things up and
plugs a potential refcount problem.

JIRA: BGPCEP-973
Change-Id: Ib9bf406a5e9de9b5e122c3fb3323a4b772a1a798
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit fed701f05399b8b7c9bd4014f97d2c8a75cfc9ef)

2 years agoFix potential ByteBuf leak in bgp-inet 56/96956/1
Robert Varga [Tue, 20 Jul 2021 15:34:54 +0000 (17:34 +0200)]
Fix potential ByteBuf leak in bgp-inet

We are using ByteBuf.readBytes() to actually skip over some content,
use ByteBuf.skipBytes() instead.

JIRA: BGPCEP-973
Change-Id: Ia33e199d63ea05fe4d3383384970f7aaf4441757
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 8c668767ef84c922aaedf6f991b7e7ff045c5e2a)

2 years agoFix potential ByteBuf leaks in bgp-labeled-unicast 55/96955/1
Robert Varga [Tue, 20 Jul 2021 15:33:18 +0000 (17:33 +0200)]
Fix potential ByteBuf leaks in bgp-labeled-unicast

We are using ByteBuf.readBytes() to actually skip over some content,
use ByteBuf.skipBytes() instead.

JIRA: BGPCEP-973
Change-Id: I1bcdcc47b7ac6352e5bdc80064d40cf4692e7eb6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 2fe9e9c53a13f6dc5dfeb17979af8803c536e0cb)

2 years agoFix potential ByteBuf leaks in pcep-base-parser 54/96954/1
Robert Varga [Tue, 20 Jul 2021 15:31:00 +0000 (17:31 +0200)]
Fix potential ByteBuf leaks in pcep-base-parser

We are using ByteBuf.readBytes() to actually skip over some content,
use ByteBuf.skipBytes() instead.

JIRA: BGPCEP-973
Change-Id: I0163acd3f0d59e6bcb272af639092f2e1b74ed5b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit dead9dfa4908530e51c0a49a6ff18466dde15470)

2 years agoUse ByteBuf.readSlice() in bgp-mvpn 53/96953/1
Robert Varga [Tue, 20 Jul 2021 15:25:38 +0000 (17:25 +0200)]
Use ByteBuf.readSlice() in bgp-mvpn

readBytes() returns a ByteBuf, which needs to be be freed eventually
through ByteBuf.release() -- which we are not doing. Use readSlice()
instead.

JIRA: BGPCEP-973
Change-Id: Ide5af583cb33823a941093e6f9e7d5b61b4d2f3c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 2350174ac2f6127e814307ff9940da0a2f904d13)

2 years agoActivate Segment Routing by default 40/96940/1
Olivier Dugeon [Fri, 16 Jul 2021 09:53:53 +0000 (11:53 +0200)]
Activate Segment Routing by default

Since Aluminium release, Segment Routing was wrongly disabled by
default, following the commit that update SR to latest RFC.

In previous release it was activated by default and the documentation
let users thinks it was enabled by default. This commit revert the
previous behavior.

JIRA: BGPCEP-972
Change-Id: Ia8c36e43e026dc576a6ef7b0f2faeac1bc9bef65
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
(cherry picked from commit 9017e70427626d244a10d4aaf4661cca4bd4d1e8)

2 years agoHandle SID Index in SRGB block 38/96938/1
Olivier Dugeon [Mon, 19 Jul 2021 15:38:54 +0000 (17:38 +0200)]
Handle SID Index in SRGB block

When building Graph from BGP-LS, Segment Routing Global Block (SRGB)
advertized with a SID Index instead of an MPLS Label thrown a Java
Exception in getVertex() function. This commit allows the support of
both SID Index and MPLS Label for SRGB lower bound value.

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

2 years agoOptimize getVertex() a bit 37/96937/1
Robert Varga [Tue, 20 Jul 2021 09:17:16 +0000 (11:17 +0200)]
Optimize getVertex() a bit

Using Uint32 for AS number allows us to side-step a few conversions,
making the code a bit more direct.

Also we have type-safe versions of IPv4/IPv6 routerIDs, do not
instantiate new addresses via Strings which is relatively slow due
to the need to check values.

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

2 years agoDo not store ConnectedGraphProvider 36/96936/1
Robert Varga [Tue, 20 Jul 2021 09:14:25 +0000 (11:14 +0200)]
Do not store ConnectedGraphProvider

We are only acquiring ConnectedGraph, eliminate unneeded field as
pointed out by Eclipse. Also use static Preconditions.checkArgument()
reference.

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

2 years agoOptimize LinkstateGraphBuilder.getVertexId() 35/96935/1
Robert Varga [Tue, 20 Jul 2021 08:50:31 +0000 (10:50 +0200)]
Optimize LinkstateGraphBuilder.getVertexId()

Eliminate the use of a temporary Long, reducing the number of type
conversions we perform.

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

2 years agoFix address handling in LinkstateGraphBuilder 34/96934/1
Olivier Dugeon [Mon, 19 Jul 2021 10:21:28 +0000 (12:21 +0200)]
Fix address handling in LinkstateGraphBuilder

When building Graph from BGP-LS, IPv4 addresses are wrongly converted
to Edge Key i.e. addresses greater than 128.0.0.0 thrown a Java
Exception.

This commit change the way Edge keys are computed from both IPv4 and
IPv6 addresses, eliminating Inet6Address.getByName() and using
efficient conversion utilities.

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

2 years agoBump MRI upstreams 64/96864/1
Robert Varga [Mon, 12 Jul 2021 06:37:32 +0000 (08:37 +0200)]
Bump MRI upstreams

Adopt following versions:
- odlparent-8.1.3
- infrautils-1.9.9
- yangtools-6.0.7
- mdsal-7.0.8
- controller-3.0.9
- aaa-0.13.4
- netconf-1.13.3

Change-Id: I309c5696493e2c420d716577553b8f5f46814185
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump versions by x.y.(z+1) 12/96412/1
jenkins-releng [Thu, 3 Jun 2021 03:40:57 +0000 (03:40 +0000)]
Bump versions by x.y.(z+1)

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

3 years agoUse OSGi R7 12/96312/1
Robert Varga [Tue, 25 May 2021 09:02:10 +0000 (11:02 +0200)]
Use OSGi R7

Update osgi.core dependencies to point to OSGi R7 artifact instead
of R6.

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

3 years agoBump MRI upstreams 42/96142/2
Robert Varga [Thu, 13 May 2021 06:14:03 +0000 (08:14 +0200)]
Bump MRI upstreams

Adopt following versions:
- odlparent-8.1.2
- infrautils-1.9.8
- yangtools-6.0.6
- mdsal-7.0.7
- controller-3.0.8
- aaa-0.13.3
- netconf-1.13.2

Change-Id: I4b4c7fca3a8d549feea462df7cf34db64d68e3c9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRe-create transaction chain upon failure in TopologyStatsProvider 35/96035/1
Oleksii Mozghovyi [Tue, 27 Apr 2021 17:16:18 +0000 (20:16 +0300)]
Re-create transaction chain upon failure in TopologyStatsProvider

Transaction failures can occur as a side-effect of various datastore
failure scenarios. In case of TopologyStatsProviderImpl, such a failure
requires manual intervention to restart the component (and thus
re-establish exports).

Rework transaction chain lifecycle, so that we close it down on failures
and establish a new chain when we need it for the periodic updates
and/or unbind operations.

Since we are modifying lifecycle, also make sure we work in terms of a
TimerTask with an externally-provided timer -- we really do not care how
we are scheduled.

JIRA: BGPCEP-920
Change-Id: I6f2be6a5c14ac6e191988c3b7bfd56b78b94abb6
Signed-off-by: Oleksii Mozghovyi <oleksii.mozghovyi@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoInstantiate BgpPeer only once 34/96034/1
Oleksii Mozghovyi [Thu, 25 Mar 2021 17:58:00 +0000 (19:58 +0200)]
Instantiate BgpPeer only once

For some reason in clustered configuration BgpPeer might be instantiated
twice and this leads to service failure, this patch introduce additional
check to avoid this.

JIRA: BGPCEP-948
Change-Id: Icb355abf89ba1dee0281c32d6dd60c95fcdfdb61
Signed-off-by: Oleksii Mozghovyi <oleksii.mozghovyi@pantheon.tech>
(cherry picked from commit d73b2dd19bbc0989f1c9fdc44419657d176f26cd)

3 years agoRework synchronization of SessionStateImpl 33/96033/2
Oleksii Mozghovyi [Mon, 26 Apr 2021 22:49:50 +0000 (01:49 +0300)]
Rework synchronization of SessionStateImpl

SessionStateImpl is a simple state tracker, but its lifecycle was
needlessly complex due to it not being inherently tied to its session.

Make sure SessionStateImpl is instantiated only when we have a session,
which makes a number of operations clearer: we no longer need to deal
with partial initialization and need to protect only internal state.

While we are at it, simplify all of that by keeping simple longs
instead of LongAdder -- and use saturatedOf(long) to convert these to
Uint objects, preventing possible runtime exceptions when overflows
occur.

JIRA: BGPCEP-920
Change-Id: I57b33c7dc33fe63500f5ad96a80d39889c6c5a67
Signed-off-by: Oleksii Mozghovyi <oleksii.mozghovyi@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit de6df3ea177d609faf693fe5c32479ba66998b7f)

3 years agoHandle TopologyNodeState release properly 32/96032/1
Oleksii Mozghovyi [Mon, 26 Apr 2021 23:58:43 +0000 (02:58 +0300)]
Handle TopologyNodeState release properly

- Close transaction chain when PCEP session goes down
- Remove NodeState from the corresponding map in SessionManager properly

JIRA: BGPCEP-920
Change-Id: Ica9dc0a6f43420b5b57694252cb13d2b5350b103
Signed-off-by: Deepthi V V <dvv@luminanetworks.com>
Signed-off-by: Oleksii Mozghovyi <oleksii.mozghovyi@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 3bf063839d01f6c4b80aa4c02ea85d80feae8bfd)

3 years agoBump versions by x.y.(z+1) 93/95593/1
jenkins-releng [Tue, 30 Mar 2021 03:04:28 +0000 (03:04 +0000)]
Bump versions by x.y.(z+1)

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

3 years agoBump MRI upstreams 93/95493/1
Robert Varga [Fri, 12 Mar 2021 06:41:02 +0000 (07:41 +0100)]
Bump MRI upstreams

Adopt following versions:
- odlparent-8.1.1
- infrautils-1.9.6
- yangtools-6.0.5
- mdsal-7.0.6
- controller-3.0.7
- aaa-0.13.2
- netconf-1.13.1

Change-Id: I3d3f9751db2d8c98df032863f8ccf9e886bd8f5d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUpdate .gitreview to stable/silicon 98/95298/1
jenkins-releng [Tue, 23 Feb 2021 00:41:35 +0000 (00:41 +0000)]
Update .gitreview to stable/silicon

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

3 years agoBump netconf to 1.13.0 44/95244/2
Robert Varga [Sun, 21 Feb 2021 17:48:20 +0000 (18:48 +0100)]
Bump netconf to 1.13.0

Adjust version for MRI-integrated NETCONF.

Change-Id: Idc87d256c0f034efe14c194a05bbf1bd6f9620d1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAbstractPeer.createPeerPath() should not be synchronized 94/94494/10
Robert Varga [Thu, 7 Jan 2021 21:14:37 +0000 (22:14 +0100)]
AbstractPeer.createPeerPath() should not be synchronized

This method depends only on peerID and RIB, let the caller provide
the intended ID -- and we can be unsynchronized, reducing cognitive
load.

Change-Id: I931f3242d077dfb0894a0a828cfb5ec4c89c4f2b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove unneeded AbstractRIBTestSetup mocks 97/94497/7
Robert Varga [Fri, 8 Jan 2021 09:42:44 +0000 (10:42 +0100)]
Remove unneeded AbstractRIBTestSetup mocks

We are not using binding interfaces anymore, do not mock them.

JIRA: BGPCEP-853
Change-Id: I5922f2eaca1a7ed87ea5ca52466191f3f7885014
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove RIBImpl's use of DataBroker 90/94490/10
Robert Varga [Thu, 7 Jan 2021 19:35:22 +0000 (20:35 +0100)]
Remove RIBImpl's use of DataBroker

We do not need the binding DataBroker anywhere in the core logic,
do not propagate it there.

JIRA: BGPCEP-853
Change-Id: I283857e7dce16b66aa6d83ab25c87adbb6b75e88
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdopt akka-2.6.x 76/94976/2
Oleksii Mozghovyi [Tue, 2 Feb 2021 21:11:29 +0000 (23:11 +0200)]
Adopt akka-2.6.x

Bump upstream to controller-3.0.6 to adopt akka-2.6.x.

Change-Id: I5b8732ff17ee47b6a0acd385eeb8ceaf4f1a1280
Signed-off-by: Oleksii Mozghovyi <oleksii.mozghovyi@pantheon.tech>
3 years agoBump upstream versions 87/94787/5
Robert Varga [Mon, 25 Jan 2021 14:09:56 +0000 (15:09 +0100)]
Bump upstream versions

Adopt following upstreams:
- odlparent-8.1.0
- infrautils-1.9.5
- yangtools-6.0.4
- mdsal-7.0.5
- controller-3.0.5

Change-Id: I3bb880b1ebd3ef23b4cd15a3bcab56fc9fd9f529
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoDo not expose Binding access through rib.impl.spi.RIB 89/94489/7
Robert Varga [Thu, 7 Jan 2021 19:27:42 +0000 (20:27 +0100)]
Do not expose Binding access through rib.impl.spi.RIB

We should not be touching binding layer at all, eliminate one avenue
of access.

JIRA: MDSAL-583
Change-Id: I4a3c7d6f864e4b69fc5d0fdc41e0aa1acd5ae341
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove Peer.getRawIdentifier() 93/94493/6
Robert Varga [Thu, 7 Jan 2021 20:52:34 +0000 (21:52 +0100)]
Remove Peer.getRawIdentifier()

This method is not used anywhere, remove it.

Change-Id: Ib28117e93de39e5d4f2ed2f728446c810b8f88f9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoClean up AbstractPeer fields 92/94492/7
Robert Varga [Thu, 7 Jan 2021 20:05:26 +0000 (21:05 +0100)]
Clean up AbstractPeer fields

Minimize fields visible to subclasses and make a note of locking
improvement.

Change-Id: If1a5f62475f642ad4edcaae635e9c801a1b303c7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRework ribOut interaction 88/94488/5
Robert Varga [Thu, 7 Jan 2021 19:13:31 +0000 (20:13 +0100)]
Rework ribOut interaction

As it turns out, we are using a binding chain separately from the
main chain. The reason for this is that we use domChain for processing
towards from the peer -- which is common for both. bindingChain is
used exclusively for ribOut writeout.

Rename it and correct the guard/use mismatch we introduced in the
previous patch.

JIRA: BGPCEP-853
Change-Id: Idac28712ae9603f7cbfefe613baf2b47c7daff17
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump MRI upstreams 13/94513/2
Robert Varga [Fri, 8 Jan 2021 20:46:01 +0000 (21:46 +0100)]
Bump MRI upstreams

Adopt following versions:
- odlparent-8.0.3
- infrautils-1.9.4
- yangtools-6.0.3
- mdsal-7.0.4
- controller-3.0.4

Change-Id: Id098b859b916fcf34eac04467e90dd7f38785d87
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix RIB documentation 91/94491/1
Robert Varga [Thu, 7 Jan 2021 19:39:02 +0000 (20:39 +0100)]
Fix RIB documentation

We have a bad reference here, fix it.

Change-Id: Ideea0ba9666274069e5d840d00dcbabaa47b11a0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoDocument AbstractPeer.bindingChain visibility 87/94487/1
Robert Varga [Thu, 7 Jan 2021 19:08:15 +0000 (20:08 +0100)]
Document AbstractPeer.bindingChain visibility

This field accessed by a test, annotate it as such and also make
sure we comply with synchronization rules.

Change-Id: I4d1280b140cae493ed7cb69a37cb950b0af82bfa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoInitialize local directly 86/94486/1
Robert Varga [Thu, 7 Jan 2021 18:34:35 +0000 (19:34 +0100)]
Initialize local directly

We are wasting a line and some clarity here, fix that.

Change-Id: I7d4c59d0a77119b26af95e61f844dc99d8acbc39
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoInvert check 85/94485/1
Robert Varga [Thu, 7 Jan 2021 18:25:30 +0000 (19:25 +0100)]
Invert check

The if-body is only a single line and may easily be missed. Save
us a negation and more readable as well.

Change-Id: I7021fec717883825b371115a09da6867505ffc1f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoDrop <R, I> generic from RIBSupport 28/94328/13
Robert Varga [Fri, 1 Jan 2021 20:11:08 +0000 (21:11 +0100)]
Drop <R, I> generic from RIBSupport

We do not have anything depending on R, I in the interface contract,
be sure to drop the generic arguments to simplify users. This cascades
to other bgp-rib-spi constructs as well.

JIRA: BGPCEP-853
Change-Id: Ib8212f26946fe02f70a947e684aa199785f974d4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove extractAdjRibInRoutes() 27/94327/12
Robert Varga [Fri, 1 Jan 2021 19:48:52 +0000 (20:48 +0100)]
Remove extractAdjRibInRoutes()

This method is not used anywhere, hence we can safely remove it.

JIRA: BGPCEP-853
Change-Id: I5c623f757e94ad28fc0c8b8e08bacf66f619b929
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert LocRibWriter to DOM APIs 31/83231/30
Robert Varga [Wed, 24 Jul 2019 10:38:30 +0000 (12:38 +0200)]
Convert LocRibWriter to DOM APIs

LocRibWriter is not very complicated, but it affects also best path
selection and add-path objects. This patch performs a straight conversion
without cleaning up RIBSupport and related classes. That part will be
done in a follow-up patch.

JIRA: BGPCEP-853
Change-Id: If6b22adf8f9a15c744ed873a5e114a251023c7a8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Claudio D. Gasparini <claudio.gasparini@pantheon.tech>
3 years agofix use of read-only transactions 38/93138/5
Gasparini, Claudio (cg479k) [Sun, 18 Oct 2020 09:45:47 +0000 (11:45 +0200)]
fix use of read-only transactions

 in openconfig-rp-statement

-  make sure transactions are used in a proper try-with-resources block
- use Optional.map() handling rather than the explicit isPresent()/get() combo

JIRA: BGPCEP-861
Signed-off-by: Gasparini, Claudio (cg479k) <claudio.gasparini@intl.att.com>
Change-Id: Icb46adc1e4d7be70a2151f26e25229baa64c87c9

3 years agoUse ImmutableMap.toImmutableMap() 28/84928/5
Robert Varga [Sun, 6 Oct 2019 16:19:14 +0000 (18:19 +0200)]
Use ImmutableMap.toImmutableMap()

Rather than using a temporary map followed by ImmutableMap.copyOf(),
use ImmutableMap's collector.

Change-Id: Id4cad5f8027692b4beabfc9fc532ed4249b62aa6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBe more defensive when checking nodes 91/94391/1
Robert Varga [Mon, 4 Jan 2021 09:28:05 +0000 (10:28 +0100)]
Be more defensive when checking nodes

We have a couple of failures, where we end up throwing a NPE
rather than an assertion. Clean them up.

Change-Id: Ib70a04fb398ba4ce789fcef9b08bb90f4b21c967
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoCleanup PathComputationImpl 69/94369/1
Robert Varga [Sun, 3 Jan 2021 16:16:23 +0000 (17:16 +0100)]
Cleanup PathComputationImpl

Remove superfluous braces and be smarter about filling out the
address family.

Change-Id: Idbd89c098c95a095872f2b28e460ee0828f8c055
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoCleanup boolean literals 68/94368/1
Robert Varga [Sun, 3 Jan 2021 16:12:41 +0000 (17:12 +0100)]
Cleanup boolean literals

A number of places are using explicit literals where not needed,
as pointed out by sonar. Fix these sites.

Change-Id: I0ad6a690c66fb3b53bb4cd5c549399b665e7bc98
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoSimplify matchAfiSafi 67/94367/1
Robert Varga [Sun, 3 Jan 2021 15:54:47 +0000 (16:54 +0100)]
Simplify matchAfiSafi

Sonar is pointing out a boolean literal, remove it by using a
smarter expression.

Change-Id: I68439a378e57122e484222e9dff08dcf7f5a9e9b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoSimplify AbstractStatementRegistryTest 49/94349/1
Robert Varga [Sun, 3 Jan 2021 08:12:33 +0000 (09:12 +0100)]
Simplify AbstractStatementRegistryTest

All state here can use field initializers, hence remove mucking
with @Before.

Change-Id: I4b583dba9efb97caf578bb8b48885acc37ab56a9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoCleanup AbstractStatementRegistryConsumerTest 41/94341/4
Robert Varga [Sat, 2 Jan 2021 14:09:17 +0000 (15:09 +0100)]
Cleanup AbstractStatementRegistryConsumerTest

Make sure we properly clean up the activator. While we're here,
also use read-only transactions for reads, close them as needed
and do not read more than we need to.

Also improve CheckUtil to report received messages when an
assertion fails -- and property assert errors.

Change-Id: Iee09d09df4b8fb50d19938074d7e65e55f67a6c3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMigrate boolean getters 09/94309/12
Robert Varga [Tue, 29 Dec 2020 12:47:55 +0000 (13:47 +0100)]
Migrate boolean getters

DataObject.isFoo() is now deprecated, use getFoo() instead. There
is also a bunch of drive-by updates to expressiveness, fixing various
(bogus) Eclipse warnings.

Tests relying on explicit order are documented as such and refactored
for clarity.

Change-Id: I40285b7a226a1b23c578badea78a80158325a561
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoTrim down AdvertizedRoute size 19/94319/1
Robert Varga [Wed, 30 Dec 2020 23:41:15 +0000 (00:41 +0100)]
Trim down AdvertizedRoute size

Use alignment shadow to store the additional boolean, as it Java <15
will not do that for us.

Change-Id: Ib2c9ec74614cca8d6edaf4d9ffae78b6698f6fff
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoOptimize isNonAddPathBestPathTheSame() 18/94318/1
Robert Varga [Wed, 30 Dec 2020 22:54:43 +0000 (23:54 +0100)]
Optimize isNonAddPathBestPathTheSame()

This is an Eclipse automatic logic optimization: in case of bestPath
being empty/null, we do not need to evaluate the second part of the
expression.

Change-Id: I96010fd93ca24f2ac1684e6d5117e59acfe2bae0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove RIBSupport.emptyRoutesContainer() 16/94316/3
Robert Varga [Wed, 30 Dec 2020 21:24:22 +0000 (22:24 +0100)]
Remove RIBSupport.emptyRoutesContainer()

This method is not called anywhere simply because this container
has no semantics in the datastore. Remove the method and all its
implementations.

This means that extensions do not load the associated Builder and
its implementation class. The second is more important, as it means
that the routes container will have only one implementation (from
mdsal-dom-codec) -- allowing JIT to devirtualuze based on CHA.

Change-Id: I643185ee9f6d035235e6364b5832b6b128443bd3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoSwitch TerminationReason to use Uint8 79/85979/6
Robert Varga [Tue, 26 Nov 2019 15:13:59 +0000 (16:13 +0100)]
Switch TerminationReason to use Uint8

As binding has switched to more expressive Uint types, embrace them
to allow smaller number of conversions.

Change-Id: I353750e1ed9fb8904b1f20be44f25d9c09592213
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUse BindingMap.Builder to fix list-related warnings 31/93031/7
Robert Varga [Mon, 12 Oct 2020 18:23:51 +0000 (20:23 +0200)]
Use BindingMap.Builder to fix list-related warnings

BindingMap allows us to keep a list-like builder and result in a
Map -- thus arriving at what we want.

Change-Id: If65d10f801ad0e9e0d6e67c16e4b27911214136b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFurther algo-impl improvements 14/94314/3
Robert Varga [Wed, 30 Dec 2020 17:45:50 +0000 (18:45 +0100)]
Further algo-impl improvements

Cleanup invocations to .toString() as well as its implementations
and declarations.

Change-Id: Ic019776cc5021ddca673a61a83b131ee74b5fb78
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoprecise OpenConfig models original license 05/93005/5
guillaume.lambert [Fri, 9 Oct 2020 14:21:44 +0000 (16:21 +0200)]
precise OpenConfig models original license

add a NOTICE and an openconfig.LICENSE files in the bgp module

OpenConfig YANG models are published under the Apache License version 2
a.k.a. ALv2 but they do not precise it in their description.

Though Alv2 allows redistribution under other licenses, it includes a
redistribution clause (4) that instructs to give any other recipients
of the work or the derivative works a copy of the original license.

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

3 years agoCleanup algo-impl classes 08/94308/2
Robert Varga [Tue, 29 Dec 2020 13:11:42 +0000 (14:11 +0100)]
Cleanup algo-impl classes

Make sure we are using simple initializers and diamond-notation,
plus the usual autosave actions.

Change-Id: Ieaaa0c7294ee95a64a04f510d95bfb47ed522b91
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump MRI upstreams 55/94155/6
Robert Varga [Thu, 10 Dec 2020 12:44:48 +0000 (13:44 +0100)]
Bump MRI upstreams

Adopt following versions:
- odlparent-8.0.2
- infrautils-1.9.3
- yangtools-6.0.2
- mdsal-7.0.3
- controller-3.0.3

Change-Id: I26a2d923a4509ebf5817878a29e7776acff23d3a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRefactor SimpleMvpnNlriRegistry 82/93782/2
Robert Varga [Wed, 11 Nov 2020 14:01:10 +0000 (15:01 +0100)]
Refactor SimpleMvpnNlriRegistry

This is an internal implementation singleton, populate it statically,
cutting some complexity.

Change-Id: Ie4d30e68c009319226c6adb2a22dd359b5d85a05
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoWire SimpleEsiTypeRegistry statically 80/93780/2
Robert Varga [Wed, 11 Nov 2020 11:26:36 +0000 (12:26 +0100)]
Wire SimpleEsiTypeRegistry statically

This is an implementation detail, wire the registry statically.
We can optimize it afterwards.

Change-Id: I131986302bd85af80740fb70f3bef285d7f5d7c0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoWire SimpleEvpnNlriRegistry statically 79/93779/4
Robert Varga [Wed, 11 Nov 2020 11:17:47 +0000 (12:17 +0100)]
Wire SimpleEvpnNlriRegistry statically

This registry is populated with invariants and is an implementation
detail. Move it to impl.nlri and make it self-populated on creation.

This will allow us to optimize it further.

Change-Id: Ic55a38eb735fd83ebf0c9712b493deb72f59bff2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoDo not populate SimpleNlriTypeRegistry from BGPActivator 78/93778/2
Robert Varga [Wed, 11 Nov 2020 11:06:20 +0000 (12:06 +0100)]
Do not populate SimpleNlriTypeRegistry from BGPActivator

SimpleNlriTypeRegistry has static contents, populate it upon
creation, so that we can treat it as an immutable entity.

Change-Id: I31fb42f5f5cf0167639e1feb4c620233c186df8b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoPopulate SimpleBindingSubTlvsRegistry statically 77/93777/2
Robert Varga [Wed, 11 Nov 2020 10:55:25 +0000 (11:55 +0100)]
Populate SimpleBindingSubTlvsRegistry statically

This is a standalone dispatch registry. Wire it statically as a
first step before we optimize it.

Change-Id: I107fc20024b83dcc4b086fae5e0caa5f012e0ca0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMigrate Ipv4NlriParserTest 07/93707/4
Robert Varga [Mon, 9 Nov 2020 23:08:21 +0000 (00:08 +0100)]
Migrate Ipv4NlriParserTest

Use MockitoJUnitRunner instead of explicit initMocks().

Change-Id: I11a6f94c7a8b6952056bf3116dd9b257c0f24091
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRefactor SimpleRouteTargetConstrainNlriRegistry 74/93774/3
Robert Varga [Tue, 10 Nov 2020 22:46:45 +0000 (23:46 +0100)]
Refactor SimpleRouteTargetConstrainNlriRegistry

This registry is utterly static, populated in various ways. Rather
than using Handlers, fine-tune it for the 4 cases we really care
about. We use an ImmutableMap for serializers and a switch() dispatch
to static methods for parsers.

Change-Id: Ibb6140fa5486fab3d5b2c09e1e270bf8e52bf944
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert bgp-rib-spi to OSGi DS 73/93773/2
Robert Varga [Tue, 10 Nov 2020 20:57:09 +0000 (21:57 +0100)]
Convert bgp-rib-spi to OSGi DS

This again is a plain whiteboard pattern, make the minimal changes
required to work with OSGi DS and other frameworks. Also makes
RIBExtensionProviderActivator implementations properly stateless,
taking out a chunk of static wiring out of various supports.

JIRA: BGPCEP-944
Change-Id: I5dfaf8562a3fc79ea4a8328e6b9db8b7d5537f86
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove unused blueprint 56/93756/3
Robert Varga [Tue, 10 Nov 2020 18:33:50 +0000 (19:33 +0100)]
Remove unused blueprint

This blueprint is not used anywhere and references non-existent
classes. Remove it to reduce confusion.

JIRA: BGPCEP-925
Change-Id: I9afa164bba6e9f75b9049b73e6d9d51b7b332280
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMerge if statements 72/93772/1
Robert Varga [Tue, 10 Nov 2020 21:06:02 +0000 (22:06 +0100)]
Merge if statements

Sonar does not like this nested if, fix that.

Change-Id: I8550d8ce4a07f5c10e918af64baffe8e2171c4c5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix OSGiBGPTableTypeRegistryConsumer whiteboard 43/93743/1
Robert Varga [Tue, 10 Nov 2020 17:43:25 +0000 (18:43 +0100)]
Fix OSGiBGPTableTypeRegistryConsumer whiteboard

We need to have a greedy policy here, otherwise we might miss some
extensions.

JIRA: BGPCEP-942
Change-Id: I33589f167be78d10139979dc62ab2a17e74e455a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix OSGiRSVPExtensionConsumerContext whiteboard 42/93742/1
Robert Varga [Tue, 10 Nov 2020 17:41:21 +0000 (18:41 +0100)]
Fix OSGiRSVPExtensionConsumerContext whiteboard

We need to have a greedy policy here, otherwise we might miss some
extensions.

JIRA: BGPCEP-923
Change-Id: I5111e4710d196bc26cce03eac8ebc5238de68c22
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert openconfig-rp-impl to OSGi DS 41/93741/1
Robert Varga [Tue, 10 Nov 2020 16:41:19 +0000 (17:41 +0100)]
Convert openconfig-rp-impl to OSGi DS

Add proper injection of dependencies and remove blueprint. With all
the previous work this is rather trivial.

JIRA: BGPCEP-943
Change-Id: Ia8a6e745e678c7359ec1fea073978d243146bee4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert rsvp-spi to OSGi DS 12/93712/10
Robert Varga [Tue, 10 Nov 2020 05:07:53 +0000 (06:07 +0100)]
Convert rsvp-spi to OSGi DS

The SPI wiring here is a bit contrived, this performs minimal
conversion, eliminating AbstractRSVPExtensionProviderActivator.

JIRA: BGPCEP-923
Change-Id: Iff29e1ed7ea3630315553f946286cf40ac0344c9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove blueprint from rsvp-impl 19/93719/1
Robert Varga [Tue, 10 Nov 2020 14:48:23 +0000 (15:48 +0100)]
Remove blueprint from rsvp-impl

rsvp-impl ends up being very simple in what it does, convert it
to OSGi DS.

JIRA: BGPCEP-924
Change-Id: I365e3daf26edc28ea842e59448144adbacbf4135
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert bgp-flowspec to OSGi DS 11/93711/9
Robert Varga [Tue, 10 Nov 2020 02:18:51 +0000 (03:18 +0100)]
Convert bgp-flowspec to OSGi DS

As it turns out, FlowspecActivator is just a bunch of static wiring,
which we do not need to inject. Refactor SimpleFlowspecTypeRegistry
into a dedicated immutable FlowspecTypeRegistry, which has provably
static lifecycle and used only for immutable access.

This cuts a ton of complexity and fixes ServiceLoader injection,
plus makes DI conversion a breeze -- eliminating static state in
process of doing so.

JIRA: BGPCEP-941
Change-Id: I0ad4fef346131b44f7f5bca2a637826e821146d7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRefactor BGPTableTypeRegistryProviderActivator 05/93705/9
Robert Varga [Mon, 9 Nov 2020 20:37:37 +0000 (21:37 +0100)]
Refactor BGPTableTypeRegistryProviderActivator

Rather than wiring through static reference extension in blueprint
and keeping stateful singletons, use a proper whiteboard injection
pattern for OSGi, ServiceLoader and Singleton worlds.

This makes bgp-openconfig-spi to completely wire natively in those
environments.

JIRA: BGPCEP-942
Change-Id: I325ab8b3cf09bc71cad217e6c1f26c6c69bc0cc1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert BGP extensions to OSGi DS 89/93689/6
Robert Varga [Mon, 9 Nov 2020 11:39:10 +0000 (12:39 +0100)]
Convert BGP extensions to OSGi DS

Most of these are straightforward ports.
bgp-linkstate will need a follow-up to deal with BGPActivator.
bgp-flowspace will need a follow-up to deal with BGP/RIBActivator.

JIRA: BGPCEP-941
Change-Id: Ib6ebbb41b3cd1095e1809e91a46fee38ebaf722f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoLower binding-spec-util usage 09/93709/5
Robert Varga [Tue, 10 Nov 2020 00:31:48 +0000 (01:31 +0100)]
Lower binding-spec-util usage

We do not use reflections in main artifact in most cases, hence
we should not be pulling it as a dependency.

Change-Id: If69d85a3a5a39c5049950df03b67482341c171ac
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove use of BindingReflections.getAugmentations() 08/93708/5
Robert Varga [Mon, 9 Nov 2020 23:54:35 +0000 (00:54 +0100)]
Remove use of BindingReflections.getAugmentations()

Augmentations are directly obtainable, simplify our code.

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