netconf.git
2 years agoRevert "Remove SchemaNode#getPath from XML writer in rfc8040" 91/100191/2
Robert Varga [Mon, 21 Mar 2022 07:51:36 +0000 (08:51 +0100)]
Revert "Remove SchemaNode#getPath from XML writer in rfc8040"

This reverts commit d21d2fe3c6e1784e6ec407b86c6eac75ba3bba66. The
proposed transformation is not valid.

Change-Id: Ib5798243764106e2ce270fa995d1abfc0ef4499b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 9c6d80b35d29969d989b2173120bde2daae56568)

2 years agoRevert "Remove SchemaNode#getPath from XML writer test in rfc8040" 90/100190/2
Robert Varga [Mon, 21 Mar 2022 07:51:14 +0000 (08:51 +0100)]
Revert "Remove SchemaNode#getPath from XML writer test in rfc8040"

This reverts commit ed024cc0db69c3f026f5e109af680e162a484572. The
proposed transformation is not valid.

Change-Id: Ia56b7cd18d940d418b2f52f280b4545811dde8cc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 3d20b6b9e8a69584859acae0c6ef92e888596e99)

2 years agoRevert "Remove SchemaNode#getPath usage from JsonPatchBodyReader" 89/100189/2
Robert Varga [Mon, 21 Mar 2022 09:20:37 +0000 (10:20 +0100)]
Revert "Remove SchemaNode#getPath usage from JsonPatchBodyReader"

This reverts commit ca56779056f1e1c4edb89e689b07a88105421cae. The
assumptsions being made are just not correct.

Change-Id: I720bffc847713198d3016be4f17d896fb9ba815b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRevert "Remove SchemaNode#getPath usage from ListenerAdapter" 88/100188/2
Robert Varga [Mon, 21 Mar 2022 09:20:23 +0000 (10:20 +0100)]
Revert "Remove SchemaNode#getPath usage from ListenerAdapter"

This reverts commit 98ff16cef35edce6fe6f53fe4023a2d24edbee1b. The
assumptsions being made are just not correct.

Change-Id: Ia7d4f7b9ce1340025820de8023b53b350f9a6c79
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRevert "Remove SchemaNode#getPath from JSON writer in rfc8040" 87/100187/2
Robert Varga [Mon, 21 Mar 2022 09:20:12 +0000 (10:20 +0100)]
Revert "Remove SchemaNode#getPath from JSON writer in rfc8040"

This reverts commit 5534751c2768eb8c866f1278e5647639ae5bff81. The
assumptsions being made are just not correct.

Change-Id: I2dcbda5e7e1b03a6c1cc24b6117a4a138e39c20e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRevert "Remove SchemaNode#getPath usage from XmlToPatchBodyReader" 86/100186/2
Robert Varga [Mon, 21 Mar 2022 09:19:31 +0000 (10:19 +0100)]
Revert "Remove SchemaNode#getPath usage from XmlToPatchBodyReader"

This reverts commit ccf915302c1183a9963c5165f525ee762188126a. The
assumptsions being made are just not correct.

Change-Id: I006eef6c4174b6de91383c607b291e669c7bde1e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRevert "Remove SchemaNode#getPath usage from XmlPatchBodyReader" 85/100185/2
Robert Varga [Mon, 21 Mar 2022 09:19:22 +0000 (10:19 +0100)]
Revert "Remove SchemaNode#getPath usage from XmlPatchBodyReader"

This reverts commit 4be37ba18758aa2f52cadec3166a6477605b8303. The
assumptsions being made are just not correct.

Change-Id: I3f654e87bc6b82393baece2caaef33d46e563264
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRevert "Remove SchemaNode#getPath usage from JsonToPatchBodyReader" 84/100184/2
Robert Varga [Mon, 21 Mar 2022 09:18:57 +0000 (10:18 +0100)]
Revert "Remove SchemaNode#getPath usage from JsonToPatchBodyReader"

This reverts commit b395c683332c037acec4eecde1b079811ab5d2a3. The
assumptsions being made are just not correct.

Change-Id: Ic7abe61c7b74383f9f8891ac0acdb281188f8b6c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRevert "Remove SchemaNode#getPath usage from RestconfDocumentedExceptionMapper" 83/100183/2
Robert Varga [Mon, 21 Mar 2022 09:18:46 +0000 (10:18 +0100)]
Revert "Remove SchemaNode#getPath usage from RestconfDocumentedExceptionMapper"

This reverts commit 0f99f8d6a6aaa6db06a50e123f1395b5a9254638. The
assumptsions being made are just not correct.

Change-Id: I2eea7580fde537c701bb2773da1dcc2783aa1296
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRevert "Remove SchemaNode#getPath from NormalizedNodeJsonBodyWriter" 82/100182/2
Robert Varga [Mon, 21 Mar 2022 09:18:33 +0000 (10:18 +0100)]
Revert "Remove SchemaNode#getPath from NormalizedNodeJsonBodyWriter"

This reverts commit ea9227ab54fe59853e13e0e5833fe6c0795cb87e. The
assumptsions being made are just not correct.

Change-Id: Ie50e8054df0f3b52bc07047dfb565a05fe4a1a60
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRevert "Remove SchemaNode#getPath from NormalizedNodeXmlBodyWriter" 81/100181/2
Robert Varga [Mon, 21 Mar 2022 09:18:20 +0000 (10:18 +0100)]
Revert "Remove SchemaNode#getPath from NormalizedNodeXmlBodyWriter"

This reverts commit c77a96371f41f180bf4e2f0eb030d847b54ef2cf. The
assumptsions being made are just not correct.

Change-Id: I0e96e50f13ab8e407506aae55eb21c9a0f306a4f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRevert "Remove SchemaNode#getPath from ControllerContext" 80/100180/2
Robert Varga [Mon, 21 Mar 2022 09:18:04 +0000 (10:18 +0100)]
Revert "Remove SchemaNode#getPath from ControllerContext"

This reverts commit 7815d63f3d34f7a7664a2e551d2bdfdb844b6a95. The
assumptsions being made are just not correct.

Change-Id: I8d45c765f5f24a72ce5f43e511c8f8fb0b4978d0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRevert "Do not parse YIID to put together a SchemaPath" 79/100179/2
Robert Varga [Mon, 21 Mar 2022 09:17:37 +0000 (10:17 +0100)]
Revert "Do not parse YIID to put together a SchemaPath"

This reverts commit b792380644d076274abf500df3a0e1cb1aae1366. This is a
precondition to backing out an invalid patch.

Change-Id: Idb9a49e68d961c0e8c9c0be04286192ae2b9f75d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRevert "Fix rfc8040 rpcs not working" 96/100196/1
Robert Varga [Mon, 21 Mar 2022 10:04:22 +0000 (11:04 +0100)]
Revert "Fix rfc8040 rpcs not working"

This reverts commit 4bcdbecb30803ed0182d1f096f8bb38f8fe4d3c4. This is
preconditioned on a patch that is being reverted.

Change-Id: Iea09481d3117bf0c4d526e2c2b1c87fa52baa0c3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRevert "Eliminate use of SchemaNode.getPath() in TestRestconfUtils" 78/100178/1
Robert Varga [Mon, 21 Mar 2022 09:16:51 +0000 (10:16 +0100)]
Revert "Eliminate use of SchemaNode.getPath() in TestRestconfUtils"

This reverts commit f2a340f0a8ec957382fb48ab7694d9c20d916a7f. The
assumptsions being made are just not correct.

Change-Id: Ib1a44afa3f344376633bf414b8dfdace724c0d8b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRevert "Eliminate use of SchemaNode.getPath() in XML reader" 77/100177/1
Robert Varga [Mon, 21 Mar 2022 09:16:35 +0000 (10:16 +0100)]
Revert "Eliminate use of SchemaNode.getPath() in XML reader"

This reverts commit 2ae92283fd3541479e454b73e64767813e2dbf5b. The
assumptsions being made are just not correct.

Change-Id: Icd5bd52fecd9321ff6ac50865620cc0eee44333a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRevert "Eliminate use of SchemaNode.getPath() in YII deserializer" 76/100176/1
Robert Varga [Mon, 21 Mar 2022 09:16:21 +0000 (10:16 +0100)]
Revert "Eliminate use of SchemaNode.getPath() in YII deserializer"

This reverts commit d8990ef41881d91b816e9a7ed430a3e18bf250e0. The
assumptsions being made are just not correct.

Change-Id: I77d609579882c6fea208cae4fb7fd964cffb18ae
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRevert "Eliminate use of SchemaNode.getPath() in sal-netconf-connector" 75/100175/1
Robert Varga [Mon, 21 Mar 2022 09:16:06 +0000 (10:16 +0100)]
Revert "Eliminate use of SchemaNode.getPath() in sal-netconf-connector"

This reverts commit 01394e68302417fca3498151bc8e70a652e88d5d. The
assumptsions being made are just not correct.

Change-Id: Ide2fd243c27b4e94869cca369585aceb74478bff
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRevert "Refactor NetconfMessageTransformer" 74/100174/1
Robert Varga [Mon, 21 Mar 2022 09:15:50 +0000 (10:15 +0100)]
Revert "Refactor NetconfMessageTransformer"

This reverts commit 1e71e52f219b84d673ca793f02306b6d27b38387. The
assumptsions being made are just not correct.

Change-Id: I8b65541c8c17b4c360a1e725fcb5cf6ec7bec4c3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRevert "Eliminate use of #getPath() in bierman02's TestRestconfUtils" 73/100173/1
Robert Varga [Mon, 21 Mar 2022 09:13:31 +0000 (10:13 +0100)]
Revert "Eliminate use of #getPath() in bierman02's TestRestconfUtils"

This reverts commit d40e045841741b0e726816b10fb6b48143c88814. The
assumptsions being made are just not correct.

Change-Id: I0dbabbdf11ec878582c7bdae81cadee65f9759f7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRevert "Remove use of #getPath() in URIParametersParsing tests" 72/100172/1
Robert Varga [Mon, 21 Mar 2022 09:13:12 +0000 (10:13 +0100)]
Revert "Remove use of #getPath() in URIParametersParsing tests"

This reverts commit 7d8d20da369015e1e435c7c843eb37b147f8ea8c. The
assumptsions being made are just not correct.

Change-Id: Ib7b868aec7e2b71e5cfa82312f33e69044e19613
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRevert "Remove SchemaNode#getPath usage from RestconfDataServiceImpl for rfc8040" 71/100171/1
Robert Varga [Mon, 21 Mar 2022 09:12:16 +0000 (10:12 +0100)]
Revert "Remove SchemaNode#getPath usage from RestconfDataServiceImpl for rfc8040"

This reverts commit 60cb992dbb51addce3165a83d4b682047a10957a. The
assumptsions being made are just not correct.

Change-Id: I035677717f4de2d829209480cbd01d47d1c99a6d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoExport supported features to ietf-yang-library 30/100130/6
OleksandrZharov [Tue, 15 Mar 2022 09:46:38 +0000 (10:46 +0100)]
Export supported features to ietf-yang-library

ModuleLike.getFeatures() now reflects the set of features used to build
the module. Examine them to construct 'features' leaf-list accordingly.

JIRA: NETCONF-857
Change-Id: I8a1447b6d53f2947beaa06f3963ae9bd43373367
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoDo not include restconf-nb-bierman02 in odl-restconf 63/100163/3
Robert Varga [Mon, 21 Mar 2022 05:06:15 +0000 (06:06 +0100)]
Do not include restconf-nb-bierman02 in odl-restconf

The old restconf implementation is now obsolete and scheduled for
removal. Do not install it by default and issue a stern warning
when it is installed.

JIRA: NETCONF-839
Change-Id: I1448a44f132d2ae4b0ba1d70a0a50e8658af41d4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoFix NETCONF error message propagation to RESTCONF 48/100148/1
Peter Puškár [Fri, 18 Mar 2022 16:45:19 +0000 (17:45 +0100)]
Fix NETCONF error message propagation to RESTCONF

This small typo during refactor caused an issue where NETCONF error
messages would not be propagated into RESTCONF response in some cases
where transaction failed.

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

2 years agoRemove use of #getPath() in URIParametersParsing tests 31/100131/7
Ivan Hrasko [Tue, 15 Mar 2022 09:54:12 +0000 (10:54 +0100)]
Remove use of #getPath() in URIParametersParsing tests

SchemaNode#getPath is deprecated, not used and we do not need
to mock it anymore.

JIRA: NETCONF-818
Change-Id: I7856a7efd364b8bd83d939263b83cd578eaaf8a6
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 years agoEliminate use of #getPath() in bierman02's TestRestconfUtils 28/100128/5
Ivan Hrasko [Tue, 15 Mar 2022 09:28:21 +0000 (10:28 +0100)]
Eliminate use of #getPath() in bierman02's TestRestconfUtils

Replace SchemaNode#getPath usage with SchemaInference.

JIRA: NETCONF-818
Change-Id: Ic0f53ac47e6dec60746f076b672d75ed974aef10
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 years agoRefactor NetconfMessageTransformer 83/100083/2
Robert Varga [Fri, 11 Mar 2022 17:22:24 +0000 (18:22 +0100)]
Refactor NetconfMessageTransformer

We can side-step a few expensive methods, let's just do simple concats
and use enterSchemaTree() without an intermediate Absolute.

JIRA: NETCONF-817
Change-Id: Id5de2febd90d18348f29a07a49e77b2fa09d3ae0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoEliminate use of SchemaNode.getPath() in sal-netconf-connector 05/100005/7
OleksandrZharov [Tue, 8 Mar 2022 18:30:50 +0000 (19:30 +0100)]
Eliminate use of SchemaNode.getPath() in sal-netconf-connector

Removed deprecated getPath method and replaced it with alternative
ways using qnames and yang instance identifier.

JIRA: NETCONF-817
Change-Id: Ia809e60f96f9a747d5d72e71f96cf421815ed751
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 years agoFix rfc8040 rpcs not working 80/100080/3
Tomas Cere [Fri, 11 Mar 2022 13:57:24 +0000 (14:57 +0100)]
Fix rfc8040 rpcs not working

Rfc8040 json writer needs an YIID and SchemaNodeIdentifier to
serialize a response after the removal of getPath().
Fix this by providing both when processing a response to an
rpc.

Change-Id: If1a369d7c5c10a7075deaee33076a7d46de0d42f
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
2 years agoDo not parse YIID to put together a SchemaPath 24/100024/4
Tomas Cere [Wed, 9 Mar 2022 13:16:08 +0000 (14:16 +0100)]
Do not parse YIID to put together a SchemaPath

Once we have InstanceIdentifierContext available,
we have already decoded YangInstanceIdentifier.
Due to this we can store the SchemaNodeIdentifier during
the decoding and not iterate through it again with streams.

Change-Id: I27739c755acec519e8422c4fa49a47266487d3cd
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
2 years agoEliminate use of SchemaNode.getPath() in XML reader 28/100028/7
Ivan Hrasko [Wed, 9 Mar 2022 16:07:58 +0000 (17:07 +0100)]
Eliminate use of SchemaNode.getPath() in XML reader

Replace SchemaNode#getPath usage with SchemaInference.

JIRA: NETCONF-818
Change-Id: I702685cc9ac26a02d78d5f07723c72d4cffd5f08
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 years agoEliminate use of SchemaNode.getPath() in YII deserializer 27/100027/5
Ivan Hrasko [Wed, 9 Mar 2022 15:39:00 +0000 (16:39 +0100)]
Eliminate use of SchemaNode.getPath() in YII deserializer

Replace SchemaNode#getPath usage with Absolute path.

JIRA: NETCONF-818
Change-Id: I5d1dab0013c81aa14bf6f4a5f07c53914af60436
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 years agoEliminate use of SchemaNode.getPath() in TestRestconfUtils 26/100026/4
Ivan Hrasko [Wed, 9 Mar 2022 15:32:15 +0000 (16:32 +0100)]
Eliminate use of SchemaNode.getPath() in TestRestconfUtils

Replace SchemaNode#getPath usage with SchemaInference.

JIRA: NETCONF-818
Change-Id: I8f64605f71eb9cdc8d17a5381e2e6c102dac7d0b
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 years agoRemove SchemaNode#getPath from ControllerContext 60/100060/4
Ivan Hrasko [Thu, 10 Mar 2022 13:56:23 +0000 (14:56 +0100)]
Remove SchemaNode#getPath from ControllerContext

Replace usage of SchemaNode#getPath with SchemaInference.

JIRA: NETCONF-818
Change-Id: I4d05987cfc9c1a0911b70d9a1e8f21681e6fe180
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 years agoConvert WadlTemplate to Java 49/100049/4
Robert Varga [Wed, 9 Mar 2022 16:46:28 +0000 (17:46 +0100)]
Convert WadlTemplate to Java

This is a quick conversion to Java, without ditching dependencies on
xtext.xbase.lib.

JIRA: NETCONF-864
Change-Id: I13b0333d7434a8abd98df01eb78948391014ba7d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove NodeContainerProxy class 58/100058/2
Ivan Hrasko [Thu, 10 Mar 2022 12:41:37 +0000 (13:41 +0100)]
Remove NodeContainerProxy class

NodeContainerProxy is marked deprecated since the version 2.0.0
remove it for version 3.0.0.

This way we do not have to spend time to maintain not used class.

JIRA: NETCONF-865
Change-Id: I35bd055a938556a384fd69127113f4bc92239bd7
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 years agoRemove SchemaNode#getPath from RestconfImpl 23/100023/4
OleksandrZharov [Wed, 9 Mar 2022 13:10:50 +0000 (14:10 +0100)]
Remove SchemaNode#getPath from RestconfImpl

Removed getPath method and replaced it with Absolute#of Qname.

JIRA: NETCONF-818
Change-Id: I1a8c6e9d0117072036cd68cac50c3ae3849da46a
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
2 years agoFix odl-netconf-callhome-server unique statement 19/100019/1
Robert Varga [Wed, 9 Mar 2022 10:14:27 +0000 (11:14 +0100)]
Fix odl-netconf-callhome-server unique statement

We have two unique references which do not correctly resolve, fix that
up.

Change-Id: I84f0f467e651329ff06dab74bd3de64f4c1c3373
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove SchemaNode#getPath from NormalizedNodeXmlBodyWriter 79/99679/18
OleksandrZharov [Thu, 10 Feb 2022 10:08:18 +0000 (11:08 +0100)]
Remove SchemaNode#getPath from NormalizedNodeXmlBodyWriter

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

Added YangInstanceIdentifier to tests according to logic of QNames. It
allows get parent path properly.

JIRA: NETCONF-818
Change-Id: I8db3481b9413040ad60ba3ce1ceec824b8533b79
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
2 years agoRemove SchemaNode#getPath from NormalizedNodeJsonBodyWriter 73/99673/12
OleksandrZharov [Wed, 9 Feb 2022 16:42:32 +0000 (17:42 +0100)]
Remove SchemaNode#getPath from NormalizedNodeJsonBodyWriter

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

Now we rely on YangInstanceIdentifier of target resource thus we need
to create QNames for Modules and Streams in RestconfImpl.

JIRA: NETCONF-818
Change-Id: I2d4f95540fc6ddc66233029dcdb1000ccbcd3524
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 years agoRemove SchemaNode#getPath usage from RestconfDocumentedExceptionMapper 16/99716/6
OleksandrZharov [Mon, 14 Feb 2022 10:27:34 +0000 (11:27 +0100)]
Remove SchemaNode#getPath usage from RestconfDocumentedExceptionMapper

Removed deprecated SchemaNode#getPath from
RestconfDocumentedExceptionMapper class and replaced by new logic
of getting path via QNames and Absolute path.

Added YangInstanceIdentifier into NormalizedNodeContext instaed of null.
It used later for getting SchemaPath from QNames.

JIRA: NETCONF-818
Change-Id: I636ab83e4c1b89500d8face06777d2e931639035
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
2 years agoRemove SchemaNode#getPath usage from JsonToPatchBodyReader 50/99650/20
OleksandrZharov [Tue, 8 Feb 2022 10:55:16 +0000 (11:55 +0100)]
Remove SchemaNode#getPath usage from JsonToPatchBodyReader

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

Removed SchemaNode from PachEdit since we don't need it and replaced
it with SchemaInference.

JIRA: NETCONF-818
Change-Id: Id0c89c5f5b98addac4f7d38749248956e010f5ab
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
2 years agoRemove SchemaNode#getPath usage from XmlPatchBodyReader 55/99755/12
OleksandrZharov [Tue, 15 Feb 2022 11:06:33 +0000 (12:06 +0100)]
Remove SchemaNode#getPath usage from XmlPatchBodyReader

Removed deprecated SchemaNode#getPath from XmlPatchBodyReader class
by using YangInstanceIdentifier and QNames that it contain to create
SchemaInferenceStack based on it.

JIRA: NETCONF-818
Change-Id: I550db7c94e0434e87769b8972f70eb88f73a0c27
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 years agoRemove SchemaNode#getPath usage from XmlToPatchBodyReader 17/99717/6
OleksandrZharov [Mon, 14 Feb 2022 11:20:45 +0000 (12:20 +0100)]
Remove SchemaNode#getPath usage from XmlToPatchBodyReader

Removed deprecated SchemaNode#getPath from XmlToPatchBodyReader class
by using YangInstanceIdentifier and QNames that it contain to create
SchemaInferenceStack based on it.

JIRA: NETCONF-818
Change-Id: I03226866ac910d21b96982963f4671392af7cf8d
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 years agoRemove SchemaNode#getPath from JSON writer in rfc8040 53/99753/5
OleksandrZharov [Tue, 15 Feb 2022 10:40:18 +0000 (11:40 +0100)]
Remove SchemaNode#getPath from JSON writer in rfc8040

Removed deprecated SchemaNode#getPath from JsonNormalizedNodeBodyWriter
class by replacing it with path created from QNames via Absolute#of
method.

JIRA: NETCONF-818
Change-Id: I93a2f6121d8635f5046b18c02624fb1f386e75eb
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 years agoRemove SchemaNode#getPath usage from ListenerAdapter 24/99724/7
OleksandrZharov [Mon, 14 Feb 2022 12:51:52 +0000 (13:51 +0100)]
Remove SchemaNode#getPath usage from ListenerAdapter

Removed deprecated SchemaNode#getPath from ListenerAdapter class
and replaced by new logic using SchemaInference.

JIRA: NETCONF-818
Change-Id: I6e4b87ab32382f2f1eb88c742652f636945dd9d0
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 years agoImprove validation for invalid files in schemas dir 35/99935/8
OleksandrZharov [Wed, 2 Mar 2022 14:33:24 +0000 (15:33 +0100)]
Improve validation for invalid files in schemas dir

Previous validation of schema files was not very specific if
there was problems with files. Now there is more direct message if
something wrong with yang files.

Removed logic that rename not yang files into .yang in schema dir.
We are storing yang models only in .yang files. Therefore all other
files should be rejected.

JIRA: NETCONF-707
Change-Id: Iad4b91fd534eef8ea134a9463de3dab618fe969e
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
2 years agoRemove SchemaNode#getPath usage from JsonPatchBodyReader 54/99754/11
OleksandrZharov [Tue, 15 Feb 2022 10:59:51 +0000 (11:59 +0100)]
Remove SchemaNode#getPath usage from JsonPatchBodyReader

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

Removed SchemaNode from PachEdit since we don't need it and replaced
it with SchemaInference.

JIRA: NETCONF-818
Change-Id: I9b82db327b9eb2711db651856ab76a4957b9a8ac
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
2 years agoDon't use getPath() to initialize leafref resolver 85/99785/4
Ivan Hrasko [Thu, 17 Feb 2022 19:32:29 +0000 (20:32 +0100)]
Don't use getPath() to initialize leafref resolver

Track absolute path to leaf with SchemaInferenceStack
and use this way initialized stack as leafref resolver.

JIRA: NETCONF-819
Change-Id: I2fd180b61e8ca4ca119e4fac1eb05af2a319d1d5
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
2 years agoSet call-home SSH port to 4334 73/98873/11
Ivan Hrasko [Mon, 6 Dec 2021 19:31:16 +0000 (20:31 +0100)]
Set call-home SSH port to 4334

According to RFC 8071 the default port
for NETCONF call-home SSH is 4334 not 6666.

JIRA: NETCONF-846
Change-Id: I24c087f5d0797178c676ddf6ece001c82af6ed4a
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 years agoBump versions to 3.0.0-SNAPSHOT 85/99885/1
Robert Varga [Mon, 28 Feb 2022 21:42:12 +0000 (22:42 +0100)]
Bump versions to 3.0.0-SNAPSHOT

This starts the next major development iteration.

Change-Id: I0341e10177f3a0a8202d1f70d173271e4f272a57
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
2 years agoRemove SchemaNode#getPath from XML writer test in rfc8040 76/99776/4
OleksandrZharov [Wed, 16 Feb 2022 10:16:26 +0000 (11:16 +0100)]
Remove SchemaNode#getPath from XML writer test in rfc8040

Removed deprecated SchemaNode#getPath from
XmlNormalizedNodeBodyWriterTest class

JIRA: NETCONF-818
Change-Id: I488296e26b929bf2cab6acee8254ac47ed7162d9
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
2 years agoRemove SchemaNode#getPath from XML writer in rfc8040 56/99756/7
OleksandrZharov [Tue, 15 Feb 2022 11:19:27 +0000 (12:19 +0100)]
Remove SchemaNode#getPath from XML writer in rfc8040

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

JIRA: NETCONF-818
Change-Id: Ibb88ccce1a987bf4e6ea979edd74ca0d2179cd9c
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
2 years agoRemove SchemaNode#getPath from JSON reader in rfc8040 34/99734/3
OleksandrZharov [Mon, 14 Feb 2022 15:13:39 +0000 (16:13 +0100)]
Remove SchemaNode#getPath from JSON reader in rfc8040

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

JIRA: NETCONF-818
Change-Id: I874d8246e54d5a0d042d7da19bdcfe264d58cd4a
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
2 years agoCheck error conditions before processing 99/99799/1
Ivan Hrasko [Fri, 18 Feb 2022 19:12:31 +0000 (20:12 +0100)]
Check error conditions before processing

First we have to check if yangIIdContext empty content does not mean
the error and only then we can use it in further processing.

JIRA: NETCONF-818
Change-Id: I81593f323a48ea47d91f5aeb424729408efed2ad
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
2 years agoRemove SchemaNode#getPath usage from CreateStreamUtil for rfc8040 59/99759/7
OleksandrZharov [Tue, 15 Feb 2022 16:22:43 +0000 (17:22 +0100)]
Remove SchemaNode#getPath usage from CreateStreamUtil for rfc8040

Removed deprecated SchemaNode#getPath from CreateStreamUtil class
by using Qnames. We always process notifications from schema root
so just Qname of notification is just enough.

JIRA: NETCONF-818
Change-Id: If9f1054fd7a1ddcef0c681b7549a52e806dd7183
Signed-off-by: OleksandrZharov <Oleksandr.Zharov@pantheon.tech>
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>