bgpcep.git
9 months agoFix checkstyle 34/107634/1
Robert Varga [Thu, 31 Aug 2023 14:04:05 +0000 (16:04 +0200)]
Fix checkstyle

Upgraded checkstyle is finding a few violations, fix them up.

Change-Id: Iaa581a6616d2a46baaf49d960cdf7835192eee76
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
9 months agoAdd sonarcloud badges to README.md 42/107142/6
Šimon Ukuš [Mon, 31 Jul 2023 09:06:46 +0000 (11:06 +0200)]
Add sonarcloud badges to README.md

Added coverage, reliability rating, technical debt and more badges.

JIRA: BGPCEP-1026
Change-Id: I27901fbb68259d07631bb414352e47ebdeb8deb6
Signed-off-by: Šimon Ukuš <simon.ukus@pantheon.tech>
9 months agoBump versions to 0.20.2-SNAPSHOT 06/107306/1
Robert Varga [Mon, 7 Aug 2023 15:34:54 +0000 (17:34 +0200)]
Bump versions to 0.20.2-SNAPSHOT

This starts the next development iteration.

Change-Id: I85dd2b104ebf0b504c069d22f9e1dece612c558d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
9 months agoRelease bgpcep v0.20.1
jenkins-releng [Mon, 7 Aug 2023 12:17:31 +0000 (12:17 +0000)]
Release bgpcep

9 months agoBump netconf to 6.0.1 88/107288/1
Robert Varga [Mon, 7 Aug 2023 11:13:04 +0000 (13:13 +0200)]
Bump netconf to 6.0.1

Pick up the latest release.

Change-Id: I476fce48b6eb24bb35cc4420c52a178c1479698d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
10 months agoAdd maven central and license badge to README.md 75/106975/3
Šimon Ukuš [Mon, 24 Jul 2023 09:21:16 +0000 (11:21 +0200)]
Add maven central and license badge to README.md

JIRA: BGPCEP-1026
Change-Id: If01526e2d20770dc966e954b34c3ce4fdb15267b
Signed-off-by: Šimon Ukuš <simon.ukus@pantheon.tech>
10 months agoUpdate contents of README.md 31/106931/4
Šimon Ukuš [Tue, 18 Jul 2023 11:12:14 +0000 (13:12 +0200)]
Update contents of README.md

The "directory organization" section is outdated and we are missing
a brief description of the project. Get rid of the outdated information,
add a general description.

JIRA: BGPCEP-1025
Change-Id: Icb6b3de8336938c111cdb3d0a5c18395d921797b
Signed-off-by: Šimon Ukuš <simon.ukus@pantheon.tech>
10 months agoUpdate syntax of README.md to be markdown 27/106927/5
Šimon Ukuš [Tue, 18 Jul 2023 11:08:07 +0000 (13:08 +0200)]
Update syntax of README.md to be markdown

The original syntax is reStructuredText, but we need markdown syntax,
since markdown is the standard for README files.

JIRA: BGPCEP-1025
Change-Id: Ia8901c1be7ec51a718eeab01421f66975bb602c1
Signed-off-by: Šimon Ukuš <simon.ukus@pantheon.tech>
10 months agoRename README to README.md 22/106922/6
Šimon Ukuš [Mon, 17 Jul 2023 13:54:55 +0000 (15:54 +0200)]
Rename README to README.md

The standard is that the README file is markdown.
Modify it accordingly.

JIRA: BGPCEP-1025
Change-Id: I399ec72c96b230d9f9f50050e96c10863361c748
Signed-off-by: Šimon Ukuš <simon.ukus@pantheon.tech>
10 months agoBump versions to 0.20.1-SNAPSHOT 23/106823/1
Robert Varga [Wed, 5 Jul 2023 19:45:17 +0000 (21:45 +0200)]
Bump versions to 0.20.1-SNAPSHOT

This starts the next development iteration.

Change-Id: I42a6c00124e6710182c6b5100eb90e6c7d829bc0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
10 months agoRelease bgpcep v0.20.0
jenkins-releng [Wed, 5 Jul 2023 16:49:49 +0000 (16:49 +0000)]
Release bgpcep

10 months agoDo not use ListeningExecutorService 08/106808/4
Robert Varga [Tue, 4 Jul 2023 19:09:06 +0000 (21:09 +0200)]
Do not use ListeningExecutorService

We ignore return from submit() -- hence we can just use execute()
instead. Also drop a FIXME to terminate the ExecutorService, as it seems
to be just hanging.

Change-Id: I395e31bbaab8ad41d56e8a9a89839682af42127a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
10 months agoDitch ListeningExecutorService 07/106807/4
Robert Varga [Tue, 4 Jul 2023 19:08:15 +0000 (21:08 +0200)]
Ditch ListeningExecutorService

We have Futures.submit() at our disposal, hence we can use plain
Executor/ExecutorService to manage our tasks.

Change-Id: I18c26b52603dc6cca11b8feb42f8ac0c6f62bf14
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
10 months agoUse release netconf artifacts 15/106815/2
Robert Varga [Wed, 5 Jul 2023 14:28:08 +0000 (16:28 +0200)]
Use release netconf artifacts

Do not use snapshots, use released versions.

Change-Id: If5b5a4d51e6de116d8c1be2c9b8bfb9f5b5cdba2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoUse controller released artifacts 81/106781/1
Robert Varga [Sun, 2 Jul 2023 11:25:59 +0000 (13:25 +0200)]
Use controller released artifacts

Ditch snapshots, use the properly-released version.

Change-Id: Id973fa56452ccd51ab8de5cbb6b5aafb1d5363db
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoUse released mdsal artifacts 71/106771/2
Robert Varga [Fri, 30 Jun 2023 11:32:08 +0000 (13:32 +0200)]
Use released mdsal artifacts

Use proper mdsal-12.0.0 release artifacts.

Change-Id: I6906dd764df0a8c8af035cd43e9d8b453a374e17
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoBump jxr-maven-plugin to 3.3.0 72/106772/1
Robert Varga [Fri, 30 Jun 2023 11:33:37 +0000 (13:33 +0200)]
Bump jxr-maven-plugin to 3.3.0

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

Change-Id: I74e2534509afe23d4a9e41aa72a35c172cc2c9b4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoUpdate restconf links in documentation 09/106309/9
tobias.pobocik [Thu, 1 Jun 2023 10:42:52 +0000 (12:42 +0200)]
Update restconf links in documentation

In order to reflect that bierman restconf is no more available,
fix all documentation files under docs.

JIRA: BGPCEP-1024
Signed-off-by: tobias.pobocik <tobias.pobocik@pantheon.tech>
Change-Id: If843d498506d73813a5efbc1bc2994f24b55caec

11 months agoConsolidate feature repositories 55/106755/3
Robert Varga [Thu, 29 Jun 2023 15:46:10 +0000 (17:46 +0200)]
Consolidate feature repositories

We should only have features-bgpcep, not a separate repository for each
set of features. This squashes the definition and separates
odl-bgpcep-bgp-benchmark into features-bgpcep-testing.

Change-Id: Icac6cb1a52af016e7631d6c486f84b5a1d2447be
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoRename features-bgpcep-extras to features-bgpcep-testing 54/106754/2
Robert Varga [Thu, 29 Jun 2023 15:33:35 +0000 (17:33 +0200)]
Rename features-bgpcep-extras to features-bgpcep-testing

This feature repository includes additionally only data-change-counter,
which is only used in testing. Rename the repository accordingly.

Change-Id: I7a204499c04ca98b12278778f971fdec3515019e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoFlatten features/ hierarchy 49/106749/1
Robert Varga [Thu, 29 Jun 2023 08:29:10 +0000 (10:29 +0200)]
Flatten features/ hierarchy

The hierarchy is needlessly complex, flatten it before we start making
sense of the features themselves.

Change-Id: Ia8b4c4aaf2c71f4e14471294c1ea7a5f7df72889
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoEliminate individual artifacts 33/106733/1
Robert Varga [Wed, 28 Jun 2023 08:43:07 +0000 (10:43 +0200)]
Eliminate individual artifacts

We really should have only bgpcep-artifacts, fold individual
directories' artifacts pom.xmls into the main one.

Change-Id: I3f9fffae2438c00bac4af484d16310b868106a64
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoBump upstreams 44/106544/19
Robert Varga [Tue, 20 Jun 2023 00:12:41 +0000 (02:12 +0200)]
Bump upstreams

Adopt:
- odlparent-13.0.3
- infrautils-6.0.1
- yangtools-11.0.0
- mdsal-12.0.0-SNAPSHOT
- controller-8.0.0-SNAPSHOT
- aaa-0.18.0-SNAPSHOT
- netconf-6.0.0-SNAPSHOT

Change-Id: I439e4c3d5f920d324e242d5b9cd2eae564704c4f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoRemove RibSupportUtils 57/106657/2
Robert Varga [Fri, 23 Jun 2023 14:16:51 +0000 (16:16 +0200)]
Remove RibSupportUtils

ApplicationPeer is the last holdout of reflection-based transcoding,
convert it to pick up the DOM tablesKey from RIBSupport and remove
RibSupportUtils.

JIRA: BGPCEP-1016
Change-Id: Ie567ecd5ff5189538a2c5a98d1cacfe8e7c83796
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoDo not use RibSupportUtils in SynchronizationAndExceptionTest 55/106655/2
Robert Varga [Fri, 23 Jun 2023 14:05:28 +0000 (16:05 +0200)]
Do not use RibSupportUtils in SynchronizationAndExceptionTest

We can just hard-code the expected identifier.

JIRA: BGPCEP-1016
Change-Id: I59880bd2e9404ac54e300ec59846e8744306f93c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoDo not use RibSupportUtils in PeerTest 54/106654/1
Robert Varga [Fri, 23 Jun 2023 14:01:54 +0000 (16:01 +0200)]
Do not use RibSupportUtils in PeerTest

Use a plain constant instead of relying on reflection. Also centralize
references to AFI/SAFI QNames.

JIRA: BGPCEP-1016
Change-Id: Ibb4e18ee7f83229386a483a912c0ce49e1ffca0e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoDo not use RibSupportUtils in AdjRibOutListener 53/106653/1
Robert Varga [Fri, 23 Jun 2023 11:40:09 +0000 (13:40 +0200)]
Do not use RibSupportUtils in AdjRibOutListener

RIBSupport provides all the information we need, there is no need to
pass TablesKey in or to transcode it separately.

JIRA: BGPCEP-1016
Change-Id: I82e8bac5dffd238e5365d48bdf7a2a1e056af213
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoDo not use RibSupportUtils in AdjRibInWriter 49/106649/2
Robert Varga [Fri, 23 Jun 2023 10:49:16 +0000 (12:49 +0200)]
Do not use RibSupportUtils in AdjRibInWriter

RIBSupport has everything we need, there is no point in using
RibSupportUtils for this task.

JIRA: BGPCEP-1016
Change-Id: If692d5b1d84d7596f8af3c13930f420bed901fd3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoUse SendReceive.getName() 47/106647/1
Robert Varga [Fri, 23 Jun 2023 09:33:40 +0000 (11:33 +0200)]
Use SendReceive.getName()

We are playing dirty tricks here in reversing the enum member class
name. This is completely unnecessary, as getName() is guaranteed to give
us exactly what we need.

Change-Id: I22548fd273a0682afd64865e6251cc895bca9e6f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoHide RibSupportUtils 45/106645/2
Robert Varga [Fri, 23 Jun 2023 09:20:04 +0000 (11:20 +0200)]
Hide RibSupportUtils

We do not want to leak this utility to the outside world. Also remove
unused methods.

JIRA: BGPCEP-1016
Change-Id: I7f52d9e51dd1ef37468363e8bcd9dcf50c374167
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoClean up AdjRibsInWriterTest a bit 46/106646/1
Robert Varga [Fri, 23 Jun 2023 09:30:10 +0000 (11:30 +0200)]
Clean up AdjRibsInWriterTest a bit

Use Set.of()/Map.of() instead of mutable collections.

Change-Id: I230d7bb98f39e4c23d011a5fa946d7feb93a87d6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoDo not use BindingReflections in AbstractRIBSupportTest 44/106644/1
Robert Varga [Fri, 23 Jun 2023 09:14:48 +0000 (11:14 +0200)]
Do not use BindingReflections in AbstractRIBSupportTest

We can make a direct reference to Routes.QNAME and also
use AbstractRIBSupport's routeQname() method to side-step the need for
lookups.

JIRA: BGPCEP-1016
Change-Id: I54204866d365fc6732bbb52ddb826c5da89e8602
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoMove RibSupportUtils 40/106640/3
Robert Varga [Thu, 22 Jun 2023 18:51:49 +0000 (20:51 +0200)]
Move RibSupportUtils

This class is only used in bgp-rib-impl, move it there.

JIRA: BGPCEP-1016
Change-Id: Ifd2780e402c63a2c4c1f455edd22a9e4e24a447e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoClean up RibSupport registration 33/106633/4
Robert Varga [Thu, 22 Jun 2023 18:12:18 +0000 (20:12 +0200)]
Clean up RibSupport registration

The RIBSupport integration shows a number of cases of accidental
duplicity with the evolution over the years. At the end of the day, each
RIBSupport knows to what AFI/SAFI it is bound -- on both Binding and DOM
layers.

Use that information to simplify interactions, improving ergonomics
across the board, as well as ditching a source of Binding->DOM identity
translation.

JIRA: BGPCEP-1016
Change-Id: I19377f25cf6adb1a9ddc170913961f948c10938c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoDo not use BindingReflections in bmp-impl 30/106630/1
Robert Varga [Thu, 22 Jun 2023 15:28:06 +0000 (17:28 +0200)]
Do not use BindingReflections in bmp-impl

There is just no point in needing to translate binding to dom -- we have
the QName readily available or we can get it from codecs we have near
by.

JIRA: BGPCEP-1016
Change-Id: I1a89e4aea49d99f8c255a77227941e1fabea7246
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoDo not use BindingReflections in AbstractRIBSupport 28/106628/2
Robert Varga [Thu, 22 Jun 2023 13:28:34 +0000 (15:28 +0200)]
Do not use BindingReflections in AbstractRIBSupport

The details of this class are specialized in a hand-coded manner,
require user to inject QNames statically.

JIRA: BGPCEP-1016
Change-Id: I780dfcf7780bd2b00ec00b97da8ccd4be968f422
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoBump versions to 0.20.0-SNAPSHOT 29/106629/1
Robert Varga [Thu, 22 Jun 2023 15:04:52 +0000 (17:04 +0200)]
Bump versions to 0.20.0-SNAPSHOT

This starts the next major development iteration.

Change-Id: I4976bb3615903c0c47983aa7f644fd11e44d293b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoUse BindingReflections.getQName() 27/106627/1
Robert Varga [Thu, 22 Jun 2023 13:04:47 +0000 (15:04 +0200)]
Use BindingReflections.getQName()

We have a purpose-defined method for extracting the QName from a
BaseIdentity instance. Use that instead of the broad findQName().

JIRA: BGPCEP-1016
Change-Id: I90e60fb337d63844be56ba1e8b208714e4822113
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
11 months agoDo not use BindingReflections in RibSupportUtilsTest 26/106626/1
Robert Varga [Thu, 22 Jun 2023 13:12:34 +0000 (15:12 +0200)]
Do not use BindingReflections in RibSupportUtilsTest

Use plain literals instead of programmatic methods to assert values
being present.

Change-Id: Iac26789f767d4ab9374ade0468b4f7730bf1aedd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoEliminate AsPathSegmentParser 41/105641/3
Robert Varga [Mon, 24 Apr 2023 09:30:18 +0000 (11:30 +0200)]
Eliminate AsPathSegmentParser

This is just a utility class, which we can integrate into
AsPathAttributeParser. This allows us to eliminate a few checks in
parsing path and a switch dispatch in serialization path.

Change-Id: Ib7058d32a37339531e2ccb8874c1e3914b57fd72
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoEliminate RouteDistinguisherBuilder 34/105634/2
Robert Varga [Sun, 23 Apr 2023 22:23:54 +0000 (00:23 +0200)]
Eliminate RouteDistinguisherBuilder

This class is in a legacy place and its testing interactions with
RouteDistinguisherUtil are weird.

Integrate getDefaultInstance() into RouteDistringuisherUtil, adjusting
tests to properly perform assertions.

Also clean up API surface, so that things do not get confused.

Change-Id: I01d53086d8b7d49709a0da2d4cf287d62bf614c2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoImprove CMulticastUtil 33/105633/2
Robert Varga [Sun, 23 Apr 2023 21:25:46 +0000 (23:25 +0200)]
Improve CMulticastUtil

Use builder fluently to maximize bytecode density.

Change-Id: Ic50ed4bd49fb161159baea75ee46dab368895f77
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoImprove RouteDistinguisherUtil 32/105632/2
Robert Varga [Sun, 23 Apr 2023 21:23:06 +0000 (23:23 +0200)]
Improve RouteDistinguisherUtil

Do not muck with NormalizedNodes.findNode(), as we have the same
functionlity directly available.

Eliminate RDType -- it is a noble idea, but all we really need is just
valid constants. This improves both paths, as the arguments are now
known compile-time constants.

Finally improve nullness annotations, eliminating the need for a
requireNonNull() in flowspec.

Change-Id: I176db96b783649de166797ee84bf919e68a57196
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoFix yang-data-tree-api dependency 31/105631/3
Robert Varga [Sun, 23 Apr 2023 20:34:48 +0000 (22:34 +0200)]
Fix yang-data-tree-api dependency

We pull in yang-data-tree-api through bgp-rib-spi, which we expect
all extensions to depend on. Relegating it to scope=test does the wrong
thing, breaking build at least in Eclipse.

While we are at it, fix dependencies for all extensions.

Change-Id: I9464632de0a22d04b1b63df1d669a1676d68bfa3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoSanitize flowspec serialization 30/105630/2
Robert Varga [Sun, 23 Apr 2023 19:35:02 +0000 (21:35 +0200)]
Sanitize flowspec serialization

We have a rather useless indirection in serializeNlri, which deals with
variadic arguments between plain and l3vpn NLRIs. Refactor the
interation by keeping only the basic in AbstractFlowspecNlriParser and
providing archetype-specific serialization methods.

Change-Id: Ifce9fcdd3380d77288f8f7b615aa0b2c966b2369
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoSanitize flowspec parsing 29/105629/2
Robert Varga [Sun, 23 Apr 2023 17:26:19 +0000 (19:26 +0200)]
Sanitize flowspec parsing

Flowspec support performs a rather ugly indirection through Object[] to
deal with the fact that base and L3VPN routes have different structure.

The problem core issue here is lack of proper specialization, where
AbstractFlowspec{NlriParser,RIBSupport} really cater to plain Ipv4/Ipv6
supports -- and thus there is no simple-specific meeting point.

Introduce AbstractFlowspecIp{NlriParser,RIBSupport} to act as proper
specialization, which allows us to structure the code correctly.

This patch deals with the parsing path, leaving the serialization path
to a follow-up.

Change-Id: Ifdc3241c9f87c06eec112550103e67b26973c80f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoBump versions to 0.19.6-SNAPSHOT 28/105628/1
Robert Varga [Sun, 23 Apr 2023 15:58:10 +0000 (17:58 +0200)]
Bump versions to 0.19.6-SNAPSHOT

This starts the next development iteration.

Change-Id: I4216964d5fc7e4cffd075f0068c2f4ecdceb2b85
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoBump upstreams 06/105606/7
Robert Varga [Sat, 22 Apr 2023 17:35:16 +0000 (19:35 +0200)]
Bump upstreams

Adopt:
- odlparent-12.0.5
- infrautils-5.0.4
- yangtools-10.0.6
- mdsal-11.0.9
- controller-7.0.6
- aaa-0.17.8
- netconf-5.0.6

Change-Id: I54b8b946b2b5149cfaecdc5d287df8654649d91d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoConvert users of Optional.get() 05/105605/7
Robert Varga [Sat, 22 Apr 2023 17:42:01 +0000 (19:42 +0200)]
Convert users of Optional.get()

Upgraded modernized plugin is flagging callers of Optional.get(). This
is a good opportunity to inspect how exactly we use Optionals.

It turns out we can improve things significantly by taking advantage of
improved interfaces in yang.data.api: using childByArg()/getChildByArg()
we can:
- remove explicit calls to verifyNotNull()
- remove duplicate lookups of nodes
- remove Optional.ifPresent() indirection

Change-Id: If1f898f3e12e730e8084cca9689f94949c53c852
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoMigrate tests away from Optional.get() 09/105609/1
Robert Varga [Sun, 23 Apr 2023 09:21:55 +0000 (11:21 +0200)]
Migrate tests away from Optional.get()

Upgraded modernizer plugin is flagging these violations, migrate to
alternatives.

Change-Id: I4f99b5cd6910819b8b50deda35d1b97445ecde2d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoReduce Mockito workaround 87/105487/1
Robert Varga [Tue, 18 Apr 2023 16:21:24 +0000 (18:21 +0200)]
Reduce Mockito workaround

The problem is use of inline mockmaker, this patch minimizes the
workaround to the affected test.

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

13 months agoMove future declaration 82/105382/1
Robert Varga [Tue, 11 Apr 2023 17:20:16 +0000 (19:20 +0200)]
Move future declaration

Co-locate declaration and initialization.

Change-Id: I7b6cfe4c4e2a4556c1ba61ccd8d1b0cd77adaf57
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoUse instanceof patterns in BGPPeer 81/105381/1
Robert Varga [Tue, 11 Apr 2023 17:15:54 +0000 (19:15 +0200)]
Use instanceof patterns in BGPPeer

Reduce the risk of mismatched casts by using an explicit pattern.

Change-Id: I238585f6dc29456dc56853a511533cbbd8b8816e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoMake BGPPeer.addPathTableMaps immutable 80/105380/1
Robert Varga [Tue, 11 Apr 2023 17:14:56 +0000 (19:14 +0200)]
Make BGPPeer.addPathTableMaps immutable

This is field is always immutable, make that contract explicit.

Change-Id: I5388b25297c7a45894d53d119e7aab44198d9d65
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoBump versions to 0.19.5-SNAPSHOT 41/105341/1
Robert Varga [Mon, 10 Apr 2023 19:05:30 +0000 (21:05 +0200)]
Bump versions to 0.19.5-SNAPSHOT

This starts the next development iteration.

Change-Id: I8d547581bc9c4e8c3a9b443d1716043b2133edc1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
13 months agoUse ArgumentMatchers.anyList() 07/105207/1
Robert Varga [Tue, 4 Apr 2023 07:18:59 +0000 (09:18 +0200)]
Use ArgumentMatchers.anyList()

This is type-safe alternative, use it to remove a warning.

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

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

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

14 months agoFix session shutdown race 14/105114/1
Robert Varga [Fri, 31 Mar 2023 11:05:26 +0000 (13:05 +0200)]
Fix session shutdown race

We must not shut down the underlying transaction chain before we have
cleared all possible interactions with it.

JIRA: BGPCEP-1020
Change-Id: Iad2836827eb0b7781152cc5d8dc1997547482596
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
14 months agoBump versions to 0.19.4-SNAPSHOT 47/105047/1
Robert Varga [Mon, 27 Mar 2023 18:24:58 +0000 (20:24 +0200)]
Bump versions to 0.19.4-SNAPSHOT

This starts the next development iteration.

Change-Id: I75582c0190d3b379a19a6a4391f07e3b6b8345a4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
14 months agoBump upstreams 46/105046/1
Robert Varga [Mon, 27 Mar 2023 18:23:53 +0000 (20:23 +0200)]
Bump upstreams

Adopt:
- aaa-0.17.7
- netconf-5.0.4

Change-Id: I0f9431f53063c4eb67c8e17e88b52e55f67362e1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
14 months agoRemove superfluous throws 68/104768/1
Robert Varga [Mon, 6 Mar 2023 10:13:32 +0000 (11:13 +0100)]
Remove superfluous throws

We are only closing a Registration, really. Make sure we preserve that
contract to remove the need to throw Exceptions.

Change-Id: I1e106c857c3adab572d09ef925a3c74d50247be6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
15 months agoBump versions to 0.19.3-SNAPSHOT 50/104750/1
Robert Varga [Fri, 3 Mar 2023 11:35:48 +0000 (12:35 +0100)]
Bump versions to 0.19.3-SNAPSHOT

This starts the next development iteration.

Change-Id: Ifb377ddc85ec9344e1fdadc2e648a597273bc384
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
15 months agoBump upstreams 47/104747/2
Robert Varga [Fri, 3 Mar 2023 01:35:53 +0000 (02:35 +0100)]
Bump upstreams

Adopt:
- odlparent-12.0.3
- infrautils-5.0.3
- yangtools-10.0.4
- mdsal-11.0.7
- controller-7.0.4
- aaa-0.17.6
- netconf-5.0.3

Change-Id: Ia2ae6366ccc691bd7d41ac31d138b870b447193a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
15 months agoBump versions to 0.19.2-SNAPSHOT 96/104396/1
Robert Varga [Wed, 15 Feb 2023 09:35:06 +0000 (10:35 +0100)]
Bump versions to 0.19.2-SNAPSHOT

This starts the next development iteration.

Change-Id: I5ea9d36bb33ec8f14a501c49c518410261236fd0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
15 months agoBump upstreams 95/104395/3
Robert Varga [Tue, 14 Feb 2023 23:03:07 +0000 (00:03 +0100)]
Bump upstreams

Adopt:
- odlparent-12.0.2
- infrautils-5.0.2
- yangtools-10.0.3
- mdsal-11.0.6
- controller-7.0.3
- aaa-0.17.5
- netconf-5.0.2

Change-Id: I578b579d13ba0b634b5ce124b35310a624964e4b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoBump versions to 0.19.1-SNAPSHOT 12/104112/1
Robert Varga [Tue, 24 Jan 2023 15:24:24 +0000 (16:24 +0100)]
Bump versions to 0.19.1-SNAPSHOT

This starts the next development iteration.

Change-Id: I2ea236703f219cc483cbd224cde3d4a3c110cab4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoBump upstreams 10/104110/1
Robert Varga [Tue, 24 Jan 2023 14:21:01 +0000 (15:21 +0100)]
Bump upstreams

Adopt:
- mdsal-11.0.4
- controller-7.0.2
- aaa-0.17.3
- netconf-5.0.1

Change-Id: I8c8bbb8791d5aa9200dfb4615669846e15016dca
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoClean up PCEPTunnelClusterSingletonService 77/104077/1
Robert Varga [Wed, 18 Jan 2023 10:32:10 +0000 (11:32 +0100)]
Clean up PCEPTunnelClusterSingletonService

Access BundleContext only once and perform general cleanups.

Change-Id: Ib9c1bb1ef6e04a2d2a94d0b9dff483a380043a5d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoRemove slf4j-api declaration 76/104076/1
Robert Varga [Wed, 18 Jan 2023 08:52:39 +0000 (09:52 +0100)]
Remove slf4j-api declaration

This is scope=provided by default, there is no point mentioning it.

Change-Id: I99626b3304f6bc90369036b5d267bfa420875497
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoDo not store InstanceIdentifier in deployer 66/104066/1
Robert Varga [Wed, 18 Jan 2023 08:36:32 +0000 (09:36 +0100)]
Do not store InstanceIdentifier in deployer

We are only using it for one-shot registration, there is no need to
store it.

Change-Id: I9394e816a860174f284fc43cded8f93e43937a2e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoDo not wipe graph configuration 60/104060/2
Robert Varga [Tue, 17 Jan 2023 10:31:11 +0000 (11:31 +0100)]
Do not wipe graph configuration

We are not using config datastore, do not wipe it on shutdown. This
prevents a splat with controller-7.

Change-Id: Ic002fbbfa4d14b1ee16f0951402ef7d651fdb92e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoModernize GraphListener a bit 59/104059/2
Robert Varga [Tue, 17 Jan 2023 10:28:45 +0000 (11:28 +0100)]
Modernize GraphListener a bit

Do not retain InstanceIdentifier and use instanceof pattern to
check/cast in one go.

Change-Id: I3226088cc908464d8d357e16929c3e87dd132b00
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoRemove dependency on AccessControlException 56/104056/1
Robert Varga [Tue, 17 Jan 2023 01:36:59 +0000 (02:36 +0100)]
Remove dependency on AccessControlException

Use a simple SecurityException instead of the deprecated
AccessControlException.

Change-Id: I52974fa463d8ca3c7fb625e340b54db61c2551ff
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoTurn ted-name into a leafref 53/104053/5
Robert Varga [Tue, 17 Jan 2023 00:34:32 +0000 (01:34 +0100)]
Turn ted-name into a leafref

We want to express strong consistency here. Use a leafref, which gives
us a type-safe reference along with expressing a consistency constraint.

Change-Id: I6026fb6cf5d6f2bf169a22eeaabb62719afeb5f2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoRelocate ted-name 52/104052/3
Robert Varga [Tue, 17 Jan 2023 00:24:34 +0000 (01:24 +0100)]
Relocate ted-name

The name should be part of topology itself, as it is not related to
pcep-api in any way, shape or form.

Change-Id: I384d94a4d87d9522f02543f4a1c9735b2bdd3c98
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoMinimize blueprint dependencies 51/104051/3
Robert Varga [Mon, 16 Jan 2023 22:45:41 +0000 (23:45 +0100)]
Minimize blueprint dependencies

We have drove down the dependencies, now we should be down to just two
features which depend on blueprint.

Change-Id: I94a237b1f5957ccdca1d24ed99092ed1b8980932
JIRA: BGPCEP-881
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoRemove blueprint from pcep-tunnel-provider 50/104050/1
Robert Varga [Mon, 16 Jan 2023 22:16:06 +0000 (23:16 +0100)]
Remove blueprint from pcep-tunnel-provider

We still have a OSGi ServiceRegistry dependency, but now we do not use
Blueprint to get it.

JIRA: BGPCEP-965
Change-Id: I11c1fcb20763febe639f73e3e5ed3176869a5f00
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoConvert pcep-segment-routing to OSGi DS 49/104049/2
Robert Varga [Mon, 16 Jan 2023 21:44:32 +0000 (22:44 +0100)]
Convert pcep-segment-routing to OSGi DS

Convert configuration bits to OSGi Metatype and configure them through
Config Admin.

JIRA: BGPCEP-967
Change-Id: I6b9b5b1cb529259846e44dbffd5aa8b3384eceb8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoConvert pcep-auto-bandwidth-extension to OSGi DS 48/104048/4
Robert Varga [Mon, 16 Jan 2023 20:59:49 +0000 (21:59 +0100)]
Convert pcep-auto-bandwidth-extension to OSGi DS

This is an experimenter option, this patch brings persistence out of the
picture and shifts configuration to OSGi DS (or whatever else external).

JIRA: BGPCEP-1018
Change-Id: I122d5a9c41c78b5ac8523bc4a1d5ed54d7b166b3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoDitch blueprint from pcep-topology-provider 47/104047/4
Robert Varga [Mon, 16 Jan 2023 18:39:18 +0000 (19:39 +0100)]
Ditch blueprint from pcep-topology-provider

We have no dependencies which would warrant the use of blueprint,
convert to activation to javax.inject and OSGi DS.

JIRA: BGPCEP-960
Change-Id: I7d7a464403fded3cbef915972b067f0a7ae23770
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoCompare capabilities during configuration apply 46/104046/4
Robert Varga [Mon, 16 Jan 2023 18:29:03 +0000 (19:29 +0100)]
Compare capabilities during configuration apply

If capabilities change we want to create a new negotiation. This may be
improved later.

JIRA: BGPCEP-960
Change-Id: I89ca223e6456fa78bd71f6a64e4fe1c3ee538854
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoClean up capability container 45/104045/4
Robert Varga [Mon, 16 Jan 2023 18:22:15 +0000 (19:22 +0100)]
Clean up capability container

We want to preserve the capability of adding configuration options
without breaking API. For that each capability should be its own
container.

JIRA: BGPCEP-960
Change-Id: Ic883e5a1455223934a3c4f076ba027e9679c4b17
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoTurn PCEPCapability into an abstract class 40/104040/13
Robert Varga [Mon, 16 Jan 2023 13:08:42 +0000 (14:08 +0100)]
Turn PCEPCapability into an abstract class

We want to force uniform treatment, equality and useful toString(). All
that requires an explicit abstract superclass.

JIRA: BGPCEP-960
Change-Id: I4522732290429c298bc7d2109ce65e272e909d86
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoRemove PCEPCapability.isStateful() 38/104038/12
Robert Varga [Mon, 16 Jan 2023 12:32:11 +0000 (13:32 +0100)]
Remove PCEPCapability.isStateful()

This is a useless method leaking a particular capability. Remove it and
adjust users.

JIRA: BGPCEP-960
Change-Id: Iedf491ef8f276ea27acca9ac40892200c857dc23
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoRemove sr-capable leaf 33/104033/10
Robert Varga [Sun, 15 Jan 2023 21:22:36 +0000 (22:22 +0100)]
Remove sr-capable leaf

The bit with advertizement is not used anywhere, as we always end up
loading the default configuration. Remove the unused leaf.

JIRA: BGPCEP-967
Change-Id: I03b9da1af231d495dc359f309984079f88b6a0e6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoEliminate blueprint from ietf-p2mp-te-lsp 32/104032/7
Robert Varga [Sun, 15 Jan 2023 20:40:02 +0000 (21:40 +0100)]
Eliminate blueprint from ietf-p2mp-te-lsp

Blueprint here is completely superfluous: services exposed by it are not
used. Furthermore the tuneable here is bogus -- we either announce it or
we do not. Remove this complexity.

JIRA: BGPCEP-968
Change-Id: I0f7d857a1c1563eee6f13e47b8caa6183093888a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoEliminate blueprint from pcep-ietf-stateful 30/104030/7
Robert Varga [Sun, 15 Jan 2023 19:48:00 +0000 (20:48 +0100)]
Eliminate blueprint from pcep-ietf-stateful

Configuration wiring has no effect in current implementation. Keep the
grouping for configuration purposes and remove persistent container.

For safety, also rename the module so it has a different namespace and
name.

JIRA: BGPCEP-969
Change-Id: I118e41a11596fb0eb2847751eb0dfb1992641235
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoConfigure PCEP Capabilities in pcep-topology-provider 31/104031/9
Robert Varga [Sun, 15 Jan 2023 20:21:22 +0000 (21:21 +0100)]
Configure PCEP Capabilities in pcep-topology-provider

Rather than relying on global configuration for each capability, use the
topology configuration to specify which capabilities are to be used.
This drops the dependency on ODL Blueprint extension as well as the
PCEPCapability services advertized through OSGi SR.

JIRA: BGPCEP-960
Change-Id: Ib90a2de1306024b0398eae3834f819fe555850e0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoDisconnect PCEPStatefulCapability from clustered-app-config 44/104044/1
Robert Varga [Mon, 16 Jan 2023 17:20:55 +0000 (18:20 +0100)]
Disconnect PCEPStatefulCapability from clustered-app-config

The container only contains the grouping. We do not care which
instantiation of the grouping we are talking to.

JIRA: BGPCEP-969
Change-Id: I18a54198c9430cc9f48e257fb86be007d4564732
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoInvert pcep-{segment-routing,topology-provider} dependencies 43/104043/1
Robert Varga [Mon, 16 Jan 2023 17:03:02 +0000 (18:03 +0100)]
Invert pcep-{segment-routing,topology-provider} dependencies

pcep-topology-provider needs to depend on pcep-segment-routing,
but a test is wrecking that. Rehost the test and flip the dependencies.

JIRA: BGPCEP-960
Change-Id: I763b9244f4ecb2ac288dc7b8cb93c2708e1d3b3d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoClean up epoll dependencies 37/104037/2
Robert Varga [Mon, 16 Jan 2023 00:53:38 +0000 (01:53 +0100)]
Clean up epoll dependencies

Each component should pull in at least one implementation, so that we
work okay in most cases.

Change-Id: I271a2f4d4c05d301f5141e142242448881a3abf0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoClean up PCEPDispatcher.createServer() 29/104029/10
Robert Varga [Sun, 15 Jan 2023 19:28:43 +0000 (20:28 +0100)]
Clean up PCEPDispatcher.createServer()

We are just passing arguments around -- PCEPSessionListenerFactory
is an invariant plus the argument we pass to it is completely unneeded.

All of that is now properly encapsulated in
PCEPSessionNegotiatorFactory, so it is completely in charge of the
negotiation process.

Change-Id: I0600b83aca20af875fba70e05bae9a65a110781e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoEliminate PCEPSessionNegotiatorFactoryDependencies 28/104028/3
Robert Varga [Sun, 15 Jan 2023 17:48:22 +0000 (18:48 +0100)]
Eliminate PCEPSessionNegotiatorFactoryDependencies

This is a completely useless construct, just adding overhead and
indirection. This converges argument knowledge, so that we actually
can peel them further.

Change-Id: I4a2c48830086087cdb225fcd399b6b01bde29ecc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoEliminate pcep-impl.xml 15/104015/15
Robert Varga [Thu, 12 Jan 2023 16:38:58 +0000 (17:38 +0100)]
Eliminate pcep-impl.xml

Migrate configuration and wiring bits to pcep-topology-provider, so that
configuration updates are applied through a well-defined set of rules.
This allows us to make further improvements in the future.

JIRA: NETCONF-962
Change-Id: I7cb6d4d94a8880349af1ffa0207d8f212427a579
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoEliminate PCEPSessionProposalFactory 26/104026/4
Robert Varga [Sun, 15 Jan 2023 13:14:57 +0000 (14:14 +0100)]
Eliminate PCEPSessionProposalFactory

This interface acts just like a proxy for creating Open objects. Fold
its functionality into PCEPSessionNegotiatorFactory.

JIRA: BGPCEP-962
Change-Id: Idcb5bc2ef5b0d7e690b6fd6733e85b50c05dab46
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoSplit up BasePCEPSessionProposalFactory 25/104025/2
Robert Varga [Sun, 15 Jan 2023 12:42:33 +0000 (13:42 +0100)]
Split up BasePCEPSessionProposalFactory

We are concentrating what amounts to a utility method into a strict
hierarchy, conflating a few arguments. At the end of the day we want to
disconnect PCEPTimerProposal from the factory, just as we do not want
to mention capabilities.

This takes a step towards that goal, eventually leading to users to
provide PCEPSessionProposalFactory on their own.

JIRA: BGCEP-962
Change-Id: I1f31a800d961daa04cf2f46292cbc338d07106b5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoMove PCEPSessionNegotiator 24/104024/2
Robert Varga [Sun, 15 Jan 2023 11:50:15 +0000 (12:50 +0100)]
Move PCEPSessionNegotiator

This class is purely-internal negotiation intermediary, which has
a strong relationship wit AbstractPCEPSessionNegotiatorFactory. Rename
it to BootstrapSessionNegotiator and make it a nested class.

JIRA: BGPCEP-962
Change-Id: I0556c43040bfabf0be691b2e70911caf97ebec91
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoTurn PCEPDispatcherImpl into a component 17/104017/15
Robert Varga [Thu, 12 Jan 2023 20:09:48 +0000 (21:09 +0100)]
Turn PCEPDispatcherImpl into a component

Clean up Epoll.isAvailable() lifecycle, so that we manage our groups
correctly. At the end of the day, each subsystem should manage the
threads and this patch does exactly that: we no longer rely on global
group, but rather do our own thing.

JIRA: BGPCEP-856
Change-Id: Ibe1c6ba8c2176d54ed41bac677a1184bbfffec98
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoDisconnect PCEPDispatcherImpl from dependencies 23/104023/3
Robert Varga [Sat, 14 Jan 2023 23:56:06 +0000 (00:56 +0100)]
Disconnect PCEPDispatcherImpl from dependencies

Each server should have its own policy w.r.t. the various factories,
hence we should be providing them when a server is established.

JIRA: BGPCEP-962
Change-Id: I73dc7cf485cbac166479dc402f09b0db09149897
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoMove getPCEPSessionProposalFactory() 22/104022/1
Robert Varga [Sat, 14 Jan 2023 18:48:26 +0000 (19:48 +0100)]
Move getPCEPSessionProposalFactory()

The wiring here comes from Config Subsystem times, where we have had a
wildly different lifecycle. Inject PCEPSessionProposalFactory through
service registry.

JIRA: BGPCEP-962
Change-Id: I2c2a197b0137c4e79cf44e0fa70fa0398d4b852d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>