bgpcep.git
2 years agoRelease bgpcep v0.16.2
jenkins-releng [Thu, 5 Aug 2021 11:58:58 +0000 (11:58 +0000)]
Release bgpcep

2 years agoBump upstream versions 64/97064/1
Robert Varga [Tue, 3 Aug 2021 11:59:43 +0000 (13:59 +0200)]
Bump upstream versions

adopt yangtools-7.0.4, mdsal-8.0.1, controller-4.0.1 and netconf-2.0.2.

Change-Id: I9c4264b4bf81a596365d65f412d3f6defec06ea8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoImprove Pcep Server 09/97009/5
Olivier Dugeon [Thu, 22 Jul 2021 12:35:18 +0000 (14:35 +0200)]
Improve Pcep Server

Some PCCs send a PcRequest message with Metrics and/or Bandwidth set
with value equal to 0 which result to a NO_PATH when calling path
computation. Indeed, it is impossible to determine a path with a metric
less or equal to 0.

This patch set skip Metrics and/or Bandwidth equal to 0 when building
the list ofi constraints for the path computation algorithm.

Change-Id: I3b343e67fc35f3393d4ed136aa4224082823f066
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRedefine AbstractMessageParser object parsing 83/96983/5
Robert Varga [Wed, 21 Jul 2021 20:24:11 +0000 (22:24 +0200)]
Redefine AbstractMessageParser object parsing

All AbstractMessageParser.validate() interact with the list of objects
by peeking at the first element and removing it when handled. While
the List contract supports it, there is no efficient implementation:
LinkedList is wasteful with memory (and its locality), ArrayList ends
up shifting arrays all the time.

Deal with this dilemma by recognizing we are dealing with a Queue, and
realize it through ArrayDeque. Let users deal with the logic rewrite,
which ends up being rather sensible: they are always looking only at the
first element anyway.

This also exposes a few places where we can run into runtime exceptions
-- mark those with FIXMEs for future improvement.

JIRA: BGPCEP-976
Change-Id: I882c7208dddd61f368499fd661e6d090752d144d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCleanup ReoptimizationBandwidth reference 85/96985/1
Robert Varga [Thu, 22 Jul 2021 10:48:32 +0000 (12:48 +0200)]
Cleanup ReoptimizationBandwidth reference

We have this class imported, use short name to reference it.

Change-Id: Ie6aee18db947f7d806b43b69df8548323658ce26
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoModernize AbstractMessageParser 82/96982/1
Robert Varga [Wed, 21 Jul 2021 19:57:56 +0000 (21:57 +0200)]
Modernize AbstractMessageParser

- use List.of(item) instead of Collections.singletonList()
- reuse requireNonNull()'s return
- reformat builder usage
- use Optional.ifPresent() to propagate present values

Change-Id: I20022f19c80f2ca832f47914ac801fca124f568e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoDo not wipe data in ApplicationPeer 77/96977/1
Robert Varga [Wed, 21 Jul 2021 15:00:42 +0000 (17:00 +0200)]
Do not wipe data in ApplicationPeer

Unfortunately the wipe here is causing lifecycle issues, as there is a
pre-populated structure we rely on when things start coming in.

Change-Id: Ib58bf34e96e68e0db2fd3a8e580cade0d01099c0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoOptimize uint interactions in bgp-linkstate 69/96969/2
Robert Varga [Wed, 21 Jul 2021 08:28:48 +0000 (10:28 +0200)]
Optimize uint interactions in bgp-linkstate

Use writeUint{8,16,32} instead of manual conversions. Also protect
a hexDump() call. Also add obvious ByteBuf sizing hints.

Change-Id: I462b9d3d566efc2bee020df15ac08ed6c89dea8d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoEliimnate use to Uint8.toJava() in rsvp-impl 68/96968/2
Robert Varga [Wed, 21 Jul 2021 08:10:40 +0000 (10:10 +0200)]
Eliimnate use to Uint8.toJava() in rsvp-impl

We have ByteBufUtils.writeUint8(), which is a tad simpler, use that
instead of dual conversion.

Change-Id: Ibd58934382e9244a0428c68722ef59611801f94b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix LinkstateGraphBuilder.ipv6toKey() 66/96966/3
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>
2 years agoDo not copy Ipv{4,6}Addresses 65/96965/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>
2 years agoRemove unneeded wrapping 64/96964/1
Robert Varga [Tue, 20 Jul 2021 18:50:26 +0000 (20:50 +0200)]
Remove unneeded wrapping

We are re-wrapping an IpPrefix, let's just reuse it, improving clarity
and performance.

Change-Id: Ib27930c3ab998647a969f45afceea8ff74c93519
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove a blind cast 63/96963/1
Robert Varga [Tue, 20 Jul 2021 18:48:05 +0000 (20:48 +0200)]
Remove a blind cast

We have a null check here, let's use an instanceof check instead,
which is essentially the same thing, except more type-safe.

Change-Id: I2538e4e2f58513aa51bcefe26d4e55ad8ab59283
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoImprove Ipv{4,6}Address handling 61/96961/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>
2 years agoSimplify LinkstateGraphBuilder.getLinkAttributes() 60/96960/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>
2 years agoImprove withdrawn routes parsing 52/96952/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>
2 years agoFix potential ByteBuf leak in bgp-inet 51/96951/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>
2 years agoFix potential ByteBuf leaks in bgp-l3vpn 50/96950/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>
2 years agoFix potential ByteBuf leak in bgp-inet 49/96949/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>
2 years agoFix potential ByteBuf leaks in bgp-labeled-unicast 48/96948/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>
2 years agoFix potential ByteBuf leaks in pcep-base-parser 47/96947/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>
2 years agoUse ByteBuf.readSlice() in bgp-mvpn 46/96946/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>
2 years agoBump versions to 0.16.2-SNAPSHOT 30/96930/2
Robert Varga [Mon, 19 Jul 2021 15:55:58 +0000 (17:55 +0200)]
Bump versions to 0.16.2-SNAPSHOT

This starts the next development iteration.

Change-Id: I92e816000f8eff23e072c0386311516ad9c25f36
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoActivate Segment Routing by default 01/96901/4
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>
2 years agoHandle SID Index in SRGB block 29/96929/4
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>
2 years agoOptimize getVertex() a bit 33/96933/3
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>
2 years agoDo not store ConnectedGraphProvider 32/96932/3
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>
2 years agoOptimize LinkstateGraphBuilder.getVertexId() 31/96931/2
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>
2 years agoFix address handling in LinkstateGraphBuilder 19/96919/6
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>
2 years agoBump netconf to 2.0.1 21/96921/1
Robert Varga [Mon, 19 Jul 2021 14:35:03 +0000 (16:35 +0200)]
Bump netconf to 2.0.1

Pick up latest upstream fixes.

Change-Id: Iefa625d68d5639531046e672633e05a78f00e495
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump versions to 0.16.1-SNAPSHOT 98/96798/1
Robert Varga [Sun, 4 Jul 2021 11:56:35 +0000 (13:56 +0200)]
Bump versions to 0.16.1-SNAPSHOT

This starts the next development iteration.

Change-Id: I229deab151d5cd91f7d6dd5414886375f7a0f117
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUse released netconf-2.0.0 artifacts 97/96797/1
Robert Varga [Sun, 4 Jul 2021 08:59:02 +0000 (10:59 +0200)]
Use released netconf-2.0.0 artifacts

Do not use snapshots, as we have released artifacts available.

Change-Id: I9aca9f4f8abe8b6e37bc9196821837d09e381c4f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUse controller-4.0.0 artifacts 87/96787/1
Robert Varga [Fri, 2 Jul 2021 15:06:24 +0000 (17:06 +0200)]
Use controller-4.0.0 artifacts

Do not use snapshots, but rather released versions. This brings us
closer back to proper integration on releases.

Change-Id: I51824e3090966cc8836bc86ba09f1f1053139a97
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove blueprint from bgp-openconfig-state 64/96764/7
Robert Varga [Thu, 1 Jul 2021 12:03:05 +0000 (14:03 +0200)]
Remove blueprint from bgp-openconfig-state

We have some amount of configuration here, but that is rectified really
easily. Move the configuration for Config Admin and use OSGi DS instead
of blueprint.

The test suite is updated with a few FIXMEs around predictable
execution.

JIRA: BGPCEP-956
Change-Id: I3b0fe17a3dc1b685698730f897ae77c470a87ac8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoClenaup use of MockitoAnnotations 63/96763/3
Robert Varga [Thu, 1 Jul 2021 11:33:22 +0000 (13:33 +0200)]
Clenaup use of MockitoAnnotations

Use MockitoJUnitRunner.StrictStubs instead of
MockitoAnnotations.initMocks(). Also perform a few drive-by cleanups as
well.

Change-Id: Iebee31479c88c8e492b92591f6047b5e8442035b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove ServiceLoaderBGPExtensionProviderContext 30/96730/5
Robert Varga [Wed, 30 Jun 2021 12:42:59 +0000 (14:42 +0200)]
Remove ServiceLoaderBGPExtensionProviderContext

This class is used only in tests and it wreaks havot with its hidden
global state. Remove it and replace its users with localized
equivalents.

Change-Id: I59f2747c0ad65ff334c5b7ea2b2af6308fdc503d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoActivate extension in bgp-testtool 43/96743/4
Robert Varga [Wed, 30 Jun 2021 15:03:49 +0000 (17:03 +0200)]
Activate extension in bgp-testtool

Our extensions are nicely decomposed and can be activated through
ServiceLoader, do that in testtool.

Change-Id: Ie794de019cac527e8b546f67ed05562744c07680
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoDo not override compiler configuration 46/96746/3
Robert Varga [Wed, 30 Jun 2021 15:20:23 +0000 (17:20 +0200)]
Do not override compiler configuration

odlparent's compiler configuration is in many ways better than what
we are doing here, just remove the configuration.

Change-Id: If95cf81dda6f65723effba833bb6fedee5751d12
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoInherit dependency analysis 45/96745/3
Robert Varga [Wed, 30 Jun 2021 15:19:30 +0000 (17:19 +0200)]
Inherit dependency analysis

Our dependency analysis has been upstreamed to odlparent, remove
unnecessary plugin execution (which is now a duplicate).

Change-Id: Ie3abbb27dfff6bff9374dfdb0c695b66bf53b086
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump argparse4j to 0.9.0 47/96747/1
Robert Varga [Wed, 30 Jun 2021 15:24:19 +0000 (17:24 +0200)]
Bump argparse4j to 0.9.0

https://github.com/argparse4j/argparse4j/releases/tag/argparse4j-0.8.0
https://github.com/argparse4j/argparse4j/releases/tag/argparse4j-0.8.1
https://github.com/argparse4j/argparse4j/releases/tag/argparse4j-0.9.0

Change-Id: I8c817955cd71b5bb1c9b363deca7ce36c27c17da
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUse proper extension loading in bgp-rib-impl tests 44/96744/1
Robert Varga [Wed, 30 Jun 2021 15:16:44 +0000 (17:16 +0200)]
Use proper extension loading in bgp-rib-impl tests

Do not use global state in ServiceLoaderBGPExtensionProviderContext(),
but rather a normal ServiceLoader operation.

Change-Id: I36975d09cda8ff8e8e6815b15811b0aa56ade8f6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoEliminate use of global service loader state 42/96742/1
Robert Varga [Wed, 30 Jun 2021 14:58:34 +0000 (16:58 +0200)]
Eliminate use of global service loader state

Use normal service loading and clean tests up a bit.

Change-Id: I9c5e09ee8e9cb0d0158ca8c1a82e2e244c7a6e60
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRefactor (Ll)GracefulCapabilityHandlerTest 41/96741/1
Robert Varga [Wed, 30 Jun 2021 14:45:12 +0000 (16:45 +0200)]
Refactor (Ll)GracefulCapabilityHandlerTest

Clean up utilities that we are using and stop using global state.

Change-Id: I6f8ff0095ba0b5e1bdace775f909c91764721b62
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRefactor OpenTest 40/96740/1
Robert Varga [Wed, 30 Jun 2021 14:31:45 +0000 (16:31 +0200)]
Refactor OpenTest

Use ServiceLoader to find extensions and take advantage of newer Java
utilities.

Change-Id: I6ed1c19ffbf85c484e0326942650256e80335222
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoDo not use ServiceLoaderBGPExtensionProviderContext 39/96739/1
Robert Varga [Wed, 30 Jun 2021 14:25:21 +0000 (16:25 +0200)]
Do not use ServiceLoaderBGPExtensionProviderContext

Update extensions' tests to not use global state, but rather activate
themselves.

Change-Id: I0ce67fbd9ccba6c27c6217193a33c4c013ab9bdc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRefactor BGPParserTest 38/96738/2
Robert Varga [Wed, 30 Jun 2021 14:17:01 +0000 (16:17 +0200)]
Refactor BGPParserTest

Do not use global state and improve structure a bit.

Change-Id: I3416d5ca93d754d29f0e47abb733e0f1b6f94e9c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRefactor NextHopAttributeParserTest 37/96737/2
Robert Varga [Wed, 30 Jun 2021 14:09:56 +0000 (16:09 +0200)]
Refactor NextHopAttributeParserTest

Use ServiceLoader and assertThrows() to make the suite more reliable.

Change-Id: I02392e48767933e43e6d2efaf756fb7d5267db4c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRefactor OriginAttributeParserTest 36/96736/1
Robert Varga [Wed, 30 Jun 2021 14:05:11 +0000 (16:05 +0200)]
Refactor OriginAttributeParserTest

Do not use global service loader state and use proper assertThrows().

Change-Id: Ibc304b985ab1d413d820402e5aff29f29979ead6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoReduce use of ServiceLoaderBGPExtensionProviderContext 35/96735/1
Robert Varga [Wed, 30 Jun 2021 13:57:53 +0000 (15:57 +0200)]
Reduce use of ServiceLoaderBGPExtensionProviderContext

Use proper serviceloader to load up the resulting consumer context,
rather than relying on magic global state.

Change-Id: Ic541ac82297558b745c5ded0ef156c2149586858
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRefactor AbstractMessageRegistryTest 34/96734/1
Robert Varga [Wed, 30 Jun 2021 13:49:38 +0000 (15:49 +0200)]
Refactor AbstractMessageRegistryTest

We have a few weird asserts and global state going on here, fix that up.

Change-Id: Ib795fa7893eddb95bf0bb277bf216fec9d800cd6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRefactor SimpleRegistryTest 33/96733/1
Robert Varga [Wed, 30 Jun 2021 13:42:49 +0000 (15:42 +0200)]
Refactor SimpleRegistryTest

Do not use ServiceLoaderBGPExtensionProviderContext due to state
proliferation.

Change-Id: If0ddb86ee3aa76f95adc7aa00b06fa81b0f57dd0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRefactor PathAttributeParserTest 32/96732/2
Robert Varga [Wed, 30 Jun 2021 13:38:17 +0000 (15:38 +0200)]
Refactor PathAttributeParserTest

We have a few interestng asserts here and we are using global state,
factor that out.

Change-Id: I93fd890baacb7fb8a22acd244341f6491c4efe43
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRefactor ParserTest 31/96731/1
Robert Varga [Wed, 30 Jun 2021 13:26:43 +0000 (15:26 +0200)]
Refactor ParserTest

Do not use ServiceLoaderBGPExtensionProviderContext() and use
assertThrows().

Change-Id: Idba5dd5e58deea555dfa7673c88fc385c77889ed
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove ServiceLoaderPCEPExtensionProviderContext 29/96729/1
Robert Varga [Wed, 30 Jun 2021 11:18:36 +0000 (13:18 +0200)]
Remove ServiceLoaderPCEPExtensionProviderContext

We have DefaultPCEPExtensionConsumerContext which serves the activation
purposes without having global state lurking in singletons. Remove
ServiceLoaderPCEPExtensionProviderContext and replace its use in tests.

Change-Id: Ib09c7f93ad00b4cfb2cc293c0fa65004749b1fab
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove ServiceLoaderRSVPExtensionProviderContext 28/96728/2
Robert Varga [Wed, 30 Jun 2021 10:49:35 +0000 (12:49 +0200)]
Remove ServiceLoaderRSVPExtensionProviderContext

Carrying global static state is ill-advised, remove
ServiceLoaderRSVPExtensionProviderContext as it is superseded
through normal injection mechanisms.

Change-Id: I0996b3fb5dc69153def89fd4e57beea4c9e4054b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoSplit out PCEPExtensionProviderActivator 21/96721/3
Robert Varga [Tue, 29 Jun 2021 19:48:35 +0000 (21:48 +0200)]
Split out PCEPExtensionProviderActivator

This is a really simple extension, split it out into a component.

JIRA: BGPCEP-968
Change-Id: I9d4abb0c54f169ef6715db8c1243cc008271b710
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoSplit out PCEPExtensionProviderActivators 20/96720/4
Robert Varga [Tue, 29 Jun 2021 19:39:05 +0000 (21:39 +0200)]
Split out PCEPExtensionProviderActivators

PCEPExtensionProviderActivator is a simple whiteboard pattern, split
the activators into OSGi DS components.

JIRA: BGPCEP-969
Change-Id: I24feced4a4af71ab35b831a8b99f8dd1125cea7f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoMigrate pcep-spi to OSGi DS 26/96726/3
Robert Varga [Wed, 30 Jun 2021 09:07:12 +0000 (11:07 +0200)]
Migrate pcep-spi to OSGi DS

This is a simple whiteboard, refactor it to use OSGi DS (and others).
The changes here cascade through all extensions, making them properly
stateless.

JIRA: BGPCEP-961
Change-Id: I1e8f253f2ea7a2eef494c84612a867b6318a93c6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove a superfluous service specification 25/96725/1
Robert Varga [Wed, 30 Jun 2021 08:37:17 +0000 (10:37 +0200)]
Remove a superfluous service specification

DefaultRSVPExtensionConsumerContext directly implements the service,
there is no point in spelling it out.

Change-Id: Ie97a021375d1db9017416764e7d337babc5b5800
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoSplit out BmpDeployerImpl 16/96716/1
Robert Varga [Tue, 29 Jun 2021 11:57:37 +0000 (13:57 +0200)]
Split out BmpDeployerImpl

We have a rather contrived service routing here, ditch it in favor of
OSGi DS. Also eliminate BmpDeployerDependencies, as they are just
getting in the way.

JIRA: BGPCEP-953
Change-Id: Ie114a01b8ec1f87926f752b31cd7762a542e5db3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoSplit out BmpDispatcherImpl 15/96715/1
Robert Varga [Tue, 29 Jun 2021 11:44:02 +0000 (13:44 +0200)]
Split out BmpDispatcherImpl

The dispatcher is a simple component, split it out into OSGi DS.

JIRA: BGPCEP-953
Change-Id: Idbdfbfdc1730bfbbdc44ed903584fb307dd4aeb6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoSplit out DefaultBmpSessionFactory wiring 14/96714/1
Robert Varga [Tue, 29 Jun 2021 11:29:10 +0000 (13:29 +0200)]
Split out DefaultBmpSessionFactory wiring

DefaultBmpSessionFactory is a simple service, use usual DI frameworks
to activate it.

JIRA: BGPCEP-953
Change-Id: Ie4c120b652f8e60e0f451052201ec355ab4f61be
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoSimplify peer group check 10/96710/2
Robert Varga [Tue, 29 Jun 2021 09:39:20 +0000 (11:39 +0200)]
Simplify peer group check

We do not need to perform an explicit nullness check, as we can simply
call equals on a constant.

Change-Id: Ibb713ea423dcc7b17e4a9a90541cd475bf03de35
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoSplit out BGPDispatcherImpl 99/96699/4
Robert Varga [Mon, 28 Jun 2021 15:51:52 +0000 (17:51 +0200)]
Split out BGPDispatcherImpl

BGPDispatcherImpl is a rather trivial component, split it out of
blueprint to make things a tad more clear.

JIRA: BGPCEP-958
Change-Id: I8d01ced1ce17ac5d52d78171d17bba39918c01c8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoSplit out OSGiBGPStateConsumer 00/96700/2
Robert Varga [Mon, 28 Jun 2021 17:25:17 +0000 (19:25 +0200)]
Split out OSGiBGPStateConsumer

BGPStateCollectorImpl is a weird bit of code. We essentially have an
OSGi whiteboard pattern going on here, except we drive it through an
otherwise-unused BGPStateProducer interface.

Turn GPStateCollectorImpl into a @Singleton for things like Guice et al,
but it will need some more integration work to get it operation.

Add OSGiBGPStateConsumer which is a trivial OSGi DS whiteboard consumer
and thus eliminate a chunk of blueprint wiring.

JIRA: BGPCEP-958
Change-Id: I92fd2ecb0ef3f1ecb1069536c8b2a4d6261f23c4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoSplit out StrictBGPPeerRegistry 98/96698/2
Robert Varga [Mon, 28 Jun 2021 15:40:53 +0000 (17:40 +0200)]
Split out StrictBGPPeerRegistry

StrictBGPPeerRegistry is a very simple service, split out of blueprint.

JIRA: BGPCEP-958
Change-Id: I51ac52bb979e727d510a6b56f5e56d020b01bcff
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUpdate initial convergence message 95/96695/1
Robert Varga [Mon, 28 Jun 2021 12:31:57 +0000 (14:31 +0200)]
Update initial convergence message

This is a slight improvement on messages logged after commit on
initial convergence.

Change-Id: Ic70949d69d4683fe4c9e0e4018e86f88af244106
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoClean EffectiveRibIn on ApplicationPeer convergence 86/96686/2
Robert Varga [Sat, 26 Jun 2021 08:45:31 +0000 (10:45 +0200)]
Clean EffectiveRibIn on ApplicationPeer convergence

If we converge with empty application peer RIB we should make sure the
operation effective-rib-in is wiped.

Change-Id: I6c7536406888e1d04f3624a8b3d2450746bd4cd8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFlush session on AdjRibOutListener convergence 85/96685/3
Robert Varga [Sat, 26 Jun 2021 08:43:41 +0000 (10:43 +0200)]
Flush session on AdjRibOutListener convergence

AdjRibOutListener should send out a flush session when it reaches
initial convergence without any data.

Change-Id: I3844a2912e0d23f679c4fcb620c8da451e6958c1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoConvert pcep-server-provider to OSGi DS 91/96691/1
Robert Varga [Mon, 28 Jun 2021 10:31:33 +0000 (12:31 +0200)]
Convert pcep-server-provider to OSGi DS

The blueprint here is a very simple single component, refactor it to use
OSGi Declarative Services instead.

JIRA: BGPCEP-963
Change-Id: Id396abaf268fce5ec01cea0e96a1d834551cb852
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoConvert bmp-spi to OSGi DS 90/96690/2
Robert Varga [Mon, 28 Jun 2021 09:17:40 +0000 (11:17 +0200)]
Convert bmp-spi to OSGi DS

Follow the same pattern as we've done in bgp-parser-spi, ditching yet
another BluePrint container.

JIRA: BGPCEP-950
Change-Id: I9a787edf34fe9a6fb667b2f7f63d583f387a2a37
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUse mdsal-8.0.0 artifacts 81/96681/3
Robert Varga [Fri, 25 Jun 2021 18:18:59 +0000 (20:18 +0200)]
Use mdsal-8.0.0 artifacts

mdsal-8.0.0, switch to using released artifacts.

Change-Id: I932810194ac4293ce584c4f317f1794c278b5f7d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdd onInitialData() callbacks 84/96684/1
Robert Varga [Sat, 26 Jun 2021 08:38:57 +0000 (10:38 +0200)]
Add onInitialData() callbacks

DOMDataTreeChangeListener provides an empty-source callback for initial
convergence. Add instances of it along with FIXMEs to implement it.

Change-Id: I661622eecbd4a137bbac1e83d8209cc5a95a4379
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove unneeded references to ODL blueprint extension 26/96626/1
Robert Varga [Wed, 23 Jun 2021 12:11:59 +0000 (14:11 +0200)]
Remove unneeded references to ODL blueprint extension

We have a few blueprints which are not using ODL extensions, yet
they are declaring a dependency on it. Remove such references, making
future migration more obvious.

JIRA: BGPCEP-881
Change-Id: I4c5fffb4806f0beade7f7d9533b5ff6cef48f3d0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoConvert bmp-parser-impl to OSGi DS 94/96594/5
Robert Varga [Mon, 21 Jun 2021 21:34:57 +0000 (23:34 +0200)]
Convert bmp-parser-impl to OSGi DS

BmpActivator is essentially a simple whiteboard dispatch, let's express
it that way, eliminating some blueprint wiring.

JIRA: BGPCEP-951
Change-Id: I77b4d0d3a53fb73adb72c8affb84e0c593919675
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoConvert programming-impl to OSGi DS 27/93127/2
Robert Varga [Sat, 17 Oct 2020 01:55:25 +0000 (03:55 +0200)]
Convert programming-impl to OSGi DS

This is a rather simple blueprint, convert it to OSGi DS.

JIRA: BGPCEP-922
Change-Id: I33b455490123cad6d20fb735ab72177b62d6cc09
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump MRI upstreams 57/96357/17
Robert Varga [Tue, 25 May 2021 09:00:50 +0000 (11:00 +0200)]
Bump MRI upstreams

Adopt:
- odlparent-9.0.2
- infrautils-2.0.2
- yangtools-7.0.3
- mdsal-8.0.0-SNAPSHOT
- aaa-0.14.0-SNAPSHOT
- netconf-2.0.0-SNAPSHOT
- controller-4.0.0-SNAPSHOT

Also adjust to API changes, mostly coming from yang-data-api, but there
is also a change in mapping for attributes-{reach,unreach} children,
which no longer are based on augmentation path.

Since augmentation sorting has been relaxed, this wrecks havoc in
odl-pcep-sync-optimizations.yang, which relies on the (illogical)
sorting rules of previous implementation. These are nailed down via
augment-identifier extension and sorted in a more logical way.

Change-Id: I54f7637a9443c9c577c6f397fe102a461f617229
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoConvert algo-impl to OSGi DS 57/93757/6
Robert Varga [Tue, 10 Nov 2020 18:46:04 +0000 (19:46 +0100)]
Convert algo-impl to OSGi DS

This is a very simple component wiring-wise, convert it to OSGi DS.

JIRA: BGPCEP-925
Change-Id: Idbad3b4fa4c92d41b6debe02865b59154c32f5bc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoConvert graph-impl to OSGi DS 55/93755/7
Robert Varga [Tue, 10 Nov 2020 18:05:16 +0000 (19:05 +0100)]
Convert graph-impl to OSGi DS

This is a very simple component wiring, convert it to OSGi DS
and allowing it to work in other environments as well.

JIRA: BGPCEP-931
Change-Id: I8f94dcdee1dad419cd6ef844697678a1c11611b0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix absolute leafref 61/96361/2
Robert Varga [Tue, 25 May 2021 11:42:43 +0000 (13:42 +0200)]
Fix absolute leafref

Leafrefs are namespace-bound at the point where they are instantiated,
hence we need to use absolute addressing to resolve references to
top-level BGP container.

Change-Id: Ie153e7a142396103adf32eee9a2c5180aab69be3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRename multiprotocol augmentations 60/96360/4
Robert Varga [Tue, 25 May 2021 09:22:15 +0000 (11:22 +0200)]
Rename multiprotocol augmentations

'attributes-1' and 'attributes-2' are counter-intuitive, rename them
to attributes-reach and attributes-unreach. This cascades all over the
place, but is completely compatible at YANG level.

Change-Id: Iae3039fecb352e8a055a54375b9e6b57f701da76
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUse GuicedEE javax.inject 56/96356/1
Robert Varga [Tue, 25 May 2021 09:08:05 +0000 (11:08 +0200)]
Use GuicedEE javax.inject

Update references to a more modern packaging of javax.inject.

Change-Id: I16c68ed0b73d1918c8e9f396c400d19399d52f7d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUse OSGi R7 55/96355/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>
3 years agoImprove mvpn parsing and serialization 33/96133/4
Robert Varga [Wed, 12 May 2021 13:46:02 +0000 (15:46 +0200)]
Improve mvpn parsing and serialization

Require MvpnSerializer implementations to provide a properly-specialized
class. Centralize implementations in AbstractMvpnNlri, so that we do not
get a virtual dispatch here.

Also specialize SimpleMvpnNlriRegistry to use ImmutableMap/EnumMap rather
than HandlerRegistry, which is using the overly-dynamic MultiRegistry --
which ends up speeding up lookups significantly.

Change-Id: I09058410b4b8c3042c6273fe470530594387a09e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUse OSGi DS in bgp-parser-spi 27/96127/5
Robert Varga [Wed, 12 May 2021 08:10:15 +0000 (10:10 +0200)]
Use OSGi DS in bgp-parser-spi

Eliminate use of blueprint in favor of binding with proper whiteboard
pattern in OSGi DS/ServiceLoader.

We also eliminate AbstractBGPExtensionProviderActivator, as the
activators are now completely stateless -- paving way for even better
registration mechanics in the future.

JIRA: BGPCEP-945
Change-Id: I0d6e2358c9419e11ef7f3c62984974802633b712
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMerge OSGiBGPRibRoutingPolicyFactory 29/96129/2
Robert Varga [Wed, 12 May 2021 08:55:47 +0000 (10:55 +0200)]
Merge OSGiBGPRibRoutingPolicyFactory

We have OSGi R7, hence we can use constructor injection and side-step
the need to have two additional classes.

Change-Id: I4b2bc45dc09c0be729b23452b65cc65633586f02
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMerge OSGiBGPTableTypeRegistryConsumer 28/96128/2
Robert Varga [Wed, 12 May 2021 08:50:16 +0000 (10:50 +0200)]
Merge OSGiBGPTableTypeRegistryConsumer

We have OSGi R7, hence we can use constructor injection and side-step
the need to have two additional classes.

Change-Id: Ibb950d4c85fecf9597440c881fada94477498a5f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMerge OSGiRSVPExtensionConsumerContext 26/96126/1
Robert Varga [Wed, 12 May 2021 07:54:14 +0000 (09:54 +0200)]
Merge OSGiRSVPExtensionConsumerContext

We have OSGi R7, hence we can use constructor injection and side-step
the need to have two additional classes.

Change-Id: Ida7548cca129e477a98de26967e641bc63f26f95
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoEliminate blueprint from BGP linkstate extension 11/96111/4
Robert Varga [Mon, 10 May 2021 20:37:17 +0000 (22:37 +0200)]
Eliminate blueprint from BGP linkstate extension

Switch the BGP-LS extension to use OSGi DS/Config Admin for activation
and configuration. This necessitates a change in operational procedure
to enable the legacy BGP-LS attribute type. This is a low-risk change,
as that type has been superseded 5 years ago.

JIRA: BGPCEP-949
Change-Id: Iac6da9ba7968e0a1efc86bede77018ff739fcd3b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRe-create transaction chain upon failure in TopologyStatsProvider 50/95950/8
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 agoRework synchronization of SessionStateImpl 48/95948/5
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>
3 years agoHandle TopologyNodeState release properly 49/95949/8
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>
3 years agoRevert "Fix issues during connection flap with scaled pcc sessions." 02/96102/1
Robert Varga [Mon, 10 May 2021 08:03:28 +0000 (10:03 +0200)]
Revert "Fix issues during connection flap with scaled pcc sessions."

This reverts commit a162197f9be41a2296e7571ba7bbfac73dce50f7. The patch
needed to be split up, which unfortuantely did not happen on the same
change-id. We will follow up on this with properly split up patches.

JIRA: BGPCEP-920
Change-Id: I06d5326de134c9b70c703a761498365643a4f7df
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix issues during connection flap with scaled pcc sessions. 39/92039/5
Deepthi V V [Tue, 11 Aug 2020 12:31:55 +0000 (18:01 +0530)]
Fix issues during connection flap with scaled pcc sessions.

Back to back pcep sessions results in exceptions and sessions cannot
be established further.

1. Close tx chain when Topology Node State is released
2. Deadlock occurs in TopologyStatsProviderImpl.
T1: Unbind call creates a tx using tx chain and commits it. This
triggers onTxChainFailed call. Lock acquired order:
TopologyStatsProviderImpl -> PingPongTransactionChain
T2: 2nd Unbind call locks on TopologyStatsProviderImpl and tries to
create tx for which lock on PingPongTransactionChain is required.
Thus resulting in deadlock.

Fix: init, closed and recreateTxChain will synhronise on TopologyStatsProviderImpl.
All other tx will be synchronised on txChain.

JIRA: BGPCEP-920
Change-Id: I1f727121843b45a5e6fc722a94319538c7522deb
Signed-off-by: Deepthi V V <dvv@luminanetworks.com>
3 years agoInstantiate BgpPeer only once 61/95561/4
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>
3 years agoBump versions by x.(y+1).z 85/95285/1
jenkins-releng [Mon, 22 Feb 2021 23:02:56 +0000 (23:02 +0000)]
Bump versions by x.(y+1).z

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

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>