[ONOS-4744] Leafref implementation and UT
Change-Id: I151797185e0bb1695c0640b667ae76ef87c4d4b0
diff --git a/plugin/src/test/resources/SelfFileLinkingWithFeatureReferredByLeafref.yang b/plugin/src/test/resources/SelfFileLinkingWithFeatureReferredByLeafref.yang
new file mode 100644
index 0000000..941b56b
--- /dev/null
+++ b/plugin/src/test/resources/SelfFileLinkingWithFeatureReferredByLeafref.yang
@@ -0,0 +1,28 @@
+module syslog {
+ yang-version 1;
+ namespace http://huawei.com;
+ prefix "sys";
+ feature local-storage {
+ description
+ "This feature means the device supports local
+ storage (memory, flash or disk) that can be used to
+ store syslog messages.";
+ }
+
+ container speed {
+ leaf local-storage-limit {
+ if-feature local-storage;
+ type uint64;
+ units "kilobyte";
+ config false;
+ description
+ "The amount of local storage that can be
+ used to hold syslog messages.";
+ }
+ }
+ leaf storage-value {
+ type leafref {
+ path "/speed/local-storage-limit";
+ }
+ }
+}