Vladyslav Marchenko [Thu, 23 Apr 2020 09:39:03 +0000 (12:39 +0300)]
NETCONF-656 Use RFC7895/RFC8525 for schema monitoring
Signed-off-by: Vladyslav Marchenko <vladyslav.marchenko@pantheon.tech>
Change-Id: I4f5f856206bb684a3b346bff2cb8939b91b85cad
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>
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>
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>
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>
Robert Varga [Fri, 24 Apr 2020 07:24:30 +0000 (09:24 +0200)]
Create netconf.topology.spi
Move netconf.topology.AbstractNetconfTopology to .spi, along
with the renamed SchemaRepositoryProviderImpl. This allows us
to eliminate the duplicate SchemaRepositoryProviderImpl.
JIRA: NETCONF-671
Change-Id: I2746aa7738f6aacd99bb4a1da7b5e09e95a366b8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 24 Apr 2020 06:52:05 +0000 (08:52 +0200)]
Eliminate TopologyUtil
This class has a single user, which will benefit from inlining.
JIRA: NETCONF-671
Change-Id: I1fc00f2c373b630760089e67aadee02a5af59569
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
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>
Robert Varga [Wed, 22 Apr 2020 16:20:45 +0000 (18:20 +0200)]
Minimize DataNormalizer footprint
Our import from the controller has some things which we do not
need. Clean them out, significantly reducing complexity.
Change-Id: Idb33749fa877c6575bae8fcf01ccbc702582ccb4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 6 Apr 2020 12:23:06 +0000 (14:23 +0200)]
Migrate away from sal-common-impl
DataNormalizer and related classes are deprecated for removal,
and are used only by are deprecated RESTCONF implementation.
Rehost the three required classes as a private detail.
Change-Id: Id5539948881d503fbe5e223c41cfa7a9a2284109
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Robert Varga [Wed, 25 Mar 2020 21:44:55 +0000 (22:44 +0100)]
Use Magnesium controller
As part of controller transition to being MRI, downgrade the version
used to Magnesium release. This will be bumped to Aluminium proper
during the MRI window.
Change-Id: Ib7d7d33fabb7731795de9ba8b59fab4064ce085e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Jamo Luhrsen [Sat, 28 Mar 2020 00:54:33 +0000 (17:54 -0700)]
Update coretutorials links
Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
Change-Id: I473a0a72f027a7d3265faefb83091aec6beaf989
Thanh Ha [Thu, 26 Mar 2020 18:45:03 +0000 (14:45 -0400)]
Master branch is now Aluminium
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Change-Id: I709dba98975ad76a1bd83e923fc08d32027c0aa8
Jamo Luhrsen [Fri, 20 Mar 2020 23:17:17 +0000 (16:17 -0700)]
Fix broken link to coretutorials:ncmount
Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
Change-Id: I80378fede387084e0b31c2b31928313e6f971f02
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
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>
Jamo Luhrsen [Thu, 27 Feb 2020 01:55:28 +0000 (17:55 -0800)]
Add a few restconf additions
- pointing out differences in URL between bierman02 and rfc8040
- added a section about using yang-patch
Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
Change-Id: Icd0f39034cbdd898dcd8e31ec70b04fc094362e6
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>
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>
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
Jamo Luhrsen [Tue, 25 Feb 2020 22:38:25 +0000 (14:38 -0800)]
Fix rst links to different section in same page
Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
Change-Id: I565a39c562df662d7b6a47d51d86c99d2cefd8ac
Jamo Luhrsen [Tue, 25 Feb 2020 04:49:34 +0000 (20:49 -0800)]
Add missing - in docker run command example
Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
Change-Id: I01da0beb803dd86b5440e85c519ca8201a5da57b
Jamo Luhrsen [Mon, 24 Feb 2020 22:59:19 +0000 (14:59 -0800)]
Update testtool download info
As of this patch, the latest "released" testtool is from
Sodium SR2 so giving a link to that. Otherwise changing
the info to direct folks to the directory with all the
possible versions.
Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
Change-Id: I06037eb2cd4ea3231f88608ea6cf1ecad25d3d9b
Jamo Luhrsen [Mon, 24 Feb 2020 22:46:26 +0000 (14:46 -0800)]
Split testtool section to own user-guide
It seems more consumable to have the testtool guide on it's
own instead of another section in an already long netconf
user guide.
Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
Change-Id: Ia103054fff420dd2cf6a3a3247fea008e6b19f6d
Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
jenkins-releng [Sat, 22 Feb 2020 04:30:16 +0000 (04:30 +0000)]
Bump versions by x.y.(z+1)
Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
Change-Id: Ice06983f80a9692c68ee234474bfc298464f6645
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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)
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
Robert Varga [Tue, 3 Sep 2019 07:21:19 +0000 (09:21 +0200)]
Use Object.requireNonNull
modernizer is pointing out these users, fix them up.
Change-Id: I67dba53d79ef24d464bb5e54685152d182fbbdb3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 3 Sep 2019 07:20:52 +0000 (09:20 +0200)]
Fix checkstyle
Updated checkstyle is finding some issues, fix them up.
Change-Id: Id17bc94b4fdd2b8883dedc5e8736f9e1971aa900
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
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>
Robert Varga [Fri, 30 Aug 2019 08:16:18 +0000 (10:16 +0200)]
Move old ietf-restconf into odl-restconf-nb-bierman02
This model is only used by this single artifact, and hence it
needs to be co-located there.
Change-Id: I0c1c86e68a90e75bff2ffeba7b69035a9f04dc5b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 20 Aug 2019 14:58:17 +0000 (16:58 +0200)]
Tie SchemaContext.NAME and NetconfUtil.NETCONF_DATA_QNAME
These are referencing the same entity, except one with revision. Tie
them together so we can document what exactly is mean by these constants.
Change-Id: Ic6e64e1231506ec3a77123165aaf9454aa836c4f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
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>
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>
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>
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>
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>
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>
ajay.dp001 [Fri, 16 Aug 2019 11:38:39 +0000 (12:38 +0100)]
Teach NETCONF about YANG 1.1 actions in cluster topology
NETCONF allows invocation of actions but only in Non-cluster
topology which works absolutly fine but when invoked in cluster
topology it failed, usecase was not supported.
This patch provides support for Yang 1.1 action in cluster topology
NETCONF code base is updated to support action, can be invoked in
cluster topology.
JIRA: NETCONF-635
Change-Id: Ic7345f02224b098eafb0bd7c42f1d619309fe12d
Signed-off-by: ajay.dp001 <ajay.deep.singh@ericsson.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Mario Abraham [Wed, 21 Aug 2019 13:23:52 +0000 (15:23 +0200)]
Teach AbstractGet how to transform MapNodes
Added case for MapNode interface in transformNormalizedNode() method
Issue-ID: NETCONF-538
Signed-off-by: Mario Abraham <mario.abraham@pantheon.tech>
Change-Id: I9fa1d7f364d3d68d715aab73473096795da4ed6b
Robert Varga [Mon, 26 Aug 2019 11:04:46 +0000 (13:04 +0200)]
Teach BaseSchema about schema mounts
We are moving towards the ability to interpret mount points, make
sure base schema interprets them as empty.
Change-Id: Ifa51bac1f51e5b8311e976d0344c0d91b312571c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 26 Aug 2019 12:57:31 +0000 (14:57 +0200)]
Make notification filter a simple lambda
There is no real value in having a variable for this piece of code,
make it a simple lambda.
Change-Id: I7ad83eb43dc3c1d0887bd249ec2ef9a1aaa95c58
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 26 Aug 2019 10:41:47 +0000 (12:41 +0200)]
More SchemaContext reuse
This reuses SchemaContext across test invocations, speeding up
testing a bit.
Change-Id: I036fa6ce065b6a895b5926e10123af038ae5593e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 26 Aug 2019 10:35:10 +0000 (12:35 +0200)]
Reuse schemacontext in ListenerAdapterTest
SchemaContext is an invariant here, make sure we reuse it across
tests.
Change-Id: Ieed76b452cfaf5bd6a6174badc4eace29650a230
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 26 Aug 2019 10:31:14 +0000 (12:31 +0200)]
Reuse SchemaContext in RuntimeRpcTest
This reuses SchemaContext across multiple invocations, saving some
time.
Change-Id: Ia8e35236b5415a2b8259f416f2e76776d2dcbe7d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 26 Aug 2019 10:26:28 +0000 (12:26 +0200)]
Reuse schemaContext in mdsal-netconf-connector tests
SchemaContext is well-known invariant, make sure we reuse it.
Change-Id: Id26988be0bd36a21bc4b0f227f5199d217a06300
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 26 Aug 2019 10:21:58 +0000 (12:21 +0200)]
Reuse SchemaContext in NetconfCommandsImplTest
SchemaContext is an invariant here, make sure we reuse it across
tests.
Change-Id: I41696a3fd60ab306888afeb3ccfc0a989bdf8fe0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 26 Aug 2019 10:21:33 +0000 (12:21 +0200)]
Reuse SchemaContext in NetconfDeviceTopologyAdapterTest
The SchemaContext is an invariant, make sure we reuse it across
tests.
Change-Id: Ib31ec637c15d50d9f7c105128e0ff5c31b9861bb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 26 Aug 2019 10:14:28 +0000 (12:14 +0200)]
Share test model SchemaContext
There is no point really to construct this context multiple times,
as it is an invariant. This shaves off some time from test execution.
Change-Id: I4335181bb6992ce5fe1820a452b7a90e0ea14f3a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>