[ONOS-4744] Leafref implementation and UT
Change-Id: I151797185e0bb1695c0640b667ae76ef87c4d4b0
diff --git a/plugin/src/test/resources/SelfResolutionWhenLeafrefInTypedefReferToContainer.yang b/plugin/src/test/resources/SelfResolutionWhenLeafrefInTypedefReferToContainer.yang
new file mode 100644
index 0000000..ae42100
--- /dev/null
+++ b/plugin/src/test/resources/SelfResolutionWhenLeafrefInTypedefReferToContainer.yang
@@ -0,0 +1,22 @@
+module ietf-network {
+ yang-version 1;
+ namespace "urn:ietf:params:xml:ns:yang:ietf-network";
+ prefix nd;
+ container networks {
+ description
+ "Serves as top-level container for a list of networks.";
+ leaf network-id {
+ type network-ref;
+ description
+ "Identifies a network.";
+ }
+ leaf id {
+ type uint8;
+ }
+ }
+ typedef network-ref {
+ type leafref {
+ path "/networks/id";
+ }
+ }
+}
\ No newline at end of file