Turn DOMRpcResult's result back to NormalizedNode 18/89318/1
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 23 Apr 2020 14:17:13 +0000 (16:17 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 23 Apr 2020 14:18:21 +0000 (16:18 +0200)
Eventhough we really want to have ContainerNode here, NETCONF
is utterly misusing normalization to tunnel AnyXmlNode here.

Revert the change donewwwe have done, so that it continues to
work.

JIRA: MDSAL-303
Change-Id: Ie675609fe4dc5e77e1f4e8ee2ea471a9f1d3d87b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
dom/mdsal-dom-api/src/main/java/org/opendaylight/mdsal/dom/api/DOMRpcResult.java
dom/mdsal-dom-spi/src/main/java/org/opendaylight/mdsal/dom/spi/DefaultDOMRpcResult.java
dom/mdsal-dom-spi/src/main/java/org/opendaylight/mdsal/dom/spi/ForwardingDOMRpcResult.java

index 66feb0f68d626db566b73b5b0ae33afc6cdd2237..5a0fd1acc087c5f85e499b6b0f62319c25880614 100644 (file)
@@ -11,7 +11,7 @@ import java.util.Collection;
 import org.eclipse.jdt.annotation.NonNullByDefault;
 import org.eclipse.jdt.annotation.Nullable;
 import org.opendaylight.yangtools.yang.common.RpcError;
-import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
+import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 
 /**
  * Interface defining a result of an RPC call.
@@ -33,5 +33,5 @@ public interface DOMRpcResult {
      * @return Invocation result, null if the operation has not produced a result. This might
      *         be the case if the operation does not produce a result, or if it failed.
      */
-    @Nullable ContainerNode getResult();
+    @Nullable NormalizedNode<?, ?> getResult();
 }
index 87eb55c3c7fab8ff17b5d065ac2daff2dd616657..09bcbcb620b52e7f43de089ae262a7ce560185fe 100644 (file)
@@ -22,6 +22,7 @@ import org.opendaylight.mdsal.dom.api.DOMRpcResult;
 import org.opendaylight.yangtools.concepts.Immutable;
 import org.opendaylight.yangtools.yang.common.RpcError;
 import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
+import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 
 /**
  * Utility class implementing {@link DefaultDOMRpcResult}.
@@ -67,7 +68,7 @@ public final class DefaultDOMRpcResult implements DOMRpcResult, Immutable, Seria
     }
 
     @Override
-    public @Nullable ContainerNode getResult() {
+    public @Nullable NormalizedNode<?, ?> getResult() {
         return result;
     }
 
index 429fb9a03d99552bc0e828a8403e1d6ade9768e9..3b5af47971b308179178470f8fef733eaf39ad47 100644 (file)
@@ -13,11 +13,10 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
 import org.eclipse.jdt.annotation.Nullable;
 import org.opendaylight.mdsal.dom.api.DOMRpcResult;
 import org.opendaylight.yangtools.yang.common.RpcError;
-import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
+import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 
 /**
- * Utility class which implements {@link DOMRpcResult} by forwarding all methods
- * to a backing instance.
+ * Utility class which implements {@link DOMRpcResult} by forwarding all methods to a backing instance.
  */
 @NonNullByDefault
 public abstract class ForwardingDOMRpcResult extends ForwardingObject implements DOMRpcResult {
@@ -30,7 +29,7 @@ public abstract class ForwardingDOMRpcResult extends ForwardingObject implements
     }
 
     @Override
-    public @Nullable ContainerNode getResult() {
+    public @Nullable NormalizedNode<?, ?> getResult() {
         return delegate().getResult();
     }
 }