netconf.git
2 years agoBump versions to 1.7.4.4-SNAPSHOT 65/98665/1 1.7.4.x
Robert Varga [Wed, 24 Nov 2021 08:23:07 +0000 (09:23 +0100)]
Bump versions to 1.7.4.4-SNAPSHOT

This starts the next development iteration.

Change-Id: I80a24cb9634e9912242a0986ccac45d1c81ad2fa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd diffie-hellman-group14-sha1 to the list of default key exchange algorithms 70/95470/1
Oleksii Mozghovyi [Wed, 10 Mar 2021 10:47:55 +0000 (12:47 +0200)]
Add diffie-hellman-group14-sha1 to the list of default key exchange algorithms

The list of key exchange algorithms enabled by default has been changed
with a Mina SSHD uplift to the version of 2.6.0, leaving some of the
SHA1 algorithms disabled by default. Some the devices might still use
this algorithm, so this change brings back the
'diffie-hellman-group14-sha1' algorithm to the list.

JIRA: NETCONF-765
Change-Id: Iea58448981e19f1632799d05dbda8784415ebf1f
Signed-off-by: Oleksii Mozghovyi <oleksii.mozghovyi@pantheon.tech>
(cherry picked from commit 79c50af55997e216a7c70e13a53a88d94b2b62c7)

3 years agoBump versions to 1.7.4.3-SNAPSHOT 94/95394/2
Robert Varga [Mon, 1 Mar 2021 11:00:50 +0000 (12:00 +0100)]
Bump versions to 1.7.4.3-SNAPSHOT

This starts the next development iteration.

Change-Id: Ie6abadf6d6639b0c28ef45be4920abe853a207d6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump versions to 1.7.4.2-SNAPSHOT 93/95393/1
Robert Varga [Mon, 1 Mar 2021 10:11:48 +0000 (11:11 +0100)]
Bump versions to 1.7.4.2-SNAPSHOT

This starts the next development iteration.

Change-Id: I06cd1a51b43d54b4c58b466ca08a02580bf3d319
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUpgrade sshd to 2.6.0 58/95258/2
Iaroslav [Tue, 2 Feb 2021 14:31:46 +0000 (16:31 +0200)]
Upgrade sshd to 2.6.0

Upgrade sshd to version 2.6.0

JIRA: NETCONF-752
Change-Id: Iaf6fd1ab232458aeb58636590bc84d3d8d2036f6
Signed-off-by: Iaroslav <iaroslav.kholiavko@pantheon.tech>
(cherry picked from commit 96eb5a33f9406e0c5d34fdab6358e9bb0c3797df)

3 years agoClear the initial content-type for DELETE requests 94/93694/4
Tibor Král [Mon, 9 Nov 2020 14:59:12 +0000 (15:59 +0100)]
Clear the initial content-type for DELETE requests

The content-type was initialized to application/json. Therefore it was
applied even for the DELETE request where it is not needed.
When initialized with NULL text/plain will be used instead.

JIRA: NETCONF-732
Change-Id: If369baccfb9b478ff8857a9da7ebd5c1173e4c8d
Signed-off-by: Tibor Král <tibor.kral@pantheon.tech>
3 years agofix example string generation for types with isBasicLatin pattern 17/93517/1
Cmarada, Michal [Tue, 27 Oct 2020 13:30:10 +0000 (14:30 +0100)]
fix example string generation for types with isBasicLatin pattern

Generex generator fails to create example if pattern contains
{isBasicLatin} condition. The issue is fixed by replacing original
condition by range of allowed basic latin characters (0x00 - 0x7F).

JIRA: NETCONF-737
Signed-off-by: Cmarada, Michal <michal.cmarada@pantheon.tech>
Change-Id: I7bc5bf3621a40804122acd4604cfe8c132ffff24

3 years agoRevert upstreams to Sodium SR4 33/93533/2
Robert Varga [Sat, 31 Oct 2020 09:55:46 +0000 (10:55 +0100)]
Revert upstreams to Sodium SR4

Use released versions of upstreams, so that we can get a stable
build without having to resurrect/release upstreams as well.

Change-Id: I69971fd38dcc7f2dc9895993fa752349d3190141
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRevert versions to 1.7.4.1-SNAPSHOT 32/93532/1
Robert Varga [Sat, 31 Oct 2020 09:51:58 +0000 (10:51 +0100)]
Revert versions to 1.7.4.1-SNAPSHOT

We are doing an off-band release, essentially Sodium SR4.1, reflect
that in our versions.

Change-Id: Icd856be31152f71ac5ffb35b5a9d1c68c8b23f8d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd workaround for SSH connection issue related to SSHD-1028 16/93116/1
Tibor Král [Mon, 26 Oct 2020 03:03:02 +0000 (04:03 +0100)]
Add workaround for SSH connection issue related to SSHD-1028

Provide custom version of Nio2Session which overrides the
bugged method.

JIRA: NETCONF-736
Change-Id: I0ef091680a9bdbe6bcab889335bb5ff48e91b703
Signed-off-by: Tibor Král <tibor.kral@pantheon.tech>
(cherry picked from commit 28925cdfe32f72ebcd034c9c7c9c107f176ca452)

3 years agoRevert "Revert "Upgrade mina-sshd to 2.4.0"" 16/92316/1
Robert Varga [Wed, 26 Aug 2020 18:30:07 +0000 (20:30 +0200)]
Revert "Revert "Upgrade mina-sshd to 2.4.0""

This reverts commit f25f45ff27c8a7c7df780df609ec33f6662ea61e,
re-bumping to 2.5.1.

JIRA: NETCONF-716
Change-Id: I520d807c50a8107c0189745cf56e0fbc75871230
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 6cc04f8a72d33b24d78aeeaa65eb8fae8217c608)

3 years agoEnable server heartbeats 94/92294/1
Robert Varga [Fri, 31 Jul 2020 08:38:30 +0000 (10:38 +0200)]
Enable server heartbeats

When we configure the server to have any timeout, make sure we give
initiate a heartbeat at least three times before timing out. Also, if
we do not specify the idle timer, we need to disable NIO2 read timeout.

JIRA: NETCONF-716
Change-Id: I2c6ed07b5d3b29f6524b0ed99067895c4dfdc020
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit d512058bc228950fab6ede804c0b533588367dcf)

3 years agoDisable NIO read timeout by default 93/92293/1
Robert Varga [Tue, 4 Aug 2020 16:57:21 +0000 (18:57 +0200)]
Disable NIO read timeout by default

Rework which timeouts are disabled, as we are hitting timeout
after 615 seconds.

JIRA: NETCONF-716
Change-Id: I98ef51b4346c2aee0c9c87d58035bc08ef2c77d1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 84c3a3198ad33135dbc982dfb048ee5906d79ece)

3 years agoRevert "Upgrade mina-sshd to 2.4.0" 92/92292/1
Jamo Luhrsen [Tue, 4 Aug 2020 22:54:11 +0000 (15:54 -0700)]
Revert "Upgrade mina-sshd to 2.4.0"

This reverts commit 560e49a0c5d879e763eb82f737db92bc78a276d3
as well as c2e07b76734c34a2fe88262530b4ac4a387b8ee7, as these
are suspected to cause a regression.

JIRA: NETCONF-716
Change-Id: Ie73f3a7b0b4f41e690b368035f212938916b40dd
Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
(cherry picked from commit f25f45ff27c8a7c7df780df609ec33f6662ea61e)

3 years agoRevert "Expand rsa-ssh2 signatures" 91/92291/1
Jamo Luhrsen [Tue, 4 Aug 2020 22:06:18 +0000 (15:06 -0700)]
Revert "Expand rsa-ssh2 signatures"

This reverts commit 3453c508f27c64feb7220c84160a34df732b9738.

Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
Change-Id: Ib3d442178877c82c760a625ff5acaa546ba797d4
(cherry picked from commit 19af114f06221cf94c5ef2c6d96b02ea67a05fc6)

3 years agoExtra superfluous edit-config RPC sent 66/92266/1
Jamo Luhrsen [Wed, 12 Aug 2020 22:54:35 +0000 (15:54 -0700)]
Extra superfluous edit-config RPC sent

Extra superfluous edit-config RPC sent just prior to correct edit-config
RPC for top-level lists POST & PUT to certain top-level lists in a
mounted device's model returns a 500 error via Restconf, although in
some cases (device-dependent) the config appears to have committed.

This problem first appeared in Boron-SR3, and continues in Carbon SR-1.

JIRA: NETCONF-482

Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
Change-Id: I718bda377245d884864e160f2566e7c3d8e62e47
(cherry picked from commit 371f6acfd6cf89319ecbffeb0259e2ce13d32405)

3 years agoAdd import for netconf-node-optional 36/91736/2
Nikhil Soni [Fri, 3 Jul 2020 07:35:54 +0000 (13:05 +0530)]
Add import for netconf-node-optional

This was missed in the initial work to add the
optional schema first added here:
  https://git.opendaylight.org/gerrit/c/netconf/+/82521

Because of that, adding any of the optional configs
(e.g., datastore-lock) to the body of the create device
RPC was failing. importing it in netconf-node-topology
fixes that.

JIRA: NETCONF-670
Change-Id: I5fc72d9714e0fb4f1dfd26f161d2eb3dcfe8862a
Signed-off-by: Nikhil Soni <nsoni@luminanetworks.com>
(cherry picked from commit 9ed4befdde4f9c88705ddd1ec70c5b5b5ec19a25)

3 years agoBump versions by x.y.(z+1) 22/92222/1
jenkins-releng [Fri, 21 Aug 2020 07:23:30 +0000 (07:23 +0000)]
Bump versions by x.y.(z+1)

Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
Change-Id: I023cb24342f29f19307967a11267504d52ee000a

3 years agoReturn Location in resp header for notif subscrip 31/91731/1
Jamo Luhrsen [Fri, 31 Jul 2020 19:24:22 +0000 (12:24 -0700)]
Return Location in resp header for notif subscrip

For rfc8040 responses we are not getting the Location
returned in the response header. This addresses that.

Pulling this work from master commit in work for NETCONF-312
This patch https://git.opendaylight.org/gerrit/c/netconf/+/90371

JIRA: NETCONF-676

Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
Change-Id: Ia84da3b9cf0789328af72607c8f739ff81c331a4

3 years agoBump odlparent/yangtools/mdsal to 5.0.11/3.0.16/4.0.17 58/90558/6
Robert Varga [Mon, 22 Jun 2020 11:11:34 +0000 (13:11 +0200)]
Bump odlparent/yangtools/mdsal to 5.0.11/3.0.16/4.0.17

This picks up latest upgrades.

Change-Id: I6f886a3b2210eac59b40b28df5e72bb8d876e937
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoExpand rsa-ssh2 signatures 56/91056/2
Robert Varga [Wed, 8 Jul 2020 07:01:58 +0000 (09:01 +0200)]
Expand rsa-ssh2 signatures

With mina-sshd 2.5.0 we can also support openssh.com versions,
update the list to match.

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

3 years agoFix missing stream leaf value 74/91374/2
Nikhil Soni [Thu, 18 Jun 2020 16:31:36 +0000 (22:01 +0530)]
Fix missing stream leaf value

If any subscription is present, attempting to build the tree will be
rejected, as the leaf will not have a set value.

JIRA: NETCONF-700
Change-Id: I6d448ceb42605b268408c91844c5b08b0c8929eb
Signed-off-by: Nikhil Soni <nsoni@luminanetworks.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix Nested YANG 1.1 Action invocation 68/91068/1
ajay_dp001 [Sun, 12 Jul 2020 07:21:17 +0000 (12:51 +0530)]
Fix Nested YANG 1.1 Action invocation

Invocation of action fails if the action is defined as an augmentation.
As it turns out the logic can be very much simplified by just cutting
the last item from YangInstanceIdentifier, as that points to the parent
(and hence context) of the action.

JIRA: NETCONF-696
Signed-off-by: ajay_dp001 <ajay.deep.singh@est.tech>
Change-Id: I1d5cd6f65ae4d040d36de5f24f6d76fe5076991f

3 years agoBump mina-sshd to 2.5.1 54/91054/1
Robert Varga [Tue, 7 Jul 2020 16:46:41 +0000 (18:46 +0200)]
Bump mina-sshd to 2.5.1

https://github.com/apache/mina-sshd/blob/master/docs/changes/2.5.0.md
https://github.com/apache/mina-sshd/blob/master/docs/changes/2.5.1.md

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

3 years agoBind operation prefix to correct namespace 59/90959/2
Robert Varga [Thu, 17 Jan 2019 12:05:32 +0000 (13:05 +0100)]
Bind operation prefix to correct namespace

During NetconfUtil.writeNormalizedNode() we failed
to set a prefix for the netconf operation leading to a warning.
Make sure we set the correct NamespaceContext and fallback
to setPrefix() in case the underlying DOM writer does not
support setNamespaceContext().

JIRA: NETCONF-603
Change-Id: Icff5e045c4e901bb53990177d448a1ea43952c62
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
(cherry picked from commit 197acb99bed8c585e26091eafb761481533718a0)

3 years agoAdd rsa-sha2 signatures to default client 50/90750/1
Robert Varga [Tue, 7 Jul 2020 21:38:03 +0000 (23:38 +0200)]
Add rsa-sha2 signatures to default client

Netopeer2 can be configured to only allow rsa-sha2 signatures, in
which case we fail to connect to it. Add these to the list of
supported signatures by default.

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

3 years agoReport HTTP status 409 on DATA_MISSING error 45/90945/1
Lukas Baca [Mon, 4 May 2020 09:47:23 +0000 (11:47 +0200)]
Report HTTP status 409 on DATA_MISSING error

Change the HTTP status reported on DATA_MISSING conditions to 409,
to match RESTCONF specification. Previous behavior of using 404
can be selected globally via a system property.

JIRA: NETCONF-682
Change-Id: Ibb10b7f9b8d49cd85edaf4fee8986a14cc9f3506
Signed-off-by: Lukas Baca <lbaca@luminanetworks.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
3 years agoHandle multiple rpc-error in the same rpc-reply 57/90257/5
Jamo Luhrsen [Thu, 14 May 2020 21:12:58 +0000 (14:12 -0700)]
Handle multiple rpc-error in the same rpc-reply

When multiple rpc-error is seen in a reply it was not being
caught as an error and eventually falling through the cracks
to show up as an IllegalArgumentException.

This also adds a hack/workaround for passing back all the
error messages found from each of the multiple rpc-error(s)

Also, instead of this case not being recognized as an
rpc-error, it was causing the request to wait until
the device request timeout to expire at which point it's
noted as a full RPC failure and the device is disconnected
and reconnected. Now it is recognized as an error and the
response is handled as soon as it's received and there is
no connection flap.

JIRA: NETCONF-666
Change-Id: I71829e04d7642cfd4d1c54596f1fc7670db0d292
Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 8b2fc27e338bdd9cea9674204c1ec3d40a0c68c4)

3 years agoRevert "Fix nested YANG 1.1 Action invocation" 43/90943/1
Robert Varga [Tue, 7 Jul 2020 08:36:11 +0000 (10:36 +0200)]
Revert "Fix nested YANG 1.1 Action invocation"

This reverts commit fce007c3bf5ba6a98900646b0c08621c35c415ef, as it
breaks CSIT.

JIRA: NETCONF-702
Change-Id: I6f65c587f5e9d04e67dcdcaeda12688d206524b5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUse censor attribute for CLI commands 86/89986/3
Venkatrangan Govindarajan [Wed, 27 May 2020 20:57:58 +0000 (02:27 +0530)]
Use censor attribute for CLI commands

This patch will help avoid usernames/passwords for device
access to be saved in karafhistory

JIRA: NETCONF-694
Change-Id: If2ac255b0ec9bbc32e3aec7d0247497cc927a3e1
Signed-off-by: Venkatrangan Govindarajan <vgovindarajan@luminanetworks.com>
(cherry picked from commit 1c201f8a99753109f18a47053c16c2d9b756ac37)

3 years agoFix nested YANG 1.1 Action invocation 62/90262/1
ajay_dp001 [Wed, 3 Jun 2020 04:27:28 +0000 (09:57 +0530)]
Fix nested YANG 1.1 Action invocation

Invocation of action fails if the action is defined as an augmentation.
As it turns out the logic can be very much simplified by just cutting
the last item from YangInstanceIdentifier, as that points to the parent
(and hence context) of the action.

JIRA: NETCONF-696
Change-Id: I7b03b2b1ebdd7bffbfab5291552c430700ff2850
Signed-off-by: ajay_dp001 <ajay.deep.singh@est.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoNETCONF-685 : Correctly propagate 'pageNum' query parameter 54/89754/3
Richard Kosegi [Wed, 13 May 2020 13:58:01 +0000 (15:58 +0200)]
NETCONF-685 : Correctly propagate 'pageNum' query parameter

There is slight difference between html code used for
bierman vs. 8040 apidocs explorer. However they both trigger same
code path on server side. 8040 is not sending 'pageNum' query
parameter that server-side code is expecting, which leads to NPE.

Change-Id: I7948276390ecf76927a9720ee20ffc1b3c36a109
Signed-off-by: Richard Kosegi <richard.kosegi@gmail.com>
3 years agoBump versions by x.y.(z+1) 51/90051/1
jenkins-releng [Thu, 28 May 2020 23:43:58 +0000 (23:43 +0000)]
Bump versions by x.y.(z+1)

Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
Change-Id: I8be0cd90247faa39e44e808fb6706b13bbf3fd94

3 years agoCorrect POST Location with lists 93/89393/8
wsx25289 [Sun, 26 Apr 2020 07:17:28 +0000 (03:17 -0400)]
Correct POST Location with lists

When a document is POSTed to a map, we end up returning the wrong
location. Update location with the first entry in the map to produce
the correct result.

JIRA: NETCONF-676
Change-Id: I0a8ab5a8147b98847a1fbb1b66cc7bb7b7722872
Signed-off-by: Wsx25289 <10200860@zte.com.cn>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAllow SshClient to be customized via NetconfClientConfiguration 96/89896/5
Tibor Král [Wed, 20 May 2020 13:16:40 +0000 (15:16 +0200)]
Allow SshClient to be customized via NetconfClientConfiguration

There are a number of options we want to have configurable on
a per-client (rather than per-dispatcher) basis. These options
are related to how SSH operates and hence we do not want to
duplicate them but rather allow an explicit pre-built client
instance to be passed down.

JIRA: NETCONF-641
Change-Id: I4c39a8ec909edae0ca15e5af4efd7ca690d64fbf
Signed-off-by: Tibor Král <tibor.kral@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoClean up PostDataTransactionUtil 12/89912/2
Robert Varga [Fri, 22 May 2020 09:23:28 +0000 (11:23 +0200)]
Clean up PostDataTransactionUtil

These methods are horrible in their if/else use. Clean them up a bit
so as to make clearer what is going on.

Change-Id: I8b6a619c3c9af548af42985a79fdf7d9c99a9fa0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoGet notification streams error. 37/88937/3
wsx25289 [Fri, 3 Apr 2020 09:14:58 +0000 (05:14 -0400)]
Get notification streams error.

Get streams should have correct response.

JIRA: NETCONF-663
Change-Id: I5cd5342653795b5531ca66cf6d839f9568c59474
Signed-off-by: Wsx25289 <10200860@zte.com.cn>
(cherry picked from commit d0a714d1ae96204e6b0cfd64dfa8e1448548dcd5)

3 years agoEliminate useless allocation 89/89289/2
Robert Varga [Sat, 25 Apr 2020 14:03:33 +0000 (16:03 +0200)]
Eliminate useless allocation

For some reason we are going through an indirection instead of
getting the modules directly. Fix that.

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

3 years agoNETCONF southbound requires notifications.yang model to be present on the device 09/89909/1
vladyslav.marchenko [Mon, 23 Mar 2020 15:05:23 +0000 (17:05 +0200)]
NETCONF southbound requires notifications.yang model to be present on the device

There is no standardized YANG model for NETCONF notifications simply
because RFC5277 predates YANG and has not been updated. The presence
of the notification capability is enough for notifications to work –
the SchemaContext assembly code supplies the model internally based
on the capability.

JIRA: NETCONF-338
Signed-off-by: vladyslav.marchenko <Vladyslav.Marchenko@pantheon.tech>
Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
Change-Id: Iaec5eab02f8d43f752d90a3fd0ecbc0a57e9e75f

3 years agoAdd Markers.confidential() to netconf protocol messages 10/89810/2
Robert Varga [Fri, 15 May 2020 08:09:06 +0000 (10:09 +0200)]
Add Markers.confidential() to netconf protocol messages

Message dumps can contain confidential information, such as login
credentials and similar. Make sure we mark them so log appenders
can treat them as needed.

JIRA: NETCONF-643
Change-Id: Idfce2dd9a8b0ab1cb840a088b849f7e7dbbcbbed
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump odlparent/yangtools/mdsal to 5.0.7/3.0.11/4.0.14 08/89808/2
Robert Varga [Fri, 15 May 2020 07:44:13 +0000 (09:44 +0200)]
Bump odlparent/yangtools/mdsal to 5.0.7/3.0.11/4.0.14

This picks up latest upgrades.

Change-Id: Icebc4a3886b5084e1546f700b31c9de896d74ae9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdjust window on read 81/89781/2
Robert Varga [Thu, 14 May 2020 21:09:03 +0000 (23:09 +0200)]
Adjust window on read

As a side-effect of us bypassing the read function, we no longer
update the window occupancy, which leads to the other side stopping
sending data. Make sure we adjust the window after passing the data
down the pipeline.

JIRA: NETCONF-686
Change-Id: I66c4873d901f7b88aabd97a1c599be64397b16c7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRe-integrate ssh client 34/89634/1
Robert Varga [Fri, 27 Sep 2019 11:19:22 +0000 (13:19 +0200)]
Re-integrate ssh client

This re-wraps SshClient in a different way, allowing us to shuffle
information directly into netty.

JIRA: NETCONF-674
Change-Id: Iba0abf81fda90b45403b507c7a00ec9fad48c5a1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Tibor Král <tibor.kral@pantheon.tech>
Signed-off-by: Vladyslav Marchenko <vladyslav.marchenko@pantheon.tech>
(cherry picked from commit 7461000dc0c8263ae58f3f95e1e3081daf9f69fa)

3 years agoUpgrade mina-sshd to 2.4.0 33/89633/2
Robert Varga [Mon, 27 Apr 2020 18:45:25 +0000 (20:45 +0200)]
Upgrade mina-sshd to 2.4.0

https://github.com/apache/mina-sshd/blob/master/docs/changes/2.4.0.md

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

3 years agoShade mina-sshd 32/89632/2
Robert Varga [Mon, 27 Apr 2020 12:25:30 +0000 (14:25 +0200)]
Shade mina-sshd

Karaf is using a down-reved version of sshd, which unfortunately
has interplay with us providing a newer version. Shade apache-sshd
so that we can ship whatever version we want without worries about
overlap.

JIRA: NETCONF-677
Change-Id: I0b509b6482f2af207bc07328a9cdb720ebbf506f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit c1999af65772cfa7d9a6789926c496c31637772f)

3 years agoEliminate CallHomeSessionContext.nettyChannel 31/89631/1
Robert Varga [Wed, 29 Apr 2020 17:54:00 +0000 (19:54 +0200)]
Eliminate CallHomeSessionContext.nettyChannel

Holding a temporary field only for it to be picked up by a callback
does not make sense. Eliminate it and allocate it much later in the
game.

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

3 years agoDo not require NetconfSessionImpl 26/89426/1
Robert Varga [Wed, 29 Apr 2020 12:14:18 +0000 (14:14 +0200)]
Do not require NetconfSessionImpl

Drop the instanceOf checks down to simple null checks, so that
we are not tied to a particular implementation.

JIRA: NETCONF-674
Change-Id: I3b9d123d6034a96e6b2d09d68d3cf5bae117cc78
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit d6d0678d47378b5f7ed1316d34ebd240991f5756)

3 years agoAdd sources to shaded-exificient 54/89454/2
Robert Varga [Mon, 27 Apr 2020 13:34:55 +0000 (15:34 +0200)]
Add sources to shaded-exificient

Our shaded-exificient does not contain a source attachment, fix
that.

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

3 years agoExclude xmlpull's MANIFEST.MF 53/89453/2
Robert Varga [Mon, 27 Apr 2020 13:30:12 +0000 (15:30 +0200)]
Exclude xmlpull's MANIFEST.MF

We do not need this manifest, just ditch it to suppress a warning.

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

3 years agoRemove unneeded sshd dependency 52/89452/2
Robert Varga [Mon, 27 Apr 2020 13:39:39 +0000 (15:39 +0200)]
Remove unneeded sshd dependency

odl-netconf-util does not need sshd, move it to netconf-netty-util,
where it really belongs.

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

4 years agoAdd eddsa dependency to netconf-testtool 91/89291/2
Robert Varga [Sun, 26 Apr 2020 14:51:36 +0000 (16:51 +0200)]
Add eddsa dependency to netconf-testtool

This enables it to process ed25519 keys, which is useful.
Also remove superfluous xmlunit version specification.

Change-Id: Ib8803c2684e14840269fbec9f71b89b0d4b460a8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove unneeded blueprint-core dependency 83/89383/1
Robert Varga [Sat, 25 Apr 2020 19:11:17 +0000 (21:11 +0200)]
Remove unneeded blueprint-core dependency

Not sure why this was ever needed, remote it.

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

4 years agoMove eddsa dependency 82/89382/1
Robert Varga [Sat, 25 Apr 2020 19:02:07 +0000 (21:02 +0200)]
Move eddsa dependency

We actually do not need to have it in netconf-netty-util, it
is enough to have it as a test dependency near SSHTest.

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

4 years agoPull eddsa into netconf-netty-util 81/89281/1
Robert Varga [Wed, 22 Apr 2020 23:15:03 +0000 (01:15 +0200)]
Pull eddsa into netconf-netty-util

Pulling in this dependency allows SSHTest to pass with ed25519
keys being configured.

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

4 years agoAdd plain PATCH capability to RFC8040 server 11/89211/3
Allan Clarke [Mon, 2 Mar 2020 20:29:11 +0000 (14:29 -0600)]
Add plain PATCH capability to RFC8040 server

Rename constant PATCH to YANG_PATCH - there are now two patch types
Add unit tests for PlainPatchDataTransactionUtil
Update unit tests for RestconfDataService

JIRA: NETCONF-657
Change-Id: I0356e7d4947f89ed603d71e722d845e709ea4e03
Signed-off-by: Allan Clarke <aclarke@pobox.com>
Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit fe6e7e380f5948e2582d97df5cb2498c59353869)

4 years agoReuse SchemaContext.NAME for base NETCONF data qname 13/89213/1
Robert Varga [Tue, 21 Apr 2020 08:46:50 +0000 (10:46 +0200)]
Reuse SchemaContext.NAME for base NETCONF data qname

This QName is a well-known constant available from SchemaContext,
do not use scattered definition.

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

4 years agoAdd a dedicated AuthenticationFailedException 64/89164/1
Robert Varga [Sun, 19 Apr 2020 11:18:47 +0000 (13:18 +0200)]
Add a dedicated AuthenticationFailedException

When we have a failure to authenticate, we want the client to be
able to discern this state.

Add a dedicated exception and report it instead of straight
exception from SSH (which may be anything) or a generic ISE.

JIRA: NETCONF-665
Change-Id: I1f113d5aaff6bf4482d9725adaa06b5d2479304c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 027c3087a288cc7291cdfe265711dfaaa907bf9b)

4 years agoFix defensive subscriber removal 89/88989/4
wsx25289 [Thu, 9 Apr 2020 07:29:44 +0000 (03:29 -0400)]
Fix defensive subscriber removal

Attempting to modify the collection while iterating over it
results in ConcurrentModificationException. Use an explicit
iterator and Iterator.remove() to prevent it.

JIRA: NETCONF-664
Change-Id: I6206dfdd896307f83420cfb3201d1125adbf9a07
Signed-off-by: Wsx25289 <10200860@zte.com.cn>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFiles should not be executable 62/89162/1
Robert Varga [Sun, 19 Apr 2020 13:32:33 +0000 (15:32 +0200)]
Files should not be executable

We do not want these to be executable, drop those permissions.

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

4 years agoDo not consider query depth in initial namespace 90/87390/4
wsx25289 [Mon, 3 Feb 2020 10:57:49 +0000 (05:57 -0500)]
Do not consider query depth in initial namespace

Initial namespace is independent of the maximum depth requested
by the user. This is a mixup with path depth introduced in the
previous fix for NETCONF-497.

Change-Id: I90fdcc60b2be0891082333490d77d681ecc4fc4a
Signed-off-by: Wsx25289 <10200860@zte.com.cn>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFix default value check 22/88922/2
Magic_J [Mon, 9 Apr 2018 06:17:44 +0000 (14:17 +0800)]
Fix default value check

TypeDefinition.getDefaultValue() is returning an optional, which
results in it always being non-null. Fix the check for nullness
and make sure we use the correct value.

Change-Id: Id5aba6cd215d4e19f8b583a81e5599daa9bbe12d
Signed-off-by: Magic_J <panda.magic.j@gmail.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove references to sal-common-impl 35/88935/1
Robert Varga [Mon, 6 Apr 2020 11:25:15 +0000 (13:25 +0200)]
Remove references to sal-common-impl

We do not need anything from sal-common-impl, remove references
to it.

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

4 years agoMigrate Compendium reference 89/88789/1
Robert Varga [Mon, 6 Apr 2020 10:29:30 +0000 (12:29 +0200)]
Migrate Compendium reference

We are using OSGi R6, migrate the artifact reference.

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

4 years agoBring doc building up to python3 25/88625/1
Jamo Luhrsen [Wed, 26 Feb 2020 00:52:08 +0000 (16:52 -0800)]
Bring doc building up to python3

looks like readthedocs builds have been failing for a while
because python2 can't find some version of sphinx that is
now required by lfdocs-conf. Maybe an older version of
sphinx would still work, but it's time to catch up to
python3 anyway.

integration/test just added this same .readthedocs.yml
file which finally got it's rtd build to work after
having unknowingly been failing for a month:

https://git.opendaylight.org/gerrit/c/integration/test/+/88064
https://readthedocs.org/projects/odl-integrationtest/builds/?page=1

and netconf has been in the same boat:
https://readthedocs.org/projects/odl-netconf/builds/?page=1

Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
Change-Id: I63c01d8d9805ee492ebeb4d1b65723ab8a2d59b9
(cherry picked from commit bca11c23ab24a7119a3972e4629f46e9e0565abd)

4 years agoBump odlparent/yangtools/mdsal to 5.0.6/3.0.10/4.0.13 51/88351/4
Robert Varga [Sat, 7 Mar 2020 07:53:52 +0000 (08:53 +0100)]
Bump odlparent/yangtools/mdsal to 5.0.6/3.0.10/4.0.13

This picks up latest upgrades, which necessitate a few fixes for
checkstyle violations.

Change-Id: I8e23365e32756793d7a17225c46f7bde79858fbe
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoNETCONF-125 connection timeout and between timeout are fixed 96/88296/1
Sarguna Dharani [Mon, 10 Feb 2020 11:55:44 +0000 (17:25 +0530)]
NETCONF-125 connection timeout and between timeout are fixed

Signed-off-by: Sarguna Dharani <sarguna.dharani@verizon.com>
Change-Id: I56275dfa10dcfd4ed1a30fbb6c34169e301269db
(cherry picked from commit fe5d5bcfdc2dff7c6fe83e1c6b7dbb69d386f06c)
(cherry picked from commit 14a729f9688c77c6163fc44ee830e425d432e0e8)

4 years agoRemove unneeded override 50/88350/1
Robert Varga [Sat, 7 Mar 2020 07:52:55 +0000 (08:52 +0100)]
Remove unneeded override

We have versions correctly propagated out of odlparent, make sure
to not override them.

Change-Id: Ib2b0dcfbee8e78f280bef53503225b10d26a2474
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoReject multiple sessions with the same host key 45/88245/1
Manoj Chokka [Mon, 10 Feb 2020 18:15:34 +0000 (23:45 +0530)]
Reject multiple sessions with the same host key

SSH host key is supposed to be unique among devices. If there is an
attempt to establish a session with the same key, terminate the new
session.

Since that rules out the possibility of multiple remotes for a key,
refactor the code to use a ConcurrentMap instead of a Multimap --
removing the need for any locking.

As we really want to use CallHomeProtocolSessionContext in logging,
make it implement a toString() method and clean it up a bit.

JIRA: NETCONF-653
Change-Id: I2d78b9aa34ee4b16d0c6d2ed2ac172942c575851
Signed-off-by: Manoj Chokka <manoj.chokka@verizon.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 547c1ddb9d8794c4cd40b16a88a28e337dfb7730)

4 years agoDo not attempt to parse empty RPC/action reply 72/87972/3
Sanjana B [Mon, 10 Feb 2020 11:26:59 +0000 (16:56 +0530)]
Do not attempt to parse empty RPC/action reply

An RPC or action can legally result in an empty reply,
even if it has some optional content in its schema.

Detect </ok> reply and do not attempt to parse it as
YANG data.

JIRA: NETCONF-568
JIRA: NETCONF-644
Change-Id: I1f0b5c349f418824b9b0b3e1f01f16824b1b8df4
Signed-off-by: Anna Bencurova <Anna.Bencurova@pantheon.tech>
Signed-off-by: Sanjana B <sanjana.b@verizon.com>
Signed-off-by: Tibor Král <tibor.kral@pantheon.tech>
(cherry picked from commit df25a540e0985695d3d0f93c68a977a4de729329)

4 years agoAdd option to provide custom SshClient for netconf-client 70/87970/1
Tibor Král [Mon, 24 Feb 2020 15:28:11 +0000 (16:28 +0100)]
Add option to provide custom SshClient for netconf-client

When creating netconf-client the DEFAULT SshClient is
used on the background by the AsyncSshHandler. This adds
the option to provide custom SshClient to be used instead.

JIRA: NETCONF-641
Change-Id: I99b1c2e882353732a2e55d0523ee6adbd1ca8cc0
Signed-off-by: Tibor Král <tibor.kral@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 995f11a17da91d69a4c6650016ff4b6afafc1259)

4 years agoCustom scheme-cache-directory yang models are not replicated among 93/83593/2
Jakub Toth [Thu, 8 Aug 2019 12:15:17 +0000 (08:15 -0400)]
Custom scheme-cache-directory yang models are not replicated among
cluster members

The problem was talking about the MissingSchemaSources, where in
the master wasn't setup schema repo & schema registry correctly
based on the data from NetconfNode (from NetconfTopologySetup).
Espacially if the node was using the specific schema cache directory.
According to, slaves were trying to ask the master for sources
(YangTextSchemaSource). In this way, master was trying to resolve
sources from the empty schema repo and it was failing there.

JIRA: NETCONF-610
Change-Id: I84290c085b8a54a9758a85b68113c18aee284a1c
Signed-off-by: Jakub Toth <jtoth@luminanetworks.com>
(cherry picked from commit 7506ce46c6c1045d98fa3bef735e60649dabc009)

4 years agoBump versions by x.y.(z+1) 03/87603/1
jenkins-releng [Wed, 12 Feb 2020 02:32:15 +0000 (02:32 +0000)]
Bump versions by x.y.(z+1)

Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
Change-Id: I811781c49c71b9158d573c3c3e35c2bd1f5237aa

4 years agoFixed wrong exception types 29/87129/1
Jaroslav Tóth [Mon, 12 Aug 2019 14:38:38 +0000 (16:38 +0200)]
Fixed wrong exception types

- After implementation of exception mapper we can throw on error
  events RestconfDocumentedException that will be automatically
  mapped to response errors container.
- This patch changes IAE or NPE during serialization/deserialition
  of instance identifier to right RDE types - HTTP method invoked
  on non-existing/malformed IID will lead to returned errors
  container (compliancy against spec.) and not status code 500
  without any description.

Change-Id: I0982e89b90d4a254656b2b9dcdab87fcbb4a8103
Signed-off-by: Jaroslav Tóth <jtoth@frinx.io>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit d30aa7c5024c62e90cac699d1d243940cb3f0ded)

4 years agoBump to odlparent-5.0.5/yangtools-3.0.9/mdsal-4.0.11 27/86927/5
Robert Varga [Wed, 15 Jan 2020 13:22:35 +0000 (14:22 +0100)]
Bump to odlparent-5.0.5/yangtools-3.0.9/mdsal-4.0.11

Pick up latest fixes.

Change-Id: I47616137b95c16c497cee6df963a437378b4bd91
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAdd namespace to action request XML 12/86812/1
Anna Bencurova [Wed, 8 Jan 2020 14:33:05 +0000 (15:33 +0100)]
Add namespace to action request XML

JIRA: NETCONF-652
Change-Id: I7a7b52d6db821f82995432c3f75ba24fe8e86067
Signed-off-by: Anna Bencurova <Anna.Bencurova@pantheon.tech>
(cherry picked from commit 5c1a60c355f60de1d5473a83989bb38151bffce4)

4 years agoRemove jsr173-ri from dependencies 86/86486/2
Robert Varga [Wed, 18 Dec 2019 14:36:17 +0000 (15:36 +0100)]
Remove jsr173-ri from dependencies

JSR173 is part of JRE, hence there is no point to inherit this
dependency. It also helps to have our releases consumable from
Central (which does not carry the .jar).

Change-Id: Iba78f955c8da0b9f0f49ebfa7893094ce8f6931c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove websocket-server override 87/86487/1
Robert Varga [Wed, 18 Dec 2019 14:35:20 +0000 (15:35 +0100)]
Remove websocket-server override

odlparent-5.0.4 is providing this declaration, remote it.

Change-Id: Id90d9b07031263d966a17e00e03f7d71b501044c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump odlparent/yangtools/mdsal to 5.0.4/3.0.7/4.0.8 87/86387/1
Robert Varga [Thu, 12 Dec 2019 07:31:45 +0000 (08:31 +0100)]
Bump odlparent/yangtools/mdsal to 5.0.4/3.0.7/4.0.8

Pick up the latest upgrades and fixes.

Change-Id: If96deb06f325f9a9ec417442eec3360c27931f63
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump to odlparent-5.0.3/yangtools-3.0.6/mdsal-4.0.7 13/85513/6
Robert Varga [Sun, 3 Nov 2019 07:45:24 +0000 (08:45 +0100)]
Bump to odlparent-5.0.3/yangtools-3.0.6/mdsal-4.0.7

This picks up latest upgrades and fixes.

Change-Id: I5e4d4536f156b55d2d1288820814c3b4297fd58c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoUpdate for sshd-2.3.0 changes 21/85521/5
Robert Varga [Mon, 16 Sep 2019 02:24:45 +0000 (04:24 +0200)]
Update for sshd-2.3.0 changes

sshd-2.3.0 changed APIs slightly, this makes the simple migration
of our code.

Change-Id: Ic525b317356a8d9ee3b0ad0b8a0fa78e10d2b482
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 74a5603f11edae5a6c071d35e8a2c33845440df9)
(cherry picked from commit 9778e2be7f4ae45cbb246b36ee8ddb9318e564d2)

4 years agoCorrectly close NormalizedNodeStreamWriters 72/85572/2
Robert Varga [Tue, 5 Nov 2019 06:50:48 +0000 (07:50 +0100)]
Correctly close NormalizedNodeStreamWriters

This code ends up not not closing the stream writer correctly,
which means some state may end up being unfinished. Fix that up.

Change-Id: Icad45cd12d30e44dabe4f86e73a6790bd5137154
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoProperly close stream writer 47/85547/2
Robert Varga [Sun, 20 Oct 2019 09:23:48 +0000 (11:23 +0200)]
Properly close stream writer

Failing to close the streamwriter means it will not output its
trailer in all cases. Fix that.

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

4 years agoDo not use toString() in looging messages 35/85535/2
Robert Varga [Mon, 28 Oct 2019 12:45:05 +0000 (13:45 +0100)]
Do not use toString() in looging messages

This eliminates unnecessary toString() calls, as logging implementation
will call it when necessary.

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

4 years agoFix config/oper reconciliation for leaf-lists 37/85537/1
wsx25289 [Tue, 15 Oct 2019 08:01:30 +0000 (04:01 -0400)]
Fix config/oper reconciliation for leaf-lists

When config and operational datastore both have same data, then if
we get data which has a leaf-list node by rests/data, it will fail,
because there is no code to process leaf-list.

Change-Id: I4724447158bf0a1a12e87145dcb361e8196b1170
Signed-off-by: Wsx25289 <10200860@zte.com.cn>
(cherry picked from commit cf8760f55d752af8abafbf09d0f4f9116b9c753b)

4 years agoLower visibility to package 22/84922/2
Robert Varga [Tue, 1 Oct 2019 21:13:35 +0000 (23:13 +0200)]
Lower visibility to package

This is a private-class method, it is fair game to declare it as
package-private, as noone can observe it outside of the nest.

Remove the need for shenanigans and lower access to the sole
method.

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

4 years agoAcquire RFC8528 mount point map 49/84749/7
Robert Varga [Thu, 26 Sep 2019 15:58:35 +0000 (17:58 +0200)]
Acquire RFC8528 mount point map

This adds the logic to create a mountpoint map, without supporting
inline schemas and recursion.

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

4 years agoApply modernizations 88/85288/2
Robert Varga [Sun, 6 Oct 2019 16:41:47 +0000 (18:41 +0200)]
Apply modernizations

Replace Guava constructs with their Java 8 equivalents.

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

4 years agoUntangle NetconfDevice setup 87/85287/2
Robert Varga [Thu, 26 Sep 2019 12:08:40 +0000 (14:08 +0200)]
Untangle NetconfDevice setup

NetconfDevice sets up the device connection in multiple stages,
which is all done in a messy way. Untangle the setup procedure,
so that we can properly hook up into it.

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

4 years agoConvert to using requireNonNull() 86/85286/2
Robert Varga [Wed, 4 Sep 2019 06:30:56 +0000 (08:30 +0200)]
Convert to using requireNonNull()

This is a second pass to migrate further Preconditions users
to java.util.Objects.requireNonNull().

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

4 years agoBump versions by x.y.(z+1) 70/85470/1
jenkins-releng [Fri, 1 Nov 2019 06:04:49 +0000 (06:04 +0000)]
Bump versions by x.y.(z+1)

Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
Change-Id: I5b12c177c45f024229f7efa39dd58dd44b8392f6

4 years agoAdd pagination for mounted resources of apidocs 79/84979/1
Jie Han [Thu, 22 Aug 2019 12:06:24 +0000 (20:06 +0800)]
Add pagination for mounted resources of apidocs

Only show 20 yang resource for one page when there're
large amount yang resoures from a mount point such that
the explorer would not clash.

Change-Id: I7f7180ae7464407933cee49bd4fe8d24db216f77
Signed-off-by: Jie Han <han.jie@zte.com.cn>
(cherry picked from commit c8f621b97a42a68e42b7b4df49312a9d5048d59d)

4 years agoReorganize transactionChainHandler usage. 78/84978/1
PeterSuna [Mon, 9 Sep 2019 11:45:43 +0000 (13:45 +0200)]
Reorganize transactionChainHandler usage.

Update transactionChainHandler to conform dependecny injection pattern.
Update DOMtransactionChain to be used multiple time.

JIRA: NETCONF-352
Change-Id: I26da73992ed2772f4f84e2a09788600b808283b3
Signed-off-by: PeterSuna <peter.suna@pantheon.tech>
(cherry picked from commit 0a8ab4d8188442b3d6ec7ccb14f413b06a448aa1)

4 years agoMigrate YangInstanceIdentifier.EMPTY users 77/84977/1
Robert Varga [Tue, 3 Sep 2019 10:27:41 +0000 (12:27 +0200)]
Migrate YangInstanceIdentifier.EMPTY users

This moves over to use the replacement empty() method.

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

4 years agoRemove use NodeIdentifierWithPredices.getKeyValues() 76/84976/1
Robert Varga [Tue, 3 Sep 2019 07:39:54 +0000 (09:39 +0200)]
Remove use NodeIdentifierWithPredices.getKeyValues()

This method has been superseded by plain access, update accordingly.

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

4 years agoSeparate out DeviceSources(Resolver) 75/84975/1
Robert Varga [Mon, 26 Aug 2019 13:38:45 +0000 (15:38 +0200)]
Separate out DeviceSources(Resolver)

NetconfDevice is quite overloaded, making it unclear what methods
participate on each stage of context assebly. This separates out
DeviceSourcesResolver, so that the logic inside it is well contained
outside of NetconfDevice.

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

4 years agoSimplify base schema lookups 74/84974/1
Robert Varga [Mon, 26 Aug 2019 13:20:06 +0000 (15:20 +0200)]
Simplify base schema lookups

We are checking for notification support multiple times, this
refactors the code to that only once.

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

4 years agoFix choice action request test 73/84973/1
Anna Bencurova [Wed, 28 Aug 2019 13:30:49 +0000 (15:30 +0200)]
Fix choice action request test

JIRA: NETCONF-639

Change-Id: Ic1d3a5b18ff64708fe9b55c3aa243b6a2db5c803
Signed-off-by: Anna Bencurova <Anna.Bencurova@pantheon.tech>
(cherry picked from commit 271121d0d00b56e5169923fb0225f6c64391bfb2)

4 years agoPropagate MountPointContext to NetconfMessageTransformer 72/84972/1
Robert Varga [Mon, 26 Aug 2019 10:58:10 +0000 (12:58 +0200)]
Propagate MountPointContext to NetconfMessageTransformer

In order to deal with NETCONF mount points, the transformer needs
to understand the execution context here. This patch updates the APIs
to pass the context down and implementations to use an empty mount
point context.

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

4 years agoUpdate NodeIdentifierWithPredicates construction 71/84971/1
Robert Varga [Wed, 28 Aug 2019 12:10:30 +0000 (14:10 +0200)]
Update NodeIdentifierWithPredicates construction

Direct constructors are going away, use factory methods instead.

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

4 years agoFix action lookups 70/84970/1
Robert Varga [Fri, 23 Aug 2019 16:05:42 +0000 (18:05 +0200)]
Fix action lookups

Actions, unlike RPCs, are not uniquely identified by their last
component, simply because they can be defined at any nest level --
and while their names can be equal, they can be completely different
things.

JIRA: NETCONF-639
Change-Id: Ic9f1df106240a26dd14a5f34de34a198945355c3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 4dc751203f52b31c4327ad8793956047691ff9fb)