Note future YangErrorInfo evolution 46/98146/2
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 26 Oct 2021 21:19:37 +0000 (23:19 +0200)
committerRobert Varga <nite@hq.sk>
Fri, 29 Oct 2021 09:12:06 +0000 (09:12 +0000)
We need to evolve this contract based on experience gained during
implementation.

Change-Id: I20597ae15830386c13d9b4df4cc0a5942d77ff0c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
data/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/YangErrorInfo.java
data/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/YangNetconfError.java

index 5677776de4c0b8d28b2c943ee8736bcf8a1022c6..531df3f82643a6743f04c496f5c40e0915749942 100644 (file)
@@ -21,7 +21,11 @@ import org.opendaylight.yangtools.yang.data.api.schema.DataContainerChild;
  */
 @Beta
 @NonNullByDefault
+// FIXME: 8.0.0: Split this into two interfaces + scenery:
+//               - yang.common.ErrorInfoRepresentation
+//               - make NormalizedNodeContainer implement ErrorInfoRepresentation
 public final class YangErrorInfo {
+    // FIXME: 8.0.0: implies it extends ErrorInfoRepresentation, but ... perhaps NormalizedErrorInfo
     private final DataContainerChild value;
 
     private YangErrorInfo(final DataContainerChild value) {
@@ -32,6 +36,7 @@ public final class YangErrorInfo {
         return new YangErrorInfo(value);
     }
 
+    // FIXME: 8.0.0: yang.common version returns ErrorInfoRepresentation
     public DataContainerChild value() {
         return value;
     }
index fb29012956f56ab740651cd39ba9db3cb7166b99..3a751e79bc6b5c4f0999cf5a784f90e6efc05554 100644 (file)
@@ -29,6 +29,9 @@ import org.opendaylight.yangtools.yang.common.ErrorType;
 @Value.Style(stagedBuilder = true, allowedClasspathAnnotations = {
     SuppressWarnings.class, Generated.class, SuppressFBWarnings.class,
 })
+// FIXME: 8.0.0: Split this interface into two:
+//               - yang.common.NetconfError, which does not have a builder sets up the stage
+//               - data.api.schema.NormalizedNetconfError
 public interface YangNetconfError {
     /**
      * Return this error's severity.
@@ -72,6 +75,7 @@ public interface YangNetconfError {
      *
      * @return Triggering path, or null.
      */
+    // FIXME: 8.0.0: yang.common returns concepts.HierarchicalIdentifier<?>
     @Nullable YangInstanceIdentifier path();
 
     /**
@@ -79,5 +83,6 @@ public interface YangNetconfError {
      *
      * @return Additional info.
      */
+    // FIXME: 8.0.0: return NetconfErrorInfoRepresentation
     List<YangErrorInfo> info();
 }