Refactor OperationsContent 02/109002/5
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 16 Nov 2023 23:26:47 +0000 (00:26 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Sat, 18 Nov 2023 08:00:58 +0000 (09:00 +0100)
commit5d420beda1cf69a4fbb8d0881725670197236472
tree147aea7811469bf5600ee79bbf5fd131b8c283f6
parentffd0a5a19e26a0d3cd835c9202ce0b54fccdcbf3
Refactor OperationsContent

Turn the enumeration into a plain DTO which can serialize itself into
XML/JSON -- allowing it to be promoted to restconf.server.api.

While we are in the area, fix the semantics here:
- do not consider ActionEffectiveStatement, as that is handled through
  a different service
- report 404 when the operation points to a non-RPC

JIRA: NETCONF-773
Change-Id: I69fd5865c89ea2b727befdf4cedb8cddf8418002
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/services/impl/MdsalRestconfServer.java
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/services/impl/OperationsContent.java [deleted file]
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/services/impl/RestconfOperationsServiceImpl.java
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/server/api/OperationsContent.java [new file with mode: 0644]
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/server/api/RestconfServer.java
restconf/restconf-nb/src/test/java/org/opendaylight/restconf/nb/rfc8040/rests/services/impl/Netconf822Test.java
restconf/restconf-nb/src/test/java/org/opendaylight/restconf/nb/rfc8040/rests/services/impl/RestconfOperationsServiceImplTest.java