Robert Varga [Thu, 23 Sep 2021 10:46:57 +0000 (12:46 +0200)]
Update withdraw()/advertize()
We have a simple boolean dispatch here, mark the boolean and use a
a simple return expression.
Change-Id: I5f45d160ef30d9b307a2e28578609dbeca27bd95
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 23 Sep 2021 10:00:00 +0000 (12:00 +0200)]
Use DistinctNodeContainer.getChildByArg()
The check implied by Optional.get() differs only by the exception thrown
-- and VerifyException is more appropriate. By same token we can
side-step the Optional and use childByArg() instead.
Change-Id: I317577ef635c621be360297a2b5b376edbbbd2d4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 23 Sep 2021 09:51:05 +0000 (11:51 +0200)]
Cleanup AdjRibOutListener a bit
We have a few single-caller methods which can be inline a tad
more efficiently.
Change-Id: I79d85e30a1deb05e0341b8b20ee6925182287dbf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 23 Sep 2021 09:38:43 +0000 (11:38 +0200)]
Prefix/PathId leaf names are constant
With the switch to DOM processing, these have become proper constants,
make sure we use their shared versions and make make a few methods
static as a result ot that.
Change-Id: I09115b77ea33bbd9f0427f923e5bfa7b21c1127d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 23 Sep 2021 09:41:10 +0000 (11:41 +0200)]
Revert "Flush session on AdjRibOutListener convergence"
This reverts commit
b2c79a62bd1d45a7b9ff83332386c30d3ea1b8d3, as it
seems to be causing problems in CSIT.
Change-Id: Id023247a624c4e0459e0573a9105986a96cb3351
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 21 Sep 2021 11:58:21 +0000 (13:58 +0200)]
Fix PCEP registry warning
We are logging getClass(), which is a bit confusing, as that is not the
key we are looking up. Make things obvious by logging
implementedInterface().
Change-Id: I80540b21554de1909a8e77930306b77ced3c9be3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 21 Sep 2021 11:52:38 +0000 (13:52 +0200)]
Bump versions to 0.16.6-SNAPSHOT
This starts the next development iteration.
Change-Id: If1238818b8e7cbd891c112f77d42bcdf4daa1fe8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 21 Sep 2021 10:24:03 +0000 (12:24 +0200)]
Fix test tool shading
We are shading a number of jars which provide services, which are
overlapping. Make sure we use ServicesResourceTransformer to merge these
entries.
Change-Id: Id5fab04d52575dc2e68526fe9c0b42dee6addef7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 21 Sep 2021 10:44:49 +0000 (12:44 +0200)]
Cleanup pcc-mock
Eliminate duplicate version specification. Also cleanup Mockito usage
and builder layout.
Change-Id: I579d39f1a101884be5e83a3ebd247d5a9cb951ec
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 21 Sep 2021 09:33:21 +0000 (11:33 +0200)]
Migrate bmp-impl tests
Do not use MockitoAnnotations.initmocks(), but rather
MockitoJUnitRunner, which has further benefits.
Change-Id: I85589b5264f62a07bbe87f13daf899fa3e947aed
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 21 Sep 2021 09:27:58 +0000 (11:27 +0200)]
Fix BmpDeployerImpl activation
Ie114a01b8ec1f87926f752b31cd7762a542e5db3 broke activation by failing to
annotate BmpDeployerImpl. This patch adds the appropriate annotations.
JIRA: BGPCEP-953
Change-Id: I8a59fc6977ddcd3e4861d02ff8df7f61820aced9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 19 Sep 2021 20:46:36 +0000 (22:46 +0200)]
Bump versions to 0.16.5-SNAPSHOT
This starts the next development iteration.
Change-Id: I81e654de999396cdb688307acdd4de25b0ee640d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Olivier Dugeon [Thu, 16 Sep 2021 15:07:04 +0000 (17:07 +0200)]
Fix PcRequest Message Parser in presence of LSP
Since RFC8231, PcRequest messages can include a LSP Object.
However, the insertObject() method of the PCEPRequestMessageParser class
does not handle LSP Objects.
Thus, when a PCC sends a PcRequest message with a LSP, ODL throws a
Java Exception about Unknown Object and sends a PcError with RP
Missing Object type.
- override initial PcRequest parser with a new StatefulPcRequest
message parser in the ietf-stateful package
- add support for LSP Objects when validating the PcRequest message
JIRA: BGPCEP-975
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Change-Id: I525cd933237bf3633da8c2ff854989b1f9968aa8
Robert Varga [Fri, 17 Sep 2021 11:25:18 +0000 (13:25 +0200)]
Bump upstreams
Adopt netconf-2.0.5 et al.
Change-Id: I54c1d4f581a4701def076b590c6215d181edecd0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
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
Robert Varga [Thu, 26 Aug 2021 08:36:56 +0000 (10:36 +0200)]
Bump versions to 0.16.4-SNAPSHOT
This starts the next development iteration.
Change-Id: I1c075a44da98ea9f0930c3736ce25de207a8d718
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 26 Aug 2021 07:38:59 +0000 (09:38 +0200)]
Bump upstream versions
Adopt netconf-2.0.3 et al. Unfortunately maven-dependency-plugin's logic
seems to have shifted, hence we disable that for now.
Change-Id: Id2e47947f544aab08ba32759199a907d87616a76
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 5 Aug 2021 14:44:43 +0000 (16:44 +0200)]
Bump versions to 0.16.3-SNAPSHOT
This starts the next development iteration.
Change-Id: Ie0b44359c2dbb9ac2cf0f215d9b0f0532f44a576
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>