From 968b41a1c1f7f9f435248015926cdaa063b277f5 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Wed, 16 May 2018 01:13:04 +0200 Subject: [PATCH] Add yang-data-api API evolution guidance This adds 3.0.0 and 4.0.0 evaluation FIXMEs. These need to be accounted for in release planning and adopted, rejected or pushed out. Change-Id: I50657a6bbb020189a4ac8662afb16bf1f7b7215f Signed-off-by: Robert Varga --- .../yang/data/api/YangInstanceIdentifier.java | 3 +++ .../yang/data/api/schema/NormalizedNode.java | 22 +++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/YangInstanceIdentifier.java b/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/YangInstanceIdentifier.java index 6f2c49cfa3..af66cd48d4 100644 --- a/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/YangInstanceIdentifier.java +++ b/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/YangInstanceIdentifier.java @@ -76,6 +76,9 @@ import org.opendaylight.yangtools.yang.data.api.schema.LeafSetEntryNode; * * @see RFC6020 */ +// FIXME: 3.0.0: this concept needs to be moved to yang-common, as parser components need the ability to refer +// to data nodes -- most notably XPath expressions and {@code default} statement arguments need to be able +// to represent these. public abstract class YangInstanceIdentifier implements Path, Immutable, Serializable { /** * An empty {@link YangInstanceIdentifier}. It corresponds to the path of the conceptual diff --git a/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/NormalizedNode.java b/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/NormalizedNode.java index 72688525ea..31a385ce4b 100644 --- a/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/NormalizedNode.java +++ b/yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/schema/NormalizedNode.java @@ -22,6 +22,28 @@ import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgum * @param Local identifier of node * @param Value of node */ +/* + * FIXME: 3.0.0: NormalizedNode represents the perfectly-compliant view of the data, as evaluated by an implementation, + * which is currently singular, with respect of its interpretation of a SchemaContext. This includes + * leaf values, which are required to hold normalized representation for a particular implementation, + * which may be affected by its understanding of any YANG extensions present -- such as optional type + * handling hints and bindings. + * + * Implementations (i.e. the reference implementation and parsers) will need to start using + * yang.common.Uint8 and friends and, if possible, express data validation in terms + * of yang.common.CanonicalValue and yang.common.CanonicalValueValidator. + * + * This notably means that to efficiently implement any sort of lenient parsing, we need a separate + * concept which contains an unverified, potentially non-conformant data tree, which the consumer needs + * to check/fixup if it wishes to use it as a NormalizedNode. Such a concept should be called + * "UnverifiedData". + */ +/* + * FIXME: 4.0.0: Once we have UnverifiedData, we should really rename this to "NormalizedData" or similar to unload + * some "Node" ambiguity. "Node" should be a generic term reserved for a particular domain -- hence 'node' + * can be used to refer to either a 'schema node' in context of yang.model.api, or to + * a 'normalized data node' in context of yang.data.api. + */ public interface NormalizedNode extends Identifiable { /** * QName of the node as defined in YANG schema. -- 2.36.6