[ONOS-4744] Leafref implementation and UT
Change-Id: I151797185e0bb1695c0640b667ae76ef87c4d4b0
diff --git a/plugin/src/test/resources/RequireInstanceDefaultValueForLeafref.yang b/plugin/src/test/resources/RequireInstanceDefaultValueForLeafref.yang
new file mode 100644
index 0000000..c4dae28
--- /dev/null
+++ b/plugin/src/test/resources/RequireInstanceDefaultValueForLeafref.yang
@@ -0,0 +1,31 @@
+module PathListener {
+ namespace "test";
+ prefix test;
+ list interface {
+ key "name";
+ leaf name {
+ type string;
+ }
+ leaf admin-status {
+ type string;
+ }
+ list address {
+ key "ip";
+ leaf ip {
+ type string;
+ }
+ }
+ }
+ container default-address {
+ leaf ifname {
+ type leafref {
+ path "../../test:interface/test:name";
+ }
+ }
+ leaf status {
+ type leafref {
+ path "/test:interface[name = current()/../ifname]/test:admin-status";
+ }
+ }
+ }
+}
\ No newline at end of file