Use ActionEffectiveStatement.input() 85/109085/1
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 28 Nov 2023 01:52:53 +0000 (02:52 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 28 Nov 2023 02:03:46 +0000 (03:03 +0100)
Do not use YangConstants, just refer to the effective model.

Change-Id: Id232bbb57de131bfe39991a80ef18ceaa30ec255
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/databind/OperationInputBody.java

index 53d31464056c4492ef81e9410777eeaa22815a78..7a831cd4b0634859f583d4f947dc14818b417fd4 100644 (file)
@@ -12,7 +12,6 @@ import java.io.InputStream;
 import java.io.PushbackInputStream;
 import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.common.YangConstants;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
 import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
 import org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter;
@@ -66,7 +65,7 @@ public abstract sealed class OperationInputBody extends AbstractBody
         if (stmt instanceof RpcEffectiveStatement rpc) {
             return rpc.input().argument();
         } else if (stmt instanceof ActionEffectiveStatement action) {
-            return YangConstants.operationInputQName(action.argument().getModule());
+            return action.input().argument();
         } else {
             throw new IllegalStateException(stack + " does not identify an 'rpc' nor an 'action' statement");
         }