Fix RestconfOperationsService.getOperations(UriInfo) 85/97685/4
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 29 Sep 2021 18:53:16 +0000 (20:53 +0200)
committerRobert Varga <nite@hq.sk>
Tue, 5 Oct 2021 12:21:36 +0000 (12:21 +0000)
commit6d7c0abc1ef49bd7cd710d608ad46cf56af2b21c
tree6fa62a20f3ec64141500d7db6a75370ed061092f
parent03698006057d590da609952ac5a01ffb7114c320
Fix RestconfOperationsService.getOperations(UriInfo)

ietf-restconf.yang has a rather ugly wart in its definition of the
operations container, which we are using an ugly workaround for.

This workaround is rendered inoperable due to strict binding to
effective model context, which does not find the dynamic leaves required
to encode the content.

Rework the implementation to side-step NormalizedNode documents and
provide ready JSON/XML strings.

JIRA: NETCONF-822
Change-Id: I57760d06240e09940026fee9b195e207853c01b2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
12 files changed:
restconf/restconf-common/src/main/java/org/opendaylight/restconf/common/OperationsContent.java [new file with mode: 0644]
restconf/restconf-common/src/main/java/org/opendaylight/restconf/common/util/OperationsResourceUtils.java
restconf/restconf-common/src/test/java/org/opendaylight/restconf/common/Netconf822Test.java [new file with mode: 0644]
restconf/restconf-common/src/test/resources/nc822/foo@2021-09-29.yang [new file with mode: 0644]
restconf/restconf-common/src/test/resources/nc822/foo@2021-09-30.yang [new file with mode: 0644]
restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/rest/api/RestconfService.java
restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/rest/impl/RestconfCompositeWrapper.java
restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/restconf/impl/RestconfImpl.java
restconf/restconf-nb-bierman02/src/main/java/org/opendaylight/netconf/sal/restconf/impl/StatisticsRestconfServiceWrapper.java
restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/services/api/RestconfOperationsService.java
restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/services/impl/RestconfOperationsServiceImpl.java
restconf/restconf-nb-rfc8040/src/test/java/org/opendaylight/restconf/nb/rfc8040/rests/services/impl/RestconfOperationsServiceTest.java