Bug 6880: [Yang 1.1] Allow leaf-lists to have default values
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / stmt / rfc6020 / YangInferencePipeline.java
index 4b746b2376912a498637b5410180929f6d488fb1..ece59443472fb69778fdf4e31c2b2e11ebba5814 100644 (file)
@@ -73,10 +73,13 @@ import org.opendaylight.yangtools.yang.parser.stmt.rfc7950.IdentityStatementRfc7
 import org.opendaylight.yangtools.yang.parser.stmt.rfc7950.ImportStatementRfc7950Support;
 import org.opendaylight.yangtools.yang.parser.stmt.rfc7950.IncludeStatementRfc7950Support;
 import org.opendaylight.yangtools.yang.parser.stmt.rfc7950.InputStatementRfc7950Support;
+import org.opendaylight.yangtools.yang.parser.stmt.rfc7950.LeafListStatementRfc7950Support;
 import org.opendaylight.yangtools.yang.parser.stmt.rfc7950.ListStatementRfc7950Support;
+import org.opendaylight.yangtools.yang.parser.stmt.rfc7950.ModifierStatementImpl;
 import org.opendaylight.yangtools.yang.parser.stmt.rfc7950.ModuleStatementRfc7950Support;
 import org.opendaylight.yangtools.yang.parser.stmt.rfc7950.NotificationStatementRfc7950Support;
 import org.opendaylight.yangtools.yang.parser.stmt.rfc7950.OutputStatementRfc7950Support;
+import org.opendaylight.yangtools.yang.parser.stmt.rfc7950.PatternStatementRfc7950Support;
 import org.opendaylight.yangtools.yang.parser.stmt.rfc7950.RefineStatementRfc7950Support;
 import org.opendaylight.yangtools.yang.parser.stmt.rfc7950.SubmoduleStatementRfc7950Support;
 
@@ -165,7 +168,9 @@ public final class YangInferencePipeline {
             .addVersionSpecificSupport(VERSION_1, new EnumStatementImpl.Definition())
             .addVersionSpecificSupport(VERSION_1_1, new EnumStatementRfc7950Support())
             .addSupport(new LengthStatementImpl.Definition())
-            .addSupport(new PatternStatementImpl.Definition())
+            .addVersionSpecificSupport(VERSION_1, new PatternStatementImpl.Definition())
+            .addVersionSpecificSupport(VERSION_1_1, new PatternStatementRfc7950Support())
+            .addVersionSpecificSupport(VERSION_1_1, new ModifierStatementImpl.Definition())
             .addSupport(new RangeStatementImpl.Definition())
             .addVersionSpecificSupport(VERSION_1, new ContainerStatementImpl.Definition())
             .addVersionSpecificSupport(VERSION_1_1, new ContainerStatementRfc7950Support())
@@ -207,7 +212,8 @@ public final class YangInferencePipeline {
             .addSupport(treeScoped(GroupingNamespace.class)) //treeScoped
             .addSupport(new ErrorMessageStatementImpl.Definition())
             .addSupport(new ErrorAppTagStatementImpl.Definition())
-            .addSupport(new LeafListStatementImpl.Definition())
+            .addVersionSpecificSupport(VERSION_1, new LeafListStatementImpl.Definition())
+            .addVersionSpecificSupport(VERSION_1_1, new LeafListStatementRfc7950Support())
             .addSupport(new PresenceStatementImpl.Definition())
             .addSupport(new KeyStatementImpl.Definition())
             .addSupport(new MaxElementsStatementImpl.Definition())