netconf.git
3 years agoBump odlparent/yangtools/mdsal to 6.0.11/4.0.13/5.0.14 55/91555/1
Robert Varga [Wed, 22 Jul 2020 21:27:46 +0000 (23:27 +0200)]
Bump odlparent/yangtools/mdsal to 6.0.11/4.0.13/5.0.14

Pick up latest updates from upstream.

Change-Id: I8145730aaec3fa94a8647ed0e719909520424089
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd support for nested notifications to NetconfMessageTransformer 92/90692/5
Anna Bencurova [Thu, 25 Jun 2020 12:16:02 +0000 (14:16 +0200)]
Add support for nested notifications to NetconfMessageTransformer

RFC7950 nested notifications are becoming the norm, yet we cannot
seem to grasp them. This patch adds preliminary support for decoding
them and shuffling them towards whoever may be consuming them.

JIRA: NETCONF-704
Change-Id: I63bebf87de93611f7c887f8b077e59000876aa84
Signed-off-by: Anna Bencurova <Anna.Bencurova@pantheon.tech>
3 years agoBump odlparent/yangtools/mdsal to 6.0.10/4.0.12/5.0.13 84/91384/1
Robert Varga [Fri, 17 Jul 2020 15:23:51 +0000 (17:23 +0200)]
Bump odlparent/yangtools/mdsal to 6.0.10/4.0.12/5.0.13

Pick up latest updates from upstream.

Change-Id: If2bf45eae7c2db8c26edeb3b63a4114166d35bd0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix missing stream leaf value 73/91373/1
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 67/91067/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 agoFix OperationsCreator javadoc 87/91087/1
Robert Varga [Fri, 10 Jul 2020 10:46:02 +0000 (12:46 +0200)]
Fix OperationsCreator javadoc

checkstyle is a bit more touchy, fix it up.

Change-Id: I39ad689d10ba508f2284cbc6cdf9c915ab5796c9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump odlparent/yangtools/mdsal 83/91083/2
Robert Varga [Fri, 10 Jul 2020 05:00:31 +0000 (07:00 +0200)]
Bump odlparent/yangtools/mdsal

This adopts the following versions:
- odlparent-6.0.9
- yangtools-4.0.11
- mdsal-5.0.12

Change-Id: I28f0fafe62c6111bac3411ec36a12a746ec67535
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoExpand rsa-ssh2 signatures 57/91057/1
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 agoBump mina-sshd to 2.5.1 55/91055/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 agoAdd rsa-sha2 signatures to default client 49/90749/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 agoBind operation prefix to correct namespace 47/90747/1
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 agoReport HTTP status 409 on DATA_MISSING error 59/89559/7
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 agoRevert "Fix nested YANG 1.1 Action invocation" 84/90484/2
Jamo Luhrsen [Mon, 22 Jun 2020 17:59:23 +0000 (17:59 +0000)]
Revert "Fix nested YANG 1.1 Action invocation"

This reverts commit 126f12f7a2f64d88060f6d55e3c738e5d891deed.

Reason for revert: checking if this caused the regression reported in NETCONF-702

Change-Id: I6f65c587f5e9d04e67dcdcaeda12688d206524b5
Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
3 years agoCatch exception when transformer fails to parse 71/90271/2
Jamo Luhrsen [Thu, 4 Jun 2020 00:17:26 +0000 (17:17 -0700)]
Catch exception when transformer fails to parse

There is a deadlock if a transformer fails to parse a reply
and uses that to invoke the rpc. The future gets stuck and
never completes. This catches the case of a bad toRpcResult
from the transformer and marks the future with a
DefaultDOMRpcException

JIRA: NETCONF-695
Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
Change-Id: Ied3e0ac4b08e128c41f54e01df91543e4d3fc3a4

3 years agoFix nested YANG 1.1 Action invocation 61/90261/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 agoClean up some log messages and descriptions 89/89989/2
Jamo Luhrsen [Wed, 27 May 2020 17:21:22 +0000 (10:21 -0700)]
Clean up some log messages and descriptions

Just some minor changes for readability when digging through
log files. yang desrciption was changed to match log message
as they were duplicates of each other.

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

3 years agoHandle multiple rpc-error in the same rpc-reply 56/90256/1
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
Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
Change-Id: I71829e04d7642cfd4d1c54596f1fc7670db0d292
(cherry picked from commit 8b2fc27e338bdd9cea9674204c1ec3d40a0c68c4)

3 years agoUse censor attribute for CLI commands 85/89985/1
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 agoNETCONF-685 : Correctly propagate 'pageNum' query parameter 53/89753/2
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 agoCorrect POST Location with lists 29/89929/2
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>
(cherry picked from commit d2e6a73b08ae4a3d6a7975895404ca3de07d2ee2)

3 years agoClean up PostDataTransactionUtil 85/89885/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 agoAllow SshClient to be customized via NetconfClientConfiguration 83/89883/2
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 agoGet notification streams error. 53/89553/2
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>
3 years agoNETCONF southbound requires notifications.yang model to be present on the device 08/89908/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

4 years agoAdjust window on read 28/89828/1
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>
(cherry picked from commit 65f621ffc65f5905bd94692927ca8e4fede5efff)

4 years agoRe-integrate ssh client 27/89827/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)

4 years agoUpgrade mina-sshd to 2.4.0 26/89826/1
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)

4 years agoShade mina-sshd 25/89825/1
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)

4 years agoEliminate CallHomeSessionContext.nettyChannel 24/89824/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)

4 years agoDo not require NetconfSessionImpl 27/89427/2
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)

4 years agoBump versions by x.y.(z+1) 91/89791/1
jenkins-releng [Fri, 15 May 2020 01:38:43 +0000 (01:38 +0000)]
Bump versions by x.y.(z+1)

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

4 years agoEliminate useless allocation 88/89288/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)

4 years agoAdd sources to shaded-exificient 51/89451/1
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)

4 years agoExclude xmlpull's MANIFEST.MF 50/89450/1
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)

4 years agoRemove unneeded sshd dependency 49/89449/1
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 90/89290/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 85/89385/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 84/89384/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 80/89280/2
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 agoBump odlparent/yangtools/mdsal 96/89196/3
Robert Varga [Tue, 21 Apr 2020 10:39:36 +0000 (12:39 +0200)]
Bump odlparent/yangtools/mdsal

This adopts the following versions:
- odlparent-6.0.6
- yangtools-4.0.8
- mdsal-5.0.10

Change-Id: I1ccad57f35148b2dd8c53b15c2f6efb5a7e59ed0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAdd plain PATCH capability to RFC8040 server 65/89165/2
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 14/89214/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 63/89163/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 84/89184/1
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 61/89161/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 36/88936/3
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 23/88923/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 34/88934/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 88/88788/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 07/88307/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 versions by x.y.(z+1) 23/88523/1
jenkins-releng [Thu, 19 Mar 2020 11:59:38 +0000 (11:59 +0000)]
Bump versions by x.y.(z+1)

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

4 years agoNETCONF-125 connection timeout and between timeout are fixed 95/88295/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)

4 years agoReject multiple sessions with the same host key 54/88254/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 agoAdd option to provide custom SshClient for netconf-client 69/87969/2
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 agoDo not attempt to parse empty RPC/action reply 71/87971/1
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 agoUpdate .gitreview to stable/magnesium 88/87888/1
jenkins-releng [Tue, 18 Feb 2020 22:05:26 +0000 (22:05 +0000)]
Update .gitreview to stable/magnesium

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

4 years agoDrop the use of google truth/@LogRule 57/87057/2
Robert Varga [Mon, 20 Jan 2020 19:00:16 +0000 (20:00 +0100)]
Drop the use of google truth/@LogRule

Simple JUnit is sufficient here, no need to depend on Truth
nor infrautils-testutils here.

Change-Id: I306799d4adc1f98fe7ffe8477c25fb231d9bd0a4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump to odlparent-6.0.4/yangtools-4.0.6/mdsal-5.0.9 96/86996/3
Robert Varga [Thu, 16 Jan 2020 21:10:01 +0000 (22:10 +0100)]
Bump to odlparent-6.0.4/yangtools-4.0.6/mdsal-5.0.9

Pick up latest fixes and upgrades.

Change-Id: Id639868a847ec16da35040cf2cd45ba83860d99b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAdd namespace to action request XML 10/86810/2
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>
4 years agoPropagate MountPointContext to NetconfRpcStructureTransformer 15/86515/3
Robert Varga [Thu, 19 Dec 2019 18:04:36 +0000 (19:04 +0100)]
Propagate MountPointContext to NetconfRpcStructureTransformer

We need to be aware of schema mounts, so that we can properly handle
them. This patch attempts to push down MountPointContext to all the
interested places.

Change-Id: Ic1c3a29bf69ee5838cd5f8434a0bcfdc767642b7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAdd ietf-netconf-acm model 17/86517/3
Robert Varga [Fri, 20 Dec 2019 09:09:07 +0000 (10:09 +0100)]
Add ietf-netconf-acm model

This model is needed with some netconf devices, make sure we
package it.

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

odlparent-6.0.3 is providing this declaration, remote it.

Change-Id: Id90d9b07031263d966a17e00e03f7d71b501044c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove jsr173-ri from dependencies 83/86483/1
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 ARIES-1923 workaround 38/86438/1
Robert Varga [Mon, 16 Dec 2019 21:03:55 +0000 (22:03 +0100)]
Remove ARIES-1923 workaround

We now have proper monkey-patch in place and can therefore remove
this workaround.

Change-Id: Ibdccb625f951c1dcd248fbb86176a8474842fd5e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump odlparent/yangtools/mdsal to 6.0.3/4.0.3/5.0.6 68/86368/2
Robert Varga [Thu, 12 Dec 2019 07:01:49 +0000 (08:01 +0100)]
Bump odlparent/yangtools/mdsal to 6.0.3/4.0.3/5.0.6

Pick up the latest upgrades and fixes.

Change-Id: If80c79f631d97b602b908f633f92d8aca4e90cda
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump to odlparent-6.0.1/yangtools-4.0.2/mdsal-5.0.4 18/85618/1
Robert Varga [Wed, 6 Nov 2019 14:09:37 +0000 (15:09 +0100)]
Bump to odlparent-6.0.1/yangtools-4.0.2/mdsal-5.0.4

This picks up latest upgrades and fixes.

Change-Id: I8db358b0af81394a561071d98bffea168dda47cc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoCorrectly close NormalizedNodeStreamWriters 73/85573/1
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 48/85548/1
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 agoUpdating Action Rest Endpoints on Swagger UI 01/85501/2
ajay_dp001 [Sat, 2 Nov 2019 02:25:45 +0000 (02:25 +0000)]
Updating Action Rest Endpoints on Swagger UI

NETCONF-647

Signed-off-by: ajay_dp001 <ajay.deep.singh@est.tech>
Change-Id: I790d81a833bdcb611459b3418fbf66be2388e050

4 years agoFix config/oper reconciliation for leaf-lists 14/85114/6
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>
4 years agoDo not use toString() in looging messages 06/85406/1
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>
4 years agoRemove remaining use of compat DTO methods 96/85396/1
Robert Varga [Fri, 25 Oct 2019 13:25:51 +0000 (15:25 +0200)]
Remove remaining use of compat DTO methods

This fixes up the final three offenders.

Change-Id: I834fe08bae984d0e5798f5b30d68f7ed1d89f0cf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMigrate to use java.util.Optional 95/85395/1
Robert Varga [Fri, 25 Oct 2019 13:21:56 +0000 (15:21 +0200)]
Migrate to use java.util.Optional

Modernizer is pointing out this use of Guava, migrate it. Also clean
up builder use in this class.

Change-Id: I2a20e21fa1e767f594d0f20e9eebe6dce4e7996e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMigrate setters 32/84932/7
Robert Varga [Mon, 7 Oct 2019 05:59:21 +0000 (07:59 +0200)]
Migrate setters

This migrate Binding DTO setter usage to use Uint types, fixing
deprecation warnings.

Change-Id: I6eb6224ccaca1444c686eec52b36afa625939557
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAdjust for AAA ditching WebClient 90/84790/20
Robert Varga [Fri, 27 Sep 2019 15:15:19 +0000 (17:15 +0200)]
Adjust for AAA ditching WebClient

This adjust for the fact AAA is using Java 11 HttpClient.

Change-Id: Ie0afd4db88828fa76581b830e74819344d19b916
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove superfluous checkstyle/spotbugs configuration 82/85282/1
Robert Varga [Mon, 21 Oct 2019 04:12:43 +0000 (06:12 +0200)]
Remove superfluous checkstyle/spotbugs configuration

odlparent is already configuring these, remove the declarations.

Change-Id: I309cd92b5096f6ec2c2d025f0ba735412dc94720
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAcquire RFC8528 mount point map 90/85090/1
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>
4 years agoBump mdsal to 5.0.3 64/85064/1
Robert Varga [Fri, 11 Oct 2019 14:11:04 +0000 (16:11 +0200)]
Bump mdsal to 5.0.3

This bumps mdsal to 5.0.3 to workaround issues with Blueprint
injection.

Change-Id: I848c9220ce06ec7b4af304ab64948bdc30257dbd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump mdsal to 5.0.2 47/84147/43
Robert Varga [Mon, 2 Sep 2019 17:30:16 +0000 (19:30 +0200)]
Bump mdsal to 5.0.2

This bumps mdsal to 5.0.2 as part of Magnesium MRI.

Change-Id: Id9ab45edf28477dca8acf8f7538cfd26f237f6f4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump yangtools to 4.0.1 46/84146/40
Robert Varga [Mon, 2 Sep 2019 17:29:40 +0000 (19:29 +0200)]
Bump yangtools to 4.0.1

This bumps yangtools to 4.0.1 as part of Magnesium MRI.

Change-Id: I6228c73d31721c8427e7f456afd5ab3ff715c88b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoUpdate for sshd-2.3.0 changes 93/84493/14
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>
4 years agoBump odlparent to 6.0.0 45/84145/32
Robert Varga [Mon, 2 Sep 2019 17:29:11 +0000 (19:29 +0200)]
Bump odlparent to 6.0.0

This bumps odlparent to 6.0.0 as part of Magnesium MRI.

Change-Id: I19505dd80b832cd6ed8b68daf471d9e90d3dfdd2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMake negotiationFuture final 87/84987/1
Robert Varga [Tue, 8 Oct 2019 10:28:05 +0000 (12:28 +0200)]
Make negotiationFuture final

It is obvious this is field does not change once constructed, make
sure constructors reflect that.

Change-Id: Ib867ba94775c52b241f7044ac6388c4263ad5074
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoApply modernizations 30/84930/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>
4 years agoUntangle NetconfDevice setup 45/84745/4
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>
4 years agoLower visibility to package 63/84863/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>
4 years agoMigrate YangInstanceIdentifier.EMPTY users 75/84175/19
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>
4 years agoRemove restconf-artifacts 04/83904/5
Robert Varga [Thu, 22 Aug 2019 13:48:27 +0000 (15:48 +0200)]
Remove restconf-artifacts

As netconf-artifacts holds all that is needed to consume
our project's artifacts, this removes the duplicate
restconf-artifacts after downstreams have been fixed up.

Change-Id: I406ac03a6ab930cd049a2b7c6433e3a03265d7fb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump mdsal to 4.0.6 25/84425/5
Robert Varga [Sat, 14 Sep 2019 02:04:27 +0000 (04:04 +0200)]
Bump mdsal to 4.0.6

This picks up latest fixes.

Change-Id: Iab74ff588673787123469f859125a336da87b209
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump yangtools to 3.0.5 24/84424/4
Robert Varga [Sat, 14 Sep 2019 02:04:05 +0000 (04:04 +0200)]
Bump yangtools to 3.0.5

This picks up latest fixes.

Change-Id: Id49b5713aa8feeed31aa690ad7011b0ce35a80ea
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump odlparent to 5.0.2 44/84144/18
Robert Varga [Mon, 2 Sep 2019 17:27:15 +0000 (19:27 +0200)]
Bump odlparent to 5.0.2

This bumps odlparent to pick up latest references.

Change-Id: Ica16c98bd6eeeb2530bdc9cee4bb7f198e4a6ab0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoReorganize transactionChainHandler usage. 79/84279/8
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>
4 years agoAdd pagination for mounted resources of apidocs 95/83895/7
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>
4 years agoTeach RFC8040 restconf about actions 92/82992/18
ajay.dp001 [Wed, 10 Jul 2019 11:23:05 +0000 (12:23 +0100)]
Teach RFC8040 restconf about actions

This adds the handlers to route action requests through
DOMActionService and return results.

JIRA: NETCONF-618
Change-Id: I9d72fa5939b73beefbbb2e8030b1fa0a1f4ff935
Signed-off-by: ajay.dp001 <ajay.deep.singh@ericsson.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoConvert to using requireNonNull() 88/84188/5
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>
4 years agoUse java.util.Optional 61/84161/11
Robert Varga [Tue, 3 Sep 2019 07:22:51 +0000 (09:22 +0200)]
Use java.util.Optional

Modernizer is point out use of Guava's Optional, migrate to Java
equivalents.

Change-Id: I732ea429505c730ef7ab38d45849662265267e0b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoUpdate user-guide.rst 63/83663/5
Mario Abraham [Wed, 14 Aug 2019 10:18:22 +0000 (12:18 +0200)]
Update user-guide.rst

- added info about 2 different endpoints
related to RESTCONF

Issue-ID: NETCONF-500
Signed-off-by: Mario Abraham <mario.abraham@pantheon.tech>
Change-Id: If961757301dffc61dc55f9fc2f580c3632aaeaaa

4 years agoFix checkstyle 87/84187/1
Robert Varga [Wed, 4 Sep 2019 06:59:26 +0000 (08:59 +0200)]
Fix checkstyle

This updates more checkstyle issues identified.

Change-Id: I0560418e647b4305f8bbd362254983456c2f2222
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove use of NodeIdentifierWithPredicates constructors 86/84186/1
Robert Varga [Wed, 4 Sep 2019 06:24:33 +0000 (08:24 +0200)]
Remove use of NodeIdentifierWithPredicates constructors

NodeIdentifierWithPredicates is becoming an abstract class, remove
references to its constructors.

Change-Id: I92f558978945867322d0e78229329e2fc7b0ca18
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove use Files.toByteArray() 63/84163/5
Robert Varga [Tue, 3 Sep 2019 08:20:08 +0000 (10:20 +0200)]
Remove use Files.toByteArray()

We have Files.readAllBytes() as a replacement, use that.

Change-Id: Ie55e6ac3bc9be08713abcf985416a4682dbe9d6f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>