bgpcep.git
16 months agoEliminate PCEPDispatcher.getPCEPSessionNegotiatorFactory() 21/104021/1
Robert Varga [Sat, 14 Jan 2023 18:00:35 +0000 (19:00 +0100)]
Eliminate PCEPDispatcher.getPCEPSessionNegotiatorFactory()

This is a useless indirection, as we are conflating the different
layers. This allows us to pass the factories when a server is created,
which is needed for the configuration flexibility.

JIRA: BGPCEP-962
Change-Id: Ia693272d67b621521a85c2662ea0f358c6479f30
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoEliminate PCEPDispatcherDependencies 20/104020/1
Robert Varga [Sat, 14 Jan 2023 16:31:43 +0000 (17:31 +0100)]
Eliminate PCEPDispatcherDependencies

This is a useless indirection hiding the things we are passing to the
dispatcher. Enumerate them explicitly, as we will be adding a few more
things as well.

JIRA: BGPCEP-962
Change-Id: Iaf950762547b6685c852e965591033fdc9024aed
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoPromote MessageRegistry to pcep-api 19/104019/2
Robert Varga [Sat, 14 Jan 2023 16:16:58 +0000 (17:16 +0100)]
Promote MessageRegistry to pcep-api

The base ability to parse messages is inherently tied to a
PCEPDispatcher. At the end up the day we will need to pass the parsing
registry when we create a server.

JIRA: BGPCEP-962
Change-Id: Ic80888f063ea7cab2a6b28ec9978f151313d64ce
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoPCEPSessionNegotiatorFactory is not generic 18/104018/2
Robert Varga [Sat, 14 Jan 2023 13:08:34 +0000 (14:08 +0100)]
PCEPSessionNegotiatorFactory is not generic

Having a type capture here is not that helpful -- all we really need is
to codify that PCEPSession.close() does not throw and have a few
explicit casts in tests.

JIRA: BGPCEP-856
Change-Id: I57246bc681707a853df2c087193d33c914842d1d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoIntroduce pcep-session-error-policy 14/104014/14
Robert Varga [Thu, 12 Jan 2023 15:21:17 +0000 (16:21 +0100)]
Introduce pcep-session-error-policy

max-unknown-messages is a common session parameter, tuning the policy
when faced with errors. Capture this in a grouping, allowing for its
reuse.

JIRA: BGPCEP-962
Change-Id: I8e7e582a11bff561b67108825d3376bb59e8c434
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoIntroduce pcep-session-tls 13/104013/5
Robert Varga [Thu, 12 Jan 2023 14:46:16 +0000 (15:46 +0100)]
Introduce pcep-session-tls

TLS configuration is a session establishment thing. Capture its
configuration in a grouping and pass that down instead of the hard-coded
datastore instance.

JIRA: BGPCEP-962
Change-Id: I2e0b4d383172c1cbbca7ac4b484b25db1242cb83
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoCorrect PCEP Session ID 12/104012/2
Robert Varga [Thu, 12 Jan 2023 13:31:29 +0000 (14:31 +0100)]
Correct PCEP Session ID

Session ID is defined to be an uint8, make sure our APIs reflect that.

Change-Id: Ibd3e09c3d22740702c3a3054066563beffb07038
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoMove TlsConfiguration 11/104011/1
Robert Varga [Thu, 12 Jan 2023 13:11:46 +0000 (14:11 +0100)]
Move TlsConfiguration

The TLS configuration bit is set in a funky way, making it unclear as to
what is going on. Make it a final field.

JIRA: BGPCEP-962
Change-Id: Ia2c15b6129ef3a0f6a16165a1cb00aaf66e314e4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoCorrect PCEP timer definitions 52/102452/7
Robert Varga [Tue, 20 Sep 2022 13:49:55 +0000 (15:49 +0200)]
Correct PCEP timer definitions

The timers have an uint8 range by definition, correct that.

JIRA: BGPCEP-1017
Change-Id: Ie2f59a1859c54883730cd2fd89b5f7efc67a8c7e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoWire app config to BasePCEPSessionProposalFactory 51/102451/7
Robert Varga [Tue, 20 Sep 2022 10:28:03 +0000 (12:28 +0200)]
Wire app config to BasePCEPSessionProposalFactory

Make sure we tie together the proposal factory with its configuration,
so that we can easily create it from users.

JIRA: BGPCEP-962
Change-Id: I99beebf370cecb25272c84df913389aa15480132
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoMove afiClass/safiClass assignment 10/104010/1
Robert Varga [Thu, 12 Jan 2023 11:26:28 +0000 (12:26 +0100)]
Move afiClass/safiClass assignment

Having a requireNonNull() silences a warning reported by eclipse.

Change-Id: I5f52e44d76065a2923b43d738ee4cee998ce0443
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
16 months agoBump upstreams 93/103793/3
Robert Varga [Fri, 30 Dec 2022 02:20:40 +0000 (03:20 +0100)]
Bump upstreams

Adopt:
- odlparent-12.0.1
- infrautils-5.0.1
- yangtools-10.0.2
- mdsal-11.0.3
- controller-7.0.1
- aaa-0.17.2
- netconf-5.0.0

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

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

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

17 months agoEnsure compliance with RFC8212 35/102535/5
Samuel Schneider [Mon, 3 Oct 2022 08:46:22 +0000 (10:46 +0200)]
Ensure compliance with RFC8212

Change default routing policy config to be compliant
with default behavior from RFC8212.

Add the fact of compliance with RFC8212 to documentation.

Changes to tests caused by change to default policy.

JIRA: BGPCEP-1013
Change-Id: Ia1a78780a7b34d436cb878cf53a66c971540aec1
Signed-off-by: Samuel Schneider <samuel.schneider@pantheon.tech>
18 months agoUpdate LSP: check LSP presence in payload 40/103240/3
Ivan Hrasko [Wed, 16 Nov 2022 15:38:10 +0000 (16:38 +0100)]
Update LSP: check LSP presence in payload

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

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

JIRA: BGPCEP-1015
Change-Id: I7e10c2c534f6cc29326a4e01732def70d41f9997
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
18 months agoClean up use of NormalizedNodeBuilders 39/103039/1
Robert Varga [Wed, 2 Nov 2022 21:10:45 +0000 (22:10 +0100)]
Clean up use of NormalizedNodeBuilders

Do not reference implementations directly, but rather use
ImmutableNodes/Builders indirections. Also use builders fluently,
which improves readability and density.

Change-Id: I184c792dc084e9ba5cc69442ac962e9c0f77d104
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
20 months agoBump versions to 0.19.0-SNAPSHOT 54/102454/1
Robert Varga [Fri, 23 Sep 2022 11:58:51 +0000 (13:58 +0200)]
Bump versions to 0.19.0-SNAPSHOT

This starts the next development iteration.

Change-Id: Iea836b3b5fcb10c90782a5b8efa0254f2fae90be
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
20 months agoBump versions to 0.18.3-SNAPSHOT 53/102453/1
Robert Varga [Fri, 23 Sep 2022 11:57:47 +0000 (13:57 +0200)]
Bump versions to 0.18.3-SNAPSHOT

This starts the next development iteration.

Change-Id: I0d77337e0957489c21d727fbdf1d7a5a5f94bf38
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
20 months agoRemove an unneeded import 50/102450/2
Robert Varga [Tue, 20 Sep 2022 11:22:08 +0000 (13:22 +0200)]
Remove an unneeded import

odl-pcep-topology-sync-optimizations-config is not using pcep-config,
remove the import.

Change-Id: I3859ab42c4277aed722538213d4b2d61072134ba
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
20 months agoBump upstreams 49/102449/2
Robert Varga [Fri, 23 Sep 2022 08:31:31 +0000 (10:31 +0200)]
Bump upstreams

Adopt:
- mdsal-10.0.2
- controller-6.0.2
- aaa-0.16.3
- netconf-4.0.2

Change-Id: I493c848bcc366ffb17b189d5eb41b0d640114591
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
21 months agoUse ImmutableLists in AbstractPrependAsPath 91/102191/3
Robert Varga [Sat, 20 Aug 2022 21:25:21 +0000 (23:25 +0200)]
Use ImmutableLists in AbstractPrependAsPath

ImmutableList.Builder allow for fluent building and does not allow the
result to be modified. Use it instead of an an ArrayList.

Change-Id: I3ca9b4c0b206ac9521efbe62c21f8df7f65cac06
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
21 months agoBump versions to 0.18.2-SNAPSHOT 61/102161/1
Robert Varga [Fri, 19 Aug 2022 06:21:06 +0000 (08:21 +0200)]
Bump versions to 0.18.2-SNAPSHOT

This starts the next development iteration.

Change-Id: I64fb149c6ace714be93fcf37cae8fe0bfa30257f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
21 months agoBump upstreams 60/102160/1
Robert Varga [Fri, 19 Aug 2022 06:20:51 +0000 (08:20 +0200)]
Bump upstreams

Adopt:
- odlparent-11.0.1
- yangtools-9.0.1
- infrautils-4.0.1
- mdsal-10.0.1
- controller-6.0.1
- aaa-0.16.1
- netconf-4.0.1

Change-Id: I6d5064eb146c18c0b5190cef8e975f2c1f2c83e9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
21 months agoBump versions to 0.18.1-SNAPSHOT 25/101925/2
Robert Varga [Fri, 29 Jul 2022 18:22:52 +0000 (20:22 +0200)]
Bump versions to 0.18.1-SNAPSHOT

This starts the next development iteration.

Change-Id: I013bde0f706c6b5beba9fda6b827804f2f379fa9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
21 months agoMove stats update timer 52/101952/8
Robert Varga [Wed, 3 Aug 2022 09:36:00 +0000 (11:36 +0200)]
Move stats update timer

Update interval is a global tuneable, but we really want it to be
adjustable on per-topology basis. Move the definition and update it
route it towards scheduler.

JIRA: BGPCEP-1011
Change-Id: Ia6946782b91da964409d1c7786253fb6c7648460
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
21 months agoRework statistics updates 62/101962/9
Robert Varga [Wed, 3 Aug 2022 14:06:00 +0000 (16:06 +0200)]
Rework statistics updates

Rather than using an unrelated transaction chain from
TopologyStatsProvider, call back into the session to perform the update
on the corresponding transaction chain.

This eliminates the problem of conflicting updates during session churn
and allows for future evolution.

JIRA: BGPCEP-1005
Change-Id: I4d70b985d1089266c108798c34a0176826016200
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
21 months agoMigrate datastore callback 61/101961/5
Robert Varga [Wed, 3 Aug 2022 13:14:09 +0000 (15:14 +0200)]
Migrate datastore callback

TopologyNodeState should not see the session, that should be part of
SessionListener lifecycle. Return the datastore future back to caller
so we can clean this up in future.

JIRA: BGPCEP-1005
Change-Id: I995ecf4d57fc90d37aab8208a2364603161b308f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
21 months agoUse a Timer for TopologyStatsProvider 51/101951/9
Robert Varga [Tue, 2 Aug 2022 23:10:31 +0000 (01:10 +0200)]
Use a Timer for TopologyStatsProvider

At the end of the day, we do not need a ScheduleExectorService if we
take advantate of our global Timer.

JIRA: BGPCEP-1011
Change-Id: I5b2d8f0e2e5a50e9c154188dbd51b747dd492ddf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
21 months agoCleanup ServerSessionManager 71/101971/3
Robert Varga [Fri, 5 Aug 2022 08:51:29 +0000 (10:51 +0200)]
Cleanup ServerSessionManager

Make sure invariants are packed together and eliminate use of
AtomicBoolean.

Change-Id: Ib22f0336d6644794442364b73cb64778b879aea6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
21 months agoIntegrate TopologyStatsRpcServiceImpl 53/101953/1
Robert Varga [Wed, 3 Aug 2022 10:32:22 +0000 (12:32 +0200)]
Integrate TopologyStatsRpcServiceImpl

This is a simple RPC service, just integrate it into
PCEPTopologyTracker.

JIRA: BGPCEP-960
Change-Id: Ie6330ca5c6229e4172c98931485279c4991ffabf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
21 months agoIntegrate TopologyStatsProviderImpl 50/101950/2
Robert Varga [Tue, 2 Aug 2022 21:29:32 +0000 (23:29 +0200)]
Integrate TopologyStatsProviderImpl

Provider is an implementation detail of PCEPTopologyTracker, make sure
it is managed internally. Also rename the interface and the class a bit
and clean up the shutdown semantics.

JIRA: BGPCEP-1011
Change-Id: I9c0c21c4ba47b8e6fec05765027462adbb8ee393
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
22 months agoTurn SyncOptimization into a record 48/101948/2
Robert Varga [Tue, 2 Aug 2022 21:01:50 +0000 (23:01 +0200)]
Turn SyncOptimization into a record

Trim down the overhead by using a simple record.

Change-Id: If9aeb13e4f3e55b768191a4541301c1bf46787f5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
22 months agoClean up SyncOptimization 47/101947/2
Robert Varga [Tue, 2 Aug 2022 20:26:17 +0000 (22:26 +0200)]
Clean up SyncOptimization

SyncOptimization is a pure DTO, which is immutable and does not directly
interact with PCEPSession.

Change-Id: I73a2f503d925f618c04c204477531ac11cfc2b06
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
22 months agoClean up SessionStateImpl lifecycle 46/101946/2
Robert Varga [Tue, 2 Aug 2022 19:49:04 +0000 (21:49 +0200)]
Clean up SessionStateImpl lifecycle

SessionStateImpl is inherently bound to statistics updater, hence
it needs to follow bind/unbind lifecycle. This has the benefit of
better isolation -- which is demonstrated by removal of unneeded
listenerState clearing.

On the side of TopologyStatsProviderImpl, we are gaining the benefits of
Registration atomicity, and therefore have a better reign over
invoke-once semantics.

JIRA: BGPCEP-1005
Change-Id: I1b58fc9891c0bfb2a7084cc6eccf9c56b41cd8fc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
22 months agoRemove ServerSessionManager.bind()/unbind() 45/101945/2
Robert Varga [Tue, 2 Aug 2022 18:23:44 +0000 (20:23 +0200)]
Remove ServerSessionManager.bind()/unbind()

This is a useless indirection through dependencies, let's remove it.

Change-Id: I5b2c320030f8457011700552acbbc296328a487d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
22 months agoUse a global Timer 39/101939/2
Robert Varga [Mon, 1 Aug 2022 11:10:33 +0000 (13:10 +0200)]
Use a global Timer

We should not be instantiating a timer for each ServerSessionManager,
but rather keep a single instance for all of them. This allows us to
reuse the timer for other things as well.

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

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

Change-Id: I961a5a40d75e376e216e903fbd3a28cfaa4dab00
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
22 months agoDo not expose Timer from ServerSessionManager 37/101937/3
Robert Varga [Mon, 1 Aug 2022 09:31:20 +0000 (11:31 +0200)]
Do not expose Timer from ServerSessionManager

The timer has a strict lifecycle, make sure it cannot be leaked.

Change-Id: I63356ce6f706bf3864cca4cd8a953bf758449ba3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
22 months agoEliminate network-pcep-topology-config 26/98726/8
Robert Varga [Fri, 26 Nov 2021 12:35:07 +0000 (13:35 +0100)]
Eliminate network-pcep-topology-config

Integrate dispatcher configuration with the topology-specific augment,
eliminating one level of indirection. This bumps netconf-topology-pcep
to revision 2022-07-30 and updates documentation accordingly.

JIRA: BGPCEP-990
Change-Id: Ifdf83b5390664ace5af11f696632d504d636df83
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
22 months agoGraph: add Multi-Topology support 61/101861/8
Olivier Dugeon [Wed, 20 Jul 2022 16:28:47 +0000 (18:28 +0200)]
Graph: add Multi-Topology support

Graph supports IPv4 or IPv6 topology but with IS-IS Multi-Topology
it is possible to advertise both IPv4 and IPv6 topologies. Recent
versions of BGP-LS speaker also support this Multi-Topology.
This patch changes the Graph yang model (including the revision date)
to handle IPv4 and IPv6 simultaneously on Edges and Vertices for
IS-IS Multi-Topology.

JIRA: BGPCEP-1010
Change-Id: Icfcf9e8a27f5f9d3fd9a928dba8d3adffaf8de50
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
22 months agoCorrect ReachTlvParser to handle IPv6 prefix 39/101839/6
Olivier Dugeon [Tue, 12 Jul 2022 07:52:40 +0000 (09:52 +0200)]
Correct ReachTlvParser to handle IPv6 prefix

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

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

JIRA: BGPCEP-1009
Change-Id: Ia5bac0fb2a6087e5c5cfbca0e3eee7d8fd7b822c
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
22 months agoDowngrade aggregator javadoc 04/101904/3
Robert Varga [Fri, 29 Jul 2022 13:34:44 +0000 (15:34 +0200)]
Downgrade aggregator javadoc

maven-javadoc-plugin-3.2.0+ does not generate any javadocs, hence we
need a downgraded version.

Change-Id: I7934eea64b81bb4aa1e69aaecc3bffc513db3e0f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
22 months agoBump netconf to 4.0.0 03/101903/2
Robert Varga [Fri, 29 Jul 2022 12:53:57 +0000 (14:53 +0200)]
Bump netconf to 4.0.0

Use released version instead of SNAPSHOT.

Change-Id: Ic1c120786b45a9fc4bf379306950a0053eb64ec3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
22 months agoUse FrameworkUtil.asDictionary() 29/101829/1
Robert Varga [Mon, 11 Jul 2022 21:31:54 +0000 (23:31 +0200)]
Use FrameworkUtil.asDictionary()

We do not need a Hashtable, use FrameworkUtil to give us what we need.

Change-Id: Ib44bd7e7af921d17040110209da7df0e5a03384d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
22 months agoBump upstreams to 2022.09 35/101735/22
Robert Varga [Tue, 5 Jul 2022 00:38:02 +0000 (02:38 +0200)]
Bump upstreams to 2022.09

Adopt the following versions:
- odlparent-11.0.0
- infrautils-4.0.0
- yangtools-9.0.0
- mdsal-10.0.0
- controller-6.0.0
- aaa-0.16.0
- netconf-4.0.0-SNAPSHOT

This requires some major surgery around identities.

Change-Id: I346020355d66bcca621bc479f5099c3069de4b61
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
22 months agoBump versions to 0.18.0-SNAPSHOT 59/101759/1
Robert Varga [Wed, 6 Jul 2022 16:23:20 +0000 (18:23 +0200)]
Bump versions to 0.18.0-SNAPSHOT

This starts the next major development iteration.

Change-Id: I535b20afc90f2e75f02f6bc92c65ff60b18c3c45
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
23 months agoBump versions to 0.17.6-SNAPSHOT 55/101555/1
Robert Varga [Thu, 9 Jun 2022 21:01:00 +0000 (23:01 +0200)]
Bump versions to 0.17.6-SNAPSHOT

This starts the next development iteration.

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

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

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

Pick up fixes from upstream.

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

This starts the next development iteration.

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

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

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

This starts the next development iteration.

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

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

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

There are unneeded qualifiers, fix them.

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

This starts the next development iteration.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Use MockitoJUnitRunner and prettify builder use.

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

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

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

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

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

Use static imports and proper hamcrest assertions.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

This is completely unneeded verbosity, remove it.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

This starts the next development iteration.

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

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

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

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

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

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

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

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

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

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

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

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

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