netconf.git
2 years agoFix empty get failing on mounted devices when using xml 86/99186/6
Tomas Cere [Tue, 4 Jan 2022 11:14:38 +0000 (12:14 +0100)]
Fix empty get failing on mounted devices when using xml

The ParameterAwareNormalizedNodeWriter was not setting an
empty container node with root path as handled so fix that.
Also make sure we actually return an empty data node when
its processed instead of empty response.

JIRA: NETCONF-847
Change-Id: Iab271a93fd13176dd061d5c26ab1d7f9a8b8263b
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump upstreams 04/99404/1
Robert Varga [Thu, 20 Jan 2022 14:16:26 +0000 (15:16 +0100)]
Bump upstreams

Adopt:
- odlparent-9.0.12
- infrautils-2.0.12
- mdsal-8.0.10
- controller-4.0.8
- aaa-0.14.8

Change-Id: I0c9c3b3b76b217a6b7f933cfdc570fef9e925aa3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUnify variable naming 91/99291/2
Robert Varga [Thu, 13 Jan 2022 11:09:30 +0000 (12:09 +0100)]
Unify variable naming

We really dealing with three writers: xmlWriter, streamWriter and a
NormalizedNodeWriter (i.e. writer). Make sure we use the same names in
all methods and use try/finally blocks consistently.

Change-Id: Idc6eafa8467e836a78c784257179aee09239620a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoEliminate illegal catch clausules 90/99290/1
Robert Varga [Thu, 13 Jan 2022 11:00:47 +0000 (12:00 +0100)]
Eliminate illegal catch clausules

Closing an XMLStreamWriter does not thrown any exception, but rather
XMLStreamException, which the callers need to be ready to handle anyway.

Eliminate useless null checks and make sure we propagate close failures
to callers.

Change-Id: I963749afbfa667a8ef071a8b1a438e171668c28b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUse Map.of() instead of ImmutableMap.of() 89/99289/1
Robert Varga [Thu, 13 Jan 2022 10:51:24 +0000 (11:51 +0100)]
Use Map.of() instead of ImmutableMap.of()

We have an equivalent utility available, use it to lower Guava
dependencies a bit.

Change-Id: Id946b6576dfc79875f2dfef020c8a104121984d3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoLower setPrefix() warning 88/99288/1
Robert Varga [Thu, 13 Jan 2022 10:49:13 +0000 (11:49 +0100)]
Lower setPrefix() warning

Our initial check is quite noisy when we get wired to JDK's
XMLDOMWriterImpl implementation. We very much expect things to work
anyway, so let's lower the message down to debug.

Change-Id: Ie47bb886c1557b6f685bf8ee42ee65f8972a1898
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix delete operation for leaf nodes 99/98699/15
Ivan Hrasko [Mon, 13 Dec 2021 19:31:34 +0000 (20:31 +0100)]
Fix delete operation for leaf nodes

In case of delete operation we do not have
NormalizedNode representing data.

To create NormalizedNode we cannot use
ImmutableNodes.fromInstanceId() because it violates
leaf node non-null value contract.

Instead we have to emit data to delete using
EmptyListXmlWriter the similar way as its
done with filters.

Similar way we have to emit data together
with metadata using EmptyListXmlMetadatWriter
to overcome NormalizedMetadataWriter' write
method which requires data in the form of NormalizedNode.

JIRA: NETCONF-833
Change-Id: I2dc2921a78e7fc41d1d5eda101978c3a2e36ec12
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 years agoAdd documentation 64/99264/4
Ivan Hrasko [Tue, 11 Jan 2022 14:58:57 +0000 (15:58 +0100)]
Add documentation

Add and fix documentation for NetconfUtil class methods.

Change-Id: I696f3c074e82764b686f36009baead09b8646ae2
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 years agoFix method name typo 63/99263/4
Ivan Hrasko [Tue, 11 Jan 2022 14:47:03 +0000 (15:47 +0100)]
Fix method name typo

We have NetconfBaseOps#createEditConfigStructure method

Change-Id: I75c36ea739c30fddaf864f958bccd49b6ca08bce
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 years agoExpose WebSocketSessionHandler 70/99270/1
Robert Varga [Wed, 12 Jan 2022 14:48:09 +0000 (15:48 +0100)]
Expose WebSocketSessionHandler

Jetty is mucking around with reflection, publish the handler class so it
can access its methods.

JIRA: NETCONF-844
Change-Id: I502cdf439f52b45e69e3261199ec13436eac9f95
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix the showing up mounted devices in apidocs Swagger 91/99191/1
Dominik Vrbovsky [Wed, 5 Jan 2022 09:19:17 +0000 (10:19 +0100)]
Fix the showing up mounted devices in apidocs Swagger

Currently all mounted devices show up in the drop down list as
"topology-netconfnode". If there are many mounted devices
there is no way to find the mounted node you are looking for
without clicking on each selection on the list. Fix this to
show up particular node ID instead of "topology-netconfnode".

JIRA: NETCONF-843
Change-Id: Iecbc2e27f66719d2a9a7024ab9813077ff7cfdb3
Signed-off-by: Dominik Vrbovsky <dominik.vrbovsky@pantheon.tech>
2 years agoDo not use SchemaNode.getPath() in mdsal-netconf-connector 79/98379/12
Ivan Hrasko [Tue, 9 Nov 2021 19:45:09 +0000 (20:45 +0100)]
Do not use SchemaNode.getPath() in mdsal-netconf-connector

We are using SchemaPath identification of what are strictly root
nodes. Use SchemaTreeInference instead, so that the lookup is captured
once and then reused, without multiple round-trips to acquire
EffectiveModelContext.

This also flushes out a potential inconsistency w.r.t. handling of
top-level choice containers. This is marked with a FIXME for a future
follow-up.

JIRA: NETCONF-816
Change-Id: I9061c3cf8b871d2947ecae41d6c57d51545990d5
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoPackage jquery internally 36/99136/1
Robert Varga [Wed, 22 Dec 2021 11:05:16 +0000 (12:05 +0100)]
Package jquery internally

We are referencing code.jquery.com, but we can load a minified
version internally. Package jquery-3.6.0.min.js and refer to it.

JIRA: NETCONF-764
Change-Id: Id9abaed8a8bc732066778dad2025ebba5c6a9b0f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump sshd to 2.8.0 28/99128/1
Robert Varga [Tue, 21 Dec 2021 10:01:42 +0000 (11:01 +0100)]
Bump sshd to 2.8.0

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

Change-Id: I60f9f5476a07966f69bfbb0842ba785f1362704a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUpgrade automaton to 1.12-3 25/99125/3
Robert Varga [Mon, 20 Dec 2021 12:13:23 +0000 (13:13 +0100)]
Upgrade automaton to 1.12-3

Fixed RegExp.toString() and built for Java 11.

Change-Id: I5d02a7cde7811904383cc67a5307a43753744968
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRefactor NETCONF node defaults 40/98940/9
Ivan Hrasko [Mon, 6 Dec 2021 10:58:02 +0000 (11:58 +0100)]
Refactor NETCONF node defaults

In fact, the difference between devices connected by call-home and
created manually in NETCONF topology is that call-home devices do
not have any data in configuration data-store.

Configuration data is used during the connection setup.

We can create full default configuration node for call-home connected
device to unify the processing of both kind of devices.

In addition, MDSAL now supports default values in data-store so we
can remove those values from AbstractNetconfTopology.

JIRA: NETCONF-832
Change-Id: Ib58ca344a7d74612cb7d049805a3e3c9279986d4
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUpdate rest-perf-client tool to RFC 8040 90/98990/1
Dominik Vrbovsky [Tue, 14 Dec 2021 14:56:55 +0000 (15:56 +0100)]
Update rest-perf-client tool to RFC 8040

Rework old draft-bierman-netconf-restconf-02 paths to RFC 8040 paths.
Set default auth credentials.

JIRA: NETCONF-797
Change-Id: I35338b66a54b574d5eb45c241fb76c2ed3f2aced
Signed-off-by: Dominik Vrbovsky <dominik.vrbovsky@pantheon.tech>
2 years agoBump versions to 2.0.12-SNAPSHOT 87/98687/1
Robert Varga [Thu, 25 Nov 2021 12:16:14 +0000 (13:16 +0100)]
Bump versions to 2.0.12-SNAPSHOT

This starts the next development iteration.

Change-Id: I3378ab170b63b9ed77654fd480585a3bde6a8be5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoDisable SSHD/Netty integration 86/98686/1
Robert Varga [Thu, 25 Nov 2021 11:56:22 +0000 (12:56 +0100)]
Disable SSHD/Netty integration

SSHDd's Netty integration logs everything at INFO, disable it until
it is fixed.

JIRA: NETCONF-835
Change-Id: I4ee0cf07727425ff690bf28095855bfb15387785
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump versions to 2.0.11-SNAPSHOT 49/98649/2
Robert Varga [Tue, 23 Nov 2021 10:42:43 +0000 (11:42 +0100)]
Bump versions to 2.0.11-SNAPSHOT

This starts the next development iteration.

Change-Id: I965375ab3c76b5425ba4a30e75be7214fc56ef1a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix infinite loop in augment resolution 47/98647/2
Robert Varga [Tue, 23 Nov 2021 08:21:22 +0000 (09:21 +0100)]
Fix infinite loop in augment resolution

We should be pushing using 'result' as source, not 'found' here.

JIRA: NETCONF-834
Change-Id: I169c97e1b18682ad7296e6e0272de1c362efe6d2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump versions to 2.0.10-SNAPSHOT 00/98500/2
Robert Varga [Sun, 14 Nov 2021 11:32:24 +0000 (12:32 +0100)]
Bump versions to 2.0.10-SNAPSHOT

This starts the next development iteration.

Change-Id: I248df1d579696991e67da53b71090d70c7df02b8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix AbstractNetconfSessionNegotiator state access 02/98502/1
Robert Varga [Sun, 14 Nov 2021 14:38:59 +0000 (15:38 +0100)]
Fix AbstractNetconfSessionNegotiator state access

Eliminate anonymous class which was mistakenly used as a synchronization
point.

JIRA: NETCONF-827
Change-Id: I3f81c7bda5f08bfc421859c2b0960beca5269c9a
Signed-off-by: Jaroslav Tóth <jtoth@frinx.io>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoPropagate WriteDataParams in utilities 06/98106/3
Robert Varga [Sun, 24 Oct 2021 16:25:45 +0000 (18:25 +0200)]
Propagate WriteDataParams in utilities

We have the two variables neatly tied together, there is no reason
to split in invocation paths.

JIRA: NETCONF-718
Change-Id: Ic3befbb97538a2ef3e8352f6585a76572523581f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdopt controller-4.0.7/aaa-0.14.7 97/98497/1
Robert Varga [Sun, 14 Nov 2021 09:16:58 +0000 (10:16 +0100)]
Adopt controller-4.0.7/aaa-0.14.7

Pick up latest fixes from upstream.

Change-Id: Icf1b51a8ec9dbd4b3fda9c54dd1b5e2ea7a1f31c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdd test for netconf-config-change notifications 94/98494/1
Robert Varga [Sun, 14 Nov 2021 08:59:57 +0000 (09:59 +0100)]
Add test for netconf-config-change notifications

Add an explicit test for deserializing a netconf-config-change
notification containing an instance identifier.

JIRA: YANGTOOLS-1362
Change-Id: I7eee431a233e28ab7dd9b6753214d6535846bac3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdded channel to logs in NETCONF negotiator 72/98272/3
Jaroslav Tóth [Tue, 26 Oct 2021 18:27:25 +0000 (20:27 +0200)]
Added channel to logs in NETCONF negotiator

- It simplifies debugging and investigation of deployment
  with a lot of NETCONF MPs.

JIRA: NETCONF-827
Change-Id: I221aab35e8d8d63481130678e1c755077125ad74
Signed-off-by: Jaroslav Tóth <jtoth@frinx.io>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCleanup AbstractNetconfSessionNegotiatorTest 25/98425/3
Robert Varga [Thu, 11 Nov 2021 10:30:47 +0000 (11:30 +0100)]
Cleanup AbstractNetconfSessionNegotiatorTest

We have stubbing errors and various warnings here, fix them up.

Change-Id: I24b2e45583190c93a26cdf25d066505bef911492
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump versions to 2.0.9-SNAPSHOT 30/98330/2
Robert Varga [Sun, 7 Nov 2021 18:28:23 +0000 (19:28 +0100)]
Bump versions to 2.0.9-SNAPSHOT

This starts the next development iteration.

Change-Id: I1b66a83f0204199dac099ec53148615cbce76270
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump sshd to 2.7.0 89/98289/3
Robert Varga [Thu, 4 Nov 2021 11:40:14 +0000 (12:40 +0100)]
Bump sshd to 2.7.0

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

JIRA: NETCONF-829
Change-Id: I8ff777f3f8ec97d710e743bb5486b31ec54fe27f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove unused dependency 27/98327/1
Robert Varga [Sun, 7 Nov 2021 13:12:32 +0000 (14:12 +0100)]
Remove unused dependency

netconf-util is not using netty-common, ditch that dependency.

Change-Id: I77053e25d6aef62fca78a2b635e1d58c9eb26c9d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdopt controller-4.0.6/aaa-0.14.6 26/98326/1
Robert Varga [Sun, 7 Nov 2021 12:07:06 +0000 (13:07 +0100)]
Adopt controller-4.0.6/aaa-0.14.6

Pick up fixes from upstreams.

Change-Id: I661cfe2152e3f1aad4c275711bf91b8915239a55
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoImplement NodeContainerProxy.getPath() 95/98295/1
Robert Varga [Thu, 4 Nov 2021 13:43:31 +0000 (14:43 +0100)]
Implement NodeContainerProxy.getPath()

getPath() is being used for diagnostics in XML parser, let's implement
it in the obviously-correct way to get some more information.

Also modermize NodeContainerProxyTest and move it netconf-util, so it
is co-located with the class it is testing.

JIRA: NETCONF-828
Change-Id: Idfac9d779366d3465db29dcadc27af51dc16b956
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 6379e64a96f5d510b3f298ef207a2ea3c3fc0b63)

2 years agoCleanup NetconfDeviceCommunicator a bit 94/98294/1
Robert Varga [Thu, 4 Nov 2021 22:26:02 +0000 (23:26 +0100)]
Cleanup NetconfDeviceCommunicator a bit

We can bail early from processing to make the code a bit more linear.

Change-Id: I61f3526761b30aa9cf78f9c12ba3763ecffed0b4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdd choice/case tests 09/84509/15
ajay_dp001 [Tue, 17 Sep 2019 15:50:29 +0000 (16:50 +0100)]
Add choice/case tests

Add two unit tests for traversal of choice/case nodes, asserting we
create a correct YangInstanceIdentifier.

JIRA: NETCONF-631
Change-Id: Icf9a00728bf4707f1951cdce208be225bba0b40c
Signed-off-by: ajay_dp001 <ajay.deep.singh@est.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUse ApiPath in YangInstanceIdentifierDeserializer 42/97742/23
Robert Varga [Mon, 4 Oct 2021 18:20:21 +0000 (20:20 +0200)]
Use ApiPath in YangInstanceIdentifierDeserializer

We are performing URL parsing in ApiPath, hence we can skip doing the
same thing in YangInstanceIdentifierDeserializer. This also improves
error reporting, as we provide additional info when we encounter parsing
errors. Error messages are also differentiated between parse errors and
semantic binding errors.

Escaping test has also updated, as ApiPathParser is intelligent enough
to understand both : and %3A in identityref name.

JIRA: NETCONF-631
Change-Id: I5fdb438d656b79199ea4bf316183d37280261eff
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoTransform ServiceLoader services 91/98291/1
Robert Varga [Thu, 4 Nov 2021 11:45:25 +0000 (12:45 +0100)]
Transform ServiceLoader services

Rather than excluding services, process them through a proper
transformer, so they work okay.

Change-Id: I43d5b5b6f5bbc13d2027e861bc4b1535437d0caf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoExclude formatter-maven-cache.properties 90/98290/1
Robert Varga [Thu, 4 Nov 2021 11:44:28 +0000 (12:44 +0100)]
Exclude formatter-maven-cache.properties

We are getting a resource overlap warning, fix it by suppressing the
offending file.

Change-Id: I19d4f506b00496150f7dd9915d6daa47a83ee1b4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCleanup TestRestconfUtils 88/98288/4
Robert Varga [Thu, 4 Nov 2021 10:03:16 +0000 (11:03 +0100)]
Cleanup TestRestconfUtils

We should be ignoring non-yang files, as otherwise things like vim
.swp files are wrecking our day.

Change-Id: I4144f60e44f5b01c0521912213ea08707c78d938
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump jsonunit to 2.28.0 86/98286/2
Robert Varga [Wed, 3 Nov 2021 20:59:19 +0000 (21:59 +0100)]
Bump jsonunit to 2.28.0

https://github.com/lukas-krecan/JsonUnit#2280

Change-Id: I219d04fe3f29c6e5bd53ca116d0f09db5bfe53b7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove an unneeded exclusion 85/98285/2
Robert Varga [Wed, 3 Nov 2021 20:55:04 +0000 (21:55 +0100)]
Remove an unneeded exclusion

The exclusion is carried since odlparent-7.0.11/8.1.3/9.0.2, remove it.

Change-Id: Ia0374569f1c32b0f22c407702d2d5fcaf09f2bfe
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoImprove YangInstanceIdentifierDeserializerTest 83/98283/3
Robert Varga [Wed, 3 Nov 2021 18:48:22 +0000 (19:48 +0100)]
Improve YangInstanceIdentifierDeserializerTest

We have very few assertions about behaviour, improve overall coverage
before we switch things around. Also mark down bad behaviour and fixup
two invalid test vectors.

JIRA: NETCONF-631
Change-Id: I5c2e2140d20df57f62e65653c70bebd76793cb9e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump versions to 2.0.8-SNAPSHOT 63/98163/2
Robert Varga [Wed, 27 Oct 2021 13:44:03 +0000 (15:44 +0200)]
Bump versions to 2.0.8-SNAPSHOT

This starts the next development iteration.

Change-Id: Ic129270424fe62bf25fa687f24d0108de082ff1a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRepair accidental version bump 65/98165/1
Robert Varga [Wed, 27 Oct 2021 13:43:26 +0000 (15:43 +0200)]
Repair accidental version bump

We do not want to bump to 2.0.8-SNAPSHOT here.

Change-Id: Ie670d495f71a38509c1c1f2f878a6834ced70135
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump upstreams 61/98161/1
Robert Varga [Wed, 27 Oct 2021 11:27:01 +0000 (13:27 +0200)]
Bump upstreams

Adopt:
- odlparent-9.0.8
- infrautils-2.0.8
- mdsal-8.0.7
- controller-4.0.5
- aaa-0.14.5

JIRA: NETCONF-826
Change-Id: Idf5447495442d5cd0015f91cec3393070e913b02
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump versions to 2.0.7-SNAPSHOT 39/98139/1
Robert Varga [Tue, 26 Oct 2021 12:33:34 +0000 (14:33 +0200)]
Bump versions to 2.0.7-SNAPSHOT

This starts the next development iteration.

Change-Id: Ibf6fab309efd077c576a10fcd6c1a87817f387b8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUnify parameter parsing 38/98138/1
Robert Varga [Tue, 26 Oct 2021 12:16:37 +0000 (14:16 +0200)]
Unify parameter parsing

We have a number of different ways to parse a query parameter, make the
contracts more consistent.

JIRA: NETCONF-773
Change-Id: I7c3090998efaeb9b7d713e595640a6d1e156fc65
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdd support for odl-pretty-print 36/98136/1
Robert Varga [Tue, 26 Oct 2021 11:37:48 +0000 (13:37 +0200)]
Add support for odl-pretty-print

Somehow we did not have plumbing for this simple usability extension,
make sure we have feature parity with bierman02.

JIRA: NETCONF-825
Change-Id: I011e7369826ca7e07fcb5df1abdada726fa532d6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoIntegrate AbstractCommonSubscriber more tightly 35/98135/2
Robert Varga [Tue, 26 Oct 2021 09:38:42 +0000 (11:38 +0200)]
Integrate AbstractCommonSubscriber more tightly

We have a ton of duplicate code, make sure to reign it in by extending
what AbstractCommonSubscriber really does.

JIRA: NETCONF-773
Change-Id: I89451e646acdacc326c48d6276e20c299e5881e1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoEliminate AbstractQueryParams 34/98134/1
Robert Varga [Tue, 26 Oct 2021 09:06:53 +0000 (11:06 +0200)]
Eliminate AbstractQueryParams

We have a separate NotificationQueryParams which holds the request
fields. AbstractQueryParams is only subclassed from
AbstractCommonSubscriber, hence we have combine the two to keep things
a tad more compact.

JIRA: NETCONF-773
Change-Id: I188b4444bf81e57b6c3a6e672bd1ea90db041bca
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUpdate AbstractQueryParams 30/98130/4
Robert Varga [Tue, 26 Oct 2021 07:53:57 +0000 (09:53 +0200)]
Update AbstractQueryParams

We now have properly-encapsulated notification query parameters, make
sure we use them as a whole rather than breaking them apart in callers.

JIRA: NETCONF-773
Change-Id: I53bca1d2404e887de16f4e6c3f827c54db45945d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoSupport leaf-nodes-only in RFC8040 northbound 32/98132/2
Robert Varga [Tue, 26 Oct 2021 08:43:37 +0000 (10:43 +0200)]
Support leaf-nodes-only in RFC8040 northbound

We have somehow lost (or never had) parity with bierman02 extension
for this option. The code to support it is in place, but due to the
legacy structure it fell off the truck in terms of parsing URIs, so
it could never be activated for a request.

Add the proper structure to support it again and define a capability
URI to let users know it is available.

JIRA: NETCONF-824
Change-Id: Ib05cc361d6bc3cc534f598276ecc84c9353f4cc2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdvertize skip-notification-data capability 31/98131/4
Robert Varga [Tue, 26 Oct 2021 08:27:43 +0000 (10:27 +0200)]
Advertize skip-notification-data capability

Add SkipNotificationDataParam to hold the details abound
skip-notification-data. Also define a new capability URI and advertize
it in the datastore.

JIRA: NETCONF-823
Change-Id: I4c907a2d359afaa4e47fbd8cb2790dd3395b3c16
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRefactor ParserFieldsParameter 29/98129/2
Robert Varga [Mon, 25 Oct 2021 19:54:57 +0000 (21:54 +0200)]
Refactor ParserFieldsParameter

We have two distinct parser tangled in a single file, making it hard
to understand what is going on. Split out the implementations and
rename the base class to have a more friendly name.

JIRA: NETCONF-773
Change-Id: Ida4eb4e39f802efbb85ea236d9e9c3b508d9ae34
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCleanup FieldsParam 28/98128/1
Robert Varga [Mon, 25 Oct 2021 19:25:52 +0000 (21:25 +0200)]
Cleanup FieldsParam

We can reconstruct paramName() from the data we have in a rather
straightforward fashion. Do that and clean up various bits and pieces
that changed over the course of development.

JIRA: NETCONF-773
Change-Id: Id037b202fb24290ca710d4aa527d63ad5bbb2a36
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoIntegrate ParserFieldsParameter with FieldsParameter 26/98126/4
Robert Varga [Mon, 25 Oct 2021 17:20:05 +0000 (19:20 +0200)]
Integrate ParserFieldsParameter with FieldsParameter

We have the baseline string parser reimplemented, which means we can
just interpret the list of selection nodes. Take out all the string
parsing code and reimplement the core loop, making things a lot clearer.

JIRA: NETCONF-820
Change-Id: I915794323a75937996a6a3ba693a10ab2878d910
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoEliminate parenthesis* variables 25/98125/1
Robert Varga [Mon, 25 Oct 2021 17:58:15 +0000 (19:58 +0200)]
Eliminate parenthesis* variables

These three variables are in fact constant and record initial state --
i.e. they shadow two of the method's arguments. So let's remove them
them and create a startLevel variable to hold the initial set.

JIRA: NETCONF-820
Change-Id: Ic31bf706b28c94edd8e63159c62455422b2f890f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUse full QName in ParserFieldsParameter 24/98124/1
Robert Varga [Mon, 25 Oct 2021 17:48:27 +0000 (19:48 +0200)]
Use full QName in ParserFieldsParameter

We have two subclasses, both of which end up creating a QName and
only use that. Create an intermediate private method to hold this
dispatch. This will make transition to FieldsParam easier.

JIRA: NETCONF-820
Change-Id: I036da1bad49ae5caa0333fac3ad1b868c8f42d94
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoExpose parameter names as String constants 16/98116/1
Robert Varga [Mon, 25 Oct 2021 00:59:29 +0000 (02:59 +0200)]
Expose parameter names as String constants

Remove static methods in favor of proper constants. This allows us to
use switch statements instead of if/else. Since we are at it,
differentiate between unknown and known-but-invalid parameters.

JIRA: NETCONF-773
Change-Id: Id2a9b09f8cbb5688d1722fc7ee932be4c46ceac6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRefactor QueryParams.newReadDataParams() 15/98115/1
Robert Varga [Sun, 24 Oct 2021 22:56:32 +0000 (00:56 +0200)]
Refactor QueryParams.newReadDataParams()

Follow the same layout as other methods, removing the need for
getSingleParameter() and checkParametersTypes(). Also differentiate
between unknown and illegal parameters.

JIRA: NETCONF-773
Change-Id: I8c5db7d1f77f07cfc8a3be28ec3382fd3fb080ae
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdd RestconfQueryParam 13/98113/2
Robert Varga [Sun, 24 Oct 2021 21:35:35 +0000 (23:35 +0200)]
Add RestconfQueryParam

Add a useful common interface for all query parameters and shorten
their names a bit.

JIRA: NETCONF-773
Change-Id: I7fb00d14dcb1517bdecb13bda373b50fb280213c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoSeparate out ReadDataParams 11/98111/1
Robert Varga [Sun, 24 Oct 2021 19:44:43 +0000 (21:44 +0200)]
Separate out ReadDataParams

QueryParams has some filtering details stuck with normal UriInfo
parsing. Separate out ReadDataParams, so that we can easily discern
what is what.

JIRA: NETCONF-773
Change-Id: Idf3a46ec4978bc9a59ee062836a14dbb7413f505
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoMove simple QueryParams tests 08/98108/4
Robert Varga [Sun, 24 Oct 2021 17:50:02 +0000 (19:50 +0200)]
Move simple QueryParams tests

We have a number of tests which do not require anything from
transaction-related, but are pure databind validation tests. Move them.

Also do not tolerate null uriInfo -- it should always be present at
runtime.

JIRA: NETCONF-773
Change-Id: I8dfd5e32706a99313249387721f0a41210e1e558
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoMove ReadDataTransactionUtil.parseUriParameters() 07/98107/1
Robert Varga [Sun, 24 Oct 2021 17:37:53 +0000 (19:37 +0200)]
Move ReadDataTransactionUtil.parseUriParameters()

This is a pure JAX-RS databind method, move it to QueryParams and
take the tests depending on it as well.

JIRA: NETCONF-773
Change-Id: I35b0790fb8c009e029796f557064b9a9907a556d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoPromote QueryParams as WriteDataParams 05/98105/3
Robert Varga [Sun, 24 Oct 2021 15:40:39 +0000 (17:40 +0200)]
Promote QueryParams as WriteDataParams

Internal structure in RestconfDataServiceImpl is suitable definition
of what we expect data resource modifications to accept. Promote it to
an API contract. Also rename UriInfoSupport to QueryParams to use the
newly-vacant name.

JIRA: NETCONF-773
Change-Id: I4ca2d01338ecc3a828978a78a23566c27ed4db84
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoIntroduce UriInfoSupport 04/98104/4
Robert Varga [Sun, 24 Oct 2021 14:51:15 +0000 (16:51 +0200)]
Introduce UriInfoSupport

While we are figuring out JAX-RS integration around complex types,
let's concentrate utilities involved in these conversions into a
dedicated databind package.

JIRA: NETCONF-773
Change-Id: I5e5718773de8436279c37d52320f1272f62d9bc2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoPromote NotificationQueryParams 03/98103/4
Robert Varga [Sun, 24 Oct 2021 13:06:35 +0000 (15:06 +0200)]
Promote NotificationQueryParams

This is now a properly-aligned DTO containing possible request parameters,
make sure it is widely available.

JIRA: NETCONF-773
Change-Id: Ifb7a26777919ac8d97608c8fc975c6a565be3ac8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUse FilterParameter for communicating its value 02/98102/1
Robert Varga [Sun, 24 Oct 2021 12:19:24 +0000 (14:19 +0200)]
Use FilterParameter for communicating its value

This improves type-safety and moves concerns.

JIRA: NETCONF-773
Change-Id: I806563be3520feb31711b7e45f4956231b6e11b2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCleanup AbstractQueryParams 01/98101/1
Robert Varga [Sun, 24 Oct 2021 12:17:27 +0000 (14:17 +0200)]
Cleanup AbstractQueryParams

We have a chunk of dead code here, which would be visible if we had
the proper structure. XPath checking is being done in a completely
different place now.

JIRA: NETCONF-773
Change-Id: I7a79deeb9108d3374663b4e83135e7ddc00a398c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUse parameters in StreamSubscriptionServiceImpl 00/98100/2
Robert Varga [Sun, 24 Oct 2021 11:31:39 +0000 (13:31 +0200)]
Use parameters in StreamSubscriptionServiceImpl

We have proper definitions fo parameters pertaining to streams,
use them to tie things together.

JIRA: NETCONF-773
Change-Id: I26a2e346bb61e13ec3a8a9e39892cd0952186671
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoMove RestconfMappingNodeUtil.mapCapabilites() 99/98099/1
Robert Varga [Sun, 24 Oct 2021 11:11:51 +0000 (13:11 +0200)]
Move RestconfMappingNodeUtil.mapCapabilites()

The only user here is SchemaContextHandler, who should understand
which capabilities we support. Move the method along with its test.

JIRA: NETCONF-773
Change-Id: Iac110846052e7b06411bf34bfc568f46741fb89d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove Rfc8040.Capabilities 98/98098/1
Robert Varga [Sun, 24 Oct 2021 10:23:05 +0000 (12:23 +0200)]
Remove Rfc8040.Capabilities

We have proper constructs encapsulating the capabilities described
by these constants. There is no need for centralization of constants,
as each parameter now exposes capabilityUri() anyway.

JIRA: NETCONF-773
Change-Id: I1ec8b385c76a74987420c39dd7368c9fa083d841
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRework query parameter parsing 96/98096/3
Robert Varga [Sun, 24 Oct 2021 09:09:55 +0000 (11:09 +0200)]
Rework query parameter parsing

Parsing code is structured so that things are not exactly nearby,
fix that by things are close by. We also create better utilities
to reduce code verbosity.

JIRA: NETCONF-773
Change-Id: Id2244c08a1e8bfd27f1da3102c08da5a06691eb5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUse DepthParameter in QueryParameters 90/98090/8
Robert Varga [Sat, 23 Oct 2021 19:51:40 +0000 (21:51 +0200)]
Use DepthParameter in QueryParameters

This cleans up more of the parsing mess we've had. We now have a
(relatively) type-safe dispatch across code.

Change-Id: Ia5e791b5ec391f61613dc34582a182b36430b196
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFilterParameter now has a YangXPathExpression 93/98093/3
Robert Varga [Sat, 23 Oct 2021 22:25:36 +0000 (00:25 +0200)]
FilterParameter now has a YangXPathExpression

We have the infrastructure to understand the structure of a YANG XPath
expression. Use it to perform additional checks, so that we can rely on
it being syntactically valid.

JIRA: NETCONF-773
Change-Id: I37a0ddb1e4d5a6c115eb479ba550686c1a3c3fcd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoHide NormalizedNodeContext and WriterParameters 91/98091/3
Robert Varga [Sat, 23 Oct 2021 21:38:10 +0000 (23:38 +0200)]
Hide NormalizedNodeContext and WriterParameters

These are used only in bierman02, move them out to not pollute
RFC8040 classpath with useless crud.

Change-Id: Ie699bf5908ff223f7f421f3df725a72a1b077d64
JIRA: NETCONF-773
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoDisconnect QueryParameters from WriterParameters 89/98089/6
Robert Varga [Sat, 23 Oct 2021 19:27:14 +0000 (21:27 +0200)]
Disconnect QueryParameters from WriterParameters

We do not want to carry bierman02 non-structural baggage, disconnect
from that and deprecate it.

JIRA: NETCONF-773
Change-Id: Ida080cca1107badc69b19742e2aa8f577c6d4c65
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoDeprecate NormalizedNodeContext 88/98088/5
Robert Varga [Sat, 23 Oct 2021 18:58:54 +0000 (20:58 +0200)]
Deprecate NormalizedNodeContext

Create a simplistic fork of this structure, allowing us to disconnect
from bierman02 for further evolution.

JIRA: NETCONF-773
Change-Id: Ib1f79489c85a61c7f14e6d5c040dee5b7e89b129
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdd representations of RFC8040 query parameters 86/98086/6
Robert Varga [Sat, 23 Oct 2021 16:12:10 +0000 (18:12 +0200)]
Add representations of RFC8040 query parameters

We do not have proper data types, which makes hunting for semantics
and constants hairy. Provide a central place for these.

JIRA: NETCONF-773
Change-Id: I761734530c3b30d5728b0f102609512bd68afbed
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoMake a few methods static 87/98087/2
Robert Varga [Sat, 23 Oct 2021 18:37:47 +0000 (20:37 +0200)]
Make a few methods static

There is no point to use instance invocation, this makes things a tad
easier on the eyes.

Change-Id: I519b946607c1f998ee39bee13024b400ccc715a5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoIntroduce FieldsParameter 51/98051/14
Robert Varga [Fri, 22 Oct 2021 18:26:08 +0000 (20:26 +0200)]
Introduce FieldsParameter

The "fields" parameter is a rather simple structure. Parsing it requires
a bit of recursion, but there is certainly no arcanum involved. Create a
class to semantically represent this field and introduce a parser which
can create these by following RFC8040 grammar to the letter.

JIRA: NETCONF-820
Change-Id: I279c04c03a482e9155ff1594a69ffd2da7678df2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoMove WriterParameters.tagged 65/98065/3
Robert Varga [Sat, 23 Oct 2021 14:20:56 +0000 (16:20 +0200)]
Move WriterParameters.tagged

This field is not used anywhere in bierman02, move it to RFC8040 only.

JIRA: NETCONF-773
Change-Id: Id9c02e32c76b8f6d12bb0a5ed58638163997836f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoSplit out RFC8040-only constructs from yang-common 64/98064/4
Robert Varga [Sat, 23 Oct 2021 12:20:55 +0000 (14:20 +0200)]
Split out RFC8040-only constructs from yang-common

We have a number of constructs dropped in restconf-common, which are
only relevant to RFC8040. Refactor code so that we do not constrained
by restconf-common when we refactor the wiring.

JIRA: NETCONF-773
Change-Id: Ie457307ad1ab239fdf70ba06654e3ab4c6090aa6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAccess parameters.getFieldPaths() only once 63/98063/1
Robert Varga [Sat, 23 Oct 2021 10:07:52 +0000 (12:07 +0200)]
Access parameters.getFieldPaths() only once

There is no point accessing it thrice, it just prevents proper
analysis.

Change-Id: Ib9fe20e5082c8e93d9ce578b656a8b365c88a1d0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoCleanup NormalizedNodeContext lifecycle 62/98062/2
Robert Varga [Sat, 23 Oct 2021 09:11:21 +0000 (11:11 +0200)]
Cleanup NormalizedNodeContext lifecycle

We have headers as a non-final field with a leaking HashMap. As it turns
out, this is only used for stream listers, which can use ImmutableMap.
Cleanup constructors to express this, so we know what gets filled in.

Change-Id: I43f3b77c8c2a9640b6edbd815ce72bc3637819ba
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdd WriterParameters.EMPTY 61/98061/1
Robert Varga [Sat, 23 Oct 2021 08:58:47 +0000 (10:58 +0200)]
Add WriterParameters.EMPTY

We use defaults in at least two places, let's use a simple constant
for the job.

Change-Id: Iaef3e8445ea02e432dc99aaf3be33004a0449ba6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix odl-yanglib packaging 59/98059/1
Robert Varga [Sat, 23 Oct 2021 07:46:32 +0000 (09:46 +0200)]
Fix odl-yanglib packaging

We are packaging an mdsal artifact, fix that.

Change-Id: Ie320e9509e9201edd8e69c4e11e0aa11546e2bf9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoImprove ApiPath.Step with hashCode()/equals() 52/98052/1
Robert Varga [Fri, 22 Oct 2021 20:30:57 +0000 (22:30 +0200)]
Improve ApiPath.Step with hashCode()/equals()

Users will be expecting a reasonable comparison behaviour, make sure
we have that covered.

Change-Id: I1df17ea035b5442e9f2b2ea908a5b9f404bb2823
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoImprove StreamingContext diagnostics 49/98049/1
Robert Varga [Fri, 22 Oct 2021 15:59:43 +0000 (17:59 +0200)]
Improve StreamingContext diagnostics

When we encounter a wrong nested child we end up throwing an opaque
ClassCastException. Add an explicit check to improve diagnostics.

JIRA: NETCONF-820
Change-Id: I3c5a24c1ff4d12a56dfd5fd6d8cd3f940af330a0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUse YangNames CharMatchers in parser 48/98048/2
Robert Varga [Fri, 22 Oct 2021 15:11:25 +0000 (17:11 +0200)]
Use YangNames CharMatchers in parser

We have common matchers available from yangtools, use those instead
of brewing our own.

Change-Id: I4099aab90e0abbf45bc5ba8248b1e0658921ee7e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUse YangNames CharMatchers 47/98047/1
Robert Varga [Fri, 22 Oct 2021 15:05:19 +0000 (17:05 +0200)]
Use YangNames CharMatchers

YangNames exposes utility CharMatchers now, use them rather than
having our own copy.

Change-Id: Ided0180e43a4e248475cad61acba9080de6e3066
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump MRI upstreams 31/98031/2
Robert Varga [Thu, 21 Oct 2021 10:52:10 +0000 (12:52 +0200)]
Bump MRI upstreams

Adopt:
- odlparent-9.0.7
- yangtools-7.0.9
- mdsal-8.0.6
- controller-4.0.4
- infrautils-2.0.7
- aaa-0.14.4

Change-Id: I58a167c02bc8e09465534859242661a8f2ee77c0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoUse simple concat in createParsingException() 09/97809/1
Robert Varga [Wed, 6 Oct 2021 11:33:14 +0000 (13:33 +0200)]
Use simple concat in createParsingException()

String.format() is wasteful as we can use JEP280 to make things
a lot more performant.

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

2 years agoUse AsyncResponse in RPC invocation path 88/97488/11
Robert Varga [Tue, 14 Sep 2021 09:12:18 +0000 (11:12 +0200)]
Use AsyncResponse in RPC invocation path

RPC invocation is isolated and is inherently asynchronous. Convert it to
use a @Suspended AsyncResponse.

JIRA: NETCONF-718
Change-Id: I5ba174bd8d69e4e54a085a2f4feac076f07d59ff
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoAdd rfc8040.ApiPath 03/97503/34
Robert Varga [Thu, 16 Sep 2021 02:09:00 +0000 (04:09 +0200)]
Add rfc8040.ApiPath

Our YangInstanceIdentifierSerializer is a rather complex piece of
machinery, which is a maintenance burden and cannot be modified easily.

In order to deal with it, we will split parsing into two steps:

1) structural tokenization, which splits the input string into a
   representation of 'api-path' ABNF producation.

2) semantic binding to an EffectiveModelContext, which reconciles the
   structure with the context, producing YangInstanceIdentifier in the
   process.

This patch deals with item 1) by introducing an ApiPath class, which
can be constructed from a string.

JIRA: NETCONF-631
Change-Id: I44c8ad1308b27ee459f95f8617f54c8537ea9c65
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoImprove YangInstanceIdentifierDeserializer.checkValid() 91/97791/1
Robert Varga [Wed, 6 Oct 2021 08:18:23 +0000 (10:18 +0200)]
Improve YangInstanceIdentifierDeserializer.checkValid()

The current implementation is slow due to always playing with arguments,
even when we do not use them. As it turns out, a bit of restructuring
allows us to make this a lot saner and performant.

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

2 years agoUpdate ParserIdentifier a bit 43/97743/4
Robert Varga [Mon, 4 Oct 2021 19:44:10 +0000 (21:44 +0200)]
Update ParserIdentifier a bit

Hide a testing-only method and mark a method for movement.

JIRA: NETCONF-631
Change-Id: I73f8e32803bec49dce747503206cde78df75fbce
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix RestconfOperationsService.getOperations(UriInfo) 85/97685/4
Robert Varga [Wed, 29 Sep 2021 18:53:16 +0000 (20:53 +0200)]
Fix RestconfOperationsService.getOperations(UriInfo)

ietf-restconf.yang has a rather ugly wart in its definition of the
operations container, which we are using an ugly workaround for.

This workaround is rendered inoperable due to strict binding to
effective model context, which does not find the dynamic leaves required
to encode the content.

Rework the implementation to side-step NormalizedNode documents and
provide ready JSON/XML strings.

JIRA: NETCONF-822
Change-Id: I57760d06240e09940026fee9b195e207853c01b2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoReturn a List from YIID Deserializer 46/97746/1
Robert Varga [Tue, 5 Oct 2021 11:02:46 +0000 (13:02 +0200)]
Return a List from YIID Deserializer

Hiding behind an interable is not useful, expose the List. This allows
us to perform major cleanups in the corresponding test, which has also
improved assertions now.

Change-Id: Ie7100a3d4ab7e0824af7b4cf06b42e483ab9a295
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix a warning 41/97741/2
Robert Varga [Mon, 4 Oct 2021 18:19:48 +0000 (20:19 +0200)]
Fix a warning

The intent is to report APPLICATION here, reference is statically.

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