[ONOS-4744] Leafref implementation and UT
Change-Id: I151797185e0bb1695c0640b667ae76ef87c4d4b0
diff --git a/plugin/src/test/resources/interfileleafrefreferstomultipleleafrefinmultiplefiles/ieft-inet-types.yang b/plugin/src/test/resources/interfileleafrefreferstomultipleleafrefinmultiplefiles/ieft-inet-types.yang
new file mode 100644
index 0000000..c393dbf
--- /dev/null
+++ b/plugin/src/test/resources/interfileleafrefreferstomultipleleafrefinmultiplefiles/ieft-inet-types.yang
@@ -0,0 +1,11 @@
+module ietf-inet-types {
+ yang-version 1;
+ namespace
+ "urn:ietf:params:xml:ns:yang:ietf-inet-types";
+ prefix inet;
+ typedef tp-ref {
+ type leafref {
+ path "/nwtp:value";
+ }
+ }
+}
\ No newline at end of file
diff --git a/plugin/src/test/resources/interfileleafrefreferstomultipleleafrefinmultiplefiles/ietf-network-topology.yang b/plugin/src/test/resources/interfileleafrefreferstomultipleleafrefinmultiplefiles/ietf-network-topology.yang
new file mode 100644
index 0000000..7e080c5
--- /dev/null
+++ b/plugin/src/test/resources/interfileleafrefreferstomultipleleafrefinmultiplefiles/ietf-network-topology.yang
@@ -0,0 +1,28 @@
+module ietf-network-topology {
+ yang-version 1;
+ namespace "urn:ietf:params:xml:ns:yang:ietf-te-topology";
+ prefix "tet";
+ import ietf-network {
+ prefix "nt";
+ }
+ grouping te-node-tunnel-termination-capability {
+ description
+ "Termination capability of a tunnel termination point on a
+ TE node.";
+ list termination-capability {
+ key "link-tp";
+ description
+ "The termination capabilities between
+ tunnel-termination-point and link termination-point.
+ The capability information can be used to compute
+ the tunnel path.";
+ leaf link-tp {
+ type leafref {
+ path "/nt:termination-point/nt:tp-id";
+ }
+ description
+ "Link termination point.";
+ }
+ } // termination-capability
+ } // te-node-tunnel-termination-capability
+}
\ No newline at end of file
diff --git a/plugin/src/test/resources/interfileleafrefreferstomultipleleafrefinmultiplefiles/ietf-network.yang b/plugin/src/test/resources/interfileleafrefreferstomultipleleafrefinmultiplefiles/ietf-network.yang
new file mode 100644
index 0000000..49a6a04
--- /dev/null
+++ b/plugin/src/test/resources/interfileleafrefreferstomultipleleafrefinmultiplefiles/ietf-network.yang
@@ -0,0 +1,14 @@
+module ietf-network {
+ yang-version 1;
+ namespace
+ "urn:ietf:params:xml:ns:yang:ietf-inet-types";
+ prefix nw;
+ import ietf-inet-types {
+ prefix inet;
+ }
+ container termination-point {
+ leaf tp-id {
+ type string;
+ }
+ }
+}
\ No newline at end of file