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>
(cherry picked from commit
0c0e5fe562ace67be1a3f87e7e93d731278a9cc2)
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>
(cherry picked from commit
fab2b26a1ba4baadd78a79b70734d863cb8e8bf5)
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>
(cherry picked from commit
695646e0543401be48718947a15e553d3b2a16b3)
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>
(cherry picked from commit
6dde3cf1413807b8e5d4f80cf1f91b10a81c2261)
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>
(cherry picked from commit
5f7ccf8acbfcfae2191f9713bf7594d65d11b16d)
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>
(cherry picked from commit
6a02b47e6eb8baeb1ac6a67cdd1224c5633bf403)
Robert Varga [Thu, 20 Jan 2022 17:55:12 +0000 (18:55 +0100)]
Bump versions to 0.16.15-SNAPSHOT
This starts the next development iteration.
Change-Id: Id9ef1c3070ca3eccfb31d844e634af0919d0128c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 14 Feb 2022 20:01:36 +0000 (21:01 +0100)]
Bump controller to 4.0.10
Controller misaligned yangtools versions, pick up the fix.
Change-Id: If601dc3eb5e4a1e113b7a0c7476af8a95fa5d511
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 20 Jan 2022 17:45:58 +0000 (18:45 +0100)]
Bump upstreams
Adopt:
- odlparent-9.0.13
- infrautils-2.0.13
- mdsal-8.0.11
- controller-4.0.9
- aaa-0.14.9
- netconf-2.0.13
Change-Id: I0a70a8728d53377907b71e596bf6fd0875d696a6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Ivan Hrasko [Thu, 3 Feb 2022 18:57:51 +0000 (19:57 +0100)]
Fix IPv6 leafs descriptions
Change-Id: I4b9cd6dbb750aa661fc7cfeb489a3941aade567a
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
(cherry picked from commit
4be87f1df99330b4d1892f522ef66f5d5d128557)
Olivier Dugeon [Tue, 23 Nov 2021 16:38:22 +0000 (17:38 +0100)]
algo: Fix NPE if ClassType is not specified
Path computation algorithms failed during edge pruning if ClassType
is not specified raising a NPE.
In addition, setting ClassType to 0 by default ito handle the NPE is
not conform to RFC5455.
This patch modify edge pruning when ClassType is not specified (set
to 0) and remove default setting to avoid problem when enforcing LSP
with a ClassType equal 0.
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Change-Id: I8930393359960dc9406fb9cc112bc194049cb35a
(cherry picked from commit
42282fe0eac1a45e0afdedd55c4984195ceddb8d)
marekzatko [Wed, 24 Nov 2021 16:21:04 +0000 (17:21 +0100)]
Remove DefaultTopologyReference service entry
Another case of service being registered, but
never accessed, remove it, making
pcep-topology-provider viable to non OSGi users.
JIRA: BGPCEP-960
Change-Id: I3f69f176891c845c1f399430ffb0a7c20fdb2cc6
Signed-off-by: marekzatko <Marek.Zatko@pantheon.tech>
(cherry picked from commit
93af921a040849938b2a80e0234bc9985b0f517b)
marekzatko [Fri, 26 Nov 2021 12:15:02 +0000 (13:15 +0100)]
Simplify pcep-stats blueprint
We don't need to subclass Timer, use
TimerTask instead, ditch factory-ref since we can
instantiate the normal way.
Change-Id: I5cb047408392a51424bdb5356f18ad0095043f74
Signed-off-by: marekzatko <Marek.Zatko@pantheon.tech>
(cherry picked from commit
c042b269052171a4720cff85f51f77303b5dc0ac)
Robert Varga [Thu, 25 Nov 2021 15:26:55 +0000 (16:26 +0100)]
Bump versions to 0.16.14-SNAPSHOT
This starts the next development iteration.
Change-Id: Ie41875192aafd7ffb36a07b8131b780f330e9aca
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 25 Nov 2021 13:38:48 +0000 (14:38 +0100)]
Bump netconf to 2.0.11
Adopt latest release.
Change-Id: I8781955f9c98a80d4b868a8ae6dc6de7ce3fbbc1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
marekzatko [Mon, 22 Nov 2021 09:05:41 +0000 (10:05 +0100)]
Remove unused service registry entry
TopologyReference service is registered into
service registry but never accessed, remove
the registration, making bgp-topology-provider
viable to non OSGi users.
JIRA: BGPCEP-980
Change-Id: I384ec2749e7f53873b1a0bf10f8d15316131b00a
Signed-off-by: marekzatko <Marek.Zatko@pantheon.tech>
Robert Varga [Tue, 23 Nov 2021 11:07:07 +0000 (12:07 +0100)]
Bump versions to 0.16.13-SNAPSHOT
This starts the next development iteration.
Change-Id: I482b4d90b9e07f1e2cd0dcb398afbee200ce6753
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 23 Nov 2021 11:06:15 +0000 (12:06 +0100)]
Bump netconf to 2.0.10
Pick up a regression fix.
Change-Id: If4ae1a645dd66053c1b0c770e9706cf76ad1231b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 19 Nov 2021 18:56:40 +0000 (19:56 +0100)]
Use DTCL to maintain LSPDB versions
Rather than issuing synchronous writes, use a DTCL to acquire
versions populated in the datastore. This eliminates a failure code
path and makes connections a tad faster.
JIRA: BGPCEP-989
Change-Id: I90c45dfac9a610f1d153eec1d95fbb50bad86800
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 21 Nov 2021 14:26:15 +0000 (15:26 +0100)]
Bump versions to 0.16.12-SNAPSHOT
This starts the next development iteration.
Change-Id: I78005a23985fed60956f413c67396d54c879a5b5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 21 Nov 2021 11:05:40 +0000 (12:05 +0100)]
Remove ClusterSingletonServiceRegistrationHelper
This class is no longer useful, remove it.
Change-Id: Id04af866ca273e306845e5efe26de80f6185c2fa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
marekzatko [Fri, 12 Nov 2021 10:29:45 +0000 (11:29 +0100)]
Fix closing of peers and rib
Migration to OSGi DS has the side effect that we get proper component
restarts based on their dependencies changing. This exposes the fact
we are not properly shutting down our singleton instances.
Since RibImpl has a captive RIBImpl instance, which undergoes lifecycle,
we have to synchronize all access to it. This is unfortunate, but
addressing this (as well as their naming) will be subject to a separate
effort.
Properly track peers, so we understand when we need to restart them.
While doing such restarts, wait for each peer to properly go down before
starting it up again.
While we are in the area, also improve BGPClusterSingletonService method
names so their intent is a tad more readable. The same goes for BgpPeer,
which is now a package-private abstract class to hide internal machinery
from the outside world.
Also ditch use of ClusterSingletonServiceRegistrationHelper -- it is a
remnant of a bygone era where ClusterSingletonServiceProvider was
incorrectly managing state -- that issue has been resolved a few years
ago. Cutting it out allows us to properly manage our lifecycle,
especially with regards to multiple registrations/instantiations.
JIRA: BGPCEP-988
Change-Id: Idb6748042ddb9a5765c3cea80f15ef319c13368b
Signed-off-by: marekzatko <Marek.Zatko@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 19 Nov 2021 15:05:48 +0000 (16:05 +0100)]
Remove SpeakerIdMapping
Tunnelling this simple map through PCEPTopologyConfiguration is
completely unnecessary as PCEPStatefulPeerProposal can easily have
it pushed via a DTCL and keep it close by.
JIRA: BGPCEP-983
Change-Id: I76abc4e94f3f69c4fab00b39dbaf0cfd6b11e055
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 17 Nov 2021 17:58:40 +0000 (18:58 +0100)]
Add PCEPTopoloy{Instance,Singleton,Tracker}
Rework topology instantiation to split the individual concerns.
PCEPTopologyTracker is responsible for finding out when a particular
topology becomes interesting to the underlying code (and when becomes
uninteresting).
For each such topology, a PCEPTopologySingleton is instantiated. It then
handles allocation of the underlying InstructionScheduler as well as
bootstrapping a cluster-wide singleton PCEPTopologyInstance to handle
that topology's configuration.
PCEPTopologyInstance tracks configuration datastore changes for a single
topology. For each update it constructs an immutable
PCEPTopologyConfiguration and forwards it to its PCEPTopologyProvider.
PCEPTopologyProvider handles updates of the configuration in the most
graceful manner possible, sequencing possible Netty Channel restart, but
otherwise just updaing the low-level componennts
JIRA: BGPCEP-893
Change-Id: I56c47b89ab87cf33a6be1016fa132b6c1aa98cbb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 19 Nov 2021 13:45:01 +0000 (14:45 +0100)]
Disconnect PCEPStatefulPeerProposal
PCEPStatefulPeerProposal is a proper implementation of a well-known
contract. Eliminate the nasty entanglement with ServerSessionManager.
JIRA: BGPCEP-983
Change-Id: Ie8cb5bb61396548a736b8d7fb616f99449971e12
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 19 Nov 2021 13:24:21 +0000 (14:24 +0100)]
Move SpeakerIdMapping to topology provider
Speaker identifiers are not something that should be visible on the
dispatcher level. Move them to pcep-topology-provider, as that is the
only component which cares about them.
JIRA: BGPCEP-983
Change-Id: Icfc7a572d79faa35904e45a6aadff73400d611db
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 17 Nov 2021 14:07:54 +0000 (15:07 +0100)]
Remove createStatefulPeerProposal()
This is a useless indirection in front of a constructor, remove it.
Change-Id: Idebba9b0b00b92a96283d6a5857fd8cf76f27489
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 17 Nov 2021 13:16:11 +0000 (14:16 +0100)]
Remove TopologySessionListenerFactory
We can cater to TopologyProgrammingTest's needs by spying on
ServerSessionManager, eliminating the need for the indirection created
via TopologySessionListenerFactory. This cleans up the tests quite a
bit.
JIRA: BGPCEP-983
Change-Id: I221db41388e80e779750c0192a41a3c52744f564
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 17 Nov 2021 12:00:00 +0000 (13:00 +0100)]
Cleanup TopologyProgrammingTest
We have a ton of mocks for something which is quite straightfoward,
cleanup the entire test.
Change-Id: I92fbeb1af5e17a7f9ca7b73380dd64ac088e7328
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 17 Nov 2021 11:47:15 +0000 (12:47 +0100)]
Mark PCEPStatefulPeerProposal for evolution
As it turns out, we have a number of datastore interactions outside
of PCEPTopologyDeployerImpl. Mark another a synchronous read() for
evolution, as we clearly need to rework the entire configuration
lifecycle.
JIRA: BGPCEP-893
Change-Id: Ibac9c98877d72b5fb3c44a46fd97b075f80433a0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 17 Nov 2021 11:22:41 +0000 (12:22 +0100)]
Move InstructionScheduler instantiation
There is fair amount of confusion about the relationship between
the scheduler and the singleton service. Move instantiation around
to make sure we match lifecycles.
JIRA: BGPCEP-983
Change-Id: Ibdefa44fabc7f8492d8df8f951674a5b87092bf2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 17 Nov 2021 10:32:03 +0000 (11:32 +0100)]
Initialize PCEPTopologyDeployerImpl in constructor
There is nothing that could possibly during instantiation, eliminate
the init() method, allowing us to focus on lifecycle.
JIRA: BGPCEP-983
Change-Id: I5844ed57bc81acaeaf3fdfe08d956da9321c27d5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 17 Nov 2021 10:21:30 +0000 (11:21 +0100)]
InstructionScheduler should be a Registration
Unregistration is implied as not being possible to fail in its only
implementation. Exposed that to users so they know they do not have
to worry about exceptions.
JIRA: BGPCEP-983
Change-Id: I3edb6bf26a732798536d536c42374f27343a0f35
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 17 Nov 2021 07:09:22 +0000 (08:09 +0100)]
Split out PCEPTopologyProviderSingleton
We are using a rather weird indirection to hide the singleton service.
Split it out into its own class to make this much easier to see, so that
we can perform a proper cleanup.
JIRA: BGPCEP-893
Change-Id: If12ba8f0ae8cf26c29f06fbc809e9da626cf4337
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 17 Nov 2021 06:39:28 +0000 (07:39 +0100)]
Cleanup PCEPTopologyProviderBean
This class is a bit of a mess, perform minor cleanups before going
further.
JIRA: BGPCEP-983
Change-Id: I96b53c7f3c9b9e9b80aaebc2aa746d40f0676491
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 16 Nov 2021 13:12:28 +0000 (14:12 +0100)]
Move SessionConfig acquisition to PCEPTopologyConfiguration
The configuration is always acquired from Topology, hence there is no
point in bothering users with it.
JIRA: BGPCEP-893
Change-Id: I773e5e827c85cab451dd1bcf123c7ef370fbbdb2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 16 Nov 2021 12:16:00 +0000 (13:16 +0100)]
KeyMapping is immutable
This core concept should be immutable and protect its byte[] from
modification. This allows us to reason about its lifecycle.
JIRA: BGPCEP-983
Change-Id: I63c6a377ff1b62f058fd2bfb4c7e0ff07f8a2516
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 16 Nov 2021 10:32:08 +0000 (11:32 +0100)]
SpeakerIdMapping is immutable
The intent here is to provide an immutable view of which address maps
to which ID. Do not subclass HashMap for that, as that just wrecks the
ability to reason about what is going on.
JIRA: BGPCEP-983
Change-Id: I8f41e22e5b3b64c7dc49a0219eeeeb673bd5c111
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 16 Nov 2021 09:43:14 +0000 (10:43 +0100)]
Cleanup ServerSessionManager a bit
Prior to untangling depndency mess, perform a minor self-contained
clean up of ServerSessionManager.
JIRA: BGPCEP-983
Change-Id: Ica3b8a1e298514e27c219c0b94adb2c84a9d7279
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 16 Nov 2021 09:33:13 +0000 (10:33 +0100)]
Cleanup PCEPTopologyProvider a bit
Prior to diving into untangling activation mess, perform self-contained
cleanups in PCEPTopologyProvider.
JIRA: BGPCEP-983
Change-Id: I456a852665dd28a64c71251a56aaf69c6b25f74b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 16 Nov 2021 08:08:40 +0000 (09:08 +0100)]
Convert PCEPTopologySessionListenerFactory to OSGi DS
This is an utterly simplistic component, break it out of blueprint.
JIRA: BGPCEP-960
Change-Id: I28f2af2b15eb5e7a6ab917220eb090060f46ae9d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 16 Nov 2021 08:01:44 +0000 (09:01 +0100)]
Ditch blueprint dependency from PCEPTopologyDeployerImpl
Indirecting through blueprint makes the logic hard to follow, inline
instantiation into PCEPTopologyDeployerImpl, making it clear what
the lifecycle is.
JIRA: BGPCEP-983
Change-Id: I4a33016184f003510bf9e58b3835341b00853870
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 16 Nov 2021 07:18:44 +0000 (08:18 +0100)]
Cleanup PCEPTopologyDeployerImpl
General cleanup of the logic flow in the class, documenting locking
rules.
Change-Id: Ife8eee1eb7190a2f8355c4a909ba2030cf1162ad
JIRA: BGPCEP-983
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 15 Nov 2021 20:25:33 +0000 (21:25 +0100)]
Bump versions 0.16.11-SNAPSHOT
This starts the next development iteration.
Change-Id: Ie40ae6bf4ec4f69bd76b0d8f6973b0a6e631451b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 15 Nov 2021 08:46:27 +0000 (09:46 +0100)]
Synchronize BgpPeer.close()
We may be racing with other callbacks, make sure we synchronize. Also
ensure we guard registrations properly.
Change-Id: If6b1e679b91bd2da21d82f0ac81f570c51284f10
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 15 Nov 2021 08:54:38 +0000 (09:54 +0100)]
Use a concurrent set for registrations
Rather than copying the entire list, use a concurrent set, which
offers better performance characteristics.
Change-Id: I097eb29fb9ef60d40e1ff457678a52ee3c1d1529
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 14 Nov 2021 17:53:46 +0000 (18:53 +0100)]
Bump to controller-4.0.7/netconf-2.0.9
Adopt latest fixes from upstream.
Change-Id: I25517867df2b0491bafc19172a517314a5e548fe
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 14 Nov 2021 17:52:04 +0000 (18:52 +0100)]
Remove superfluous version declaration
infrautils-testutils is advertized in infrautils-artifacts, drop
unneeded version/scope directives.
Change-Id: I5829014cda1abad4b99cc425741ea5affac8068f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
marekzatko [Wed, 10 Nov 2021 09:06:39 +0000 (10:06 +0100)]
Silence SCR errors
SCR does not like overloaded constructors containing arrays/iterables.
Remove them in favor of using lists. Also improve diagnostics in
OSGiRIBExtensionConsumerContext.
Change-Id: Iccee38dbafa1df4b7de59aedc759b0e765481b39
Signed-off-by: marekzatko <Marek.Zatko@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Olivier Dugeon [Tue, 9 Nov 2021 10:12:16 +0000 (11:12 +0100)]
Fix Graph deletion which cause NPE
Graph is deleted twice when stopping ODL which cause a NPE.
When ODL stops, AbstractTopologyBuilder() calls
LinkStateGraphBuilder.clearTopology() which call
ConnectedGraphImpl.clear(). Then ConnectedGraphServer() stops by
calling destroyOperationalGraphModel() which browse all stored graphs
and call again ConnectedGraphImpl.clear() which cause the NPE.
Fix removes graph from ConnectedGraphServer graphs Map in
clearGraph() method instead of deleteGraph() method.
JIRA: BGPCEP-977
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Change-Id: I55209e77ffa2c317ea85ca29cc794016f338c488
Robert Varga [Mon, 8 Nov 2021 06:04:33 +0000 (07:04 +0100)]
Bump versions to 0.16.10-SNAPSHOT
This starts the next development iteration.
Change-Id: I32581a67f3f157098fc4d7338132f3ea235ef114
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 7 Nov 2021 23:31:50 +0000 (00:31 +0100)]
Bump controller-4.0.6/netconf-2.0.8
Pick up latest updates.
Change-Id: I41143d2cd3f4b2ca7ac899e7bbd8ef54989bd7cc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 28 Oct 2021 17:37:19 +0000 (19:37 +0200)]
Bump versions to 0.16.9-SNAPSHOT
This starts the next development iteration.
Change-Id: Id31c5b9760758cbfa6b2f30dbfe115a367d12f71
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
marekzatko [Tue, 26 Oct 2021 10:57:03 +0000 (12:57 +0200)]
Fix BGP operational state
- Operational state of BGP was not present in datastore
due to missing registrations of RIB/Peers state providers.
(registration was deleted in
I3ff92bedc6f6c7b215fb7dba7ef0eb4df9f59072)
- Rename/cleanup some classes to be more transparent
JIRA: BGPCEP-958
Change-Id: I8217c008b044133fabea6258e824416497e011e6
Signed-off-by: marekzatko <Marek.Zatko@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Tomas Cere [Thu, 28 Oct 2021 10:12:03 +0000 (12:12 +0200)]
Rename distribution-karaf artifact to bgpcep-karaf
We need to be able to distinguish between different mri
distributions in csit scripts so rename this to something
less vague.
Change-Id: I904b0cd2d8e78902f2571a67d8c74b2a1be4583e
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
Tomas Cere [Thu, 28 Oct 2021 11:06:42 +0000 (13:06 +0200)]
Add infrautils features to bgpcep distribution
These are needed for csit.
Change-Id: I18386d41b8a447283f8f7b4570adc83ab9c33e94
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Tomas Cere [Thu, 28 Oct 2021 09:55:09 +0000 (11:55 +0200)]
Add controller-testing features to bgpcep distribution
We need these for testing, for now.
Change-Id: I2a565bd007972faa56c8bd5ba54d5c0e9999c59d
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
Tomas Cere [Thu, 28 Oct 2021 09:50:45 +0000 (11:50 +0200)]
Publish karaf distribution
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
Change-Id: I6351851bf37e65b0d564013e8f88cc3c294d6b69
Robert Varga [Wed, 27 Oct 2021 15:56:35 +0000 (17:56 +0200)]
Bump upstreams
Adopt:
- odlparent-9.0.8
- infrautils-2.0.8
- mdsal-8.0.7
- controller-4.0.5
- aaa-0.14.5
- netconf-2.0.7
Also re-enable dependency conversion checks.
Change-Id: I564a7eaa8ddc740e8fa2e8ebae2f94a4c8286197
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 26 Oct 2021 12:40:48 +0000 (14:40 +0200)]
Bump MRI upstreams
Adopt:
- odlparent-9.0.7
- yangtools-7.0.9
- mdsal-8.0.6
- controller-4.0.4
- infrautils-2.0.7
- aaa-0.14.4
- netconf-2.0.6
Change-Id: I714dd09cd02df0cf2dcf0cc1acc9f6c56dee8826
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Aman [Thu, 18 Jun 2020 18:57:13 +0000 (00:27 +0530)]
Added JSON and XML payloads tabs with working RFC 8040 URL
Modified docs/bgp/bgp-user-guide-bgp-application-peer.rst by adding JSON,XML examples with corresponding sphinx tabs
Change-Id: Ic8aaa0728a43936cd4c6e1ed590e01ba8f0fbf2c
Signed-off-by: Aman <170030039@iitdh.ac.in>
Robert Varga [Thu, 21 Oct 2021 13:29:02 +0000 (15:29 +0200)]
Recognized Extended Administrative Group TLV
Recognize TLV 1173 and print a milder message when we encounter it.
Also change 'invalid' to 'unrecognized' in the warning we do print
for things we do not recognize.
JIRA: BGPCEP-987
Change-Id: I3eb8f903bbf4842fc00549f2afdc6548f85be6e3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
marekzatko [Fri, 6 Aug 2021 11:44:44 +0000 (13:44 +0200)]
Migrate bgp-rib-impl to OSGi DS
Also split BgpDeployerImpl into:
- DefaultBgpDeployer
- OSGiBgpDeployer
JIRA: BGPCEP-958
Change-Id: I3ff92bedc6f6c7b215fb7dba7ef0eb4df9f59072
Signed-off-by: marekzatko <Marek.Zatko@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 21 Oct 2021 12:47:03 +0000 (14:47 +0200)]
Close read-only transaction in BgpDeployerImpl
We are not closing the transaction, which is rather inefficient. Fix
that through a simple try-with-resources.
Change-Id: I2cdfa734e83daef9a968031a289b6406eb031e4a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Kostiantyn Nosach [Wed, 13 Oct 2021 13:42:26 +0000 (16:42 +0300)]
Add source of incoming message to the log
Add source's socket address of incoming message to the log
JIRA: BGPCEP-984
Change-Id: I614c8406f770b7253706f860c5f240d7158263c6
Signed-off-by: Kostiantyn Nosach <kostiantyn.nosach@pantheon.tech>
Robert Varga [Tue, 28 Sep 2021 16:42:55 +0000 (18:42 +0200)]
Bump versions to 0.16.8-SNAPSHOT
This starts the next development iteration.
Change-Id: Ica208a1f8dfa8e2aaa279452679481c48d224167
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 28 Sep 2021 16:40:49 +0000 (18:40 +0200)]
Format PCEPErrors in UnknownObject.toString()
Rather than printing a binding DTO, use the well-known enum, which
has symbolic names.
JIRA: BGPCEP-981
Change-Id: I1e458c25cce265a5fb0d8499bcb5343af51c8bcd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 28 Sep 2021 16:20:16 +0000 (18:20 +0200)]
Fix PCCActivator registration
All providers need to provide ServiceLoader entries, make sure pccmock
does as well. Also remove commented-out code which used to do the
activation before.
JIRA: BGPCEP-981
Change-Id: I39a7ac95836a0e7269b33f9070d441884dfe806b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 28 Sep 2021 12:37:20 +0000 (14:37 +0200)]
Improve InitiatedPCInitiateMessageParser diagnostics
Unlike everywhere else we are just stomping over the object queue
here, leading to the cryptic CCE. Add a simple utility which turns
mismatches into properly-reported exceptions.
JIRA: BGPCEP-981
Change-Id: I0edcde9e285bab2926cdcc6f368db487e2b18bef
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 28 Sep 2021 12:36:15 +0000 (14:36 +0200)]
Improve UnknownObject observability
Add an UnknownObject.toString() method, so that UnknownObjects expose
their state for debugging purposes.
JIRA: BGPCEP-981
Change-Id: I414e5cbd6967811bb6174f6d289f88fba1d1db08
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 23 Sep 2021 14:59:02 +0000 (16:59 +0200)]
Do not reference opendaylight.org/xmlns/blueprint/v1.0.0
bgp-rib-impl is not using any Blueprint extensions, hence there is no
need to bind to this namespace.
JIRA: BGPCEP-958
Change-Id: If6c1a3ddaad47f6f8e0df4d0b8accbe21d3b625c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 23 Sep 2021 12:38:50 +0000 (14:38 +0200)]
Switch bgp-topology-provider to OSGi DS
The container we use here is extremely simple, migrate it to Declarative
Services.
JIRA: BGPCEP-959
Change-Id: Ib7f6f7f1925949f2b94ac8a4427c36dac838fa59
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 23 Sep 2021 11:48:37 +0000 (13:48 +0200)]
Bump versions to 0.16.7-SNAPSHOT
This starts the next development iteration.
Change-Id: I615061b5db91275b19a617e858c4fd04d2218631
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 23 Sep 2021 10:59:05 +0000 (12:59 +0200)]
Intern constant QNames
We really want to reuse global constants here, make sure that happens.
Change-Id: I7cc78f29fbfae873b3920b3684bde8c331a3d0af
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 23 Sep 2021 10:46:57 +0000 (12:46 +0200)]
Update withdraw()/advertize()
We have a simple boolean dispatch here, mark the boolean and use a
a simple return expression.
Change-Id: I5f45d160ef30d9b307a2e28578609dbeca27bd95
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 23 Sep 2021 10:00:00 +0000 (12:00 +0200)]
Use DistinctNodeContainer.getChildByArg()
The check implied by Optional.get() differs only by the exception thrown
-- and VerifyException is more appropriate. By same token we can
side-step the Optional and use childByArg() instead.
Change-Id: I317577ef635c621be360297a2b5b376edbbbd2d4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 23 Sep 2021 09:51:05 +0000 (11:51 +0200)]
Cleanup AdjRibOutListener a bit
We have a few single-caller methods which can be inline a tad
more efficiently.
Change-Id: I79d85e30a1deb05e0341b8b20ee6925182287dbf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 23 Sep 2021 09:38:43 +0000 (11:38 +0200)]
Prefix/PathId leaf names are constant
With the switch to DOM processing, these have become proper constants,
make sure we use their shared versions and make make a few methods
static as a result ot that.
Change-Id: I09115b77ea33bbd9f0427f923e5bfa7b21c1127d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 23 Sep 2021 09:41:10 +0000 (11:41 +0200)]
Revert "Flush session on AdjRibOutListener convergence"
This reverts commit
b2c79a62bd1d45a7b9ff83332386c30d3ea1b8d3, as it
seems to be causing problems in CSIT.
Change-Id: Id023247a624c4e0459e0573a9105986a96cb3351
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 21 Sep 2021 11:58:21 +0000 (13:58 +0200)]
Fix PCEP registry warning
We are logging getClass(), which is a bit confusing, as that is not the
key we are looking up. Make things obvious by logging
implementedInterface().
Change-Id: I80540b21554de1909a8e77930306b77ced3c9be3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 21 Sep 2021 11:52:38 +0000 (13:52 +0200)]
Bump versions to 0.16.6-SNAPSHOT
This starts the next development iteration.
Change-Id: If1238818b8e7cbd891c112f77d42bcdf4daa1fe8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 21 Sep 2021 10:24:03 +0000 (12:24 +0200)]
Fix test tool shading
We are shading a number of jars which provide services, which are
overlapping. Make sure we use ServicesResourceTransformer to merge these
entries.
Change-Id: Id5fab04d52575dc2e68526fe9c0b42dee6addef7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 21 Sep 2021 10:44:49 +0000 (12:44 +0200)]
Cleanup pcc-mock
Eliminate duplicate version specification. Also cleanup Mockito usage
and builder layout.
Change-Id: I579d39f1a101884be5e83a3ebd247d5a9cb951ec
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 21 Sep 2021 09:33:21 +0000 (11:33 +0200)]
Migrate bmp-impl tests
Do not use MockitoAnnotations.initmocks(), but rather
MockitoJUnitRunner, which has further benefits.
Change-Id: I85589b5264f62a07bbe87f13daf899fa3e947aed
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 21 Sep 2021 09:27:58 +0000 (11:27 +0200)]
Fix BmpDeployerImpl activation
Ie114a01b8ec1f87926f752b31cd7762a542e5db3 broke activation by failing to
annotate BmpDeployerImpl. This patch adds the appropriate annotations.
JIRA: BGPCEP-953
Change-Id: I8a59fc6977ddcd3e4861d02ff8df7f61820aced9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 19 Sep 2021 20:46:36 +0000 (22:46 +0200)]
Bump versions to 0.16.5-SNAPSHOT
This starts the next development iteration.
Change-Id: I81e654de999396cdb688307acdd4de25b0ee640d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Olivier Dugeon [Thu, 16 Sep 2021 15:07:04 +0000 (17:07 +0200)]
Fix PcRequest Message Parser in presence of LSP
Since RFC8231, PcRequest messages can include a LSP Object.
However, the insertObject() method of the PCEPRequestMessageParser class
does not handle LSP Objects.
Thus, when a PCC sends a PcRequest message with a LSP, ODL throws a
Java Exception about Unknown Object and sends a PcError with RP
Missing Object type.
- override initial PcRequest parser with a new StatefulPcRequest
message parser in the ietf-stateful package
- add support for LSP Objects when validating the PcRequest message
JIRA: BGPCEP-975
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Change-Id: I525cd933237bf3633da8c2ff854989b1f9968aa8
Robert Varga [Fri, 17 Sep 2021 11:25:18 +0000 (13:25 +0200)]
Bump upstreams
Adopt netconf-2.0.5 et al.
Change-Id: I54c1d4f581a4701def076b590c6215d181edecd0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Olivier Dugeon [Wed, 21 Jul 2021 16:52:23 +0000 (18:52 +0200)]
Fix parsing issue of PcReport Objects
StatefulPCReportMessageParser() class assumes that PCEP Objects in the
PcReport message are sent in a certain order. However, the order of
Object in the PcReport has changed between old draft version and final
RFC8231.
Indeed, as per RFC8231, the PcReport is composed of:
- [SRP], <LSP>, <path> where:
- <path> = <intended-path>
[<actual-attribute-list><actual-path>]
<intended-attribute-list>
- <intended-path> = ERO
- <actual-attribute-list> = BANDWIDTH, METRICS & <actual-path> = RRO
- <intended-attribute-list> = LSPA, BANDWIDTH, METRICS, IRO
While in old draft version, <intended-attribute-list> was placed just
right after the <intended-path>.
Thus, the state machine should be flexible enough to accommodate to
PCCs that continue to use old draft and PCCs that are compliant to the
RFC8231.
JIRA: BGPCEP-974
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Change-Id: I97c4e339d8fe66d5e6a10fbb7055c91941351eda
Robert Varga [Thu, 26 Aug 2021 08:36:56 +0000 (10:36 +0200)]
Bump versions to 0.16.4-SNAPSHOT
This starts the next development iteration.
Change-Id: I1c075a44da98ea9f0930c3736ce25de207a8d718
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 26 Aug 2021 07:38:59 +0000 (09:38 +0200)]
Bump upstream versions
Adopt netconf-2.0.3 et al. Unfortunately maven-dependency-plugin's logic
seems to have shifted, hence we disable that for now.
Change-Id: Id2e47947f544aab08ba32759199a907d87616a76
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 5 Aug 2021 14:44:43 +0000 (16:44 +0200)]
Bump versions to 0.16.3-SNAPSHOT
This starts the next development iteration.
Change-Id: Ie0b44359c2dbb9ac2cf0f215d9b0f0532f44a576
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 3 Aug 2021 11:59:43 +0000 (13:59 +0200)]
Bump upstream versions
adopt yangtools-7.0.4, mdsal-8.0.1, controller-4.0.1 and netconf-2.0.2.
Change-Id: I9c4264b4bf81a596365d65f412d3f6defec06ea8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Olivier Dugeon [Thu, 22 Jul 2021 12:35:18 +0000 (14:35 +0200)]
Improve Pcep Server
Some PCCs send a PcRequest message with Metrics and/or Bandwidth set
with value equal to 0 which result to a NO_PATH when calling path
computation. Indeed, it is impossible to determine a path with a metric
less or equal to 0.
This patch set skip Metrics and/or Bandwidth equal to 0 when building
the list ofi constraints for the path computation algorithm.
Change-Id: I3b343e67fc35f3393d4ed136aa4224082823f066
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 21 Jul 2021 20:24:11 +0000 (22:24 +0200)]
Redefine AbstractMessageParser object parsing
All AbstractMessageParser.validate() interact with the list of objects
by peeking at the first element and removing it when handled. While
the List contract supports it, there is no efficient implementation:
LinkedList is wasteful with memory (and its locality), ArrayList ends
up shifting arrays all the time.
Deal with this dilemma by recognizing we are dealing with a Queue, and
realize it through ArrayDeque. Let users deal with the logic rewrite,
which ends up being rather sensible: they are always looking only at the
first element anyway.
This also exposes a few places where we can run into runtime exceptions
-- mark those with FIXMEs for future improvement.
JIRA: BGPCEP-976
Change-Id: I882c7208dddd61f368499fd661e6d090752d144d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 22 Jul 2021 10:48:32 +0000 (12:48 +0200)]
Cleanup ReoptimizationBandwidth reference
We have this class imported, use short name to reference it.
Change-Id: Ie6aee18db947f7d806b43b69df8548323658ce26
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 21 Jul 2021 19:57:56 +0000 (21:57 +0200)]
Modernize AbstractMessageParser
- use List.of(item) instead of Collections.singletonList()
- reuse requireNonNull()'s return
- reformat builder usage
- use Optional.ifPresent() to propagate present values
Change-Id: I20022f19c80f2ca832f47914ac801fca124f568e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 21 Jul 2021 15:00:42 +0000 (17:00 +0200)]
Do not wipe data in ApplicationPeer
Unfortunately the wipe here is causing lifecycle issues, as there is a
pre-populated structure we rely on when things start coming in.
Change-Id: Ib58bf34e96e68e0db2fd3a8e580cade0d01099c0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 21 Jul 2021 08:28:48 +0000 (10:28 +0200)]
Optimize uint interactions in bgp-linkstate
Use writeUint{8,16,32} instead of manual conversions. Also protect
a hexDump() call. Also add obvious ByteBuf sizing hints.
Change-Id: I462b9d3d566efc2bee020df15ac08ed6c89dea8d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 21 Jul 2021 08:10:40 +0000 (10:10 +0200)]
Eliimnate use to Uint8.toJava() in rsvp-impl
We have ByteBufUtils.writeUint8(), which is a tad simpler, use that
instead of dual conversion.
Change-Id: Ibd58934382e9244a0428c68722ef59611801f94b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>