jenkins-releng [Mon, 31 Oct 2022 10:31:52 +0000 (10:31 +0000)]
Release netconf
Robert Varga [Tue, 18 Oct 2022 21:07:52 +0000 (23:07 +0200)]
Replace replaceHelloMessageOutboundHandler()
This is a utility method to manipulate pipeline, with a single caller.
Inline the method so the manipulations are clearly visible.
Change-Id: I7aafce20947559753f213cfcb686a14e74f6bb7c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
c8947a87b23c3171d74d9195b73a6e81c8ce71b3)
(cherry picked from commit
335dbc09e5a34bbb47cf44d7b5af270dc42e3f79)
Robert Varga [Tue, 18 Oct 2022 21:33:28 +0000 (23:33 +0200)]
Simplify error checking in writeWithPendingDetection()
We are only interested in seeing the failure, as we are guarateed to see
a completed future.
JIRA: NETCONF-905
Change-Id: I3fa0236592ff785be49e0cb69a20d7c08b9432e9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
7f08b1035520fcc0f60ab6c6ab6536366510a45f)
(cherry picked from commit
4062aa60862fc4bb81edc563fa0b6bc3cc41d3f3)
Robert Varga [Tue, 18 Oct 2022 23:45:41 +0000 (01:45 +0200)]
Ignore incoming messages in State.FAILED
Once we transition to FAILED state, we should not process any other
messages, as we just waiting for close() to complete.
JIRA: NETCONF-905
Change-Id: Id7d7f657e50bb7c7ad25c1445fa0b69e1e57cdb9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
06c94657833f0ed7110a40af31af20f869cca19d)
(cherry picked from commit
f0cd16a3b950448b75a2a50820a7cba352ecbd0f)
Robert Varga [Tue, 18 Oct 2022 19:37:29 +0000 (21:37 +0200)]
Check for early message send failures
The transition to start session negotiation does not truly start if we
fail to send the hello message. Check for this condition before
manipulating any other channel state.
JIRA: NETCONF-905
Change-Id: I024a39abc8c6219019531c2abedaf124a25b3f27
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
815f175ed380271ef32d04bf223f4a1b2a70bcb1)
(cherry picked from commit
7aabde7b7621aea44d693752ef6beb8eddaf1e61)
Robert Varga [Tue, 18 Oct 2022 20:23:01 +0000 (22:23 +0200)]
Clean up netconf-client tests
Remove unneeded throws declarations and do not use mockito internals.
Change-Id: If25da046270c1e097f9e24c7e43dbad53720a293
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
4377c8e7b1ac67c1fe1699adfd13fc10a3509f1f)
(cherry picked from commit
9a4b4f4f893eea7d25689953ea7dbb4bcf8ae4af)
Robert Varga [Tue, 18 Oct 2022 19:27:51 +0000 (21:27 +0200)]
Sequence state transitions during negotiation start
If we fail to write out the initial proposal, we will end up running
listener actions before other negotiation start transitions -- hence
messing up our state.
Inline sendMessage() and dispatch the listener as a last operation of
start().
JIRA: NETCONF-905
Change-Id: I06b3b266ed2c37ec388aff4abb988f84e6fa3863
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
ea556da8f195af133ef9a4b9b85601af526e9f4c)
(cherry picked from commit
8f02786bb9d62b9227ae14c1d68107d5f80d24f4)
Robert Varga [Wed, 19 Oct 2022 00:01:35 +0000 (02:01 +0200)]
Simplify isStateChangePermitted()
We have a duplicate check of old state value, merge two 'if' statements
together.
Change-Id: I36611230ef27de80f91a61b604e7bd71646c4718
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
a4a4f3cde22d044c7bd97b80b307f58c90d12c62)
(cherry picked from commit
ea0b8f7e2902dffa5be0d2644ac5b4fdca470d5c)
Robert Varga [Tue, 18 Oct 2022 20:16:48 +0000 (22:16 +0200)]
Clean up netconf-api tests
Remove unneeded throws declaration, @Before instantiation and use of
mockito internals.
Change-Id: I7831f67d408c45582f1d97e8e21719700847b08d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
699f38ff6723788eeb1a43bc0c536f9c018c8417)
(cherry picked from commit
a198f22bf1df5d145441f8a2f9163be93bfc8707)
Robert Varga [Tue, 18 Oct 2022 18:59:34 +0000 (20:59 +0200)]
Use Future.cause() for error checking
Include error trace when terminating session.
Change-Id: I02faabd68cf8f9ad89dc0273e9a85641d12c8db6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
78e5a0d290329a908d262a5114e9d191f137347f)
(cherry picked from commit
52ff51de1a4fa4bb4ca4eb630e8a26112a99f755)
Robert Varga [Tue, 31 May 2022 20:30:11 +0000 (22:30 +0200)]
Use a simple future
Channel is an invariant, hence we do not need to dereference
ChannelFuture, allowing us to reduce verbosity quite a bit.
Change-Id: Ifa9b9b89e1841479f3e66141e02b2619492f3900
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
bebb527a997ac93766c4639c9ee04c2ac7b2995b)
(cherry picked from commit
c54303fa6f35b38aae16f4bfde7bf992b4a3169f)
Robert Varga [Tue, 18 Oct 2022 18:45:14 +0000 (20:45 +0200)]
Use Future.cause() for completion checking
We know the future has completed, hence nullability of Future.cause()
is a quicker check for success.
Change-Id: Ie7baadb7fd744a8b7cfd58b01097997e71045ccd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
44d23b752c46b110188ebc9371a0d459c408bebc)
(cherry picked from commit
2ff3776a0e9288995f6f38db298fbad40d630b7e)
Robert Varga [Tue, 18 Oct 2022 14:44:39 +0000 (16:44 +0200)]
Check disconnected flag on each operation
We are performing a staggered setup during which we may encounter an
asynchronous disconnect. We have an atomic flag guarding this, which is
always flipped before disconnect enters critical region.
Check the flag at each synchronized connect stage and abort connection
if it is observed as flipped -- ensuring we cannot accidentally signal
channel activation after the channel has been close()d.
Also ditch the AtomicBoolean and instead use a simple VarHandle, saving
a few bytes of overhead.
JIRA: NETCONF-905
Change-Id: I857b1768b083c13ac5060a803a9ba6d4008c5e4b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
bdc0153931463070df6d03c75357e08f65bb9783)
(cherry picked from commit
afef223672144f174d4da6ef079ee19ad6ebf568)
Robert Varga [Tue, 18 Oct 2022 11:24:39 +0000 (13:24 +0200)]
Run AsyncSshHandler.onOpenComplete() on event loop
onOpenComplete() runs ctx.fireChannelActive(), which in turn talks to
other handlers. Netty silently delays the invocation if it is called
from a different thread.
Make sure we run onOpenComplete() on the appropriate executor, so that
the state transition and handler updates run synchronously.
JIRA: NETCONF-905
Change-Id: Id8c2f4cb1e045d5d5bb446801deec341ccb27e87
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
5038dde5cdb878badaa4328e3956409917f1eaf4)
(cherry picked from commit
7e9fc20c4c5f4c5e52e40adaaea3006e857d6249)
Robert Varga [Tue, 18 Oct 2022 09:15:33 +0000 (11:15 +0200)]
Rework AsyncSshHandler callback locking
We have top-half and bottom-half dispatch going on here, with both paths
acquiring the object lock. Unify callbacks and lock object before
deciding which path to take.
JIRA: NETCONF-905
Change-Id: Ic42a652ed06ea8bc90cbe504963cc1405dad7fdc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
0a29984645d407de655066110362261146464be1)
(cherry picked from commit
1e399271be1c78c9953eccde7f626ed0ff4ff81d)
Robert Varga [Tue, 18 Oct 2022 09:10:15 +0000 (11:10 +0200)]
Run safelyDisconnect() on event loop
The disconnect() operation needs to inform handlers of state
transitions, which should not be delayed. Netty provides indirects these
calls silently on thread mismatch, which we do not want.
Make sure to schedule safelyDisconnect() on the event loop, so that that
it cannot run concurrently with other channel tasks.
JIRA: NETCONF-905
Change-Id: Iffe98db142f9c407fca9f92e5d336a0484ef1eff
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
f2cf330ae8041264a599b8f8b5652ee54716eb88)
(cherry picked from commit
cd0fe54e116b26fd4778fe68001e3231f76ba9df)
Robert Varga [Tue, 18 Oct 2022 09:02:06 +0000 (11:02 +0200)]
Rename AsyncSshHandler.handleSshSetupFailure()
Rename this method to onOpenFailure() and move it to a more appropriate
place.
JIRA: NETCONF-905
Change-Id: I9ab3b6d4e7701fe3ee432ee0965322426dda0bec
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
1b4958b336a80f2ab62164196de8f90a6f083f03)
(cherry picked from commit
9a5114f3b132bca358e5058226ccb178be47e070)
Robert Varga [Tue, 18 Oct 2022 08:58:35 +0000 (10:58 +0200)]
Remove AsyncSshHandler.handleSshChanelOpened()
This is the locked bottom of onOpenComplete(), rename it and co-locate
it with its sole caller, making the code progression linear.
JIRA: NETCONF-905
Change-Id: I5a8fba44767535fb1e59bf48e3f4a422c0db3b59
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
2610ec1df534fed79964b764dba8a656ae950aee)
(cherry picked from commit
113064b0c5963a59609cb07e5601c6dca58bae83)
Robert Varga [Tue, 18 Oct 2022 08:55:29 +0000 (10:55 +0200)]
Remove AsyncSshHandler.handleSshAuthenticated()
This method is the locked bottom of onAuthComplete(), rename it and
split out onOpenComplete(), making the flow more linear. Also switch
to use getException() to discern success/failure, fixing up badly-named
mocks.
JIRA: NETCONF-905
Change-Id: I7a0c20b872b19b66e99144d0ce83636d6b4cd400
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
6de37782ed59747d2ad803e3b9836f6ed25d6986)
(cherry picked from commit
1a3e240661ae48d498c98f02036dff2a3d8f3ec6)
Robert Varga [Tue, 18 Oct 2022 08:44:52 +0000 (10:44 +0200)]
Remove AsyncSshHandler.handleSshSessionCreated()
This method is the synchronized part of onConnectComplete(), move it
closer to its source and split out onAuthComplete(). Also switch to
using getException() to check for success/failure.
JIRA: NETCONF-905
Change-Id: Ic8a49491afa92d68cb0585538a3fc9ffb044e9cb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
811508380706eea604bab58f3725bc9bf64790aa)
(cherry picked from commit
472c7476c32ca38469e58efb9da95dcb6cd9342e)
Robert Varga [Tue, 18 Oct 2022 08:27:19 +0000 (10:27 +0200)]
Add AsyncSshHandler.onConnectComplete()
Rather than using an anonymous listener, document the lifecycle event,
allowing us to refactor locking and extraction in the future. Also use
getException() to check for success.
JIRA: NETCONF-905
Change-Id: I8569ca007aefad634aff54294b475e565ac4f669
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
9b3050377a785f809f71dd6722a596e2fdbc4c65)
(cherry picked from commit
71cb1c46c65a764e2c0b7d4d50e3b54709f22fe5)
Robert Varga [Mon, 17 Oct 2022 18:51:13 +0000 (20:51 +0200)]
Inline AsyncSshHandler.startSsh()
There is just no reason to have this method split out, inline it to its
sole user -- which is making interactions a bit clearer. We also see
that there is a blocking call, holding up the caller until the
connection succeeds.
JIRA: NETCONF-905
Change-Id: Iae781a743e670498c9329162bb05a7475f32d370
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
350a98cd443038597784197888d664f7e0dca9f8)
(cherry picked from commit
d9e1b88bc8862479c83fff0124dc54a33f6e1b3c)
Robert Varga [Sat, 29 Oct 2022 19:25:32 +0000 (21:25 +0200)]
Bump upstream versions
Adopt:
- odlparent-9.0.16
- infrautils-2.0.16
- yangtools-7.0.18
- mdsal-8.0.16
- controller-4.0.13
- aaa-0.14.14
Change-Id: I926364bb14619ea9ecf21e3d91496e93c6f9a4a5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 28 Oct 2022 09:14:10 +0000 (11:14 +0200)]
Bump org.json/json to
20220924
This version is in public domain, resolving potential licensing issues
around "do no evil" restriction. Also update other testing frameworks.
Change-Id: I55c4ba72c53bad8a33ba42c712db84e8bfece57c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
a1896dbc3c3ffcee5283c160492e5a6b8ed8eb63)
Robert Varga [Fri, 28 Oct 2022 09:07:54 +0000 (11:07 +0200)]
Remove explicit org.json from feature
The package will be pulled in as needed, there is no point in mentioning
it separately.
Change-Id: I988db3fa3ce42f055ff151e9888811da2a19678e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
92e5803e9cdbe365af29670bb973e4a4c825164d)
Robert Varga [Wed, 1 Jun 2022 16:52:45 +0000 (18:52 +0200)]
Guard connectPromise not being null
Make sure that we validated the passed promise to not be null. Also fix
debug output, which would show up null.
Change-Id: Id7490dc57480192f135bf688a973713c3d30ea9c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
eaace15120044a3e602fd3093b2412be03fd2133)
(cherry picked from commit
120a71646f1e41680063de2470b5df18e53b9c1c)
Robert Varga [Wed, 1 Jun 2022 16:47:56 +0000 (18:47 +0200)]
Fix a raw type warning
Use a FutureListener<Object> instead of a raw GenericFutureListener.
Change-Id: Ie378ee8e7c3b38f781f48cc4ee6857834a14adc9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
6e662cfa5ed236a16ae47e4917fe6f847e0a9598)
(cherry picked from commit
3bdbc61d3a810a9f4623f7957832eab0afcc884a)
Robert Varga [Wed, 1 Jun 2022 16:55:31 +0000 (18:55 +0200)]
Move logging out of try/catch block
We are catching just IOException, there is no point to include logging
in the block.
Change-Id: I4650513ea444b506068182586153a627bfaff2b9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
22755ee880d798830f42cc0d60e84c8602fe3794)
(cherry picked from commit
09983568c97cefacb96677336bd8c37adc2dafe0)
Robert Varga [Wed, 12 Oct 2022 11:54:06 +0000 (13:54 +0200)]
Expire negotiation on event loop
Rather than having to completely synchronize state transitions, make
sure we run expiry on the event loop.
JIRA: NETCONF-827
Change-Id: I8d02c025ceaf78d547848e7e92861cb125405141
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
0df65029004fe5b4766caf2b47db23e47f955332)
(cherry picked from commit
0f23eb998f0bea7e12be4172593c24cbb3afebed)
Robert Varga [Wed, 12 Oct 2022 09:50:31 +0000 (11:50 +0200)]
Do not use Optional for SslHandler
Use a simple @Nullable return instead wrapping and unwrapping it again.
Change-Id: I97d3475d4a8090ca7ac75e67c56d37997a58b859
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
3d5a570ce63aea1383a34512473883fea70ed03d)
(cherry picked from commit
946277d21829da45ff7e2f806ad0919dba59e833)
Robert Varga [Mon, 12 Sep 2022 13:31:28 +0000 (15:31 +0200)]
Bump jquery to 3.6.1
https://blog.jquery.com/2022/08/26/jquery-3-6-1-maintenance-release/
Change-Id: I5e5ae541c1acc5a1f0c8dc5699066ec6c2734851
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
3bbaee47917b06fa390724619c0a43acfc1e06fc)
Jakub Morvay [Thu, 16 Aug 2018 12:02:02 +0000 (14:02 +0200)]
Get rid of Netty's DelimiterBasedFrameDecoder
Netty's DelimiterBasedFrameDecoder is not really effective when dealing
with huge NETCONF messages and reading them in just really small parts
at a time.
DelimiterBasedFrameDecoder always searches whole input ByteBuf for
delimiter when new input bytes are available. It performs the search
also on bytes already checked in previous tries. Obviously, this can be
really ineffective when reading large messages by very small parts at
a time.
Replace Netty's DelimiterBasedFrameDecoder by our own frame detection
implementation. The implementation remembers already checked part of
the input ByteBuf and searches the delimiter just in a new bytes
available.
JIRA: NETCONF-889
Change-Id: If5e78f4373d767f4cf465024313eeac873c1621d
Signed-off-by: Jakub Morvay <jmorvay@frinx.io>
Signed-off-by: Maros Marsalek <mmarsalek@frinx.io>
Signed-off-by: Sangwook Ha <sangwook.ha@verizon.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
5c92f1730eafb59a22c6ba160eb8e87b9aee4d4a)
Peter Suna [Mon, 4 Jul 2022 11:29:06 +0000 (13:29 +0200)]
Disable creating reduced netconf-testtol pom
When dependency reduced pom for netconf-testtool is generated, it gets
overridden with scale-util pom.
Fix that by disabling creating reduced dependency pom.
https://maven.apache.org/plugins/maven-shade-plugin/shade-mojo.html#createDependencyReducedPom
JIRA: NETCONF-884
Change-Id: Iea5269782261d2d550cb534fa405ec0fadaced46
Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
(cherry picked from commit
c83d51f95b5de398dda926edc17fcda273588ae2)
Peter Puškár [Mon, 20 Jun 2022 06:53:26 +0000 (08:53 +0200)]
Fix error message typo
The correct string is 'nonconfig', not 'non-config'.
JIRA: NETCONF-886
Signed-off-by: Peter Puškár <ppuskar@frinx.io>
Change-Id: If5b77c64f8f17885977c8700195ba6b910197e26
(cherry picked from commit
7c1d84b96f8bb38a9dad250339a4ffabcdff515f)
Robert Varga [Tue, 31 May 2022 18:54:42 +0000 (20:54 +0200)]
Fix another state-keeping thinko
We need to update pending before we add a listener, as the future
may have already completed and thus we could observe pending being
either null or point to the bad value.
Also update the corresponding checkState() to use identity comparison
and include a proper message.
JIRA: NETCONF-827
Change-Id: If79d7ce71480bab6b35eec6fab63671f949c6cf9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
d1a112edda4fa487522010a6330f67defe6359a4)
Robert Varga [Tue, 31 May 2022 18:37:29 +0000 (20:37 +0200)]
Fix state transition thinko
The future returned from reconnect strategy may have completed before
we add a listener. Make sure we record the future before adding the
listener.
Also change checkState() to a verify() with a proper identity check
to work with nulls and a proper message.
JIRA: NETCONF-827
Change-Id: Ica152cd1445e797c122e542aa1138232f11c6736
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
5e9f3517718f4475c3026acba0a5afb6f19388fa)
Robert Varga [Tue, 31 May 2022 20:27:53 +0000 (22:27 +0200)]
Fix session logging
We are using 'this' for session name -- that refers to the anonymous
class, leading to confusing logs. Fix that by passing the proper
session. This allows us to use a simple lambda instead.
Change-Id: I10080ef1f55d260af3a1ca8b62a58510d0feec87
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
1581d8d1ac5205e45409ab48c1034a23d8b8a7ee)
Robert Varga [Tue, 31 May 2022 18:35:08 +0000 (20:35 +0200)]
Eliminate ReconnectingStrategyListener
Use a private method and a lambda to make the lifecycle cleared.
Change-Id: Ie57025a7fe60830ca2711272748b1ed6ea84dbdf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
0cca635f76cb935c3a8d8bb62abe3e9383276a0c)
Robert Varga [Tue, 31 May 2022 18:29:24 +0000 (20:29 +0200)]
Eliminate BootstrapConnectListener
Use a simple method and a method handle instead of an explicit
class. This makes things a tad simpler on synchronization side of
things.
Change-Id: Id341b8a3ff124bd95a1e4e14f60721e6b443f72b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
a33c469af7ba77c86a89fb1637c6e65bc9cf234b)
Robert Varga [Tue, 31 May 2022 18:25:03 +0000 (20:25 +0200)]
Reduce ReconnectingStrategyListener nesting
We do not need to nest the two listeners into each other. This is the
first step to eliminating both of them.
Change-Id: I3af5797dcccc3e82e9c28731b082e1f4014aba74
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
3b229907bacd02c1a37174d84945a34c468c1d95)
Robert Varga [Tue, 31 May 2022 18:21:31 +0000 (20:21 +0200)]
Remove superfluous this. qualifier
We have some unnecessary verbosity here, ditch it to simplify access.
Change-Id: Idf94706a60169741e7e5a4deec0f17cf87a313d8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
d31802bfa8ab119aa41c4a859446764480424d9d)
Robert Varga [Thu, 19 May 2022 10:31:55 +0000 (12:31 +0200)]
Bump versions to 2.0.17-SNAPSHOT
This starts the next development iteration.
Change-Id: I06af407ade2238232fce382fc4a57282bf239b42
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 19 May 2022 10:31:19 +0000 (12:31 +0200)]
Bump upstream versions
Adopt:
- odlparent-9.0.15
- infrautils-2.0.15
- yangtools-7.0.17
- mdsal-8.0.15
- controller-4.0.12
- aaa-0.14.13
Change-Id: Ibda60a947800663d8041379b93452570b76789df
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 17 May 2022 09:53:23 +0000 (11:53 +0200)]
Centralize NetconfNode/InetSocketAddress conversion
The process of creating a RemoteDeviceId and/or the target
InetSocketAddress is duplicated in a number of places, each slightly
different.
Centralize conversion in netconf.topology.spi and use it from there,
which leads us to topology-singleton being able to use non-IP addresses.
JIRA: NETCONF-875
Change-Id: I5c4a610eb4f4b3cd6586198d5e9a4b84b476d351
Signed-off-by: Rohini.Ambika <rohini.ambika@infosys.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
90dcdd5d040eb22b74e87baccffd70a30d93bfc0)
Robert Varga [Tue, 17 May 2022 09:35:35 +0000 (11:35 +0200)]
Cleanup ActorProxyNetconfServiceFacade
Use Futures.immediateFuture(), but mark a FIXME, where we should really
be getting a response.
Change-Id: I73e1f1620df83b76d266ed8980d86bb40634a614
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
622b6917095076cbdb8478863cdd5fad2988f65a)
Robert Varga [Tue, 17 May 2022 09:11:48 +0000 (11:11 +0200)]
Prefer java.time.Duration
Use Java 8 Duration instead of Scala's version. Actors then convert
to Scala as needed.
Change-Id: Id1301c9c67a8a301aa20aafafdbd387865c2cf3b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
7d83179b4d81e63eeb5c1c1adf4794c6e74c5709)
Robert Varga [Mon, 16 May 2022 19:42:10 +0000 (21:42 +0200)]
Bump versions to 2.0.16-SNAPSHOT
This starts the next development iteration.
Change-Id: Ic1518b637311f825ea487dabfd281182559a0868
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 16 May 2022 09:30:02 +0000 (11:30 +0200)]
Bump upstream versions
Adopt:
- odlparent-9.0.14
- infrautils-2.0.14
- yangtools-7.0.16
- mdsal-8.0.14
- controller-4.0.11
- aaa-0.14.12
Change-Id: Ib54cb71b495759f54cb6a984a48c45fdde9b6d4c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 4 Apr 2022 19:38:35 +0000 (21:38 +0200)]
Simplify SSE mocking
The springboard through interface default method does not quite work,
rework the mock to not use it.
Change-Id: Iec36b42762c901ae7f0fc83072abbb6c2e12c553
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
704e831a53f23c2a133303496c624ce448459073)
Robert Varga [Mon, 4 Apr 2022 14:59:45 +0000 (16:59 +0200)]
Remove unused spying
KeepaliveSalFacadeTest has a bit of useless mocking/spying. This is
failing with JDK17. While we would want to mock the behavior exactly
without delays, use real executor for now.
Change-Id: I462852fb8ed56ed5370d7036bc2c3c862129dce1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
4111fc386b35e327d1038b7b7b8a52d6457df28d)
Robert Varga [Thu, 12 May 2022 15:21:16 +0000 (17:21 +0200)]
Bump argparse4j to 0.9.0
https://github.com/argparse4j/argparse4j/releases/tag/argparse4j-0.9.0
Change-Id: Iba7c6c0612ab39060ec0a7e4672d4b6a1b584477
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
465720aa537e95d51540529e8fed773a345e87eb)
(cherry picked from commit
8a0f61aafbfe00a614a86b09156c62050e5910cc)
Robert Varga [Mon, 28 Mar 2022 22:24:54 +0000 (00:24 +0200)]
Fixup processing reporting
We need to report the events as done even if the downstream writer does
not accept the object model. If we do not, we will get confused about
how the node should be processed.
JIRA: NETCONF-868
Change-Id: I5a76c5a2af79ecaaf4c80f832774b08d60d03379
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
d705d8e40d4a11c3ed0ca879128782dd6988eeb7)
Sangwook Ha [Sun, 27 Mar 2022 22:15:29 +0000 (15:15 -0700)]
Support AnydataNode in ParameterAwareNormalizedNodeWriter
AnydataNode is not processed in ParameterAwareNormalizedNodeWriter
throwing IllegalStateException. Add a step to check/process AnydataNode
in wasProcessAsSimpleNode().
JIRA: NETCONF-868
Change-Id: I637890ff6779d0a532ee6d4182e4c36baa4f5231
Signed-off-by: Sangwook Ha <sangwook.ha@verizon.com>
(cherry picked from commit
0b55436b34f4c764da926d8a9318af68a8c3cc98)
Robert Varga [Thu, 24 Mar 2022 20:36:43 +0000 (21:36 +0100)]
Improve DataNormalizer performance
We are using ImmutableList.Builder and build() at each step to pass
arguments down to checkArgument(). That's wasteful, let's rather pay
the cost of a single ImmutableList.copyOf() -- which breaks even at
three path arguments.
Change-Id: I586761f5e8f8e39f1be3c85bc5e9181c1681e6fd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
b78c1895a0e08026e85fe370ed018f355ffb1863)
Samuel Schneider [Thu, 3 Mar 2022 09:14:22 +0000 (10:14 +0100)]
Fix Stackoverflow in sal-rest-docgen
Add escaping of chars which underlying library
consider as special characters (and we do not).
JIRA: NETCONF-713
Change-Id: Ife63c31cd9c4912a74db10562b9f927623bc4695
Signed-off-by: Samuel Schneider <samuel.schneider@pantheon.tech>
(cherry picked from commit
7c022319559356346bf5b0e9b1d9f18a9b87b928)
Robert Varga [Thu, 24 Mar 2022 12:40:10 +0000 (13:40 +0100)]
Fix DataNormalizationOperation with nested choices
This is a port of YANGTOOLS-1411 to the legacy codebase.
Change-Id: Iff3ac515f4bd763c1c7b7905508fca3b5dc277c7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
b5577a04215dbdcc624d1aa2c082195cdaa15d37)
Robert Varga [Thu, 24 Mar 2022 12:30:16 +0000 (13:30 +0100)]
Do not shuffle PathArguments needlessly
There is no point in creating a separate collection if we are not
doing anything with it.
Change-Id: I3199c7232c63464b315eff8f69aac98181946ebd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
28b2c230f2277d53dd80892e95122d82276ec871)
Peter Puškár [Mon, 14 Feb 2022 12:44:52 +0000 (13:44 +0100)]
Fix notification serialization with odl-leaf-nodes-only
Rather than attempting to roll a SchemaPath from PathArguments, use the
provided tool to perform that function -- in a centralized manner.
Add tests to cover serialization of augmentation and choice nodes.
JIRA: NETCONF-848
Change-Id: I9f6dffd9532bd3d52021bbac58473c3cf3b58937
Signed-off-by: Peter Puškár <ppuskar@frinx.io>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
c123de52b03a3ee4fba2da5e7ec18a214d3876e8)
Robert Varga [Mon, 21 Mar 2022 09:03:26 +0000 (10:03 +0100)]
Revert "Remove SchemaNode#getPath usage from RestconfDataServiceImpl for rfc8040"
This reverts commit
60cb992dbb51addce3165a83d4b682047a10957a. The
assumptions made here are not valid.
Change-Id: Icd259437ae3dacf0300b15c1cc7e296c5c434390
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 21 Mar 2022 07:52:41 +0000 (08:52 +0100)]
Revert "Remove SchemaNode#getPath usage from RestconfImplTest"
This reverts commit
b962a56278c0d0ad060cfbd02387821a878ee98f. The
proposed transformation is not valid.
Change-Id: I82be944a90cfef738a41efd86dbed0a936c5999e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 21 Mar 2022 07:52:37 +0000 (08:52 +0100)]
Revert "Replace #getPath in processInstanceIdentifierType"
This reverts commit
445e898b86ffe443776037e0fc769ddce3d19f58. The
proposed transformation is not valid.
Change-Id: I6479f27151191c2211682bcea8253b0439e9103e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 21 Mar 2022 07:52:17 +0000 (08:52 +0100)]
Revert "Remove SchemaNode#getPath usage from JsonNormalizedNodeBodyReader"
This reverts commit
ec6ea24581c692b474fafe17fb27259dbe94026d. The
proposed transformation is not valid.
Change-Id: I291ff37a932cd074fb4a2467fbaa37748bf64fb6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 21 Mar 2022 07:52:14 +0000 (08:52 +0100)]
Revert "Remove SchemaNode#getPath from JSON reader in rfc8040"
This reverts commit
d3403542792afb6f6a6525a088b27163236070f2. The
proposed transformation is not valid.
Change-Id: I73453f4f196fc64919f08b165b382a2df69d3a5e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 21 Mar 2022 07:51:36 +0000 (08:51 +0100)]
Revert "Remove SchemaNode#getPath from XML writer in rfc8040"
This reverts commit
d21d2fe3c6e1784e6ec407b86c6eac75ba3bba66. The
proposed transformation is not valid.
Change-Id: Ib5798243764106e2ce270fa995d1abfc0ef4499b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 21 Mar 2022 07:51:14 +0000 (08:51 +0100)]
Revert "Remove SchemaNode#getPath from XML writer test in rfc8040"
This reverts commit
ed024cc0db69c3f026f5e109af680e162a484572. The
proposed transformation is not valid.
Change-Id: Ia56b7cd18d940d418b2f52f280b4545811dde8cc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Peter Puškár [Fri, 18 Mar 2022 16:45:19 +0000 (17:45 +0100)]
Fix NETCONF error message propagation to RESTCONF
This small typo during refactor caused an issue where NETCONF error
messages would not be propagated into RESTCONF response in some cases
where transaction failed.
Signed-off-by: Peter Puškár <ppuskar@frinx.io>
Change-Id: I4c5179f8ec575da112ac0f76da40436900291cb9
Robert Varga [Wed, 9 Mar 2022 10:14:27 +0000 (11:14 +0100)]
Fix odl-netconf-callhome-server unique statement
We have two unique references which do not correctly resolve, fix that
up.
Change-Id: I84f0f467e651329ff06dab74bd3de64f4c1c3373
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
2e9e7c9762d03c35376152b1fc2424ef89ba6433)
OleksandrZharov [Wed, 2 Mar 2022 14:33:24 +0000 (15:33 +0100)]
Improve validation for invalid files in schemas dir
Previous validation of schema files was not very specific if
there was problems with files. Now there is more direct message if
something wrong with yang files.
Removed logic that rename not yang files into .yang in schema dir.
We are storing yang models only in .yang files. Therefore all other
files should be rejected.
JIRA: NETCONF-707
Change-Id: Iad4b91fd534eef8ea134a9463de3dab618fe969e
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
(cherry picked from commit
0a1d0c2b779ae95ae8b0e67f02c820cb89402b30)
OleksandrZharov [Wed, 16 Feb 2022 10:16:26 +0000 (11:16 +0100)]
Remove SchemaNode#getPath from XML writer test in rfc8040
Removed deprecated SchemaNode#getPath from
XmlNormalizedNodeBodyWriterTest class
JIRA: NETCONF-818
Change-Id: I488296e26b929bf2cab6acee8254ac47ed7162d9
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
OleksandrZharov [Tue, 15 Feb 2022 11:19:27 +0000 (12:19 +0100)]
Remove SchemaNode#getPath from XML writer in rfc8040
Removed deprecated SchemaNode#getPath from XmlNormalizedNodeBodyWriter
class by using getQName and Absolute#of path.
JIRA: NETCONF-818
Change-Id: Ibb88ccce1a987bf4e6ea979edd74ca0d2179cd9c
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
OleksandrZharov [Mon, 14 Feb 2022 15:13:39 +0000 (16:13 +0100)]
Remove SchemaNode#getPath from JSON reader in rfc8040
Removed deprecated SchemaNode#getPath from JsonNormalizedNodeBodyReader
class by using getNodeType and methods of SchemaInferenceStack.
JIRA: NETCONF-818
Change-Id: I874d8246e54d5a0d042d7da19bdcfe264d58cd4a
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
Ivan Hrasko [Fri, 18 Feb 2022 19:12:31 +0000 (20:12 +0100)]
Check error conditions before processing
First we have to check if yangIIdContext empty content does not mean
the error and only then we can use it in further processing.
JIRA: NETCONF-818
Change-Id: I81593f323a48ea47d91f5aeb424729408efed2ad
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
OleksandrZharov [Tue, 15 Feb 2022 16:22:43 +0000 (17:22 +0100)]
Remove SchemaNode#getPath usage from CreateStreamUtil for rfc8040
Removed deprecated SchemaNode#getPath from CreateStreamUtil class
by using Qnames. We always process notifications from schema root
so just Qname of notification is just enough.
JIRA: NETCONF-818
Change-Id: If9f1054fd7a1ddcef0c681b7549a52e806dd7183
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
OleksandrZharov [Wed, 2 Feb 2022 11:48:47 +0000 (12:48 +0100)]
Remove SchemaNode#getPath usage from JsonNormalizedNodeBodyReader
Removed deprecated SchemaNode#getPath from JsonNormalizedNodeBodyReader
class by using getNodeType and methods of SchemaInferenceStack.
JIRA: NETCONF-818
Change-Id: Ic717f06d259cf1269aa1aa6b48395ef86edad50d
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
Ivan Hrasko [Fri, 11 Feb 2022 19:57:19 +0000 (20:57 +0100)]
Replace #getPath in processInstanceIdentifierType
DefinitionGenerator#processInstanceIdentifierType method was used to
create an example of the instance-identifier leaf node's value.
For this purpose SchemaPath#getPath method was used to search for 'root'
container.
In fact, this approach leads to incorrect results because it can for example
find an RPC definition as 'root' container. RPC definition cannot be used as
instance-identifier value because its not a data node.
We have reworked this method to use as an example the first container child
of the node's model.
This way we can also get-rid of deprecated SchemaPath#getPath method.
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Change-Id: I2a4f1dc2e76ae9117bc826e45b0d9c0379cb5213
Manoj Chokka [Mon, 1 Nov 2021 05:20:10 +0000 (05:20 +0000)]
Do not use SchemaNode.getPath() in RestDocgenUtil
Instead of investigating full schema path we can just use
the parent node QName to determine if a child is in the same module
as its parent.
To compare name-space and revision we work with QNames -
we have adapted method resolvePathArgumentsName(..) parameters
to require QNames.
We can go further and mark all parameters as NonNull because
the use-case when parent is null has no sense - we are at direct
child of module - so full path should be used.
Align parameter usage across the methods -
first is node's QName the second is node's parent's QName.
In addition, mark not-used resolveNodesName(SchemaNode, Module) method
as deprecated for removal.
To simplify situation in callers we can resolve resource path before
addPaths or addOperations methods are called. This way we do not need
to increase the number of parameters.
JIRA: NETCONF-819
Change-Id: Ib7a7614a70c9573521c47716c62ec74f887e6132
Signed-off-by: Manoj Chokka <cmanoj8@gmail.com>
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
OleksandrZharov [Mon, 14 Feb 2022 14:37:44 +0000 (15:37 +0100)]
Remove SchemaNode#getPath usage from RestconfImplTest
Removed deprecated SchemaNode#getPath from RestconfImplTest
class
JIRA: NETCONF-818
Change-Id: I27bb6c8dd56527b546d27d03c0683d42cefefe1e
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
OleksandrZharov [Tue, 15 Feb 2022 12:30:17 +0000 (13:30 +0100)]
Remove SchemaNode#getPath usage from RestconfDataServiceImpl for rfc8040
Removed deprecated SchemaNode#getPath from RestconfDataServiceImpl
class by using getQName and Absolute#of path.
JIRA: NETCONF-818
Change-Id: I88d23c1da5a381774ab093b50839328c282647a7
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
Robert Varga [Mon, 14 Feb 2022 18:00:14 +0000 (19:00 +0100)]
Bump versions to 2.0.15-SNAPSHOT
This starts the next development iteration.
Change-Id: I0f52ffc910d55d56d3b73e331cd42a5304cf2f19
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 14 Feb 2022 17:58:58 +0000 (18:58 +0100)]
Fix yangtools mis-alignment
Previous version bump is causing multiple versions of yangtools to be
pulled in. Fix this by bumping controller/aaa/yangtools.
Change-Id: I8db1c662a88380982dd856d2b23b0488747a9a9c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 14 Feb 2022 11:33:50 +0000 (12:33 +0100)]
Bump versions to 2.0.14-SNAPSHOT
This starts the next development iteration.
Change-Id: I0c09e8f96fbade26e5e2a3dc1faeeca39a913f98
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 14 Feb 2022 11:33:13 +0000 (12:33 +0100)]
Bump upstreams
Adopt:
- odlparent-9.0.13
- infrautils-2.0.13
- mdsal-8.0.11
- controller-4.0.9
- aaa-0.14.9
Change-Id: I56b8cf3a7e2a9cec14253fc37d362be165fc0055
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Peter Puškár [Fri, 4 Feb 2022 08:38:37 +0000 (09:38 +0100)]
Fix links to RFC8040 query parameters documentation
Previous ones were pointing incorrectly to other parameters
Signed-off-by: Peter Puškár <ppuskar@frinx.io>
Change-Id: Ie1e88333517482c9da893fa32a8cc13ff672af51
Robert Varga [Fri, 11 Feb 2022 15:31:41 +0000 (16:31 +0100)]
Retain certificate-chain ordering
The order of certificats in the chain is significant and therefore
needs to be marked 'ordered-by user', otherwise the datastore
implementation is free to reorder the elements.
JIRA: NETCONF-854
Change-Id: Icc2e5793a214ab374ad08fdba5518396587de263
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 8 Feb 2022 18:12:15 +0000 (19:12 +0100)]
Enable ignored test
We do not have a singleton ControllerContext anymore, re-enable ignored
test. Also remove unused throws declarations.
Change-Id: Ifdeb48aa085fea312a9579e27bd1359c30f26913
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 8 Feb 2022 18:10:29 +0000 (19:10 +0100)]
Migrate to assertThrows()
ExpectedException.none() is deprecated, use assertThrows() for the same
function.
Change-Id: I6baa6ff28e572d2070adf15017ba21f4a09b0b25
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 8 Feb 2022 09:24:29 +0000 (10:24 +0100)]
Do not instantiate JsonParser
The class should not be instantiated, use utility methods instead.
Change-Id: Ifc225ea36906232264dcb338ae66dfab41f55c91
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Ivan Hrasko [Wed, 2 Feb 2022 09:56:37 +0000 (10:56 +0100)]
Remove ScaleUtilParameters
Scale util is using TesttoolParameters to store its commnad line arguments.
ScaleUtilParameters is no more used.
JIRA: NETCONF-798
Change-Id: I4b7ccbf0535fc6fdb415594d1e7609ba847abb6b
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
OleksandrZharov [Wed, 5 Jan 2022 10:56:24 +0000 (11:56 +0100)]
Fix scale util test tool
Fixed karaf session readiness checking for features installation.
Fixed duplicate data directory deletion.
Changed restconf url according to rfc-8040.
Added authorization for HttpClient so we can send requests.
Added PATCH requests for creating simulated devices.
Added default controller-ip and controller-port in parameters.
Added mechanism to check that netconf topology via restconf is ready.
JIRA: NETCONF-798
Change-Id: Ice05ab77cd0f479c5cbfc307d0fdca9104f8843b
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Tomas Cere [Thu, 27 Jan 2022 09:55:02 +0000 (10:55 +0100)]
Fix RFC8040 root access
Requests targetting root need to be wrapped in <data> container
to conform to the RFC, otherwise we end up with multiple roots
when serializing requests targetting root(either rests/data or
root of mounted device).
JIRA: NETCONF-853
Change-Id: I6d2a8d7b235a11779da134ed9c9abec8e8afe27c
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 27 Jan 2022 19:27:20 +0000 (20:27 +0100)]
Migrate to Empty.value()
Empty.getInstance() is being removed, migrate to its replacement.
Change-Id: Ic12e07df3c16827afcddf32f2fb595389e4efdbe
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 26 Jan 2022 09:09:21 +0000 (10:09 +0100)]
Do not reuse inactive handler
We have a simple event dispatch handler here, which is stateless and can
be reused, except Netty's defences are rejecting such reuse. Since it is
a very simple object, just do not bother with its reuse.
JIRA: NETCONF-852
Change-Id: I40b48b0a8e14a0a271043bb9fb4b471cfd56a8e7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 20 Jan 2022 14:27:29 +0000 (15:27 +0100)]
Bump versions to 2.0.13-SNAPSHOT
This starts the next development iteration.
Change-Id: I204b572bd2ad4c02c6d449605c7fea1e359f0b7d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 20 Jan 2022 16:54:02 +0000 (17:54 +0100)]
Issue a mild warning when draft RESTCONF is activated
draft-bierman-netconf-restconf-02 is an ancient revision of the RESTCONF
protocol which we are still supporting. We are phasing this code out,
hence issue a mild warning when this is activated, so that users have a
fair warning and a chance to migrate.
JIRA: NETCONF-838
Change-Id: I42c61a1853bf789b488c6ce97348d269a7257bef
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Tomas Cere [Tue, 4 Jan 2022 11:14:38 +0000 (12:14 +0100)]
Fix empty get failing on mounted devices when using xml
The ParameterAwareNormalizedNodeWriter was not setting an
empty container node with root path as handled so fix that.
Also make sure we actually return an empty data node when
its processed instead of empty response.
JIRA: NETCONF-847
Change-Id: Iab271a93fd13176dd061d5c26ab1d7f9a8b8263b
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 20 Jan 2022 14:16:26 +0000 (15:16 +0100)]
Bump upstreams
Adopt:
- odlparent-9.0.12
- infrautils-2.0.12
- mdsal-8.0.10
- controller-4.0.8
- aaa-0.14.8
Change-Id: I0c9c3b3b76b217a6b7f933cfdc570fef9e925aa3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 13 Jan 2022 11:09:30 +0000 (12:09 +0100)]
Unify variable naming
We really dealing with three writers: xmlWriter, streamWriter and a
NormalizedNodeWriter (i.e. writer). Make sure we use the same names in
all methods and use try/finally blocks consistently.
Change-Id: Idc6eafa8467e836a78c784257179aee09239620a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 13 Jan 2022 11:00:47 +0000 (12:00 +0100)]
Eliminate illegal catch clausules
Closing an XMLStreamWriter does not thrown any exception, but rather
XMLStreamException, which the callers need to be ready to handle anyway.
Eliminate useless null checks and make sure we propagate close failures
to callers.
Change-Id: I963749afbfa667a8ef071a8b1a438e171668c28b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 13 Jan 2022 10:51:24 +0000 (11:51 +0100)]
Use Map.of() instead of ImmutableMap.of()
We have an equivalent utility available, use it to lower Guava
dependencies a bit.
Change-Id: Id946b6576dfc79875f2dfef020c8a104121984d3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 13 Jan 2022 10:49:13 +0000 (11:49 +0100)]
Lower setPrefix() warning
Our initial check is quite noisy when we get wired to JDK's
XMLDOMWriterImpl implementation. We very much expect things to work
anyway, so let's lower the message down to debug.
Change-Id: Ie47bb886c1557b6f685bf8ee42ee65f8972a1898
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>