YANG construct collision detection framework added
Change-Id: I1458f9e3192641f3f90c444798c31a64536ffa5d
diff --git a/src/test/resources/ContainerDuplicateContainer.yang b/src/test/resources/ContainerDuplicateContainer.yang
new file mode 100644
index 0000000..4928463
--- /dev/null
+++ b/src/test/resources/ContainerDuplicateContainer.yang
@@ -0,0 +1,23 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ container ospf {
+ container valid {
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ status current;
+ reference "RFC 6020";
+ }
+ }
+ container valid {
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ status current;
+ reference "RFC 6020";
+ }
+ }
+ }
+}
diff --git a/src/test/resources/ContainerWithDuplicateLeaf.yang b/src/test/resources/ContainerWithDuplicateLeaf.yang
new file mode 100644
index 0000000..3adaccd
--- /dev/null
+++ b/src/test/resources/ContainerWithDuplicateLeaf.yang
@@ -0,0 +1,34 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ container valid {
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ config true;
+ mandatory true;
+ status current;
+ reference "RFC 6020";
+ }
+ leaf valid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ config true;
+ mandatory true;
+ status current;
+ reference "RFC 6020";
+ }
+ leaf valid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ config true;
+ mandatory true;
+ status current;
+ reference "RFC 6020";
+ }
+ }
+}
diff --git a/src/test/resources/DuplicateContainerAndList.yang b/src/test/resources/DuplicateContainerAndList.yang
new file mode 100644
index 0000000..74c7721
--- /dev/null
+++ b/src/test/resources/DuplicateContainerAndList.yang
@@ -0,0 +1,29 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ container ospf {
+ container valid {
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ status current;
+ reference "RFC 6020";
+ }
+ }
+ list valid {
+ key "process-id";
+ container interface {
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ status current;
+ reference "RFC 6020";
+ }
+ }
+ leaf process-id {
+ type "string";
+ }
+ }
+ }
+}
diff --git a/src/test/resources/ListDuplicateContainer.yang b/src/test/resources/ListDuplicateContainer.yang
new file mode 100644
index 0000000..8c152b2
--- /dev/null
+++ b/src/test/resources/ListDuplicateContainer.yang
@@ -0,0 +1,27 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ list ospf {
+ key "process-id";
+ container interface {
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ status current;
+ reference "RFC 6020";
+ }
+ }
+ leaf process-id {
+ type "string";
+ }
+ container interface {
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ status current;
+ reference "RFC 6020";
+ }
+ }
+ }
+}
diff --git a/src/test/resources/ListWithDuplicateLeaf.yang b/src/test/resources/ListWithDuplicateLeaf.yang
new file mode 100644
index 0000000..55a78f6
--- /dev/null
+++ b/src/test/resources/ListWithDuplicateLeaf.yang
@@ -0,0 +1,26 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ list valid {
+ key "invalid-interval";
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ config true;
+ mandatory true;
+ status current;
+ reference "RFC 6020";
+ }
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ config true;
+ mandatory true;
+ status current;
+ reference "RFC 6020";
+ }
+ }
+}
diff --git a/src/test/resources/ModuleDuplicateContainer.yang b/src/test/resources/ModuleDuplicateContainer.yang
new file mode 100644
index 0000000..bc58896
--- /dev/null
+++ b/src/test/resources/ModuleDuplicateContainer.yang
@@ -0,0 +1,29 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ container valid {
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ status current;
+ reference "RFC 6020";
+ }
+ }
+ container invalid {
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ status current;
+ reference "RFC 6020";
+ }
+ }
+ container valid {
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ status current;
+ reference "RFC 6020";
+ }
+ }
+}
diff --git a/src/test/resources/ModuleWithDuplicateLeaf.yang b/src/test/resources/ModuleWithDuplicateLeaf.yang
new file mode 100644
index 0000000..2c3ecbc
--- /dev/null
+++ b/src/test/resources/ModuleWithDuplicateLeaf.yang
@@ -0,0 +1,32 @@
+module Test {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix Ant;
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ config true;
+ mandatory true;
+ status current;
+ reference "RFC 6020";
+ }
+ leaf valid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ config true;
+ mandatory true;
+ status current;
+ reference "RFC 6020";
+ }
+ leaf invalid-interval {
+ type "uint16";
+ units "seconds";
+ description "Interval before a route is declared invalid";
+ config true;
+ mandatory true;
+ status current;
+ reference "RFC 6020";
+ }
+}