Migrate YANG inputs for yang-data-codec-xml 33/106033/10
authormatus.matok <matus.matok@pantheon.tech>
Thu, 18 May 2023 13:14:38 +0000 (15:14 +0200)
committerRobert Varga <nite@hq.sk>
Mon, 5 Jun 2023 11:23:24 +0000 (11:23 +0000)
Migrated all YANG testfiles counting 50 lines or less.

JIRA: YANGTOOLS-1506
Change-Id: Ibe3772d09e651a0f29751075d3b62b5bf128ba7e
Signed-off-by: matus.matok <matus.matok@pantheon.tech>
39 files changed:
codec/yang-data-codec-xml/src/test/java/org/opendaylight/yangtools/yang/data/codec/xml/AbstractAnydataTest.java
codec/yang-data-codec-xml/src/test/java/org/opendaylight/yangtools/yang/data/codec/xml/Bug5396Test.java
codec/yang-data-codec-xml/src/test/java/org/opendaylight/yangtools/yang/data/codec/xml/Bug5446Test.java
codec/yang-data-codec-xml/src/test/java/org/opendaylight/yangtools/yang/data/codec/xml/Bug8083Test.java
codec/yang-data-codec-xml/src/test/java/org/opendaylight/yangtools/yang/data/codec/xml/Bug8675Test.java
codec/yang-data-codec-xml/src/test/java/org/opendaylight/yangtools/yang/data/codec/xml/Bug8745Test.java
codec/yang-data-codec-xml/src/test/java/org/opendaylight/yangtools/yang/data/codec/xml/Bug8803Test.java
codec/yang-data-codec-xml/src/test/java/org/opendaylight/yangtools/yang/data/codec/xml/DOMSourceXMLStreamReaderTest.java
codec/yang-data-codec-xml/src/test/java/org/opendaylight/yangtools/yang/data/codec/xml/SchemaOrderedNormalizedNodeWriterTest.java
codec/yang-data-codec-xml/src/test/java/org/opendaylight/yangtools/yang/data/codec/xml/StrictParsingModeTest.java
codec/yang-data-codec-xml/src/test/java/org/opendaylight/yangtools/yang/data/codec/xml/YT1107Test.java
codec/yang-data-codec-xml/src/test/java/org/opendaylight/yangtools/yang/data/codec/xml/YT1108Test.java
codec/yang-data-codec-xml/src/test/java/org/opendaylight/yangtools/yang/data/codec/xml/YT1473Test.java
codec/yang-data-codec-xml/src/test/resources/anyxml-support/yang/bar.yang [deleted file]
codec/yang-data-codec-xml/src/test/resources/anyxml-support/yang/foo.yang [deleted file]
codec/yang-data-codec-xml/src/test/resources/anyxml-support/yang/yang-ext.yang [deleted file]
codec/yang-data-codec-xml/src/test/resources/bug1848/foo.yang [deleted file]
codec/yang-data-codec-xml/src/test/resources/bug1848/order.yang [deleted file]
codec/yang-data-codec-xml/src/test/resources/bug5396/yang/foo.yang [deleted file]
codec/yang-data-codec-xml/src/test/resources/bug5446/yang/foo.yang [deleted file]
codec/yang-data-codec-xml/src/test/resources/bug8083/yang/baz.yang [deleted file]
codec/yang-data-codec-xml/src/test/resources/bug8083/yang/foobar.yang [deleted file]
codec/yang-data-codec-xml/src/test/resources/bug8083/yang/zab.yang [deleted file]
codec/yang-data-codec-xml/src/test/resources/bug8675/foo.yang [deleted file]
codec/yang-data-codec-xml/src/test/resources/bug8745/foo.yang [deleted file]
codec/yang-data-codec-xml/src/test/resources/bug8803/bar.yang [deleted file]
codec/yang-data-codec-xml/src/test/resources/bug8803/baz.yang [deleted file]
codec/yang-data-codec-xml/src/test/resources/bug8803/foo.yang [deleted file]
codec/yang-data-codec-xml/src/test/resources/dom-reader-test/bar.yang [deleted file]
codec/yang-data-codec-xml/src/test/resources/dom-reader-test/baz.yang [deleted file]
codec/yang-data-codec-xml/src/test/resources/dom-reader-test/foo.yang [deleted file]
codec/yang-data-codec-xml/src/test/resources/dom-reader-test/rab.yang [deleted file]
codec/yang-data-codec-xml/src/test/resources/dom-reader-test/zab.yang [deleted file]
codec/yang-data-codec-xml/src/test/resources/strict-parsing-mode-test/foo.yang [deleted file]
codec/yang-data-codec-xml/src/test/resources/test-anydata.yang [deleted file]
codec/yang-data-codec-xml/src/test/resources/yt1107/yt1107.yang [deleted file]
codec/yang-data-codec-xml/src/test/resources/yt1108/yang/foo.yang [deleted file]
codec/yang-data-codec-xml/src/test/resources/yt1473/bar.yang [deleted file]
codec/yang-data-codec-xml/src/test/resources/yt1473/foo.yang [deleted file]

index 51c5d5df7ff7894a12c2ef64af346b560aa843da..60f4435a583dcf7760163096da00ffaec8ee2bb5 100644 (file)
@@ -51,7 +51,38 @@ public abstract class AbstractAnydataTest {
 
     @BeforeClass
     public static void beforeClass() throws Exception {
-        SCHEMA_CONTEXT = YangParserTestUtils.parseYangResource("/test-anydata.yang");
+        SCHEMA_CONTEXT = YangParserTestUtils.parseYang("""
+            module test-anydata {
+              yang-version 1.1;
+              namespace test-anydata;
+              prefix ta;
+
+              anydata foo;
+
+              container cont {
+                anydata cont-any;
+                leaf cont-leaf {
+                  type string;
+                }
+                leaf empty-leaf {
+                  type empty;
+                }
+                container bar {
+                  leaf cont-leaf {
+                    type string;
+                  }
+                }
+              }
+
+              list lst {
+                leaf cont-leaf {
+                  type string;
+                }
+                leaf-list my-leafs {
+                  type string;
+                }
+              }
+            }""");
     }
 
     @AfterClass
index a1382bd247b86c3321f889e314d3788e3368f5f3..67652c875f12fc113c8ae78e1c0cd87720a07642 100644 (file)
@@ -30,7 +30,39 @@ import org.opendaylight.yangtools.yang.test.util.YangParserTestUtils;
 public class Bug5396Test {
     private static final QNameModule FOO = QNameModule.create(XMLNamespace.of("foo"), Revision.of("2016-03-22"));
 
-    private final EffectiveModelContext schemaContext = YangParserTestUtils.parseYangResourceDirectory("/bug5396/yang");
+    private final EffectiveModelContext schemaContext = YangParserTestUtils.parseYang("""
+        module foo {
+          yang-version 1;
+          namespace "foo";
+          prefix "foo";
+
+          revision "2016-03-22" {
+            description "test";
+          }
+
+          container root {
+            leaf my-leaf {
+              type my-type;
+            }
+          }
+
+          typedef my-type {
+            type union {
+              type string {
+                pattern "dp[0-9]+o[0-9]+";
+              }
+              type string {
+                pattern "dp[0-9]+s[0-9]+(f[0-9]+)?(d[0-9]+)?";
+              }
+              type string {
+                pattern "dp[0-9]+(P[0-9]+)?p[0-9]{1,3}s[0-9]{1,3}(f[0-9]+)?(d[0-9]+)?";
+              }
+              type string {
+                pattern "dp[0-9]+p[0-9]+p[0-9]+";
+              }
+            }
+          }
+        }""");
 
     @Test
     public void test() throws Exception {
index b65ab73701ee2ec36cb887b6ee5bf29659cc8939..d9638d5bd7c26ce60a3d79d7856afe2b587514f3 100644 (file)
@@ -52,7 +52,40 @@ public class Bug5446Test extends XMLTestCase {
 
     @Test
     public void test() throws Exception {
-        final EffectiveModelContext schemaContext = YangParserTestUtils.parseYangResource("/bug5446/yang/foo.yang");
+        final EffectiveModelContext schemaContext = YangParserTestUtils.parseYang("""
+            module foo {
+              yang-version 1;
+              namespace "foo";
+              prefix "foo";
+
+              revision "2015-11-05" {
+              }
+
+              typedef ipv4-address-binary {
+                type binary {
+                  length "4";
+                }
+              }
+
+              typedef ipv6-address-binary {
+                type binary {
+                  length "16";
+                }
+              }
+
+              typedef ip-address-binary {
+                type union {
+                  type ipv4-address-binary;
+                  type ipv6-address-binary;
+                }
+              }
+
+              container root {
+                leaf ip-address {
+                  type ip-address-binary;
+                }
+              }
+            }""");
         final Document doc = loadDocument("/bug5446/xml/foo.xml");
 
         final ContainerNode docNode = createDocNode();
index 4fefef3df06c21d33f7ff475b40767a22633d5d1..77415388e516b3c2e979a72e3ea123c0888366af 100644 (file)
@@ -27,7 +27,26 @@ public class Bug8083Test {
 
     @Test
     public void testInstanceIdentifierPathWithEmptyListKey() throws Exception {
-        final var schemaContext = YangParserTestUtils.parseYangResource("/bug8083/yang/baz.yang");
+        final var schemaContext = YangParserTestUtils.parseYang("""
+            module baz {
+              namespace baz-ns;
+              prefix baz-prefix;
+
+              container top-cont {
+                list keyed-list {
+                  key empty-key-leaf;
+                  leaf empty-key-leaf {
+                    type empty;
+                  }
+                  leaf regular-leaf {
+                    type int32;
+                  }
+                }
+                leaf iid-leaf {
+                  type instance-identifier;
+                }
+              }
+            }""");
 
         final InputStream resourceAsStream = Bug8083Test.class.getResourceAsStream("/bug8083/xml/baz.xml");
 
@@ -45,7 +64,34 @@ public class Bug8083Test {
 
     @Test
     public void testInstanceIdentifierPathWithIdentityrefListKey() throws Exception {
-        final var schemaContext = YangParserTestUtils.parseYangResource("/bug8083/yang/zab.yang");
+        final var schemaContext = YangParserTestUtils.parseYang("""
+            module zab {
+              namespace zab-ns;
+              prefix zab-prefix;
+
+              identity base-id;
+
+              identity derived-id {
+                base base-id;
+              }
+
+              container top-cont {
+                list keyed-list {
+                  key identityref-key-leaf;
+                  leaf identityref-key-leaf {
+                    type identityref {
+                      base base-id;
+                    }
+                  }
+                  leaf regular-leaf {
+                    type int32;
+                  }
+                }
+                leaf iid-leaf {
+                  type instance-identifier;
+                }
+              }
+            }""");
 
         final var resourceAsStream = Bug8083Test.class.getResourceAsStream("/bug8083/xml/zab.xml");
 
@@ -63,7 +109,29 @@ public class Bug8083Test {
 
     @Test
     public void testInstanceIdentifierPathWithInstanceIdentifierListKey() throws Exception {
-        final var schemaContext = YangParserTestUtils.parseYangResource("/bug8083/yang/foobar.yang");
+        final var schemaContext = YangParserTestUtils.parseYang("""
+            module foobar {
+              namespace foobar-ns;
+              prefix foobar-prefix;
+
+              container top-cont {
+                list keyed-list {
+                  key iid-key-leaf;
+                  leaf iid-key-leaf {
+                    type instance-identifier;
+                  }
+                  leaf regular-leaf {
+                    type int32;
+                  }
+                }
+                leaf iid-leaf {
+                  type instance-identifier;
+                }
+                leaf leaf-b {
+                  type int32;
+                }
+              }
+            }""");
         final var resourceAsStream = Bug8083Test.class.getResourceAsStream("/bug8083/xml/foobar.xml");
         final var reader = UntrustedXML.createXMLStreamReader(resourceAsStream);
 
index 2ea7f1d5f85f9b9adacdbd7596b791edf1fc773a..ebc6b574385da2b0ea6cdc5f1f16f0e92a4e07c3 100644 (file)
@@ -30,7 +30,49 @@ public class Bug8675Test {
 
     @BeforeClass
     public static void setup() {
-        schemaContext = YangParserTestUtils.parseYangResource("/bug8675/foo.yang");
+        schemaContext = YangParserTestUtils.parseYang("""
+            module foo {
+              namespace foo;
+              prefix foo;
+              revision 2017-06-13;
+
+              list top-level-list {
+                key key-leaf;
+                leaf key-leaf {
+                  type string;
+                }
+                leaf ordinary-leaf {
+                  type string;
+                }
+
+                container cont-in-list {}
+
+                list inner-list {
+                  key inner-key-leaf;
+                  leaf inner-key-leaf {
+                    type string;
+                  }
+                  leaf inner-ordinary-leaf {
+                    type string;
+                  }
+                }
+              }
+
+              container top-level-container {
+                container inner-container-1 {}
+                container inner-container-2 {}
+              }
+
+              anyxml top-level-anyxml;
+
+              leaf top-level-leaf {
+                type int32;
+              }
+
+              leaf-list top-level-leaf-list {
+                type int32;
+              }
+            }""");
     }
 
     @AfterClass
index e6074088f59a9ff6cf308976789ec94c0aff0710..2dc186c5a6eafef6eeba11b3f7388324ad09bff8 100644 (file)
@@ -59,7 +59,26 @@ public class Bug8745Test {
 
     @BeforeClass
     public static void beforeClass() {
-        SCHEMA_CONTEXT = YangParserTestUtils.parseYangResource("/bug8745/foo.yang");
+        SCHEMA_CONTEXT = YangParserTestUtils.parseYang("""
+            module foo {
+              namespace foo;
+              prefix foo;
+
+              container cont-with-attributes {
+                leaf leaf-with-attributes {
+                  type string;
+                }
+                leaf-list leaf-list-with-attributes {
+                  type string;
+                }
+                list list-with-attributes {
+                  key list-key;
+                  leaf list-key {
+                    type string;
+                  }
+                }
+              }
+            }""");
     }
 
     @AfterClass
index 067bcb7460dffd6f270d6ce423cd5a0599f8d4b6..12984a1eb87eed8e470ab075ef8d9443e96d70e8 100644 (file)
@@ -49,7 +49,47 @@ public class Bug8803Test {
 
     @BeforeClass
     public static void beforeClass() {
-        SCHEMA_CONTEXT = YangParserTestUtils.parseYangResourceDirectory("/bug8803");
+        SCHEMA_CONTEXT = YangParserTestUtils.parseYang("""
+            module bar {
+              namespace bar-ns;
+              prefix bar;
+
+              import foo {
+                prefix foo;
+              }
+
+              augment "/foo:top-cont/foo:keyed-list" {
+                leaf iid-leaf {
+                  type instance-identifier;
+                }
+              }
+            }""", """
+            module baz {
+              namespace baz-ns;
+              prefix baz;
+
+              container top-cont {
+                list keyed-list {
+                  key key-leaf;
+                  leaf key-leaf {
+                    type int32;
+                  }
+                }
+              }
+            }""", """
+            module foo {
+              namespace foo-ns;
+              prefix foo;
+
+              container top-cont {
+                list keyed-list {
+                  key key-leaf;
+                  leaf key-leaf {
+                    type int32;
+                  }
+                }
+              }
+            }""");
     }
 
     @AfterClass
index 3397657f3694a137dec31bec6ba1c2d18b6d81a1..f0cad15ce7262c6b050193ee73cf4343af40bf7c 100644 (file)
@@ -58,7 +58,97 @@ public class DOMSourceXMLStreamReaderTest {
 
     @BeforeClass
     public static void beforeClass() {
-        SCHEMA_CONTEXT = YangParserTestUtils.parseYangResourceDirectory("/dom-reader-test");
+        SCHEMA_CONTEXT = YangParserTestUtils.parseYang("""
+            module bar {
+              namespace bar-ns;
+              prefix bar;
+
+              import foo {
+                prefix foo;
+              }
+
+              augment "/foo:top-cont/foo:keyed-list" {
+                leaf iid-leaf {
+                  type instance-identifier;
+                }
+              }
+            }""", """
+            module baz {
+              namespace baz-ns;
+              prefix baz;
+
+              container top-cont {
+                /*list keyed-list {
+                  key key-leaf;
+                  leaf key-leaf {
+                    type int32;
+                  }
+                }*/
+              }
+            }""", """
+            module foo {
+              namespace foo-ns;
+              prefix foo;
+
+              import rab {
+                prefix rab;
+              }
+
+              container top-cont {
+                list keyed-list {
+                  key key-leaf;
+                  leaf key-leaf {
+                    type int32;
+                  }
+                  leaf idref-leaf {
+                    type identityref {
+                      base rab:base-id;
+                    }
+                  }
+                  leaf ordinary-leaf {
+                    type int32;
+                  }
+                }
+              }
+            }""", """
+            module rab {
+              namespace rab-ns;
+              prefix rab;
+
+              import baz {
+                prefix baz;
+              }
+
+              augment "/baz:top-cont" {
+                list keyed-list {
+                  key key-leaf;
+                  leaf key-leaf {
+                    type int32;
+                  }
+                }
+              }
+
+              identity base-id;
+
+              identity id-foo {
+                base base-id;
+              }
+            }""", """
+            module zab {
+              namespace zab-ns;
+              prefix zab;
+
+              import foo {
+                prefix foo;
+              }
+
+              augment "/foo:top-cont/foo:keyed-list/" {
+                /*leaf ordinary-leaf {
+                  type int32;
+                }*/
+                anyxml aug-anyxml;
+              }
+            }""");
     }
 
     @AfterClass
index 1542366c1446f42914ce2257fa860e3ef73f314d..0814088994339618df698e8fba84d89dcfa2406b 100644 (file)
@@ -91,7 +91,27 @@ public class SchemaOrderedNormalizedNodeWriterTest {
         final StringWriter stringWriter = new StringWriter();
         final XMLStreamWriter xmlStreamWriter = factory.createXMLStreamWriter(stringWriter);
 
-        EffectiveModelContext schemaContext = getSchemaContext("/bug1848/foo.yang");
+        EffectiveModelContext schemaContext = getSchemaContext("""
+            module foo {
+              namespace "foo";
+              prefix "foo";
+              revision "2016-02-17";
+
+              container root {
+                list policy {
+                  key name;
+                  leaf name {
+                    type string;
+                  }
+                  list rule {
+                    key name;
+                    leaf name {
+                      type string;
+                    }
+                  }
+                }
+              }
+            }""");
         NormalizedNodeStreamWriter writer = XMLStreamNormalizedNodeStreamWriter.create(xmlStreamWriter, schemaContext);
 
         try (SchemaOrderedNormalizedNodeWriter nnw = new SchemaOrderedNormalizedNodeWriter(writer, schemaContext)) {
@@ -150,7 +170,23 @@ public class SchemaOrderedNormalizedNodeWriterTest {
     public void testWriteOrder() throws XMLStreamException, IOException, SAXException {
         final StringWriter stringWriter = new StringWriter();
         final XMLStreamWriter xmlStreamWriter = factory.createXMLStreamWriter(stringWriter);
-        EffectiveModelContext schemaContext = getSchemaContext("/bug1848/order.yang");
+        EffectiveModelContext schemaContext = getSchemaContext("""
+            module order {
+              namespace "order";
+              prefix "order";
+              revision "2016-02-17";
+
+              container root {
+                leaf id {
+                  type string;
+                }
+                container cont {
+                  leaf content {
+                    type string;
+                  }
+                }
+              }
+            }""");
         NormalizedNodeStreamWriter writer = XMLStreamNormalizedNodeStreamWriter.create(xmlStreamWriter, schemaContext);
 
         try (NormalizedNodeWriter nnw = new SchemaOrderedNormalizedNodeWriter(writer, schemaContext)) {
@@ -172,8 +208,8 @@ public class SchemaOrderedNormalizedNodeWriterTest {
         XMLAssert.assertXMLIdentical(new Diff(EXPECTED_2, stringWriter.toString()), true);
     }
 
-    private static EffectiveModelContext getSchemaContext(final String filePath) {
-        return YangParserTestUtils.parseYangResource(filePath);
+    private static EffectiveModelContext getSchemaContext(final String literalYang) {
+        return YangParserTestUtils.parseYang(literalYang);
     }
 
     private static YangInstanceIdentifier.NodeIdentifier getNodeIdentifier(final String ns, final String name) {
index 0d319681935e95f37b157c0f68ad46f31cc0de8d..2c3856ad5fb41b6652606b380ef08d9e4b3619ff 100644 (file)
@@ -29,7 +29,15 @@ public class StrictParsingModeTest {
 
     @BeforeClass
     public static void beforeClass() {
-        schemaContext = YangParserTestUtils.parseYangResource("/strict-parsing-mode-test/foo.yang");
+        schemaContext = YangParserTestUtils.parseYang("""
+            module foo {
+              namespace foo;
+              prefix foo;
+
+              container top-level-container {
+                container inner-container {}
+              }
+            }""");
     }
 
     @AfterClass
index e18bbc625ca9331443143557ec7d8fb2b8f7fc3e..8005fe29ec670672056545367226a6eef49316b9 100644 (file)
@@ -29,7 +29,27 @@ public class YT1107Test {
 
     @Test
     public void testInterleavingLists() throws Exception {
-        final var schemaContext = YangParserTestUtils.parseYangResource("/yt1107/yt1107.yang");
+        final var schemaContext = YangParserTestUtils.parseYang("""
+            module yt1107 {
+              namespace "yt1107";
+              prefix "yt1107";
+
+              container parent {
+                config true;
+                list user {
+                  key name;
+                  leaf name {
+                    type string;
+                  }
+                }
+                list admin {
+                  key name;
+                  leaf name {
+                    type string;
+                  }
+                }
+              }
+            }""");
         final var resourceAsStream = XmlToNormalizedNodesTest.class.getResourceAsStream("/yt1107/yt1107.xml");
         final var reader = UntrustedXML.createXMLStreamReader(resourceAsStream);
 
index 5ac539d44c565fabbe9adb8f3ab46bc43c81bb1f..11088c5013ff8320601248f7288adceb4e3990ec 100644 (file)
@@ -72,7 +72,37 @@ public class YT1108Test {
 
     @BeforeClass
     public static void beforeClass() {
-        SCHEMA_CONTEXT = YangParserTestUtils.parseYangResource("/yt1108/yang/foo.yang");
+        SCHEMA_CONTEXT = YangParserTestUtils.parseYang("""
+            module foo {
+              namespace "foo-namespace";
+              prefix "f";
+
+              identity ident-base;
+
+              identity ident-one {
+                base ident-base;
+              }
+
+              typedef union-type {
+                type union {
+                  type uint8;
+                  type identityref {
+                    base ident-base;
+                  }
+                }
+              }
+
+              container leaf-container {
+                leaf union-identityref-leaf {
+                  type union-type;
+                }
+                leaf identityref-leaf {
+                  type identityref {
+                    base ident-base;
+                  }
+                }
+              }
+            }""");
     }
 
     @AfterClass
index 2d651fe2b3d993ff4616bd41e19c34f57993f06e..9d1d050de10c0308d05db0d2ab67d5179da6f50e 100644 (file)
@@ -53,7 +53,84 @@ class YT1473Test {
 
     @BeforeAll
     static void beforeAll() {
-        final var modelContext = YangParserTestUtils.parseYangResourceDirectory("/yt1473");
+        final var modelContext = YangParserTestUtils.parseYang("""
+            module bar {
+              namespace barns;
+              prefix bar;
+
+              import foo {
+                prefix foo;
+              }
+
+              identity two {
+                base foo:one;
+              }
+
+              leaf-list str {
+                type string;
+              }
+
+              leaf-list foo {
+                type identityref {
+                  base foo:one;
+                }
+              }
+
+              leaf-list bar {
+                type instance-identifier;
+              }
+
+              leaf-list bee {
+                type foo:bitz;
+              }
+
+              leaf baz {
+                type instance-identifier;
+              }
+            }""", """
+            module foo {
+              namespace foons;
+              prefix foo;
+              identity one;
+
+              typedef bitz {
+                type bits {
+                  bit one;
+                  bit two;
+                  bit three;
+                }
+              }
+
+              list foo {
+                key str;
+                leaf str {
+                  type string;
+                }
+              }
+
+              list bar {
+                key qname;
+                leaf qname {
+                  type identityref {
+                    base one;
+                  }
+                }
+              }
+
+              list baz {
+                key id;
+                leaf id {
+                  type instance-identifier;
+                }
+              }
+
+              list bee {
+                key bts;
+                leaf bts {
+                  type bitz;
+                }
+              }
+            }""");
         final var baz = assertInstanceOf(ListSchemaNode.class, modelContext.getDataChildByName(FOO_BAZ));
         final var id = assertInstanceOf(LeafSchemaNode.class, baz.getDataChildByName(FOO_ID));
         final var type = assertInstanceOf(InstanceIdentifierTypeDefinition.class, id.getType());
diff --git a/codec/yang-data-codec-xml/src/test/resources/anyxml-support/yang/bar.yang b/codec/yang-data-codec-xml/src/test/resources/anyxml-support/yang/bar.yang
deleted file mode 100644 (file)
index b8c57a8..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-module bar {
-    namespace "bar";
-    prefix bar;
-
-    container bar {
-        container my-container-1 {
-            leaf my-leaf-1 {
-                type string;
-            }
-        }
-
-        container my-container-2 {
-            leaf my-leaf-2 {
-                type string;
-            }
-        }
-    }
-}
diff --git a/codec/yang-data-codec-xml/src/test/resources/anyxml-support/yang/foo.yang b/codec/yang-data-codec-xml/src/test/resources/anyxml-support/yang/foo.yang
deleted file mode 100644 (file)
index 70ffa0b..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-module foo {
-    namespace "foo";
-    prefix foo;
-
-    import yang-ext { prefix ext; revision-date 2013-07-09; }
-
-    container my-container-1 {
-        leaf my-leaf-1 {
-            type string;
-        }
-    }
-
-    container my-container-2 {
-        container inner-container {
-            leaf my-leaf-2 {
-                type string;
-            }
-        }
-        leaf my-leaf-3 {
-            type string;
-        }
-    }
-
-    anyxml my-anyxml-data {
-        ext:anyxml-schema-location "/my-container-2";
-    }
-}
diff --git a/codec/yang-data-codec-xml/src/test/resources/anyxml-support/yang/yang-ext.yang b/codec/yang-data-codec-xml/src/test/resources/anyxml-support/yang/yang-ext.yang
deleted file mode 100644 (file)
index 99eb4b6..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-module yang-ext {
-    yang-version 1;
-    namespace "urn:opendaylight:yang:extension:yang-ext";
-    prefix "ext";
-
-    contact "Anton Tkacik <ttkacik@cisco.com>";
-
-    description
-        "Copyright (c) 2013 Cisco Systems, Inc. and others. All rights
-        reserved. This program and the accompanying materials are made
-        available under the terms of the Eclipse Public License v1.0 which
-        accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html";
-
-    revision "2013-07-09" {
-        description "";
-    }
-
-    // Augmentation name
-
-    extension "augment-identifier" {
-        description
-                "YANG language extension which assigns an identifier to augmentation.
-                Augment identifier is used to identify specific augment statement
-                by name. The identifier syntax is defined formally defined by
-                the rule 'identifier' in Section 12 of RFC 6020. All augment identifiers
-                defined in a namespace MUST be unique. The namespace of augment
-                identifiers is shared by module and its submodules.";
-
-        /*
-                Discussion:
-                This extension allows for ease of development / debug
-                of YANG modules and it is suitable for code generation,
-                where each augment statement is nicely identified by
-                unique name instead of combination of augment target
-                and when condition.
-            */
-        argument "identifier";
-    }
-
-    // Context-aware RPCs
-
-    grouping rpc-context-ref {
-        description
-                "A reference to RPC context.";
-        leaf context-instance {
-            type instance-identifier;
-            description "Pointer to the context. ";
-        }
-    }
-
-    extension "rpc-context-instance" {
-        description
-                "YANG language extension which defines enclosing (parent) schema
-                node as referencable context for RPCs. The argument is identity
-                which is used to identify RPC context type.";
-
-        argument "context-type";
-    }
-
-    extension "context-reference" {
-        argument "context-type";
-    }
-
-    extension "context-instance" {
-        argument "context-type";
-    }
-
-    extension "instance-target" {
-        argument "path";
-    }
-
-    extension "anyxml-schema-location" {
-        argument "target-node";
-    }
-}
diff --git a/codec/yang-data-codec-xml/src/test/resources/bug1848/foo.yang b/codec/yang-data-codec-xml/src/test/resources/bug1848/foo.yang
deleted file mode 100644 (file)
index 82e8d92..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-module foo {
-    namespace "foo";
-    prefix "foo";
-    revision "2016-02-17";
-
-    container root {
-        list policy {
-            key name;
-            leaf name {
-                type string;
-            }
-            list rule {
-                key name;
-                leaf name {
-                    type string;
-                }
-            }
-        }
-    }
-}
\ No newline at end of file
diff --git a/codec/yang-data-codec-xml/src/test/resources/bug1848/order.yang b/codec/yang-data-codec-xml/src/test/resources/bug1848/order.yang
deleted file mode 100644 (file)
index 5cc8349..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-module order {
-    namespace "order";
-    prefix "order";
-    revision "2016-02-17";
-
-    container root {
-        leaf id {
-            type string;
-        }
-        container cont {
-            leaf content {
-                type string;
-            }
-        }
-    }
-}
\ No newline at end of file
diff --git a/codec/yang-data-codec-xml/src/test/resources/bug5396/yang/foo.yang b/codec/yang-data-codec-xml/src/test/resources/bug5396/yang/foo.yang
deleted file mode 100644 (file)
index bad4e39..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-module foo {
-    yang-version 1;
-    namespace "foo";
-    prefix "foo";
-
-    revision "2016-03-22" {
-        description "test";
-    }
-
-    container root {
-        leaf my-leaf {
-            type my-type;
-        }
-    }
-
-    typedef my-type {
-        type union {
-            type string {
-                pattern "dp[0-9]+o[0-9]+";
-            }
-            type string {
-                pattern "dp[0-9]+s[0-9]+(f[0-9]+)?(d[0-9]+)?";
-            }
-            type string {
-                pattern "dp[0-9]+(P[0-9]+)?p[0-9]{1,3}s[0-9]{1,3}(f[0-9]+)?(d[0-9]+)?";
-            }
-            type string {
-                pattern "dp[0-9]+p[0-9]+p[0-9]+";
-            }
-        }
-    }
-}
diff --git a/codec/yang-data-codec-xml/src/test/resources/bug5446/yang/foo.yang b/codec/yang-data-codec-xml/src/test/resources/bug5446/yang/foo.yang
deleted file mode 100644 (file)
index 57ae347..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-module foo {
-    yang-version 1;
-    namespace "foo";
-    prefix "foo";
-
-    revision "2015-11-05" {
-    }
-
-    typedef ipv4-address-binary {
-        type binary {
-            length "4";
-        }
-    }
-
-    typedef ipv6-address-binary {
-        type binary {
-            length "16";
-        }
-    }
-
-    typedef ip-address-binary {
-        type union {
-            type ipv4-address-binary;
-            type ipv6-address-binary;
-        }
-    }
-
-    container root {
-        leaf ip-address {
-            type ip-address-binary;
-        }
-    }
-}
diff --git a/codec/yang-data-codec-xml/src/test/resources/bug8083/yang/baz.yang b/codec/yang-data-codec-xml/src/test/resources/bug8083/yang/baz.yang
deleted file mode 100644 (file)
index 0690b1f..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-module baz {
-
-    namespace baz-ns;
-    prefix baz-prefix;
-
-    container top-cont {
-        list keyed-list {
-            key empty-key-leaf;
-
-            leaf empty-key-leaf {
-                type empty;
-            }
-
-            leaf regular-leaf {
-                type int32;
-            }
-        }
-
-        leaf iid-leaf {
-            type instance-identifier;
-        }
-    }
-}
\ No newline at end of file
diff --git a/codec/yang-data-codec-xml/src/test/resources/bug8083/yang/foobar.yang b/codec/yang-data-codec-xml/src/test/resources/bug8083/yang/foobar.yang
deleted file mode 100644 (file)
index ec42bab..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-module foobar {
-
-    namespace foobar-ns;
-    prefix foobar-prefix;
-
-    container top-cont {
-        list keyed-list {
-            key iid-key-leaf;
-
-            leaf iid-key-leaf {
-                type instance-identifier;
-            }
-
-            leaf regular-leaf {
-                type int32;
-            }
-        }
-
-        leaf iid-leaf {
-            type instance-identifier;
-        }
-
-        leaf leaf-b {
-            type int32;
-        }
-    }
-}
\ No newline at end of file
diff --git a/codec/yang-data-codec-xml/src/test/resources/bug8083/yang/zab.yang b/codec/yang-data-codec-xml/src/test/resources/bug8083/yang/zab.yang
deleted file mode 100644 (file)
index 5af9529..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-module zab {
-
-    namespace zab-ns;
-    prefix zab-prefix;
-
-    identity base-id;
-
-    identity derived-id {
-        base base-id;
-    }
-
-    container top-cont {
-        list keyed-list {
-            key identityref-key-leaf;
-
-            leaf identityref-key-leaf {
-                type identityref {
-                    base base-id;
-                }
-            }
-
-            leaf regular-leaf {
-                type int32;
-            }
-        }
-
-        leaf iid-leaf {
-            type instance-identifier;
-        }
-    }
-}
\ No newline at end of file
diff --git a/codec/yang-data-codec-xml/src/test/resources/bug8675/foo.yang b/codec/yang-data-codec-xml/src/test/resources/bug8675/foo.yang
deleted file mode 100644 (file)
index 06ff0eb..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-module foo {
-    namespace foo;
-    prefix foo;
-
-    revision 2017-06-13;
-
-    list top-level-list {
-        key key-leaf;
-
-        leaf key-leaf {
-            type string;
-        }
-
-        leaf ordinary-leaf {
-            type string;
-        }
-
-        container cont-in-list {}
-
-        list inner-list {
-            key inner-key-leaf;
-
-            leaf inner-key-leaf {
-                type string;
-            }
-
-            leaf inner-ordinary-leaf {
-                type string;
-            }
-        }
-    }
-
-    container top-level-container {
-        container inner-container-1 {}
-        container inner-container-2 {}
-    }
-
-    anyxml top-level-anyxml;
-
-    leaf top-level-leaf {
-        type int32;
-    }
-
-    leaf-list top-level-leaf-list {
-        type int32;
-    }
-}
\ No newline at end of file
diff --git a/codec/yang-data-codec-xml/src/test/resources/bug8745/foo.yang b/codec/yang-data-codec-xml/src/test/resources/bug8745/foo.yang
deleted file mode 100644 (file)
index c2958d5..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-module foo {
-    namespace foo;
-    prefix foo;
-
-    container cont-with-attributes {
-        leaf leaf-with-attributes {
-            type string;
-        }
-
-        leaf-list leaf-list-with-attributes {
-            type string;
-        }
-
-        list list-with-attributes {
-            key list-key;
-
-            leaf list-key {
-                type string;
-            }
-        }
-    }
-}
\ No newline at end of file
diff --git a/codec/yang-data-codec-xml/src/test/resources/bug8803/bar.yang b/codec/yang-data-codec-xml/src/test/resources/bug8803/bar.yang
deleted file mode 100644 (file)
index 64adc82..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-module bar {
-    namespace bar-ns;
-    prefix bar;
-
-    import foo {
-        prefix foo;
-    }
-
-    augment "/foo:top-cont/foo:keyed-list" {
-        leaf iid-leaf {
-            type instance-identifier;
-        }
-    }
-}
\ No newline at end of file
diff --git a/codec/yang-data-codec-xml/src/test/resources/bug8803/baz.yang b/codec/yang-data-codec-xml/src/test/resources/bug8803/baz.yang
deleted file mode 100644 (file)
index abe4a57..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-module baz {
-    namespace baz-ns;
-    prefix baz;
-
-    container top-cont {
-        list keyed-list {
-            key key-leaf;
-
-            leaf key-leaf {
-                type int32;
-            }
-        }
-    }
-}
\ No newline at end of file
diff --git a/codec/yang-data-codec-xml/src/test/resources/bug8803/foo.yang b/codec/yang-data-codec-xml/src/test/resources/bug8803/foo.yang
deleted file mode 100644 (file)
index 7c8bae4..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-module foo {
-    namespace foo-ns;
-    prefix foo;
-
-    container top-cont {
-        list keyed-list {
-            key key-leaf;
-
-            leaf key-leaf {
-                type int32;
-            }
-        }
-    }
-}
\ No newline at end of file
diff --git a/codec/yang-data-codec-xml/src/test/resources/dom-reader-test/bar.yang b/codec/yang-data-codec-xml/src/test/resources/dom-reader-test/bar.yang
deleted file mode 100644 (file)
index 64adc82..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-module bar {
-    namespace bar-ns;
-    prefix bar;
-
-    import foo {
-        prefix foo;
-    }
-
-    augment "/foo:top-cont/foo:keyed-list" {
-        leaf iid-leaf {
-            type instance-identifier;
-        }
-    }
-}
\ No newline at end of file
diff --git a/codec/yang-data-codec-xml/src/test/resources/dom-reader-test/baz.yang b/codec/yang-data-codec-xml/src/test/resources/dom-reader-test/baz.yang
deleted file mode 100644 (file)
index fc39bdc..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-module baz {
-    namespace baz-ns;
-    prefix baz;
-
-    container top-cont {
-        /*list keyed-list {
-            key key-leaf;
-
-            leaf key-leaf {
-                type int32;
-            }
-        }*/
-    }
-}
\ No newline at end of file
diff --git a/codec/yang-data-codec-xml/src/test/resources/dom-reader-test/foo.yang b/codec/yang-data-codec-xml/src/test/resources/dom-reader-test/foo.yang
deleted file mode 100644 (file)
index b09776d..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-module foo {
-    namespace foo-ns;
-    prefix foo;
-
-    import rab {
-        prefix rab;
-    }
-
-    container top-cont {
-        list keyed-list {
-            key key-leaf;
-
-            leaf key-leaf {
-                type int32;
-            }
-
-            leaf idref-leaf {
-                type identityref {
-                    base rab:base-id;
-                }
-            }
-
-            leaf ordinary-leaf {
-                type int32;
-            }
-        }
-    }
-}
\ No newline at end of file
diff --git a/codec/yang-data-codec-xml/src/test/resources/dom-reader-test/rab.yang b/codec/yang-data-codec-xml/src/test/resources/dom-reader-test/rab.yang
deleted file mode 100644 (file)
index dc085ec..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-module rab {
-    namespace rab-ns;
-    prefix rab;
-
-    import baz {
-        prefix baz;
-    }
-
-    augment "/baz:top-cont" {
-        list keyed-list {
-            key key-leaf;
-
-            leaf key-leaf {
-                type int32;
-            }
-        }
-    }
-
-    identity base-id;
-    identity id-foo {
-        base base-id;
-    }
-}
\ No newline at end of file
diff --git a/codec/yang-data-codec-xml/src/test/resources/dom-reader-test/zab.yang b/codec/yang-data-codec-xml/src/test/resources/dom-reader-test/zab.yang
deleted file mode 100644 (file)
index d31199e..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-module zab {
-    namespace zab-ns;
-    prefix zab;
-
-    import foo {
-        prefix foo;
-    }
-
-    augment "/foo:top-cont/foo:keyed-list/" {
-        /*leaf ordinary-leaf {
-            type int32;
-        }*/
-
-        anyxml aug-anyxml;
-    }
-}
\ No newline at end of file
diff --git a/codec/yang-data-codec-xml/src/test/resources/strict-parsing-mode-test/foo.yang b/codec/yang-data-codec-xml/src/test/resources/strict-parsing-mode-test/foo.yang
deleted file mode 100644 (file)
index f341760..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-module foo {
-    namespace foo;
-    prefix foo;
-
-    container top-level-container {
-        container inner-container {}
-    }
-}
\ No newline at end of file
diff --git a/codec/yang-data-codec-xml/src/test/resources/test-anydata.yang b/codec/yang-data-codec-xml/src/test/resources/test-anydata.yang
deleted file mode 100644 (file)
index a125e8b..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-module test-anydata {
-    yang-version 1.1;
-    namespace test-anydata;
-    prefix ta;
-
-    anydata foo;
-
-    container cont {
-        anydata cont-any;
-
-        leaf cont-leaf {
-            type string;
-        }
-        leaf empty-leaf {
-            type empty;
-        }
-        container bar {
-            leaf cont-leaf {
-                type string;
-            }
-        }
-    }
-    list lst {
-        leaf cont-leaf {
-            type string;
-        }
-        leaf-list my-leafs {
-            type string;
-        }
-    }
-}
-
diff --git a/codec/yang-data-codec-xml/src/test/resources/yt1107/yt1107.yang b/codec/yang-data-codec-xml/src/test/resources/yt1107/yt1107.yang
deleted file mode 100644 (file)
index 5ff2fce..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-module yt1107 {
-    namespace "yt1107";
-    prefix "yt1107";
-    container parent {
-        config true;
-        list user {
-            key name;
-            leaf name {
-                type string;
-            }
-        }
-        list admin {
-            key name;
-            leaf name {
-                type string;
-            }
-        }
-    }
-}
diff --git a/codec/yang-data-codec-xml/src/test/resources/yt1108/yang/foo.yang b/codec/yang-data-codec-xml/src/test/resources/yt1108/yang/foo.yang
deleted file mode 100644 (file)
index 403a81b..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-module foo {
-    namespace "foo-namespace";
-    prefix "f";
-
-    identity ident-base;
-    identity ident-one {
-        base ident-base;
-    }
-
-    typedef union-type {
-        type union {
-            type uint8;
-            type identityref {
-                base ident-base;
-            }
-        }
-    }
-
-    container leaf-container {
-        leaf union-identityref-leaf {
-            type union-type;
-        }
-
-        leaf identityref-leaf {
-            type identityref {
-                base ident-base;
-            }
-        }
-    }
-}
\ No newline at end of file
diff --git a/codec/yang-data-codec-xml/src/test/resources/yt1473/bar.yang b/codec/yang-data-codec-xml/src/test/resources/yt1473/bar.yang
deleted file mode 100644 (file)
index 2eebb34..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-module bar {
-  namespace barns;
-  prefix bar;
-
-  import foo { prefix foo; }
-
-  identity two {
-    base foo:one;
-  }
-
-  leaf-list str {
-    type string;
-  }
-
-  leaf-list foo {
-    type identityref {
-      base foo:one;
-    }
-  }
-
-  leaf-list bar {
-    type instance-identifier;
-  }
-
-  leaf-list bee {
-    type foo:bitz;
-  }
-
-  leaf baz {
-    type instance-identifier;
-  }
-}
diff --git a/codec/yang-data-codec-xml/src/test/resources/yt1473/foo.yang b/codec/yang-data-codec-xml/src/test/resources/yt1473/foo.yang
deleted file mode 100644 (file)
index e1f156a..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-module foo {
-  namespace foons;
-  prefix foo;
-
-  identity one;
-
-  typedef bitz {
-    type bits {
-      bit one;
-      bit two;
-      bit three;
-    }
-  }
-
-  list foo {
-    key str;
-    leaf str {
-      type string;
-    }
-  }
-
-  list bar {
-    key qname;
-    leaf qname {
-      type identityref {
-        base one;
-      }
-    }
-  }
-
-  list baz {
-    key id;
-    leaf id {
-      type instance-identifier;
-    }
-  }
-
-  list bee {
-    key bts;
-    leaf bts {
-      type bitz;
-    }
-  }
-}