Robert Varga [Wed, 14 Oct 2020 10:26:44 +0000 (12:26 +0200)]
Upgrade yang-library schema in sal-netconf-connector
Upgrade the schema used for determining the model set present
on the device. We will end up interpreting RFC7895 as RFC8525, which
is just fine.
JIRA: NETCONF-725
Change-Id: If74baa5476f84d511b7c28278cfc54749fb698b1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 14 Oct 2020 09:42:07 +0000 (11:42 +0200)]
Squash registrations
Use a minimally-sized List instead of default allocation.
Change-Id: I58ce1082a96d546d66ce4ca59df14c20b2bc9d2a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
PeterSuna [Wed, 7 Oct 2020 08:52:14 +0000 (10:52 +0200)]
Add SchemaSourceRegistration list to NetconfConnectorDTO
When a NetconfDevice is initialized, we keep track of it via
NetconfConnectorDTO. As a device actually can have some YANG Library
source attached to it, we are registering them as well, but we are
failing to unregister them.
Keep the registration list in the DTO and route close requests
towards it -- allowing us to also remove the registrations.
JIRA: NETCONF-675
Change-Id: Id1d5fb2ff23aad766273e22d5f6f6639300fb3a5
Signed-off-by: PeterSuna <peter.suna@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Luis Gomez [Mon, 12 Oct 2020 01:19:54 +0000 (18:19 -0700)]
Update NETCONF user documentation
- Remove old CSS configuration
- Add JSON payloads
Change-Id: I8eddf4f4cc505d9c3f872cdadacc9fc5a972380d
Signed-off-by: Luis Gomez <ecelgp@gmail.com>
Nikhil Soni [Mon, 25 May 2020 09:41:29 +0000 (15:11 +0530)]
Extend Websocket streams for data-less notifications
A new filter named "odl-skip-notification-data", similar to "odl-leaf-nodes-only", is added in the subscription API.
Using this filter, Client can get notification without data.
JIRA: NETCONF-689
Change-Id: I0cec77f69cb141fabc9f839c9a91626d3c667655
Signed-off-by: Nikhil Soni <nsoni@luminanetworks.com>
Robert Varga [Tue, 22 Sep 2020 15:45:10 +0000 (17:45 +0200)]
Bump MRI projects
This patch adopts:
- odlparent-7.0.6
- infrautils-1.8.1
- yangtools-5.0.6
- mdsal-6.0.5
- controller-2.0.4
Also adjust schema managers to work with IRSchemaSource instead
of ASTSchemaSource.
Change-Id: If1658111aad5f4c39a6e9dff844d3193994e943d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Vladyslav Marchenko [Tue, 25 Aug 2020 07:32:29 +0000 (10:32 +0300)]
If there is only one revision is present, return it.
JIRA: NETCONF-720
Signed-off-by: Vladyslav Marchenko <vladyslav.marchenko@pantheon.tech>
Change-Id: I9103ef41af9bda1681baddf853fb3f739c20b620
Robert Varga [Tue, 7 Jul 2020 18:05:01 +0000 (20:05 +0200)]
Use YangConstants.RFC6020_YIN_MEDIA_TYPE
application/yin+xml media type is an RFC6020 definition, and hence
its common definition lives in YangConstants. Use it for there
instead of brewing our own.
Change-Id: I6d9f9fd123ffa6db41994d55400bd8c640c6a1f4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 26 Aug 2020 18:30:07 +0000 (20:30 +0200)]
Revert "Revert "Upgrade mina-sshd to 2.4.0""
This reverts commit
f25f45ff27c8a7c7df780df609ec33f6662ea61e,
re-bumping to 2.5.1.
JIRA: NETCONF-716
Change-Id: I520d807c50a8107c0189745cf56e0fbc75871230
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 31 Jul 2020 08:38:30 +0000 (10:38 +0200)]
Enable server heartbeats
When we configure the server to have any timeout, make sure we give
initiate a heartbeat at least three times before timing out. Also, if
we do not specify the idle timer, we need to disable NIO2 read timeout.
JIRA: NETCONF-716
Change-Id: I2c6ed07b5d3b29f6524b0ed99067895c4dfdc020
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 4 Aug 2020 16:57:21 +0000 (18:57 +0200)]
Disable NIO read timeout by default
Rework which timeouts are disabled, as we are hitting timeout
after 615 seconds.
JIRA: NETCONF-716
Change-Id: I98ef51b4346c2aee0c9c87d58035bc08ef2c77d1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Jamo Luhrsen [Tue, 4 Aug 2020 22:54:11 +0000 (15:54 -0700)]
Revert "Upgrade mina-sshd to 2.4.0"
This reverts commit
560e49a0c5d879e763eb82f737db92bc78a276d3
as well as
c2e07b76734c34a2fe88262530b4ac4a387b8ee7, as these
are suspected to cause a regression.
JIRA: NETCONF-716
Change-Id: Ie73f3a7b0b4f41e690b368035f212938916b40dd
Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
Jamo Luhrsen [Tue, 4 Aug 2020 22:06:18 +0000 (15:06 -0700)]
Revert "Expand rsa-ssh2 signatures"
This reverts commit
3453c508f27c64feb7220c84160a34df732b9738.
Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
Change-Id: Ib3d442178877c82c760a625ff5acaa546ba797d4
Jamo Luhrsen [Wed, 12 Aug 2020 22:54:35 +0000 (15:54 -0700)]
Extra superfluous edit-config RPC sent
Extra superfluous edit-config RPC sent just prior to correct edit-config
RPC for top-level lists POST & PUT to certain top-level lists in a
mounted device's model returns a 500 error via Restconf, although in
some cases (device-dependent) the config appears to have committed.
This problem first appeared in Boron-SR3, and continues in Carbon SR-1.
JIRA: NETCONF-482
Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
Change-Id: I718bda377245d884864e160f2566e7c3d8e62e47
Thanh Ha [Tue, 11 Aug 2020 19:28:32 +0000 (15:28 -0400)]
Bump conf.yaml versions to Silicon
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Change-Id: I010ef27ac4307e4b2b2c3a501ffb7561ece5ddaa
Robert Varga [Mon, 3 Aug 2020 16:56:38 +0000 (18:56 +0200)]
Do not use pattern matching for simple removal
This is a follow-up patch to improvee CR/LF stripping, as this
can be done much more efficiently.
Change-Id: If8104af82228ce94c3b40f3a3cd4f7baa12172ad
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Oleksii Mozghovyi [Tue, 28 Jul 2020 13:09:29 +0000 (16:09 +0300)]
Remove deprecated GzipFilter from restconf
Issue-ID: NETCONF-602
Change-Id: I1aa08ccb83f45f26a6f8373d68feb35aa980d599
Signed-off-by: Oleksii Mozghovyi <oleksii.mozghovyi@pantheon.tech>
Thanh Ha [Wed, 5 Aug 2020 21:02:32 +0000 (17:02 -0400)]
Bump versions by x.(y+1).z for next dev cycle
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Change-Id: Ib353bd4b62d93941e45fa26cd58d1813d959675d
Lukas Baca [Wed, 3 Jun 2020 10:19:13 +0000 (12:19 +0200)]
RESTCONF RFC8040 compliance: SSE support
Add implementation of Server-Sent Events according to RFC8040
(https://tools.ietf.org/html/rfc8040#section-6) and make it the default behavior.
Previous behavior(websocket) is possible turn on by configuration.
Add example of config file which is located
in etc/org.opendaylight.restconf.nb.rfc8040.cfg, plus some javadocs.
JIRA: NETCONF-679
Change-Id: I3be8f25e10512b9972dbd42d3e48c03719e0704f
Signed-off-by: Lukas Baca <lbaca@luminanetworks.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 3 Aug 2020 16:40:41 +0000 (18:40 +0200)]
Fix javadoc warnings
We have a number of warnings, fix them up.
Change-Id: I19525f5fb2b2f468fc74cef0ab4311d5ab95065d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Anna Bencurova [Tue, 28 Jul 2020 12:19:45 +0000 (14:19 +0200)]
Synchronize stop and reschedule keepalive methods
Synchronize to avoid stucked scheduled keepalive task. This is not
a perfect solution, but should work for now.
JIRA: NETCONF-715
Change-Id: I130507f3e6472c8b15eb027e40ab41c972f075ec
Signed-off-by: Anna Bencurova <Anna.Bencurova@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 2 Aug 2020 08:18:43 +0000 (10:18 +0200)]
Clean up NetconfKeystoreAdapter
We can safely import java.security.KeyStore, simplifying code. Also
migrate to Objects.requireNonNull().
Change-Id: Iddd3cbfc8adb919833643294b7e99a5a0a07ace0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 2 Aug 2020 08:07:40 +0000 (10:07 +0200)]
Convert sal-netconf-connector to OSGi DS
This is a very simple blueprint container, eliminate it in favor
of OSGi components.
Change-Id: I1b6636bc94b77cf33fb79fec65168c18b3c9794d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Nikhil Soni [Fri, 3 Jul 2020 07:35:54 +0000 (13:05 +0530)]
Add import for netconf-node-optional
This was missed in the initial work to add the
optional schema first added here:
https://git.opendaylight.org/gerrit/c/netconf/+/82521
Because of that, adding any of the optional configs
(e.g., datastore-lock) to the body of the create device
RPC was failing. importing it in netconf-node-topology
fixes that.
JIRA: NETCONF-670
Change-Id: I5fc72d9714e0fb4f1dfd26f161d2eb3dcfe8862a
Signed-off-by: Nikhil Soni <nsoni@luminanetworks.com>
Vladyslav Marchenko [Thu, 9 Jul 2020 14:27:22 +0000 (17:27 +0300)]
Add support of new a NetconfDataTreeService in clustered netconf
In NETCONF-312 was introduced a new service (NetconfDataTreeService) for exposing operations in their NETCONF-native form.
We need a proxy implementation of this new service for the slave which would forward the requests to master.
JIRA: NETCONF-706
Signed-off-by: Vladyslav Marchenko <vladyslav.marchenko@pantheon.tech>
Change-Id: I58cdc6791fb4476e64b474e95c12292a3a52e771
Robert Varga [Tue, 28 Jul 2020 11:26:18 +0000 (13:26 +0200)]
Use released version of infrautils
infrautils-1.8.0 has been released, use released version instead
of snapshots.
Change-Id: Iedc0e527b5ad4f5a43b9320561ee9935e4bd768e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sat, 11 Jul 2020 20:18:19 +0000 (22:18 +0200)]
Bump odlparent/yangtools/mdsal/controller
Adopt upstream versions:
- odlparent-7.0.5
- yangtools-5.0.5
- mdsal-6.0.4
- controller-2.0.3
Change-Id: Ia9d798ea1594582c563549a19c53d2b86871caf0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Anna Bencurova [Thu, 25 Jun 2020 12:16:02 +0000 (14:16 +0200)]
Add support for nested notifications to NetconfMessageTransformer
RFC7950 nested notifications are becoming the norm, yet we cannot
seem to grasp them. This patch adds preliminary support for decoding
them and shuffling them towards whoever may be consuming them.
JIRA: NETCONF-704
Change-Id: I63bebf87de93611f7c887f8b077e59000876aa84
Signed-off-by: Anna Bencurova <Anna.Bencurova@pantheon.tech>
(cherry picked from commit
a78077ff87fb40fe37eaddfbdd17e150a6b93e8c)
Nikhil Soni [Thu, 18 Jun 2020 16:31:36 +0000 (22:01 +0530)]
Fix missing stream leaf value
If any subscription is present, attempting to build the tree will be
rejected, as the leaf will not have a set value.
JIRA: NETCONF-700
Change-Id: I6d448ceb42605b268408c91844c5b08b0c8929eb
Signed-off-by: Nikhil Soni <nsoni@luminanetworks.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
ajay_dp001 [Sun, 12 Jul 2020 07:21:17 +0000 (12:51 +0530)]
Fix Nested YANG 1.1 Action invocation
Invocation of action fails if the action is defined as an augmentation.
As it turns out the logic can be very much simplified by just cutting
the last item from YangInstanceIdentifier, as that points to the parent
(and hence context) of the action.
JIRA: NETCONF-696
Signed-off-by: ajay_dp001 <ajay.deep.singh@est.tech>
Change-Id: I1d5cd6f65ae4d040d36de5f24f6d76fe5076991f
Vladyslav Marchenko [Wed, 10 Jun 2020 09:19:19 +0000 (12:19 +0300)]
Create NetconfDataTreeService with base and additional operations for netconf
Service provided by netconf mountpoints. It provides an api for all netconf operations, instead of mapping mdsal api to netconf requests. Restconf now uses the new NetconfDataTreeService when available. If no - fall back to DOMDataBroker.
JIRA: NETCONF-312
Signed-off-by: Vladyslav Marchenko <vladyslav.marchenko@pantheon.tech>
Change-Id: I354449883b54c8a3a4e7ffdc12d7d532c8120b6a
Thanh Ha [Fri, 10 Jul 2020 14:30:22 +0000 (10:30 -0400)]
Do not fail on warnings for docs-linkcheck
This is a workaround due to sphinx-tabs being incompatible with the
Sphinx linkchecker which throws a warning. We mainly use linkchecker
to catch broken links so we don't really need to fail on warnings as
the main "docs" builder will still fail for warning level issues so
this is a reasonable workaround.
This patch also fixes some current broken links in the docs, mainly
wiki.odl to wiki-archive.odl as these docs have not been migrated
to the new wiki as of yet.
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Change-Id: I94d09ad6740efde204b4bb649623eedf346c3208
Anil Belur [Sun, 12 Jul 2020 00:54:24 +0000 (10:54 +1000)]
Add INFO.yaml for netconf
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Change-Id: I63b57b8ebceae8f16e5588479580d50b6d7391de
Robert Varga [Fri, 10 Jul 2020 10:46:02 +0000 (12:46 +0200)]
Fix OperationsCreator javadoc
checkstyle is a bit more touchy, fix it up.
Change-Id: I39ad689d10ba508f2284cbc6cdf9c915ab5796c9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
bdd71505b92999ea46d6aa683314100439cd8008)
Kailash Khalasi [Thu, 25 Jun 2020 00:30:48 +0000 (17:30 -0700)]
Make ETag header value more readable
for example:
this:
'ETag': '"2017-01-26streams"
is now this:
'ETag': '"2017-01-26-streams"
Change-Id: I44f943a0b77838f83c9dff123a750727f17ea98c
Signed-off-by: Kailash Khalasi <kailash.khalasi@gmail.com>
Robert Varga [Thu, 9 Jul 2020 14:50:44 +0000 (16:50 +0200)]
Fix module file name
Modules should have the same file name. While we are normalizing
them during processing, finding a particular model is troublesome.
Change-Id: I8b4bfb7cc8a5cda2c89f977b8b6d31cd9f3af1b6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 8 Jul 2020 07:01:58 +0000 (09:01 +0200)]
Expand rsa-ssh2 signatures
With mina-sshd 2.5.0 we can also support openssh.com versions,
update the list to match.
Change-Id: I4440329912e928ba035e3f7ee9f73ef0f7cc9257
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 7 Jul 2020 16:46:41 +0000 (18:46 +0200)]
Bump mina-sshd to 2.5.1
https://github.com/apache/mina-sshd/blob/master/docs/changes/2.5.0.md
https://github.com/apache/mina-sshd/blob/master/docs/changes/2.5.1.md
Change-Id: I95b25909fad428a3ba61472cedc7d98c3ebe1532
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 7 Jul 2020 21:38:03 +0000 (23:38 +0200)]
Add rsa-sha2 signatures to default client
Netopeer2 can be configured to only allow rsa-sha2 signatures, in
which case we fail to connect to it. Add these to the list of
supported signatures by default.
Change-Id: I00a961e23c06c99dfca0043dd2129fc1438d0b94
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 8 Jul 2020 14:59:56 +0000 (16:59 +0200)]
Move CreateStreamUtil to rests.services.impl
Continue with elimination of 'util' classes by rehosting
CreateStreamUtil to the same package as the baseline implementation,
further simplifying things.
Change-Id: I5a6ace24daa05925645af542237724e83adfa4f4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 8 Jul 2020 14:55:50 +0000 (16:55 +0200)]
Eliminate RestconfStreamsConstants.EQUAL
This is a simple character, inlining it into its users makes them
actually cleaner.
Change-Id: I5c41a81eb814fdf5403cf5696a892291981f29c5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 8 Jul 2020 13:16:57 +0000 (15:16 +0200)]
Eliminate RestconfConstants.SLASH
This is a rather useless constant, which is just muddling things
up. Inline it into users, clearing some very surprising ways of use.
Change-Id: I7d98f670238c32fab32681d6084a9fe28bc8f0b3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 8 Jul 2020 12:53:33 +0000 (14:53 +0200)]
Move SubscribeToStreamUtil to rests.services.impl
Overall structure of RestconfDataServiceImpl relying on a random
mix if 'util' classes is quite wrong, as demonstrated by
ReadDataTransactionUtil.readData(), which actually is very much
stream-specific and ends up *writing* data.
Start with SubscribeToStreamUtil, which pulls a chunk of utility
methods into rests/services/impl. This cleans up other utilities
and makes the package dependency graph a bit simpler.
Change-Id: Ia327182edde23364570f6f5d46044d3efe319fe2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 8 Jul 2020 12:34:56 +0000 (14:34 +0200)]
Remove RestconfMapping{Node,Stream}Constants
These two classes are completely unreferenced, remove them.
Change-Id: I9d9fc3a94cadb245adc6a6bae3c39230bfc1898a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 8 Jul 2020 11:58:01 +0000 (13:58 +0200)]
Cleanup ParserFieldsParameter
Parsing here is quite contrived, with character checks muddled by
constants, leading to multiply-checked conditions. Clean the code
up.
Change-Id: I89214596da5a714ea798eda9f8860c9d57656d83
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 8 Jul 2020 11:34:06 +0000 (13:34 +0200)]
Remove org.opendaylight.restconf.nb.rfc8040.utils.parser.builder
This package holds only a few constants, which are better
redistributed and kept where they are actually used.
Change-Id: I0fc614072e17df463615b1ea3544a3fae0fd659d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 8 Jul 2020 13:06:05 +0000 (15:06 +0200)]
Migrate stream-related RestconfStreamsConstants
These protocol constants are referenced from a single implementation
place, make sure to move them there.
Change-Id: I273ceb9f4cfed698bd856deb49edd5bef8264310
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 8 Jul 2020 13:39:12 +0000 (15:39 +0200)]
JSONRestconfServiceRfc8040Impl is not AutoCloseable
This service has no cleanup, remove useless @PreDestroy method.
Change-Id: I113e0a08e301b9d4eae6b6706d3ce45bb8086002
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 8 Jul 2020 08:40:41 +0000 (10:40 +0200)]
Fix illegalCatch suppressions
We are catching multiple checked exceptions here, but really we are
being lazy. Enumerate caught exceptions and remove suppression.
Change-Id: Ia2d57baf109e19459c662d9e1e3ccd9373b7c08d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 8 Jul 2020 08:57:12 +0000 (10:57 +0200)]
Remove bogus suppression
checkstyle:MissingSwitchDefault is no longer relevant here, remove
the suppression.
Change-Id: I7eea2b4b303a14160d461df52efd0f47afa26b5f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 8 Jul 2020 08:44:44 +0000 (10:44 +0200)]
Package test-jar sources
Navigating sources tests in downstreams without sources is not
particularly nice. Add tests-sources.jar to all artifacts which
are producting test-jar.
Change-Id: I4b77ca4f9e45638271eec68370db1658f4c20779
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 7 Jul 2020 17:58:34 +0000 (19:58 +0200)]
Use YangConstants.RFC6020_YANG_MEDIA_TYPE
application/yang media type is an RFC6020 definition, and hence its
common definition lives in YangConstants. Use it from there instead
of brewing our own.
Change-Id: I75d2c2849e8d4e98760445148f1afc9b1f0acb6d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 7 Jul 2020 15:48:27 +0000 (17:48 +0200)]
Fix rawtypes/hiddenField suppressions
This is a case of laziness, just specify a wildcard and remove
suppression. While we are in the area, also remove a bogus
hiddenField suppression.
Change-Id: I06d81fc4b03a4d593face187fd92893bab7400f1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 7 Jul 2020 15:40:42 +0000 (17:40 +0200)]
Remove bogus illegalThrows suppressions
This code should never have passed review, fix it up. While we are
at it, fixup throws declarations.
Change-Id: I2ecc832260b711571fea2d4cdbe7d04b075bb293
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 7 Jul 2020 15:32:48 +0000 (17:32 +0200)]
Remove unused SuppressWarnings
checkstyle:illegalCatch is no longer applicable in a number of
places, remove suppressions.
Change-Id: I7fcd339ea8aafaef7ba4db1eaa6f3c6b8960582c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 7 Jul 2020 15:31:03 +0000 (17:31 +0200)]
Remove unused SuppressWarnings
checkstyle:finalClass is no longer applicable here, remove it.
Change-Id: I49f7311d87a668de215a7a884195deedfc8f3aee
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 7 Jul 2020 15:27:32 +0000 (17:27 +0200)]
Fix raw type warnings in rfc8040 northbound
There are quite a few warnings around use of raw types, fix them up.
Change-Id: I3a5cffd8148086470f9a1dfbdf837228d56d6e7f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 7 Jul 2020 13:39:52 +0000 (15:39 +0200)]
Remove SchemaContextRef
Carrying a soft reference is completely superfluous -- it does not
guarantee availability and realistically this is just a brain-dead
wrapper for a local reference. Remove the class along with all
references to it.
Change-Id: I2e6fc3f9720f200e12443e07c490f8d79d04351b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 7 Jul 2020 13:10:30 +0000 (15:10 +0200)]
Remove useless SchemaContextRef wrappers
For whatever legacy reasons we are wrapping references to
EffectiveModelContext into soft reference holder, only to unwrap
them in the same method. Remove this clutter.
Change-Id: I2211639c2663bfc4f2f4f9e5898be304c6acad17
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 7 Jul 2020 12:54:16 +0000 (14:54 +0200)]
Cleanup RestconfValidationTest
The tests here could use proper asserts, clean them up.
Change-Id: I75aceba1942a857fe95c9604db4f8e485158adf4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 7 Jul 2020 12:43:05 +0000 (14:43 +0200)]
Eliminate org.opendaylight.restconf.nb.rfc8040.utils.validations
This package is self-serving detail of identifiers parsing. Fold
it into ParserIdentifier, which is its only production user.
Change-Id: Ie07f7097e30374882f694f1d88cb49e15b0199ad
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Thu, 17 Jan 2019 12:05:32 +0000 (13:05 +0100)]
Bind operation prefix to correct namespace
During NetconfUtil.writeNormalizedNode() we failed
to set a prefix for the netconf operation leading to a warning.
Make sure we set the correct NamespaceContext and fallback
to setPrefix() in case the underlying DOM writer does not
support setNamespaceContext().
JIRA: NETCONF-603
Change-Id: Icff5e045c4e901bb53990177d448a1ea43952c62
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
JakubToth [Wed, 1 Jul 2020 22:32:27 +0000 (22:32 +0000)]
Revert "Added Validation for invalid file in schemas-directory."
This reverts commit
4c21689aba5d009c36765dd614643a6c8f89915c.
Reason for revert: readLine() is not returning null for example for binary files etc
Change-Id: I9b3e70b8e95a04dc7ae95b9ff60be2a664b636c8
Signed-off-by: JakubToth <jakubt4@gmail.com>
Robert Varga [Tue, 7 Jul 2020 08:35:18 +0000 (10:35 +0200)]
Revert "Fix nested YANG 1.1 Action invocation"
This reverts commit
8b9206c7b36b7f7ebfadf23e1be00d43a0bd9573, as
it breaks CSIT.
JIRA: NETCONF-702
Change-Id: I6f65c587f5e9d04e67dcdcaeda12688d206524b5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Nikhil Soni [Wed, 1 Jul 2020 05:39:45 +0000 (11:09 +0530)]
Added Validation for invalid file in schemas-directory.
If any invalid (not readable as text) file is present in Schemas-directory then those files should be validated in existing validate method.
JIRA: NETCONF-707
Signed-off-by: Nikhil Soni <nsoni@luminanetworks.com>
Change-Id: I41191748569fcbfd87141c4a4cfe2e8328137911
Oleksii Mozghovyi [Sun, 21 Jun 2020 02:39:13 +0000 (05:39 +0300)]
Add method to build SSL Handler for selected keys only
JIRA: NETCONF-5
Signed-off-by: Oleksii Mozghovyi <oleksii.mozghovyi@pantheon.tech>
Change-Id: I780949db6c425ac0fd682838e87f3893065434e6
Oleksii Mozghovyi [Sun, 21 Jun 2020 01:27:10 +0000 (04:27 +0300)]
Minor refactor in Call-Home
JIRA: NETCONF-5
Signed-off-by: Oleksii Mozghovyi <oleksii.mozghovyi@pantheon.tech>
Change-Id: I6d79e7cdfe864f416aeb3466047e7d0f6be23f7e
Ilya Igushev [Thu, 25 Jun 2020 06:46:02 +0000 (06:46 +0000)]
Fix processing of hexadecimal, octal values
JSON doesn't support hexadecimal, octal numbers, unlike YANG.
Therefore when YANG type definition has hexadecimal,or octal
default value of YANG leaf used string JSON format.
Change-Id: I95b1756c0092991a591164b3432f7d93214dfe1d
JIRA: NETCONF-703
Signed-off-by: illia.ihushev <illia.ihushev@pantheon.tech>
Robert Varga [Tue, 23 Jun 2020 06:28:16 +0000 (08:28 +0200)]
Fix up feature packaging
We have a number of bundles packaged multiple times, fix that up
by providing proper references.
Change-Id: I0488fefbeaab3760eca7daf93ddd9d335713f285
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 22 Jun 2020 19:24:33 +0000 (21:24 +0200)]
Use range when importing MRI features
Not using ranges for features locks us down unfortunately, make
sure to use them for MRI projects.
Change-Id: Ia31779d7fbe28334ed7f1856f183a5d381ce5f33
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Jamo Luhrsen [Thu, 4 Jun 2020 00:17:26 +0000 (17:17 -0700)]
Catch exception when transformer fails to parse
There is a deadlock if a transformer fails to parse a reply
and uses that to invoke the rpc. The future gets stuck and
never completes. This catches the case of a bad toRpcResult
from the transformer and marks the future with a
DefaultDOMRpcException
JIRA: NETCONF-695
Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
Change-Id: Ied3e0ac4b08e128c41f54e01df91543e4d3fc3a4
Robert Varga [Thu, 11 Jun 2020 21:43:52 +0000 (23:43 +0200)]
Integrate controller-2.0.2
This bumps versions to the following:
- odlparent-7.0.3
- yangtools-5.0.3
- mdsal-6.0.2
- controller-2.0.2
Change-Id: I7255d610b092259c64fe9dfe24244a68a7195e14
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
ajay_dp001 [Wed, 3 Jun 2020 04:27:28 +0000 (09:57 +0530)]
Fix nested YANG 1.1 Action invocation
Invocation of action fails if the action is defined as an augmentation.
As it turns out the logic can be very much simplified by just cutting
the last item from YangInstanceIdentifier, as that points to the parent
(and hence context) of the action.
JIRA: NETCONF-696
Change-Id: I7b03b2b1ebdd7bffbfab5291552c430700ff2850
Signed-off-by: ajay_dp001 <ajay.deep.singh@est.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Lukas Baca [Tue, 12 May 2020 14:43:31 +0000 (16:43 +0200)]
RESTCONF RFC8040 Notifications support for application/yang-data+xml
In "https://tools.ietf.org/html/rfc8040" have GET,PUT,POST,PATCH
possibility to use Accept: application/yang-data+xml
JIRA: NETCONF-684
Change-Id: I25c165b7c2672f7ad7bacbd95c4c5a9634b69122
Signed-off-by: Lukas Baca <lbaca@luminanetworks.com>
Richard Kosegi [Wed, 27 May 2020 03:53:21 +0000 (05:53 +0200)]
Correctly extract mountpoint name from URI
Last path component of mountpoint's YII is not necessarily
always "node". Split URI on '=' instead.
JIRA: NETCONF-693
Change-Id: Ib4a2e9bd71abaee327b4a971cc22698027a73ce7
Signed-off-by: Richard Kosegi <richard.kosegi@gmail.com>
Jamo Luhrsen [Thu, 14 May 2020 21:12:58 +0000 (14:12 -0700)]
Handle multiple rpc-error in the same rpc-reply
When multiple rpc-error is seen in a reply it was not being
caught as an error and eventually falling through the cracks
to show up as an IllegalArgumentException.
This also adds a hack/workaround for passing back all the
error messages found from each of the multiple rpc-error(s)
Also, instead of this case not being recognized as an
rpc-error, it was causing the request to wait until
the device request timeout to expire at which point it's
noted as a full RPC failure and the device is disconnected
and reconnected. Now it is recognized as an error and the
response is handled as soon as it's received and there is
no connection flap.
JIRA: NETCONF-666
Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
Change-Id: I71829e04d7642cfd4d1c54596f1fc7670db0d292
Robert Varga [Wed, 3 Jun 2020 13:05:55 +0000 (15:05 +0200)]
Ensure RPC input in invocation is not null
DOMRpcService contract has changed to require input to be non-null,
hence we need to build an empty container when user does not supply
one.
JIRA: NETCONF-697
Change-Id: I5355a1e7b4c958d9beefc6dc41de83a1c9dc9763
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 31 May 2020 09:11:41 +0000 (11:11 +0200)]
Trim awaitility specification
org.awaitility is declared with scope=test, there's no need to
repeat it.
Change-Id: Ic65b06e725f333dec5f89d0c1c1a49bde377898c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 31 May 2020 08:09:07 +0000 (10:09 +0200)]
Integrate controller-2.0.1
This bumps versions to the following:
- odlparent-7.0.2
- yangtools-5.0.2
- mdsal-6.0.1
- controller-2.0.1
Change-Id: Id0fae35520d7b9562882223fb2fce38f0eba5372
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Wed, 27 May 2020 11:36:27 +0000 (13:36 +0200)]
Cleanup a few uses of getDataChildByName()
This method has been deprecated for quite some time and our use of
it leads nulls floating in places where they should not. Fix a few
of the use sites.
Change-Id: Idcc73caf374e54d9f39d7429acd6f18b15fc4ed0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Jamo Luhrsen [Wed, 27 May 2020 17:21:22 +0000 (10:21 -0700)]
Clean up some log messages and descriptions
Just some minor changes for readability when digging through
log files. yang desrciption was changed to match log message
as they were duplicates of each other.
Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
Change-Id: I51a6deee824ef95b3c7721c2e555f247d95de781
Venkatrangan Govindarajan [Wed, 27 May 2020 20:57:58 +0000 (02:27 +0530)]
Use censor attribute for CLI commands
This patch will help avoid usernames/passwords for device
access to be saved in karafhistory
JIRA: NETCONF-694
Change-Id: If2ac255b0ec9bbc32e3aec7d0247497cc927a3e1
Signed-off-by: Venkatrangan Govindarajan <vgovindarajan@luminanetworks.com>
Vladyslav Marchenko [Tue, 5 May 2020 07:25:22 +0000 (10:25 +0300)]
Use RFC7895/RFC8525 for schema monitoring
Added support of RFC7895 that obsoletes RFC7895 (new "yang-library" container). Added a "yang-library-update" notification as a replacement for the deprecated "yang-library-change" notification.
JIRA: NETCONF-656
Signed-off-by: Vladyslav Marchenko <vladyslav.marchenko@pantheon.tech>
Change-Id: Iad13c504c621d245943ade20bd5581efc5292db6
Robert Varga [Wed, 27 May 2020 08:26:30 +0000 (10:26 +0200)]
Cleanup use of deprecated constructs
Continue cleaning up of deprecated warnings, so that we get a stable
baseline before embarking on major work items in Aluminium.
Change-Id: Ib7d0e7a072054b04c21217ad9ce9106bedb6ae70
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 26 May 2020 10:53:31 +0000 (12:53 +0200)]
Cleanup use of deprecated constructs
A number of tests are reporting use of deprecated methods, this patch
cleans some of them up.
Change-Id: Ibbaa87be60a2b9261e473df040c3738cae8181d9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 26 May 2020 10:23:18 +0000 (12:23 +0200)]
Clean up SchemalessRpcStructureTransformerTest
Do not use ExpectedException, pinpointing exact failure mode.
Change-Id: I2bc6c1c1557925c248c93ff317c2a1a45ae6af4f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 26 May 2020 10:16:35 +0000 (12:16 +0200)]
Clean up NetconfNodeActorTest
Do not use ExpectedException and clean up checkstyle suppressions.
Change-Id: If91b404f900edbc2035831c04cadb70841f7a60f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 26 May 2020 09:01:16 +0000 (11:01 +0200)]
Cleanup RFC8040 tests
Do not use ExpectedException or try/catch blocks, as we have
assertThrows() readily available. Also make sure we reuse
EffectiveModelContext.
Change-Id: I6c43b23ef90f914218c707c59c0a434945a0e4a1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
wsx25289 [Sun, 26 Apr 2020 07:17:28 +0000 (03:17 -0400)]
Correct POST Location with lists
When a document is POSTed to a map, we end up returning the wrong
location. Update location with the first entry in the map to produce
the correct result.
JIRA: NETCONF-676
Change-Id: I0a8ab5a8147b98847a1fbb1b66cc7bb7b7722872
Signed-off-by: Wsx25289 <10200860@zte.com.cn>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
d2e6a73b08ae4a3d6a7975895404ca3de07d2ee2)
Robert Varga [Fri, 22 May 2020 09:23:28 +0000 (11:23 +0200)]
Clean up PostDataTransactionUtil
These methods are horrible in their if/else use. Clean them up a bit
so as to make clearer what is going on.
Change-Id: I8b6a619c3c9af548af42985a79fdf7d9c99a9fa0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Tibor Král [Wed, 20 May 2020 13:16:40 +0000 (15:16 +0200)]
Allow SshClient to be customized via NetconfClientConfiguration
There are a number of options we want to have configurable on
a per-client (rather than per-dispatcher) basis. These options
are related to how SSH operates and hence we do not want to
duplicate them but rather allow an explicit pre-built client
instance to be passed down.
JIRA: NETCONF-641
Change-Id: I4c39a8ec909edae0ca15e5af4efd7ca690d64fbf
Signed-off-by: Tibor Král <tibor.kral@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
wsx25289 [Fri, 3 Apr 2020 09:14:58 +0000 (05:14 -0400)]
Get notification streams error.
Get streams should have correct response.
JIRA: NETCONF-663
Change-Id: I5cd5342653795b5531ca66cf6d839f9568c59474
Signed-off-by: Wsx25289 <10200860@zte.com.cn>
vladyslav.marchenko [Mon, 23 Mar 2020 15:05:23 +0000 (17:05 +0200)]
NETCONF southbound requires notifications.yang model to be present on the device
There is no standardized YANG model for NETCONF notifications simply because RFC5277 predates YANG and has not been updated. The presence of the notification capability is enough for notifications to work – the SchemaContext assembly code supplies the model internally based on the capability.
JIRA: NETCONF-338
Signed-off-by: vladyslav.marchenko <Vladyslav.Marchenko@pantheon.tech>
Change-Id: Iaec5eab02f8d43f752d90a3fd0ecbc0a57e9e75f
illia.ihushev [Wed, 1 Apr 2020 14:57:37 +0000 (17:57 +0300)]
Update swagger generator to OpenAPI 3.0
This commit update both generation of the API documentation JSON, along
with UI based on the JSON.
Issues:
- the request bodies generated with all the choice case nodes present
- invalid request bodies for the POST requests on list/container, when
Content-Type is application/xml
JIRA: NETCONF-687
Signed-off-by: illia.ihushev <illia.ihushev@pantheon.tech>
Change-Id: I58002878d5d5a46507be021c4c1783004ea0409a
Robert Varga [Thu, 14 May 2020 21:09:03 +0000 (23:09 +0200)]
Adjust window on read
As a side-effect of us bypassing the read function, we no longer
update the window occupancy, which leads to the other side stopping
sending data. Make sure we adjust the window after passing the data
down the pipeline.
JIRA: NETCONF-686
Change-Id: I66c4873d901f7b88aabd97a1c599be64397b16c7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Mon, 11 May 2020 11:32:07 +0000 (13:32 +0200)]
Further rework of base schemas
As it turns out we cannot really instantiate base schemas without
a proper parser, as would be required in static contexts. Let us
turn them into a proper component, so that it can be injected at
runtime.
JIRA: NETCONF-683
Change-Id: I65b90f3042d9354443dfa4052413d531626f4376
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Tue, 12 May 2020 12:36:25 +0000 (14:36 +0200)]
Use ranges for controller features
We really want to allow smooth upgrades wherever possible, hence
we should specify ranges for controller's features.
Change-Id: Ia2f9b8b4d1716abe402e230bc44bdbbf511eea6f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Lukas Baca [Mon, 4 May 2020 09:47:23 +0000 (11:47 +0200)]
Report HTTP status 409 on DATA_MISSING error
Change the HTTP status reported on DATA_MISSING conditions to 409,
to match RESTCONF specification. Previous behavior of using 404
can be selected globally via a system property.
JIRA: NETCONF-682
Change-Id: Ibb10b7f9b8d49cd85edaf4fee8986a14cc9f3506
Signed-off-by: Lukas Baca <lbaca@luminanetworks.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Sun, 26 Apr 2020 01:52:08 +0000 (03:52 +0200)]
Bind to PasswordCredentialAuth
Rather than using a non-safe wild generic, bind to the specialization
for passwords, addressing a long-standing FIXME.
Change-Id: I0b14c92c2801dfdc833a925c8b907e4802e0506e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 27 Sep 2019 11:19:22 +0000 (13:19 +0200)]
Re-integrate ssh client
This re-wraps SshClient in a different way, allowing us to shuffle
information directly into netty.
JIRA: NETCONF-674
Change-Id: Iba0abf81fda90b45403b507c7a00ec9fad48c5a1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Tibor Král <tibor.kral@pantheon.tech>
Signed-off-by: Vladyslav Marchenko <vladyslav.marchenko@pantheon.tech>