Add yanglib API for non-revision model 73/104473/14
authorPeter Suna <peter.suna@pantheon.tech>
Mon, 20 Feb 2023 08:43:58 +0000 (09:43 +0100)
committerRobert Varga <nite@hq.sk>
Wed, 19 Apr 2023 12:31:50 +0000 (12:31 +0000)
commit04c94a48416e0c87f2d62164e11a6266630e6956
treed1a57c2f82aede121240601c00bb4bbb8fca3c77
parent3488d9c0cfab5cc7884f1bf9732d01eb62cc244c
Add yanglib API for non-revision model

The Yanglib API previously used a single API for both
models with revisions and those without. As a result,
it was necessary to append a '/' at the end of the URL request
for non-revision models.

This issue has now been resolved by introducing a separate API
specifically for non-revision models.

Added tests to validate the handling of both revision
and non-revision models.

Additionally, the existing Yanglib tests have been reworked to
use YANG models stored in resources.

JIRA: NETCONF-968
Change-Id: I3a22de90457bd1b2dbb77f3228bcce83a97ba4e1
Signed-off-by: Peter Suna <peter.suna@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
netconf/yanglib/src/main/java/org/opendaylight/yanglib/api/YangLibService.java
netconf/yanglib/src/main/java/org/opendaylight/yanglib/impl/YangLibProvider.java
netconf/yanglib/src/test/java/org/opendaylight/yanglib/impl/YangLibProviderTest.java
netconf/yanglib/src/test/resources/model/model1@2023-02-21.yang [new file with mode: 0644]
netconf/yanglib/src/test/resources/model/model2.yang [new file with mode: 0644]