Eliminate RestconfSchemaServiceImpl 52/109052/5
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 23 Nov 2023 10:47:33 +0000 (11:47 +0100)
committerRobert Varga <nite@hq.sk>
Sun, 26 Nov 2023 11:34:22 +0000 (11:34 +0000)
commitb7dd1dd96b40665cad4b38d6b23b32be7ef9a744
tree90e15ecf44cb4b3955c35e2f3f1d98e910445ce1
parentb35cf934cb55f2dbcf4a834eb754c997196d0e39
Eliminate RestconfSchemaServiceImpl

RestconfSchemaServiceImpl is serving YANG/YIN schema sources. While this
capability is not standardized, integrate it into RestconfServer as
modules{Yin,Yang}GET().

This turns out to be a major refactor, as the implementation was shoddy
-- it required local DOMSchemaService to expose
DOMYangTextSourceProvider extension and then it used that when talking
to mount points.

This refactor integrates the ability to lookup sources into
DatabindContext, with the corresponding DOMDatabindProvider wiring. If
no DOMYangTextSourceProvider is present, we call back to using
YangTextSnippet.

JIRA: NETCONF-773
Change-Id: I57689b2915eda0486c0bb5d5ba6de992b3107c0b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
19 files changed:
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/jaxrs/JaxRsRestconf.java
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/jaxrs/JaxRsRestconfCallback.java
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/RestconfApplication.java
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/databind/DatabindContext.java
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/databind/YangCharSource.java [new file with mode: 0644]
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/databind/YinCharSource.java [new file with mode: 0644]
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/jersey/providers/AbstractSchemaExportBodyWriter.java [deleted file]
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/jersey/providers/YangSchemaExportBodyWriter.java [deleted file]
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/jersey/providers/YinSchemaExportBodyWriter.java [deleted file]
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/legacy/SchemaExportContext.java [deleted file]
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/services/impl/RestconfSchemaServiceImpl.java [deleted file]
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/services/impl/RestconfSchemaSourceUrlProvider.java
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/server/api/ModulesGetResult.java [new file with mode: 0644]
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/server/api/RestconfServer.java
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/server/mdsal/DOMDatabindProvider.java
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/server/mdsal/DOMSourceResolver.java [new file with mode: 0644]
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/server/mdsal/MdsalRestconfServer.java
restconf/restconf-nb/src/test/java/org/opendaylight/restconf/nb/jaxrs/RestconfModulesGetTest.java [moved from restconf/restconf-nb/src/test/java/org/opendaylight/restconf/nb/rfc8040/rests/services/impl/RestconfModulesGetTest.java with 50% similarity]
restconf/restconf-nb/src/test/java/org/opendaylight/restconf/nb/jaxrs/RestconfSchemaServiceTest.java [moved from restconf/restconf-nb/src/test/java/org/opendaylight/restconf/nb/rfc8040/rests/services/impl/RestconfSchemaServiceTest.java with 71% similarity]