bgpcep.git
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>
13 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)

13 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>
13 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>
13 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>
14 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>
14 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>
15 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>
15 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>
15 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>
15 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>
15 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>
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>
17 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>
19 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>
19 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>
19 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>
19 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>
20 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>
20 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>
20 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>
21 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>
21 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>
21 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>
21 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>
21 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>
21 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>
21 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>
21 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>
21 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>
21 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>
21 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>
21 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>