netconf.git
2 years agoRemove SchemaNode#getPath usage from JsonNormalizedNodeBodyReader 55/99555/19
OleksandrZharov [Wed, 2 Feb 2022 11:48:47 +0000 (12:48 +0100)]
Remove SchemaNode#getPath usage from JsonNormalizedNodeBodyReader

Removed deprecated SchemaNode#getPath from JsonNormalizedNodeBodyReader
class by using getNodeType and methods of SchemaInferenceStack.

JIRA: NETCONF-818
Change-Id: Ic717f06d259cf1269aa1aa6b48395ef86edad50d
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
2 years agoReplace #getPath in processInstanceIdentifierType 99/99699/3
Ivan Hrasko [Fri, 11 Feb 2022 19:57:19 +0000 (20:57 +0100)]
Replace #getPath in processInstanceIdentifierType

DefinitionGenerator#processInstanceIdentifierType method was used to
create an example of the instance-identifier leaf node's value.
For this purpose SchemaPath#getPath method was used to search for 'root'
container.

In fact, this approach leads to incorrect results because it can for example
find an RPC definition as 'root' container. RPC definition cannot be used as
instance-identifier value because its not a data node.

We have reworked this method to use as an example the first container child
of the node's model.

This way we can also get-rid of deprecated SchemaPath#getPath method.

Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Change-Id: I2a4f1dc2e76ae9117bc826e45b0d9c0379cb5213

2 years agoDo not use SchemaNode.getPath() in RestDocgenUtil 50/98250/18
Manoj Chokka [Mon, 1 Nov 2021 05:20:10 +0000 (05:20 +0000)]
Do not use SchemaNode.getPath() in RestDocgenUtil

Instead of investigating full schema path we can just use
the parent node QName to determine if a child is in the same module
as its parent.

To compare name-space and revision we work with QNames -
we have adapted method resolvePathArgumentsName(..) parameters
to require QNames.

We can go further and mark all parameters as NonNull because
the use-case when parent is null has no sense - we are at direct
child of module - so full path should be used.

Align parameter usage across the methods -
first is node's QName the second is node's parent's QName.

In addition, mark not-used resolveNodesName(SchemaNode, Module) method
as deprecated for removal.

To simplify situation in callers we can resolve resource path before
addPaths or addOperations methods are called. This way we do not need
to increase the number of parameters.

JIRA: NETCONF-819
Change-Id: Ib7a7614a70c9573521c47716c62ec74f887e6132
Signed-off-by: Manoj Chokka <cmanoj8@gmail.com>
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 years agoRemove SchemaNode#getPath usage from RestconfImplTest 31/99731/3
OleksandrZharov [Mon, 14 Feb 2022 14:37:44 +0000 (15:37 +0100)]
Remove SchemaNode#getPath usage from RestconfImplTest

Removed deprecated SchemaNode#getPath from RestconfImplTest
class

JIRA: NETCONF-818
Change-Id: I27bb6c8dd56527b546d27d03c0683d42cefefe1e
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
2 years agoRemove SchemaNode#getPath usage from RestconfDataServiceImpl for rfc8040 57/99757/1
OleksandrZharov [Tue, 15 Feb 2022 12:30:17 +0000 (13:30 +0100)]
Remove SchemaNode#getPath usage from RestconfDataServiceImpl for rfc8040

Removed deprecated SchemaNode#getPath from RestconfDataServiceImpl
class by using getQName and Absolute#of path.

JIRA: NETCONF-818
Change-Id: I88d23c1da5a381774ab093b50839328c282647a7
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
2 years agoBump versions to 2.0.15-SNAPSHOT 42/99742/1
Robert Varga [Mon, 14 Feb 2022 18:00:14 +0000 (19:00 +0100)]
Bump versions to 2.0.15-SNAPSHOT

This starts the next development iteration.

Change-Id: I0f52ffc910d55d56d3b73e331cd42a5304cf2f19
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix yangtools mis-alignment 41/99741/1
Robert Varga [Mon, 14 Feb 2022 17:58:58 +0000 (18:58 +0100)]
Fix yangtools mis-alignment

Previous version bump is causing multiple versions of yangtools to be
pulled in. Fix this by bumping controller/aaa/yangtools.

Change-Id: I8db1c662a88380982dd856d2b23b0488747a9a9c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump versions to 2.0.14-SNAPSHOT 19/99719/2
Robert Varga [Mon, 14 Feb 2022 11:33:50 +0000 (12:33 +0100)]
Bump versions to 2.0.14-SNAPSHOT

This starts the next development iteration.

Change-Id: I0c09e8f96fbade26e5e2a3dc1faeeca39a913f98
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump upstreams 18/99718/2
Robert Varga [Mon, 14 Feb 2022 11:33:13 +0000 (12:33 +0100)]
Bump upstreams

Adopt:
- odlparent-9.0.13
- infrautils-2.0.13
- mdsal-8.0.11
- controller-4.0.9
- aaa-0.14.9

Change-Id: I56b8cf3a7e2a9cec14253fc37d362be165fc0055
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix links to RFC8040 query parameters documentation 76/99576/2
Peter Puškár [Fri, 4 Feb 2022 08:38:37 +0000 (09:38 +0100)]
Fix links to RFC8040 query parameters documentation

Previous ones were pointing incorrectly to other parameters

Signed-off-by: Peter Puškár <ppuskar@frinx.io>
Change-Id: Ie1e88333517482c9da893fa32a8cc13ff672af51

2 years agoRetain certificate-chain ordering 94/99694/1
Robert Varga [Fri, 11 Feb 2022 15:31:41 +0000 (16:31 +0100)]
Retain certificate-chain ordering

The order of certificats in the chain is significant and therefore
needs to be marked 'ordered-by user', otherwise the datastore
implementation is free to reorder the elements.

JIRA: NETCONF-854
Change-Id: Icc2e5793a214ab374ad08fdba5518396587de263
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoEnable ignored test 64/99664/1
Robert Varga [Tue, 8 Feb 2022 18:12:15 +0000 (19:12 +0100)]
Enable ignored test

We do not have a singleton ControllerContext anymore, re-enable ignored
test. Also remove unused throws declarations.

Change-Id: Ifdeb48aa085fea312a9579e27bd1359c30f26913
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoMigrate to assertThrows() 63/99663/1
Robert Varga [Tue, 8 Feb 2022 18:10:29 +0000 (19:10 +0100)]
Migrate to assertThrows()

ExpectedException.none() is deprecated, use assertThrows() for the same
function.

Change-Id: I6baa6ff28e572d2070adf15017ba21f4a09b0b25
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoDo not instantiate JsonParser 43/99643/1
Robert Varga [Tue, 8 Feb 2022 09:24:29 +0000 (10:24 +0100)]
Do not instantiate JsonParser

The class should not be instantiated, use utility methods instead.

Change-Id: Ifc225ea36906232264dcb338ae66dfab41f55c91
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove ScaleUtilParameters 54/99554/1
Ivan Hrasko [Wed, 2 Feb 2022 09:56:37 +0000 (10:56 +0100)]
Remove ScaleUtilParameters

Scale util is using TesttoolParameters to store its commnad line arguments.
ScaleUtilParameters is no more used.

JIRA: NETCONF-798
Change-Id: I4b7ccbf0535fc6fdb415594d1e7609ba847abb6b
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 years agoFix scale util test tool 92/99192/31
OleksandrZharov [Wed, 5 Jan 2022 10:56:24 +0000 (11:56 +0100)]
Fix scale util test tool

Fixed karaf session readiness checking for features installation.
Fixed duplicate data directory deletion.
Changed restconf url according to rfc-8040.
Added authorization for HttpClient so we can send requests.
Added PATCH requests for creating simulated devices.
Added default controller-ip and controller-port in parameters.
Added mechanism to check that netconf topology via restconf is ready.

JIRA: NETCONF-798
Change-Id: Ice05ab77cd0f479c5cbfc307d0fdca9104f8843b
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 years agoFix RFC8040 root access 94/99494/6
Tomas Cere [Thu, 27 Jan 2022 09:55:02 +0000 (10:55 +0100)]
Fix RFC8040 root access

Requests targetting root need to be wrapped in <data> container
to conform to the RFC, otherwise we end up with multiple roots
when serializing requests targetting root(either rests/data or
root of mounted device).

JIRA: NETCONF-853
Change-Id: I6d2a8d7b235a11779da134ed9c9abec8e8afe27c
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoMigrate to Empty.value() 08/99508/1
Robert Varga [Thu, 27 Jan 2022 19:27:20 +0000 (20:27 +0100)]
Migrate to Empty.value()

Empty.getInstance() is being removed, migrate to its replacement.

Change-Id: Ic12e07df3c16827afcddf32f2fb595389e4efdbe
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoDo not reuse inactive handler 62/99462/2
Robert Varga [Wed, 26 Jan 2022 09:09:21 +0000 (10:09 +0100)]
Do not reuse inactive handler

We have a simple event dispatch handler here, which is stateless and can
be reused, except Netty's defences are rejecting such reuse. Since it is
a very simple object, just do not bother with its reuse.

JIRA: NETCONF-852
Change-Id: I40b48b0a8e14a0a271043bb9fb4b471cfd56a8e7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoBump versions to 2.0.13-SNAPSHOT 05/99405/3
Robert Varga [Thu, 20 Jan 2022 14:27:29 +0000 (15:27 +0100)]
Bump versions to 2.0.13-SNAPSHOT

This starts the next development iteration.

Change-Id: I204b572bd2ad4c02c6d449605c7fea1e359f0b7d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoIssue a mild warning when draft RESTCONF is activated 07/99407/1
Robert Varga [Thu, 20 Jan 2022 16:54:02 +0000 (17:54 +0100)]
Issue a mild warning when draft RESTCONF is activated

draft-bierman-netconf-restconf-02 is an ancient revision of the RESTCONF
protocol which we are still supporting. We are phasing this code out,
hence issue a mild warning when this is activated, so that users have a
fair warning and a chance to migrate.

JIRA: NETCONF-838
Change-Id: I42c61a1853bf789b488c6ce97348d269a7257bef
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
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>