Gasparini, Claudio (cg479k) [Sun, 18 Oct 2020 09:45:47 +0000 (11:45 +0200)]
fix use of read-only transactions
in openconfig-rp-statement
- make sure transactions are used in a proper try-with-resources block
- use Optional.map() handling rather than the explicit isPresent()/get() combo
JIRA: BGPCEP-861
Signed-off-by: Gasparini, Claudio (cg479k) <claudio.gasparini@intl.att.com>
Change-Id: Icb46adc1e4d7be70a2151f26e25229baa64c87c9
Robert Varga [Sun, 6 Oct 2019 16:19:14 +0000 (18:19 +0200)]
Use ImmutableMap.toImmutableMap()
Rather than using a temporary map followed by ImmutableMap.copyOf(),
use ImmutableMap's collector.
Change-Id: Id4cad5f8027692b4beabfc9fc532ed4249b62aa6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 4 Jan 2021 09:28:05 +0000 (10:28 +0100)]
Be more defensive when checking nodes
We have a couple of failures, where we end up throwing a NPE
rather than an assertion. Clean them up.
Change-Id: Ib70a04fb398ba4ce789fcef9b08bb90f4b21c967
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 16:16:23 +0000 (17:16 +0100)]
Cleanup PathComputationImpl
Remove superfluous braces and be smarter about filling out the
address family.
Change-Id: Idbd89c098c95a095872f2b28e460ee0828f8c055
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 16:12:41 +0000 (17:12 +0100)]
Cleanup boolean literals
A number of places are using explicit literals where not needed,
as pointed out by sonar. Fix these sites.
Change-Id: I0ad6a690c66fb3b53bb4cd5c549399b665e7bc98
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 15:54:47 +0000 (16:54 +0100)]
Simplify matchAfiSafi
Sonar is pointing out a boolean literal, remove it by using a
smarter expression.
Change-Id: I68439a378e57122e484222e9dff08dcf7f5a9e9b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 3 Jan 2021 08:12:33 +0000 (09:12 +0100)]
Simplify AbstractStatementRegistryTest
All state here can use field initializers, hence remove mucking
with @Before.
Change-Id: I4b583dba9efb97caf578bb8b48885acc37ab56a9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 2 Jan 2021 14:09:17 +0000 (15:09 +0100)]
Cleanup AbstractStatementRegistryConsumerTest
Make sure we properly clean up the activator. While we're here,
also use read-only transactions for reads, close them as needed
and do not read more than we need to.
Also improve CheckUtil to report received messages when an
assertion fails -- and property assert errors.
Change-Id: Iee09d09df4b8fb50d19938074d7e65e55f67a6c3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 29 Dec 2020 12:47:55 +0000 (13:47 +0100)]
Migrate boolean getters
DataObject.isFoo() is now deprecated, use getFoo() instead. There
is also a bunch of drive-by updates to expressiveness, fixing various
(bogus) Eclipse warnings.
Tests relying on explicit order are documented as such and refactored
for clarity.
Change-Id: I40285b7a226a1b23c578badea78a80158325a561
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 30 Dec 2020 23:41:15 +0000 (00:41 +0100)]
Trim down AdvertizedRoute size
Use alignment shadow to store the additional boolean, as it Java <15
will not do that for us.
Change-Id: Ib2c9ec74614cca8d6edaf4d9ffae78b6698f6fff
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 30 Dec 2020 22:54:43 +0000 (23:54 +0100)]
Optimize isNonAddPathBestPathTheSame()
This is an Eclipse automatic logic optimization: in case of bestPath
being empty/null, we do not need to evaluate the second part of the
expression.
Change-Id: I96010fd93ca24f2ac1684e6d5117e59acfe2bae0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 30 Dec 2020 21:24:22 +0000 (22:24 +0100)]
Remove RIBSupport.emptyRoutesContainer()
This method is not called anywhere simply because this container
has no semantics in the datastore. Remove the method and all its
implementations.
This means that extensions do not load the associated Builder and
its implementation class. The second is more important, as it means
that the routes container will have only one implementation (from
mdsal-dom-codec) -- allowing JIT to devirtualuze based on CHA.
Change-Id: I643185ee9f6d035235e6364b5832b6b128443bd3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 26 Nov 2019 15:13:59 +0000 (16:13 +0100)]
Switch TerminationReason to use Uint8
As binding has switched to more expressive Uint types, embrace them
to allow smaller number of conversions.
Change-Id: I353750e1ed9fb8904b1f20be44f25d9c09592213
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 12 Oct 2020 18:23:51 +0000 (20:23 +0200)]
Use BindingMap.Builder to fix list-related warnings
BindingMap allows us to keep a list-like builder and result in a
Map -- thus arriving at what we want.
Change-Id: If65d10f801ad0e9e0d6e67c16e4b27911214136b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 30 Dec 2020 17:45:50 +0000 (18:45 +0100)]
Further algo-impl improvements
Cleanup invocations to .toString() as well as its implementations
and declarations.
Change-Id: Ic019776cc5021ddca673a61a83b131ee74b5fb78
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
guillaume.lambert [Fri, 9 Oct 2020 14:21:44 +0000 (16:21 +0200)]
precise OpenConfig models original license
add a NOTICE and an openconfig.LICENSE files in the bgp module
OpenConfig YANG models are published under the Apache License version 2
a.k.a. ALv2 but they do not precise it in their description.
Though Alv2 allows redistribution under other licenses, it includes a
redistribution clause (4) that instructs to give any other recipients
of the work or the derivative works a copy of the original license.
Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Change-Id: Id64f9473ebd43df0c851a0c78533ea593634fe60
Robert Varga [Tue, 29 Dec 2020 13:11:42 +0000 (14:11 +0100)]
Cleanup algo-impl classes
Make sure we are using simple initializers and diamond-notation,
plus the usual autosave actions.
Change-Id: Ieaaa0c7294ee95a64a04f510d95bfb47ed522b91
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 10 Dec 2020 12:44:48 +0000 (13:44 +0100)]
Bump MRI upstreams
Adopt following versions:
- odlparent-8.0.2
- infrautils-1.9.3
- yangtools-6.0.2
- mdsal-7.0.3
- controller-3.0.3
Change-Id: I26a2d923a4509ebf5817878a29e7776acff23d3a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 11 Nov 2020 14:01:10 +0000 (15:01 +0100)]
Refactor SimpleMvpnNlriRegistry
This is an internal implementation singleton, populate it statically,
cutting some complexity.
Change-Id: Ie4d30e68c009319226c6adb2a22dd359b5d85a05
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 11 Nov 2020 11:26:36 +0000 (12:26 +0100)]
Wire SimpleEsiTypeRegistry statically
This is an implementation detail, wire the registry statically.
We can optimize it afterwards.
Change-Id: I131986302bd85af80740fb70f3bef285d7f5d7c0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 11 Nov 2020 11:17:47 +0000 (12:17 +0100)]
Wire SimpleEvpnNlriRegistry statically
This registry is populated with invariants and is an implementation
detail. Move it to impl.nlri and make it self-populated on creation.
This will allow us to optimize it further.
Change-Id: Ic55a38eb735fd83ebf0c9712b493deb72f59bff2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 11 Nov 2020 11:06:20 +0000 (12:06 +0100)]
Do not populate SimpleNlriTypeRegistry from BGPActivator
SimpleNlriTypeRegistry has static contents, populate it upon
creation, so that we can treat it as an immutable entity.
Change-Id: I31fb42f5f5cf0167639e1feb4c620233c186df8b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 11 Nov 2020 10:55:25 +0000 (11:55 +0100)]
Populate SimpleBindingSubTlvsRegistry statically
This is a standalone dispatch registry. Wire it statically as a
first step before we optimize it.
Change-Id: I107fc20024b83dcc4b086fae5e0caa5f012e0ca0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 9 Nov 2020 23:08:21 +0000 (00:08 +0100)]
Migrate Ipv4NlriParserTest
Use MockitoJUnitRunner instead of explicit initMocks().
Change-Id: I11a6f94c7a8b6952056bf3116dd9b257c0f24091
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 10 Nov 2020 22:46:45 +0000 (23:46 +0100)]
Refactor SimpleRouteTargetConstrainNlriRegistry
This registry is utterly static, populated in various ways. Rather
than using Handlers, fine-tune it for the 4 cases we really care
about. We use an ImmutableMap for serializers and a switch() dispatch
to static methods for parsers.
Change-Id: Ibb6140fa5486fab3d5b2c09e1e270bf8e52bf944
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 10 Nov 2020 20:57:09 +0000 (21:57 +0100)]
Convert bgp-rib-spi to OSGi DS
This again is a plain whiteboard pattern, make the minimal changes
required to work with OSGi DS and other frameworks. Also makes
RIBExtensionProviderActivator implementations properly stateless,
taking out a chunk of static wiring out of various supports.
JIRA: BGPCEP-944
Change-Id: I5dfaf8562a3fc79ea4a8328e6b9db8b7d5537f86
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 10 Nov 2020 18:33:50 +0000 (19:33 +0100)]
Remove unused blueprint
This blueprint is not used anywhere and references non-existent
classes. Remove it to reduce confusion.
JIRA: BGPCEP-925
Change-Id: I9afa164bba6e9f75b9049b73e6d9d51b7b332280
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 10 Nov 2020 21:06:02 +0000 (22:06 +0100)]
Merge if statements
Sonar does not like this nested if, fix that.
Change-Id: I8550d8ce4a07f5c10e918af64baffe8e2171c4c5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 10 Nov 2020 17:43:25 +0000 (18:43 +0100)]
Fix OSGiBGPTableTypeRegistryConsumer whiteboard
We need to have a greedy policy here, otherwise we might miss some
extensions.
JIRA: BGPCEP-942
Change-Id: I33589f167be78d10139979dc62ab2a17e74e455a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 10 Nov 2020 17:41:21 +0000 (18:41 +0100)]
Fix OSGiRSVPExtensionConsumerContext whiteboard
We need to have a greedy policy here, otherwise we might miss some
extensions.
JIRA: BGPCEP-923
Change-Id: I5111e4710d196bc26cce03eac8ebc5238de68c22
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 10 Nov 2020 16:41:19 +0000 (17:41 +0100)]
Convert openconfig-rp-impl to OSGi DS
Add proper injection of dependencies and remove blueprint. With all
the previous work this is rather trivial.
JIRA: BGPCEP-943
Change-Id: Ia8a6e745e678c7359ec1fea073978d243146bee4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 10 Nov 2020 05:07:53 +0000 (06:07 +0100)]
Convert rsvp-spi to OSGi DS
The SPI wiring here is a bit contrived, this performs minimal
conversion, eliminating AbstractRSVPExtensionProviderActivator.
JIRA: BGPCEP-923
Change-Id: Iff29e1ed7ea3630315553f946286cf40ac0344c9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 10 Nov 2020 14:48:23 +0000 (15:48 +0100)]
Remove blueprint from rsvp-impl
rsvp-impl ends up being very simple in what it does, convert it
to OSGi DS.
JIRA: BGPCEP-924
Change-Id: I365e3daf26edc28ea842e59448144adbacbf4135
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 10 Nov 2020 02:18:51 +0000 (03:18 +0100)]
Convert bgp-flowspec to OSGi DS
As it turns out, FlowspecActivator is just a bunch of static wiring,
which we do not need to inject. Refactor SimpleFlowspecTypeRegistry
into a dedicated immutable FlowspecTypeRegistry, which has provably
static lifecycle and used only for immutable access.
This cuts a ton of complexity and fixes ServiceLoader injection,
plus makes DI conversion a breeze -- eliminating static state in
process of doing so.
JIRA: BGPCEP-941
Change-Id: I0ad4fef346131b44f7f5bca2a637826e821146d7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 9 Nov 2020 20:37:37 +0000 (21:37 +0100)]
Refactor BGPTableTypeRegistryProviderActivator
Rather than wiring through static reference extension in blueprint
and keeping stateful singletons, use a proper whiteboard injection
pattern for OSGi, ServiceLoader and Singleton worlds.
This makes bgp-openconfig-spi to completely wire natively in those
environments.
JIRA: BGPCEP-942
Change-Id: I325ab8b3cf09bc71cad217e6c1f26c6c69bc0cc1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 9 Nov 2020 11:39:10 +0000 (12:39 +0100)]
Convert BGP extensions to OSGi DS
Most of these are straightforward ports.
bgp-linkstate will need a follow-up to deal with BGPActivator.
bgp-flowspace will need a follow-up to deal with BGP/RIBActivator.
JIRA: BGPCEP-941
Change-Id: Ib6ebbb41b3cd1095e1809e91a46fee38ebaf722f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 10 Nov 2020 00:31:48 +0000 (01:31 +0100)]
Lower binding-spec-util usage
We do not use reflections in main artifact in most cases, hence
we should not be pulling it as a dependency.
Change-Id: If69d85a3a5a39c5049950df03b67482341c171ac
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 9 Nov 2020 23:54:35 +0000 (00:54 +0100)]
Remove use of BindingReflections.getAugmentations()
Augmentations are directly obtainable, simplify our code.
Change-Id: Ib59d695c2857f42f81a071799f172390d1782027
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 9 Nov 2020 23:52:12 +0000 (00:52 +0100)]
Migrate flowspec tests to MockitoJUnitRunner
Do not use initMocks() directly.
Change-Id: Idabdaaf577037fe537b1f2ff1d02176fe3a6d665
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 8 Nov 2020 16:06:56 +0000 (17:06 +0100)]
Eliminate blueprint from bgp-openconfig-rp-spi
The only specialty we are using is the reference list, hence we can
convert to a properly-injected component.
JIRA: BGPCEP-939
Change-Id: Ic9d9e3fa6fb8641bbc9b74e58bbe8338e7491e36
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 8 Nov 2020 22:34:57 +0000 (23:34 +0100)]
Convert bgp-route-target to OSGi DS
This is really a simplistic component, convert it to use OSGi DS
and other frameworks.
JIRA: BGPCEP-940
Change-Id: I0781ce8bc40c1245292e950be939a17d2aa3d5e7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 8 Nov 2020 15:35:17 +0000 (16:35 +0100)]
Remove blueprint from bgp-openconfig-rp-statement
This is a rather straightforward conversion, also add @Singleton
as appropriate.
JIRA: BGPCEP-938
Change-Id: Ibc5d4af8cf88a05f615a7c50a9a8c115b8c2e058
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 8 Nov 2020 12:28:38 +0000 (13:28 +0100)]
Remove hand-written ServiceLoader services
@MetaInfServices provides automatic generation of these files, hence
use it to make bindings to code more explicit.
JIRA: BGPCEP-937
Change-Id: I9a4a5627cddfdd7898b83414404d1cae069795ed
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 4 Nov 2020 16:22:48 +0000 (17:22 +0100)]
Convert bgp-parser-impl to OSGi DS
The blueprint here is very simplistic, just convert it to an
immediate component.
JIRA: BGPCEP-936
Change-Id: I1a4f8d9b8637e5f5dcc18596b44c017d56eb5af2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 4 Nov 2020 16:26:52 +0000 (17:26 +0100)]
Remove blueprint from pcep-base-parser
This is very simplistic component, convert it to an immediate OSGi
DS component.
JIRA: BGPCEP-935
Change-Id: I793716f7404f63b3fa129877b59ebaab219ad6ee
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 3 Nov 2020 20:41:58 +0000 (21:41 +0100)]
Convert data-change-counter to OSGi DS
This is very simple change, convert to OSGi DS and javax.inject.
JIRA: BGPCEP-930
Change-Id: I8a00dc85185c662720db1929aec6d3849f1d13d9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 27 Oct 2020 22:37:40 +0000 (23:37 +0100)]
Update infrautils to 1.9.1
This upgrade was missed last time around, catch up.
Change-Id: I8bea29bd61215559a5256a8d9612d684dd76019a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 17 Oct 2020 10:59:25 +0000 (12:59 +0200)]
Improve config loader performance
Global context does not change often and hence to is appropriate
to find the root schema node we need for parsing when that happens
and cache it.
This also means we can perform upfront checks and neatly ignore
any registrations which are not satisfied by the model context.
Furthermore OSGiConfigLoader is updated to take mode updates without
restarting, improving overall experience.
Since we are in the area, we also harden XML parsing through use
of UntrustedXML.
Change-Id: If9b17686e648294a81249ae1b40684f1448380fb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 17 Oct 2020 09:23:38 +0000 (11:23 +0200)]
Switch ConfigFileProcessor to use SchemaNodeIdentifier.Absolute
SchemaPath will be going away and it is a quite bad concept, switch
to its replacement, which is properly founded in RFC7950.
JIRA: BGPCEP-932
Change-Id: I6b4d843130384f50aeeedf866172071566b5ade2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 17 Oct 2020 08:13:43 +0000 (10:13 +0200)]
Switch ConfigLoader to mdsal-binding-runtime
There is no need for the config loader to require Binding/DOM
translation services, hence it is enough when it bindings to
mdsal-binding-runtime instead of mdsal-binding-dom-adapter.
This allows speedier start of services with smaller overall
footprint.
JIRA: BGPCEP-933
Change-Id: I8aa9569591565dd440ac528bccc413b5aea7e358
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 17 Oct 2020 07:47:47 +0000 (09:47 +0200)]
Switch ConfigFileProcessors to DOM API
ConfigFileProcessors do not need to interact with Binding API, speed
them up and simplify them by using DOM APIs directly.
JIRA: BGPCEP-933
Change-Id: If20c7f64dd4c708cd69a5c8c3ec6d4358b5b405e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 17 Oct 2020 05:34:34 +0000 (07:34 +0200)]
Ensure WatchService is cleaned speedily
Rather than registering a shutdown hook, we prefer to use a cleaner.
While this allocates a thread, it is not a privileged action and we
kill the service as soon as we are GC'd.
Change-Id: I04e5fa2cba57f98a20ee038eb1d0be6acc21b9fa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 17 Oct 2020 04:11:13 +0000 (06:11 +0200)]
Remove blueprint from topology-config-loader
This is a straight conversion from blueprint to OSGi DS/inject.
JIRA: BGPCEP-929
Change-Id: Ie098c51808c8a4aa11357605f3f802894152f6f3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 17 Oct 2020 04:03:03 +0000 (06:03 +0200)]
Remove blueprint from protocols-config-loader
This is a straight conversion from blueprint to OSGi DS/inject.
JIRA: BGPCEP-927
Change-Id: I3c0c122a21229d481a4cae7ced582308f033d82a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 17 Oct 2020 03:34:50 +0000 (05:34 +0200)]
Remove blueprint from bmp-monitors-config-loader
This is a straight conversion from blueprint to OSGi DS/inject.
JIRA: BGPCEP-926
Change-Id: Ifb83fa309f148a1b72c21561df3410238c637026
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 26 Oct 2020 12:16:57 +0000 (13:16 +0100)]
Fix intermittent failures in LlGracefulCapabilityHandlerTest
The test is expecting ordering to be completely kept, hence we need
to use an alternative BindingMap.
Change-Id: Ic45bef9f7cf5678ebdb107443f8d016cfe17f744
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 17 Oct 2020 03:12:01 +0000 (05:12 +0200)]
Remove blueprint from routing-policy-config-loader
This is a straight conversion from blueprint to OSGi DS/inject. The
patch is a bit larger as it introduces some basic infrastructure
for reuse across implementations.
JIRA: BGPCEP-928
Change-Id: Ica5a317cb6f44cf1baec8a9802af85c3b77e1c43
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 13 May 2020 20:20:30 +0000 (22:20 +0200)]
Convert config-loader to OSGi DS
The primary task here is getting rid of explicit blueprint while
retaining autowiring functionality.
This forces us to decompose ConfigLoaderImpl into multiple classes,
which ends up being a boon for tests, as they can completely forgo
threading.
First of all FileWatcherImpl was renamed to DefaultFileWatcher and
is a completely separate component, with proper lifecycle without
edge case failures.
Next we split out AbstractConfigLoader with all the loading logic
and AbstractWatchingConfigLoader with the addition of having notion
of a FileWatcher. This allows us to use synchronous loading in
test harness, while also providing the ability to have async
processing.
We then instantiate SimpleConfigLoader and OSGiConfigLoader to
handle the cases of static vs. dynamic codecs, as well as
TestConfigLoader to handle unit testing tasks.
We can therefore drop dependency on odl-controller-blueprint, in
favor of depending on YANG tools codecs instead.
JIRA: BGPCEP-905
Change-Id: I5549bdfeb372b2f9cb15a1690c399401432f4702
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
guillaume.lambert [Mon, 19 Oct 2020 14:43:08 +0000 (16:43 +0200)]
rename cfg-ldr classes before OSGi DS conversion
this will ease the review of the OSGi DS conversion to come
https://wiki.openstack.org/wiki/GitCommitMessages#Structural_split_of_changes
Change-Id: I8a4419d45831f11082623ca696c8b92374643e12
Co-authored-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Robert Varga [Mon, 12 Oct 2020 18:22:49 +0000 (20:22 +0200)]
Fix List-related warnings in bgp-rib-impl
Use BindingMap to fix warnings around deprecated methods.
Change-Id: I9ee6836feaa3db10c287b36d52e9b095e7239638
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
guillaume.lambert [Thu, 22 Oct 2020 12:39:24 +0000 (14:39 +0200)]
remove attributes odl:type default from blueprints
Their use is discouraged since Aluminium.
https://docs.opendaylight.org/en/stable-aluminium/release-notes/upgrade-process.html#use-of-odl-type-in-blueprint-is-discouraged
Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Change-Id: I3bb5832b439202d9539338afb71433d34573b74a
guillaume.lambert [Thu, 22 Oct 2020 06:38:45 +0000 (08:38 +0200)]
remove some useless empty lines
this will ease the review of the OSGi DS conversion to come
https://wiki.openstack.org/wiki/GitCommitMessages#Structural_split_of_changes
Change-Id: I01aad5992f174e82dd5ea31eed69f33a4cc81167
Co-authored-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
guillaume.lambert [Thu, 22 Oct 2020 06:57:56 +0000 (08:57 +0200)]
update wiki URL in poms
Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Change-Id: I1d83a481ff90fe9b1eb30c338bf1704852c4afbc
Robert Varga [Mon, 12 Oct 2020 18:21:55 +0000 (20:21 +0200)]
Clean up List-related warnings in bgp-parser-impl tests
Use BindingMap to fix deprecation warnings.
Change-Id: Iec06649f2040f99c1a4653c5699f83463cfd9559
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
guillaume.lambert [Mon, 19 Oct 2020 14:05:17 +0000 (16:05 +0200)]
refine path declaration in config-loader FileWatch
Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Change-Id: I2116c38b0b2a03a24c7492dc2662e6a51e9e2f48
Robert Varga [Mon, 19 Oct 2020 19:27:31 +0000 (21:27 +0200)]
Bump to mdsal-7.0.1/controller-3.0.1
Pick up mdsal fixes and improvements.
Change-Id: I464319a4b2c621100db884e9272544c822585ff6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 7 Oct 2020 15:30:44 +0000 (17:30 +0200)]
Bump upstreams for Silicon
Adopt the following upstream versions:
- odlparent-8.0.0
- yangtools-6.0.0
- mdsal-7.0.0
- controller-3.0.0-SNAPSHOT
Since MD-SAL has removed some legacy models we are using, we are
re-introducing them here.
Change-Id: Ifb1724fb80fe313b78992a5955941f9f93d1d8cc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 28 Sep 2020 10:24:41 +0000 (12:24 +0200)]
Fix uint usage warnings
This is another pass through warnings, fixing simple offenses.
Change-Id: I0ea5569f3284cceed500500c4aee51ad8153d6c6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 22 Sep 2020 15:51:48 +0000 (17:51 +0200)]
Bump MRI projects
This patch adopts:
- odlparent-7.0.6
- infrautils-1.8.1
- yangtools-5.0.6
- mdsal-6.0.5
- controller-2.0.4
Change-Id: I729dd3888015355c10506ef83003fa27eb37aed6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Aman [Mon, 22 Jun 2020 10:14:16 +0000 (15:44 +0530)]
Added JSON and XML payloads tabs with RFC 8040 URL
Modified docs/bgp/bgp-user-guide-long-lived-graceful-restart-capability.rst by adding JSON,XML examples with corresponding sphinx tabs
Change-Id: I277e40fb90b1140d9c59ff492024db0361845688
Signed-off-by: Aman <170030039@iitdh.ac.in>
Aman [Sat, 20 Jun 2020 19:54:45 +0000 (01:24 +0530)]
Added JSON and XML payloads tabs with working RFC 8040 URL
Modified docs/bgp/bgp-user-guide-ip-unicast-family.rst by adding JSON,XML examples with corresponding sphinx tabs
Change-Id: I277e40fb90b1140d9c59ff492024db0361845525
Signed-off-by: Aman <170030039@iitdh.ac.in>
Aman [Mon, 22 Jun 2020 16:53:54 +0000 (22:23 +0530)]
Added JSON and XML payloads tabs with RFC 8040 URL
Modified docs/bgp/bgp-user-guide-route-refresh-capability.rst by adding JSON,XML examples with corresponding sphinx tabs
Change-Id: I277e40fb90b1140d9c59ff492024db0361836718
Signed-off-by: Aman <170030039@iitdh.ac.in>
Aman [Mon, 22 Jun 2020 09:42:19 +0000 (15:12 +0530)]
Added JSON and XML payloads tabs with RFC 8040 URL
Modified docs/bgp/bgp-user-guide-linkstate-family.rst by adding JSON,XML examples with corresponding sphinx tab
Change-Id: I277e40fb90b1140d9c59ff492024db0361845468
Signed-off-by: Aman <170030039@iitdh.ac.in>
aman1403 [Thu, 27 Aug 2020 18:12:19 +0000 (23:42 +0530)]
Add json examples for bgp-user-guide-pmsi-attribute.rst
Change-Id: I76887817ca2f99ca510d8311910887110ce0a31c
Signed-off-by: aman1403 <170030039@iitdh.ac.in>
Aman [Sat, 20 Jun 2020 20:11:29 +0000 (01:41 +0530)]
Added JSON and XML payloads tabs with RFC 8040 URL
Modified docs/bgp/bgp-user-guide-l3vpn-family.rst by adding JSON,XML examples with corresponding sphinx tabs
Change-Id: I277e40fb90b1140d9c59ff492024db0361845765
Signed-off-by: Aman <170030039@iitdh.ac.in>
Aman [Mon, 22 Jun 2020 09:20:52 +0000 (14:50 +0530)]
Added JSON and XML payloads tabs with working RFC 8040 URL
Modified docs/bgp/bgp-user-guide-labeled-family.rst by adding JSON,XML examples with corresponding sphinx tabs
Change-Id: I277e40fb90b1140d9c59ff492024db0361845985
Signed-off-by: Aman <170030039@iitdh.ac.in>
Aman [Sat, 20 Jun 2020 19:07:34 +0000 (00:37 +0530)]
Added JSON and XML payloads tabs with RFC 8040 URL
Modified docs/bgp/bgp-user-guide-graceful-restart-capability.rst by adding JSON,XML examples with corresponding sphinx tabs
Change-Id: I277e40fb90b1140d9c59ff492024db0361845718
Signed-off-by: Aman <170030039@iitdh.ac.in>
Aman [Mon, 22 Jun 2020 10:24:11 +0000 (15:54 +0530)]
Added JSON and XML payloads tabs with RFC 8040 URL
Modified docs/bgp/bgp-user-guide-mvpn-family.rst by adding JSON,XML examples with corresponding sphinx tabs
Change-Id: I277e40fb90b1140d9c59ff492024db0361845432
Signed-off-by: Aman <170030039@iitdh.ac.in>
Aman [Tue, 16 Jun 2020 07:31:18 +0000 (13:01 +0530)]
Added JSON and XML payloads tabs with working RFC 8040 Url
Modified docs/bgp/bgp-user-guide-additional-path-capability.rst by adding JSON,XML examples with corresponding sphinx tabs
Change-Id: Ic8aaa0728a43936cd4c6e1ed590e01ba8f0fbf6d
Signed-off-by: Aman <170030039@iitdh.ac.in>
Aman [Sat, 20 Jun 2020 14:16:47 +0000 (19:46 +0530)]
Added JSON and XML payloads tabs with working RFC 8040 URL
Modified docs/pcep/pcep-user-guide-bgp-server.rst by adding JSON,XML examples with corresponding sphinx tabs
Change-Id: Iee56ba474335003e0091e8a2c85c68dbcd18d7f0
Signed-off-by: Aman <170030039@iitdh.ac.in>
Aman [Sat, 20 Jun 2020 18:00:53 +0000 (23:30 +0530)]
Added JSON and XML payloads tabs with RFC 8040 URL
Modified docs/bgp/bgp-user-guide-flowspec-family.rst by adding JSON,XML examples with corresponding sphinx tabs
Change-Id: Ic8aaa0728a43936cd4c6e1ed590e01ba8f0fbf5b
Signed-off-by: Aman <170030039@iitdh.ac.in>
Aman [Mon, 22 Jun 2020 17:20:00 +0000 (22:50 +0530)]
Added JSON and XML payloads tabs with RFC 8040 URL
Modified docs/bgp/bgp-user-guide-route-target-family.rst by adding JSON,XML examples with corresponding sphinx tabs
Change-Id: I277e40fb90b1140d9c59ff492024db0361485718
Signed-off-by: Aman <170030039@iitdh.ac.in>
Aman [Sat, 20 Jun 2020 19:30:13 +0000 (01:00 +0530)]
Added JSON and XML payloads tabs with RFC 8040 URL
Modified docs/pcep/pcep-user-guide-evpn-family.rst by adding JSON,XML examples with corresponding sphinx tabs
Change-Id: I277e40fb90b1140d9c59ff492024db0361845624
Signed-off-by: Aman <170030039@iitdh.ac.in>
Aman [Thu, 18 Jun 2020 19:10:41 +0000 (00:40 +0530)]
Added JSON and XML payloads tabs with working RFC 8040 URL
Modified docs/bgp/bgp-user-guide-bgp-peering.rst by adding JSON,XML examples with corresponding sphinx tabs
Change-Id: Ic8aaa0728a43936cd4c6e1ed590e01ba8f0fbf3f
Signed-off-by: Aman <170030039@iitdh.ac.in>
Aman [Mon, 22 Jun 2020 12:40:03 +0000 (18:10 +0530)]
Added JSON and XML payloads tabs with RFC 8040 URL
Modified docs/bgp/bgp-user-guide-operational.rst by adding JSON,XML examples with corresponding sphinx tabs
Change-Id: I277e40fb90b1140d9c59ff492024db0361845915
Signed-off-by: Aman <170030039@iitdh.ac.in>
Aman [Mon, 22 Jun 2020 19:08:49 +0000 (00:38 +0530)]
Added JSON and XML payloads tabs with RFC 8040 URL
Modified docs/bgp/bgp-user-guide-topology-provider.rst by adding JSON,XML examples with corresponding sphinx tabs
Change-Id: I277e40fb90b1140d9c59ff492024db0361845689
Signed-off-by: Aman <170030039@iitdh.ac.in>
Aman [Mon, 22 Jun 2020 18:06:58 +0000 (23:36 +0530)]
Added JSON and XML payloads tabs with RFC 8040 URL
Modified docs/bgp/bgp-user-guide-test-tools.rst by adding JSON,XML examples with corresponding sphinx tabs
Change-Id: I277e40fb90b1140d9c59ff492024db0361845599
Signed-off-by: Aman <170030039@iitdh.ac.in>
Aman [Mon, 22 Jun 2020 17:35:48 +0000 (23:05 +0530)]
Added JSON and XML payloads tabs with RFC 8040 URL
Modified docs/bgp/bgp-user-guide-running-bgp.rst by adding JSON,XML examples with corresponding sphinx tabs
Change-Id: I277e40fb90b1140d9c59ff492154db0361845718
Signed-off-by: Aman <170030039@iitdh.ac.in>
Aman [Mon, 22 Jun 2020 14:49:40 +0000 (20:19 +0530)]
Added JSON and XML payloads tabs with RFC 8040 URL
Modified docs/bgp/bgp-user-guide-rib-config-policies.rst by adding JSON,XML examples with corresponding sphinx tabs
Change-Id: I277e40fb90b1140d9c59ff492024db0361846525
Signed-off-by: Aman <170030039@iitdh.ac.in>
Aman [Mon, 22 Jun 2020 13:43:13 +0000 (19:13 +0530)]
Added JSON and XML payloads tabs with RFC 8040 URL
Modified docs/bgp/bgp-user-guide-revised-error-handling.rst by adding JSON,XML examples with corresponding sphinx tabs
Change-Id: I277e40fb90b1140d9c59ff492024db0361845152
Signed-off-by: Aman <170030039@iitdh.ac.in>
Aman [Mon, 22 Jun 2020 13:35:03 +0000 (19:05 +0530)]
Added JSON and XML payloads tabs with RFC 8040 URL
Modified docs/bgp/bgp-user-guide-protocol-configurtion.rst by adding JSON,XML examples with corresponding sphinx tabs
Change-Id: I277e40fb90b1140d9c59ff492024db0361845218
Signed-off-by: Aman <170030039@iitdh.ac.in>
Thanh Ha [Tue, 11 Aug 2020 19:28:26 +0000 (15:28 -0400)]
Bump conf.yaml versions to Silicon
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Change-Id: I76887817ca2f99ca510d8311910887110ce0a29b
Ajay Lele [Tue, 26 May 2020 18:09:14 +0000 (11:09 -0700)]
Prevent deadlock in PCEP threads by using consistent locking order
Two threads take lock on ServerSessionManager and
Stateful07TopologySessionListener instances in opposite
order causing deadlock. Patch fixes this by ensuring same
order is followed while acquiring the locks (ServerSessionManager
followed by Stateful07TopologySessionListener).
JIRA: BGPCEP-901
Signed-off-by: Ajay Lele <ajayslele@gmail.com>
Change-Id: I89f64be3ef69e8bc72504baf4d6a0bb0a6e8e581
Vikram Singh Kalakoti [Fri, 29 May 2020 16:10:50 +0000 (21:40 +0530)]
Propagate only negotiated afi/safi routes to adj-rib-out
When BGP session comes, empty entries for negotiated afi/safi are
created in peer's adj-rib-out. If routes belonging to afi/safi
that were not negotiated for the peer are present in loc-rib,
those entries are being propagated to the peer, resulting in
ModifiedNodeDoesNotExistException. Patch prevents this by allowing
routes for only the negotiated afi/safi to be propagated from
loc-rib to peer's adj-rib-out.
If routes are written to non-existent afi/safi table in adj-rib-out,
it results in transaction chain failure which leads to a scenario
where multiple threads block to get a lock on BGPPeer but the
thread handling transaction failure is waiting for the submitted
futures to exit. Patch fixes this scenario by preventing wait on
the submtited futures when handling transaction failures.
JIRA: BGPCEP-906
Change-Id: I836d1828c3d552e4d62be0688040490ec3f36912
Signed-off-by: Vikram Singh Kalakoti <vikramskalakoti@gmail.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Ajay Lele [Tue, 26 May 2020 17:59:57 +0000 (10:59 -0700)]
Prevent deadlock between PCEP session mgmt and stats thread
Deadlock happens between 2 threads trying to acquire lock on
Stateful07TopologySessionListener and TopologyStatsProviderImpl
instance in reverse order. In AbstractTopologySessionListener#getDelegatedLspsCount(),
locking was added to avoid ConcurrentModificationException for
lspData map. Patch achieves same result without having to acquire
the lock by using thread-safe ConcurrentHashMap for lspData.
JIRA: BGPCEP-901
Change-Id: I74b5070c2e1c8075f5df9504d6eef4de541597fd
Signed-off-by: Ajay Lele <ajayslele@gmail.com>
Signed-off-by: Deepthi V V <dvv@luminanetworks.com>
Thanh Ha [Wed, 5 Aug 2020 21:02:26 +0000 (17:02 -0400)]
Bump versions by x.(y+1).z for next dev cycle
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Change-Id: If3412c16a6629834297c7789443be08421f8fda8
Vikram Singh Kalakoti [Wed, 1 Jul 2020 19:04:08 +0000 (00:34 +0530)]
Non ipv4 advertising peer causes BGP session flaps
During the session establishment phase, if a peer
doesn't advertise ipv4-unicast, controller
automatically adds ipv4-unicast as supported
family for the session to support classic BGP
sessions.
Currently, we are adding Ipv4 family in the
BGPPeer but not updating AdjRibInWriter which
causes the BGP session to not recover from
session flap. Patch fixes this issue by adding
ipv4 support before updating AdjRibInWriter.
JIRA: BGPCEP-910
Change-Id: I669104a17d603e0494f9ac7090a8fd671f67a3a5
Signed-off-by: Vikram Singh Kalakoti <vikramskalakoti@gmail.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Olivier Dugeon [Thu, 23 Apr 2020 13:34:53 +0000 (15:34 +0200)]
Remove GraphModel Config init. in datastore
Both Configuration and Operation GraphModels are initialized within
the same single transaction in ConnnectedGraphServer class. Remove
unnecessary initialization of GraphModel Configuration.
JIRA: BGPCEP-904
Change-Id: If5988b916a23d85c9e0b8a8c9c378bd5e6931fba
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Olivier Dugeon [Tue, 21 Jul 2020 13:48:15 +0000 (15:48 +0200)]
Update to RFC 8664 (PCEP Segment Routing)
As per RFC 8664, this commit introduces following changes:
- Add Flags N & X to SR PCE Capability
- Add Ipv6 Local Nai Type and rename SID Type to NAI Type (NT) in
odl-pcep-segment-routing-yang
- Change IANA type (=36) for SR-ERO and SR-RRO to be the default value in
pcep-segment-routing-app-config.yang instead of Legacy Type values
- Update yang model revision
- Turn IANA Type as the defaut for Segement Routing parser registration
- Mark deprecated all IANA Type configuration (this will be removed in next
release after Aluminium)
- Add extra verifications to AbstractSrSubobjectParser Java Class and support
for Ipv6Local NAI
- Update accordingly Segment Routing Junit Tests
JIRA: BGPCEP-882
Change-Id: Ic6dc01329af87a317154f742d7e698cc9d752df0
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Aman [Sun, 5 Jul 2020 10:20:59 +0000 (15:50 +0530)]
Added JSON and XML payloads tabs with RFC 8040 URL
Modified docs/pcep/pcep-user-guide-running-pcep.rst by adding JSON,XML examples with corresponding sphinx tab
Change-Id: I63c308e723b7dbc79571128a405c2402b4cbe370
Signed-off-by: Aman <170030039@iitdh.ac.in>