netconf.git
3 years agoRefactor RestconfStrategy 35/93035/4
Robert Varga [Wed, 14 Oct 2020 11:26:29 +0000 (13:26 +0200)]
Refactor RestconfStrategy

This is part one of refactoring: a strategy implementation is only
dependent on the backing services, not on data being accessed.

Every caller should supply a strategy and the path separately, as
the strategy is an invariant.

Change-Id: Ibd6fbe8a8a734478cf764627402b2e02dd9fcd87
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove an unneeded dependency 45/93045/2
Robert Varga [Wed, 14 Oct 2020 10:45:40 +0000 (12:45 +0200)]
Remove an unneeded dependency

restconf-nb-bierman02 does not use yang-library, remove this
dependency.

JIRA: NETCONF-725
Change-Id: I7f24f8cf3e4347a0c5f64d517c74db5b69afd0be
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUpgrade yang-library schema in sal-netconf-connector 44/93044/4
Robert Varga [Wed, 14 Oct 2020 10:26:44 +0000 (12:26 +0200)]
Upgrade yang-library schema in sal-netconf-connector

Upgrade the schema used for determining the model set present
on the device. We will end up interpreting RFC7895 as RFC8525, which
is just fine.

JIRA: NETCONF-725
Change-Id: If74baa5476f84d511b7c28278cfc54749fb698b1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoSquash registrations 40/93040/1
Robert Varga [Wed, 14 Oct 2020 09:42:07 +0000 (11:42 +0200)]
Squash registrations

Use a minimally-sized List instead of default allocation.

Change-Id: I58ce1082a96d546d66ce4ca59df14c20b2bc9d2a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd SchemaSourceRegistration list to NetconfConnectorDTO 31/92931/8
PeterSuna [Wed, 7 Oct 2020 08:52:14 +0000 (10:52 +0200)]
Add SchemaSourceRegistration list to NetconfConnectorDTO

When a NetconfDevice is initialized, we keep track of it via
NetconfConnectorDTO. As a device actually can have some YANG Library
source attached to it, we are registering them as well, but we are
failing to unregister them.

Keep the registration list in the DTO and route close requests
towards it -- allowing us to also remove the registrations.

JIRA: NETCONF-675
Change-Id: Id1d5fb2ff23aad766273e22d5f6f6639300fb3a5
Signed-off-by: PeterSuna <peter.suna@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUpdate NETCONF user documentation 17/93017/3
Luis Gomez [Mon, 12 Oct 2020 01:19:54 +0000 (18:19 -0700)]
Update NETCONF user documentation

- Remove old CSS configuration
- Add JSON payloads

Change-Id: I8eddf4f4cc505d9c3f872cdadacc9fc5a972380d
Signed-off-by: Luis Gomez <ecelgp@gmail.com>
3 years agoExtend Websocket streams for data-less notifications 28/89928/13
Nikhil Soni [Mon, 25 May 2020 09:41:29 +0000 (15:11 +0530)]
Extend Websocket streams for data-less notifications

A new filter named "odl-skip-notification-data", similar to "odl-leaf-nodes-only", is added in the subscription API.
Using this filter, Client can get notification without data.

JIRA: NETCONF-689
Change-Id: I0cec77f69cb141fabc9f839c9a91626d3c667655
Signed-off-by: Nikhil Soni <nsoni@luminanetworks.com>
3 years agoBump MRI projects 96/92596/3
Robert Varga [Tue, 22 Sep 2020 15:45:10 +0000 (17:45 +0200)]
Bump MRI projects

This patch adopts:
- odlparent-7.0.6
- infrautils-1.8.1
- yangtools-5.0.6
- mdsal-6.0.5
- controller-2.0.4

Also adjust schema managers to work with IRSchemaSource instead
of ASTSchemaSource.

Change-Id: If1658111aad5f4c39a6e9dff844d3193994e943d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoIf there is only one revision is present, return it. 62/92262/5
Vladyslav Marchenko [Tue, 25 Aug 2020 07:32:29 +0000 (10:32 +0300)]
If there is only one revision is present, return it.

JIRA: NETCONF-720
Signed-off-by: Vladyslav Marchenko <vladyslav.marchenko@pantheon.tech>
Change-Id: I9103ef41af9bda1681baddf853fb3f739c20b620

3 years agoUse YangConstants.RFC6020_YIN_MEDIA_TYPE 68/90968/2
Robert Varga [Tue, 7 Jul 2020 18:05:01 +0000 (20:05 +0200)]
Use YangConstants.RFC6020_YIN_MEDIA_TYPE

application/yin+xml media type is an RFC6020 definition, and hence
its common definition lives in YangConstants. Use it for there
instead of brewing our own.

Change-Id: I6d9f9fd123ffa6db41994d55400bd8c640c6a1f4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRevert "Revert "Upgrade mina-sshd to 2.4.0"" 99/92299/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>
3 years agoEnable server heartbeats 88/91788/5
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>
3 years agoDisable NIO read timeout by default 66/91866/3
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>
3 years agoRevert "Upgrade mina-sshd to 2.4.0" 85/92285/2
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>
3 years agoRevert "Expand rsa-ssh2 signatures" 77/91877/2
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

3 years agoExtra superfluous edit-config RPC sent 42/92142/2
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

3 years agoBump conf.yaml versions to Silicon 63/92063/2
Thanh Ha [Tue, 11 Aug 2020 19:28:32 +0000 (15:28 -0400)]
Bump conf.yaml versions to Silicon

Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Change-Id: I010ef27ac4307e4b2b2c3a501ffb7561ece5ddaa

3 years agoDo not use pattern matching for simple removal 29/91829/2
Robert Varga [Mon, 3 Aug 2020 16:56:38 +0000 (18:56 +0200)]
Do not use pattern matching for simple removal

This is a follow-up patch to improvee CR/LF stripping, as this
can be done much more efficiently.

Change-Id: If8104af82228ce94c3b40f3a3cd4f7baa12172ad
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove deprecated GzipFilter from restconf 24/91724/3
Oleksii Mozghovyi [Tue, 28 Jul 2020 13:09:29 +0000 (16:09 +0300)]
Remove deprecated GzipFilter from restconf

Issue-ID: NETCONF-602
Change-Id: I1aa08ccb83f45f26a6f8373d68feb35aa980d599
Signed-off-by: Oleksii Mozghovyi <oleksii.mozghovyi@pantheon.tech>
3 years agoBump versions by x.(y+1).z for next dev cycle 26/91926/1
Thanh Ha [Wed, 5 Aug 2020 21:02:32 +0000 (17:02 -0400)]
Bump versions by x.(y+1).z for next dev cycle

Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Change-Id: Ib353bd4b62d93941e45fa26cd58d1813d959675d

3 years agoRESTCONF RFC8040 compliance: SSE support 29/90229/30
Lukas Baca [Wed, 3 Jun 2020 10:19:13 +0000 (12:19 +0200)]
RESTCONF RFC8040 compliance: SSE support

Add implementation of Server-Sent Events according to RFC8040
(https://tools.ietf.org/html/rfc8040#section-6) and make it the default behavior.

Previous behavior(websocket) is possible turn on by configuration.

Add example of config file which is located
in etc/org.opendaylight.restconf.nb.rfc8040.cfg, plus some javadocs.

JIRA: NETCONF-679
Change-Id: I3be8f25e10512b9972dbd42d3e48c03719e0704f
Signed-off-by: Lukas Baca <lbaca@luminanetworks.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix javadoc warnings 28/91828/1
Robert Varga [Mon, 3 Aug 2020 16:40:41 +0000 (18:40 +0200)]
Fix javadoc warnings

We have a number of warnings, fix them up.

Change-Id: I19525f5fb2b2f468fc74cef0ab4311d5ab95065d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoSynchronize stop and reschedule keepalive methods 32/91732/3
Anna Bencurova [Tue, 28 Jul 2020 12:19:45 +0000 (14:19 +0200)]
Synchronize stop and reschedule keepalive methods

Synchronize to avoid stucked scheduled keepalive task. This is not
a perfect solution, but should work for now.

JIRA: NETCONF-715
Change-Id: I130507f3e6472c8b15eb027e40ab41c972f075ec
Signed-off-by: Anna Bencurova <Anna.Bencurova@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoClean up NetconfKeystoreAdapter 14/91814/1
Robert Varga [Sun, 2 Aug 2020 08:18:43 +0000 (10:18 +0200)]
Clean up NetconfKeystoreAdapter

We can safely import java.security.KeyStore, simplifying code. Also
migrate to Objects.requireNonNull().

Change-Id: Iddd3cbfc8adb919833643294b7e99a5a0a07ace0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoConvert sal-netconf-connector to OSGi DS 13/91813/1
Robert Varga [Sun, 2 Aug 2020 08:07:40 +0000 (10:07 +0200)]
Convert sal-netconf-connector to OSGi DS

This is a very simple blueprint container, eliminate it in favor
of OSGi components.

Change-Id: I1b6636bc94b77cf33fb79fec65168c18b3c9794d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd import for netconf-node-optional 09/90909/11
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>
3 years agoAdd support of new a NetconfDataTreeService in clustered netconf 38/91038/11
Vladyslav Marchenko [Thu, 9 Jul 2020 14:27:22 +0000 (17:27 +0300)]
Add support of new a NetconfDataTreeService in clustered netconf

In NETCONF-312 was introduced a new service (NetconfDataTreeService) for exposing operations in their NETCONF-native form.
We need a proxy implementation of this new service for the slave which would forward the requests to master.

JIRA: NETCONF-706
Signed-off-by: Vladyslav Marchenko <vladyslav.marchenko@pantheon.tech>
Change-Id: I58cdc6791fb4476e64b474e95c12292a3a52e771

3 years agoUse released version of infrautils 14/91714/1
Robert Varga [Tue, 28 Jul 2020 11:26:18 +0000 (13:26 +0200)]
Use released version of infrautils

infrautils-1.8.0 has been released, use released version instead
of snapshots.

Change-Id: Iedc0e527b5ad4f5a43b9320561ee9935e4bd768e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump odlparent/yangtools/mdsal/controller 62/91662/2
Robert Varga [Sat, 11 Jul 2020 20:18:19 +0000 (22:18 +0200)]
Bump odlparent/yangtools/mdsal/controller

Adopt upstream versions:
- odlparent-7.0.5
- yangtools-5.0.5
- mdsal-6.0.4
- controller-2.0.3

Change-Id: Ia9d798ea1594582c563549a19c53d2b86871caf0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd support for nested notifications to NetconfMessageTransformer 93/91493/2
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>
(cherry picked from commit a78077ff87fb40fe37eaddfbdd17e150a6b93e8c)

3 years agoFix missing stream leaf value 98/90498/4
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 74/91274/2
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 agoCreate NetconfDataTreeService with base and additional operations for netconf 71/90371/30
Vladyslav Marchenko [Wed, 10 Jun 2020 09:19:19 +0000 (12:19 +0300)]
Create NetconfDataTreeService with base and additional operations for netconf

Service provided by netconf mountpoints. It provides an api for all netconf operations, instead of mapping mdsal api to netconf requests. Restconf now uses the new NetconfDataTreeService when available. If no - fall back to DOMDataBroker.

JIRA: NETCONF-312
Signed-off-by: Vladyslav Marchenko <vladyslav.marchenko@pantheon.tech>
Change-Id: I354449883b54c8a3a4e7ffdc12d7d532c8120b6a

3 years agoDo not fail on warnings for docs-linkcheck 87/91187/2
Thanh Ha [Fri, 10 Jul 2020 14:30:22 +0000 (10:30 -0400)]
Do not fail on warnings for docs-linkcheck

This is a workaround due to sphinx-tabs being incompatible with the
Sphinx linkchecker which throws a warning. We mainly use linkchecker
to catch broken links so we don't really need to fail on warnings as
the main "docs" builder will still fail for warning level issues so
this is a reasonable workaround.

This patch also fixes some current broken links in the docs, mainly
wiki.odl to wiki-archive.odl as these docs have not been migrated
to the new wiki as of yet.

Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Change-Id: I94d09ad6740efde204b4bb649623eedf346c3208

3 years agoAdd INFO.yaml for netconf 48/91248/1
Anil Belur [Sun, 12 Jul 2020 00:54:24 +0000 (10:54 +1000)]
Add INFO.yaml for netconf

Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Change-Id: I63b57b8ebceae8f16e5588479580d50b6d7391de

3 years agoFix OperationsCreator javadoc 63/91063/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>
(cherry picked from commit bdd71505b92999ea46d6aa683314100439cd8008)

3 years agoMake ETag header value more readable 77/90677/6
Kailash Khalasi [Thu, 25 Jun 2020 00:30:48 +0000 (17:30 -0700)]
Make ETag header value more readable

for example:

this:
'ETag': '"2017-01-26streams"

is now this:

'ETag': '"2017-01-26-streams"

Change-Id: I44f943a0b77838f83c9dff123a750727f17ea98c
Signed-off-by: Kailash Khalasi <kailash.khalasi@gmail.com>
3 years agoFix module file name 40/91040/2
Robert Varga [Thu, 9 Jul 2020 14:50:44 +0000 (16:50 +0200)]
Fix module file name

Modules should have the same file name. While we are normalizing
them during processing, finding a particular model is troublesome.

Change-Id: I8b4bfb7cc8a5cda2c89f977b8b6d31cd9f3af1b6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoExpand rsa-ssh2 signatures 73/90973/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>
3 years agoBump mina-sshd to 2.5.1 60/90960/3
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>
3 years agoAdd rsa-sha2 signatures to default client 71/90971/5
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>
3 years agoMove CreateStreamUtil to rests.services.impl 01/91001/1
Robert Varga [Wed, 8 Jul 2020 14:59:56 +0000 (16:59 +0200)]
Move CreateStreamUtil to rests.services.impl

Continue with elimination of 'util' classes by rehosting
CreateStreamUtil to the same package as the baseline implementation,
further simplifying things.

Change-Id: I5a6ace24daa05925645af542237724e83adfa4f4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoEliminate RestconfStreamsConstants.EQUAL 00/91000/2
Robert Varga [Wed, 8 Jul 2020 14:55:50 +0000 (16:55 +0200)]
Eliminate RestconfStreamsConstants.EQUAL

This is a simple character, inlining it into its users makes them
actually cleaner.

Change-Id: I5c41a81eb814fdf5403cf5696a892291981f29c5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoEliminate RestconfConstants.SLASH 94/90994/4
Robert Varga [Wed, 8 Jul 2020 13:16:57 +0000 (15:16 +0200)]
Eliminate RestconfConstants.SLASH

This is a rather useless constant, which is just muddling things
up. Inline it into users, clearing some very surprising ways of use.

Change-Id: I7d98f670238c32fab32681d6084a9fe28bc8f0b3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMove SubscribeToStreamUtil to rests.services.impl 89/90989/4
Robert Varga [Wed, 8 Jul 2020 12:53:33 +0000 (14:53 +0200)]
Move SubscribeToStreamUtil to rests.services.impl

Overall structure of RestconfDataServiceImpl relying on a random
mix if 'util' classes is quite wrong, as demonstrated by
ReadDataTransactionUtil.readData(), which actually is very much
stream-specific and ends up *writing* data.

Start with SubscribeToStreamUtil, which pulls a chunk of utility
methods into rests/services/impl. This cleans up other utilities
and makes the package dependency graph a bit simpler.

Change-Id: Ia327182edde23364570f6f5d46044d3efe319fe2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove RestconfMapping{Node,Stream}Constants 88/90988/4
Robert Varga [Wed, 8 Jul 2020 12:34:56 +0000 (14:34 +0200)]
Remove RestconfMapping{Node,Stream}Constants

These two classes are completely unreferenced, remove them.

Change-Id: I9d9fc3a94cadb245adc6a6bae3c39230bfc1898a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoCleanup ParserFieldsParameter 85/90985/4
Robert Varga [Wed, 8 Jul 2020 11:58:01 +0000 (13:58 +0200)]
Cleanup ParserFieldsParameter

Parsing here is quite contrived, with character checks muddled by
constants, leading to multiply-checked conditions. Clean the code
up.

Change-Id: I89214596da5a714ea798eda9f8860c9d57656d83
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove org.opendaylight.restconf.nb.rfc8040.utils.parser.builder 84/90984/4
Robert Varga [Wed, 8 Jul 2020 11:34:06 +0000 (13:34 +0200)]
Remove org.opendaylight.restconf.nb.rfc8040.utils.parser.builder

This package holds only a few constants, which are better
redistributed and kept where they are actually used.

Change-Id: I0fc614072e17df463615b1ea3544a3fae0fd659d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoMigrate stream-related RestconfStreamsConstants 93/90993/2
Robert Varga [Wed, 8 Jul 2020 13:06:05 +0000 (15:06 +0200)]
Migrate stream-related RestconfStreamsConstants

These protocol constants are referenced from a single implementation
place, make sure to move them there.

Change-Id: I273ceb9f4cfed698bd856deb49edd5bef8264310
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoJSONRestconfServiceRfc8040Impl is not AutoCloseable 97/90997/2
Robert Varga [Wed, 8 Jul 2020 13:39:12 +0000 (15:39 +0200)]
JSONRestconfServiceRfc8040Impl is not AutoCloseable

This service has no cleanup, remove useless @PreDestroy method.

Change-Id: I113e0a08e301b9d4eae6b6706d3ce45bb8086002
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix illegalCatch suppressions 75/90975/2
Robert Varga [Wed, 8 Jul 2020 08:40:41 +0000 (10:40 +0200)]
Fix illegalCatch suppressions

We are catching multiple checked exceptions here, but really we are
being lazy. Enumerate caught exceptions and remove suppression.

Change-Id: Ia2d57baf109e19459c662d9e1e3ccd9373b7c08d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove bogus suppression 76/90976/1
Robert Varga [Wed, 8 Jul 2020 08:57:12 +0000 (10:57 +0200)]
Remove bogus suppression

checkstyle:MissingSwitchDefault is no longer relevant here, remove
the suppression.

Change-Id: I7eea2b4b303a14160d461df52efd0f47afa26b5f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoPackage test-jar sources 74/90974/1
Robert Varga [Wed, 8 Jul 2020 08:44:44 +0000 (10:44 +0200)]
Package test-jar sources

Navigating sources tests in downstreams without sources is not
particularly nice. Add tests-sources.jar to all artifacts which
are producting test-jar.

Change-Id: I4b77ca4f9e45638271eec68370db1658f4c20779
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUse YangConstants.RFC6020_YANG_MEDIA_TYPE 67/90967/1
Robert Varga [Tue, 7 Jul 2020 17:58:34 +0000 (19:58 +0200)]
Use YangConstants.RFC6020_YANG_MEDIA_TYPE

application/yang media type is an RFC6020 definition, and hence its
common definition lives in YangConstants. Use it from there instead
of brewing our own.

Change-Id: I75d2c2849e8d4e98760445148f1afc9b1f0acb6d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix rawtypes/hiddenField suppressions 57/90957/1
Robert Varga [Tue, 7 Jul 2020 15:48:27 +0000 (17:48 +0200)]
Fix rawtypes/hiddenField suppressions

This is a case of laziness, just specify a wildcard and remove
suppression. While we are in the area, also remove a bogus
hiddenField suppression.

Change-Id: I06d81fc4b03a4d593face187fd92893bab7400f1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove bogus illegalThrows suppressions 56/90956/2
Robert Varga [Tue, 7 Jul 2020 15:40:42 +0000 (17:40 +0200)]
Remove bogus illegalThrows suppressions

This code should never have passed review, fix it up. While we are
at it, fixup throws declarations.

Change-Id: I2ecc832260b711571fea2d4cdbe7d04b075bb293
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove unused SuppressWarnings 55/90955/1
Robert Varga [Tue, 7 Jul 2020 15:32:48 +0000 (17:32 +0200)]
Remove unused SuppressWarnings

checkstyle:illegalCatch is no longer applicable in a number of
places, remove suppressions.

Change-Id: I7fcd339ea8aafaef7ba4db1eaa6f3c6b8960582c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove unused SuppressWarnings 54/90954/1
Robert Varga [Tue, 7 Jul 2020 15:31:03 +0000 (17:31 +0200)]
Remove unused SuppressWarnings

checkstyle:finalClass is no longer applicable here, remove it.

Change-Id: I49f7311d87a668de215a7a884195deedfc8f3aee
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix raw type warnings in rfc8040 northbound 53/90953/1
Robert Varga [Tue, 7 Jul 2020 15:27:32 +0000 (17:27 +0200)]
Fix raw type warnings in rfc8040 northbound

There are quite a few warnings around use of raw types, fix them up.

Change-Id: I3a5cffd8148086470f9a1dfbdf837228d56d6e7f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove SchemaContextRef 51/90951/2
Robert Varga [Tue, 7 Jul 2020 13:39:52 +0000 (15:39 +0200)]
Remove SchemaContextRef

Carrying a soft reference is completely superfluous -- it does not
guarantee availability and realistically this is just a brain-dead
wrapper for a local reference. Remove the class along with all
references to it.

Change-Id: I2e6fc3f9720f200e12443e07c490f8d79d04351b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoRemove useless SchemaContextRef wrappers 50/90950/1
Robert Varga [Tue, 7 Jul 2020 13:10:30 +0000 (15:10 +0200)]
Remove useless SchemaContextRef wrappers

For whatever legacy reasons we are wrapping references to
EffectiveModelContext into soft reference holder, only to unwrap
them in the same method. Remove this clutter.

Change-Id: I2211639c2663bfc4f2f4f9e5898be304c6acad17
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoCleanup RestconfValidationTest 49/90949/1
Robert Varga [Tue, 7 Jul 2020 12:54:16 +0000 (14:54 +0200)]
Cleanup RestconfValidationTest

The tests here could use proper asserts, clean them up.

Change-Id: I75aceba1942a857fe95c9604db4f8e485158adf4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoEliminate org.opendaylight.restconf.nb.rfc8040.utils.validations 48/90948/1
Robert Varga [Tue, 7 Jul 2020 12:43:05 +0000 (14:43 +0200)]
Eliminate org.opendaylight.restconf.nb.rfc8040.utils.validations

This package is self-serving detail of identifiers parsing. Fold
it into ParserIdentifier, which is its only production user.

Change-Id: Ie07f7097e30374882f694f1d88cb49e15b0199ad
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBind operation prefix to correct namespace 10/79610/20
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>
3 years agoRevert "Added Validation for invalid file in schemas-directory." 42/90742/2
JakubToth [Wed, 1 Jul 2020 22:32:27 +0000 (22:32 +0000)]
Revert "Added Validation for invalid file in schemas-directory."

This reverts commit 4c21689aba5d009c36765dd614643a6c8f89915c.

Reason for revert: readLine() is not returning null for example for binary files etc

Change-Id: I9b3e70b8e95a04dc7ae95b9ff60be2a664b636c8
Signed-off-by: JakubToth <jakubt4@gmail.com>
3 years agoRevert "Fix nested YANG 1.1 Action invocation" 44/90944/1
Robert Varga [Tue, 7 Jul 2020 08:35:18 +0000 (10:35 +0200)]
Revert "Fix nested YANG 1.1 Action invocation"

This reverts commit 8b9206c7b36b7f7ebfadf23e1be00d43a0bd9573, as
it breaks CSIT.

JIRA: NETCONF-702
Change-Id: I6f65c587f5e9d04e67dcdcaeda12688d206524b5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdded Validation for invalid file in schemas-directory. 34/90834/1
Nikhil Soni [Wed, 1 Jul 2020 05:39:45 +0000 (11:09 +0530)]
Added Validation for invalid file in schemas-directory.

If any invalid (not readable as text) file is present in Schemas-directory then those files should be validated in existing validate method.

JIRA: NETCONF-707
Signed-off-by: Nikhil Soni <nsoni@luminanetworks.com>
Change-Id: I41191748569fcbfd87141c4a4cfe2e8328137911

3 years agoAdd method to build SSL Handler for selected keys only 38/90538/7
Oleksii Mozghovyi [Sun, 21 Jun 2020 02:39:13 +0000 (05:39 +0300)]
Add method to build SSL Handler for selected keys only

JIRA: NETCONF-5
Signed-off-by: Oleksii Mozghovyi <oleksii.mozghovyi@pantheon.tech>
Change-Id: I780949db6c425ac0fd682838e87f3893065434e6

3 years agoMinor refactor in Call-Home 37/90537/6
Oleksii Mozghovyi [Sun, 21 Jun 2020 01:27:10 +0000 (04:27 +0300)]
Minor refactor in Call-Home

JIRA: NETCONF-5
Signed-off-by: Oleksii Mozghovyi <oleksii.mozghovyi@pantheon.tech>
Change-Id: I6d79e7cdfe864f416aeb3466047e7d0f6be23f7e

3 years agoFix processing of hexadecimal, octal values 86/90486/3
Ilya Igushev [Thu, 25 Jun 2020 06:46:02 +0000 (06:46 +0000)]
Fix processing of hexadecimal, octal values

JSON doesn't support hexadecimal, octal numbers, unlike YANG.
Therefore when YANG type definition has hexadecimal,or octal
default value of YANG leaf used string JSON format.

Change-Id: I95b1756c0092991a591164b3432f7d93214dfe1d
JIRA: NETCONF-703
Signed-off-by: illia.ihushev <illia.ihushev@pantheon.tech>
3 years agoFix up feature packaging 94/90594/2
Robert Varga [Tue, 23 Jun 2020 06:28:16 +0000 (08:28 +0200)]
Fix up feature packaging

We have a number of bundles packaged multiple times, fix that up
by providing proper references.

Change-Id: I0488fefbeaab3760eca7daf93ddd9d335713f285
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoUse range when importing MRI features 81/90581/1
Robert Varga [Mon, 22 Jun 2020 19:24:33 +0000 (21:24 +0200)]
Use range when importing MRI features

Not using ranges for features locks us down unfortunately, make
sure to use them for MRI projects.

Change-Id: Ia31779d7fbe28334ed7f1856f183a5d381ce5f33
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoCatch exception when transformer fails to parse 37/90237/5
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 agoIntegrate controller-2.0.2 06/90406/1
Robert Varga [Thu, 11 Jun 2020 21:43:52 +0000 (23:43 +0200)]
Integrate controller-2.0.2

This bumps versions to the following:
- odlparent-7.0.3
- yangtools-5.0.3
- mdsal-6.0.2
- controller-2.0.2

Change-Id: I7255d610b092259c64fe9dfe24244a68a7195e14
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix nested YANG 1.1 Action invocation 25/90225/5
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 agoRESTCONF RFC8040 Notifications support for application/yang-data+xml 04/89704/4
Lukas Baca [Tue, 12 May 2020 14:43:31 +0000 (16:43 +0200)]
RESTCONF RFC8040 Notifications support for application/yang-data+xml

In "https://tools.ietf.org/html/rfc8040" have GET,PUT,POST,PATCH
possibility to use Accept: application/yang-data+xml

JIRA: NETCONF-684
Change-Id: I25c165b7c2672f7ad7bacbd95c4c5a9634b69122
Signed-off-by: Lukas Baca <lbaca@luminanetworks.com>
3 years agoCorrectly extract mountpoint name from URI 94/89994/3
Richard Kosegi [Wed, 27 May 2020 03:53:21 +0000 (05:53 +0200)]
Correctly extract mountpoint name from URI

Last path component of mountpoint's YII is not necessarily
always "node". Split URI on '=' instead.

JIRA: NETCONF-693
Change-Id: Ib4a2e9bd71abaee327b4a971cc22698027a73ce7
Signed-off-by: Richard Kosegi <richard.kosegi@gmail.com>
3 years agoHandle multiple rpc-error in the same rpc-reply 59/89859/6
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

3 years agoEnsure RPC input in invocation is not null 32/90232/3
Robert Varga [Wed, 3 Jun 2020 13:05:55 +0000 (15:05 +0200)]
Ensure RPC input in invocation is not null

DOMRpcService contract has changed to require input to be non-null,
hence we need to build an empty container when user does not supply
one.

JIRA: NETCONF-697
Change-Id: I5355a1e7b4c958d9beefc6dc41de83a1c9dc9763
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoTrim awaitility specification 55/90155/1
Robert Varga [Sun, 31 May 2020 09:11:41 +0000 (11:11 +0200)]
Trim awaitility specification

org.awaitility is declared with scope=test, there's no need to
repeat it.

Change-Id: Ic65b06e725f333dec5f89d0c1c1a49bde377898c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoIntegrate controller-2.0.1 54/90154/1
Robert Varga [Sun, 31 May 2020 08:09:07 +0000 (10:09 +0200)]
Integrate controller-2.0.1

This bumps versions to the following:
- odlparent-7.0.2
- yangtools-5.0.2
- mdsal-6.0.1
- controller-2.0.1

Change-Id: Id0fae35520d7b9562882223fb2fce38f0eba5372
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoCleanup a few uses of getDataChildByName() 98/89998/2
Robert Varga [Wed, 27 May 2020 11:36:27 +0000 (13:36 +0200)]
Cleanup a few uses of getDataChildByName()

This method has been deprecated for quite some time and our use of
it leads nulls floating in places where they should not. Fix a few
of the use sites.

Change-Id: Idcc73caf374e54d9f39d7429acd6f18b15fc4ed0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoClean up some log messages and descriptions 08/90008/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

4 years agoUse censor attribute for CLI commands 15/90015/2
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>
4 years agoUse RFC7895/RFC8525 for schema monitoring 97/89597/7
Vladyslav Marchenko [Tue, 5 May 2020 07:25:22 +0000 (10:25 +0300)]
Use RFC7895/RFC8525 for schema monitoring

Added support of RFC7895 that obsoletes RFC7895 (new "yang-library" container). Added a "yang-library-update" notification as a replacement for the deprecated "yang-library-change" notification.

JIRA: NETCONF-656
Signed-off-by: Vladyslav Marchenko <vladyslav.marchenko@pantheon.tech>
Change-Id: Iad13c504c621d245943ade20bd5581efc5292db6

4 years agoCleanup use of deprecated constructs 95/89995/3
Robert Varga [Wed, 27 May 2020 08:26:30 +0000 (10:26 +0200)]
Cleanup use of deprecated constructs

Continue cleaning up of deprecated warnings, so that we get a stable
baseline before embarking on major work items in Aluminium.

Change-Id: Ib7d0e7a072054b04c21217ad9ce9106bedb6ae70
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoCleanup use of deprecated constructs 53/89953/2
Robert Varga [Tue, 26 May 2020 10:53:31 +0000 (12:53 +0200)]
Cleanup use of deprecated constructs

A number of tests are reporting use of deprecated methods, this patch
cleans some of them up.

Change-Id: Ibbaa87be60a2b9261e473df040c3738cae8181d9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoClean up SchemalessRpcStructureTransformerTest 51/89951/2
Robert Varga [Tue, 26 May 2020 10:23:18 +0000 (12:23 +0200)]
Clean up SchemalessRpcStructureTransformerTest

Do not use ExpectedException, pinpointing exact failure mode.

Change-Id: I2bc6c1c1557925c248c93ff317c2a1a45ae6af4f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoClean up NetconfNodeActorTest 50/89950/2
Robert Varga [Tue, 26 May 2020 10:16:35 +0000 (12:16 +0200)]
Clean up NetconfNodeActorTest

Do not use ExpectedException and clean up checkstyle suppressions.

Change-Id: If91b404f900edbc2035831c04cadb70841f7a60f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoCleanup RFC8040 tests 48/89948/2
Robert Varga [Tue, 26 May 2020 09:01:16 +0000 (11:01 +0200)]
Cleanup RFC8040 tests

Do not use ExpectedException or try/catch blocks, as we have
assertThrows() readily available. Also make sure we reuse
EffectiveModelContext.

Change-Id: I6c43b23ef90f914218c707c59c0a434945a0e4a1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoCorrect POST Location with lists 20/89420/3
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)

4 years agoClean up PostDataTransactionUtil 86/89886/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>
4 years agoAllow SshClient to be customized via NetconfClientConfiguration 84/89884/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>
4 years agoGet notification streams error. 73/88873/5
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>
4 years agoNETCONF southbound requires notifications.yang model to be present on the device 43/88643/9
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>
Change-Id: Iaec5eab02f8d43f752d90a3fd0ecbc0a57e9e75f

4 years agoUpdate swagger generator to OpenAPI 3.0 30/88830/23
illia.ihushev [Wed, 1 Apr 2020 14:57:37 +0000 (17:57 +0300)]
Update swagger generator to OpenAPI 3.0

This commit update both generation of the API documentation JSON, along
with UI based on the JSON.

Issues:

 - the request bodies generated with all the choice case nodes present
 - invalid request bodies for the POST requests on list/container, when
   Content-Type is application/xml

JIRA: NETCONF-687
Signed-off-by: illia.ihushev <illia.ihushev@pantheon.tech>
Change-Id: I58002878d5d5a46507be021c4c1783004ea0409a

4 years agoAdjust window on read 56/89756/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>
4 years agoFurther rework of base schemas 34/89734/3
Robert Varga [Mon, 11 May 2020 11:32:07 +0000 (13:32 +0200)]
Further rework of base schemas

As it turns out we cannot really instantiate base schemas without
a proper parser, as would be required in static contexts. Let us
turn them into a proper component, so that it can be injected at
runtime.

JIRA: NETCONF-683
Change-Id: I65b90f3042d9354443dfa4052413d531626f4376
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoUse ranges for controller features 01/89701/1
Robert Varga [Tue, 12 May 2020 12:36:25 +0000 (14:36 +0200)]
Use ranges for controller features

We really want to allow smooth upgrades wherever possible, hence
we should specify ranges for controller's features.

Change-Id: Ia2f9b8b4d1716abe402e230bc44bdbbf511eea6f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoReport HTTP status 409 on DATA_MISSING error 83/89583/8
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>