Move YANGTOOLS-892 test
[yangtools.git] / yang / yang-data-impl / src / test / resources / yt892 / test-network-instance.yang
diff --git a/yang/yang-data-impl/src/test/resources/yt892/test-network-instance.yang b/yang/yang-data-impl/src/test/resources/yt892/test-network-instance.yang
new file mode 100644 (file)
index 0000000..70947c4
--- /dev/null
@@ -0,0 +1,70 @@
+module test-network-instance {
+    yang-version "1";
+    namespace "urn:opendaylight:params:xml:ns:yang:test:network:instance";
+    prefix netinst;
+
+    import test-policy-types { prefix "pt"; }
+
+    revision 2018-08-14;
+
+    grouping network-instance-top {
+        container network-instances {
+            list network-instance {
+                key "name";
+
+                leaf name {
+                    type leafref {
+                        path "../config/name";
+                    }
+                }
+
+                container config {
+                    uses network-instance-config;
+                }
+
+                container protocols {
+                    list protocol {
+                        key "identifier name";
+
+                        leaf identifier {
+                            type leafref {
+                                path "../config/identifier";
+                            }
+                        }
+
+                        leaf name {
+                            type leafref {
+                                path "../config/name";
+                            }
+                        }
+
+                        container config {
+                            uses protocols-config;
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    grouping network-instance-config {
+        leaf name {
+            type string;
+        }
+    }
+
+    grouping protocols-config {
+        leaf identifier {
+            type identityref {
+                base "pt:install-protocol-type";
+            }
+        }
+
+        leaf name {
+            type string;
+        }
+    }
+
+    uses network-instance-top;
+}
+