# Using Leafref to access a device NED

**URL:** <https://dmap-community.ductus.global/t/using-leafref-to-access-a-device-ned/53>\
**Category:** YANG\
**Created:** [February 25, 2015, 7:26pm UTC](https://dmap-community.ductus.global/t/using-leafref-to-access-a-device-ned/53 "2015-02-25T19:26:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![viveky1977](https://avatars.discourse-cdn.com/v4/letter/v/c5a1d2/32.png) [@viveky1977](https://dmap-community.ductus.global/u/viveky1977)\
**Post date:** [February 25, 2015, 7:26pm UTC](https://dmap-community.ductus.global/t/using-leafref-to-access-a-device-ned/53/1 "2015-02-25T19:26:18Z")

</div>

I am trying to create a service template and plan to use leafref capability to access the already created node of a F5 LTM and update the description of the node.

**Performing a Make gives me the following error**  
make clean all  
rm -rf …/load-dir/\*  
/opt/ncs/current/bin/ncsc `ls nodedesc-ann.yang > /dev/null 2>&1 && echo "-a nodedesc-ann.yang"`   
–yangpath yang --yangpath …/…/f5-bigip/src/yang -c -o …/load-dir/nodedesc.fxs yang/nodedesc.yang  
yang/nodedesc.yang:6: warning: imported module ietf-inet-types not used  
yang/nodedesc.yang:41: error: tailf-ned-f5-bigip:net in the path for node-test at yang/nodedesc.yang:38 is not found  
nodedesc contains errors

I have included the F5 ned path in the Makefile aswell.

**YANG File:**  
module nodedesc {

namespace “[http://com/example/nodedesc](http://com/example/nodedesc)”;  
prefix nodedesc;

import ietf-inet-types {  
prefix inet;  
}  
import tailf-ncs {  
prefix ncs;  
}  
import tailf-common {  
prefix tailf;  
}  
import tailf-ned-f5-bigip {  
prefix bigip;  
}

augment /ncs:services {  
list nodedesc {  
key “device name”;

```
  uses ncs:service-data;
  ncs:servicepoint "nodedesc";

  leaf name {
    type string;
  }

  leaf device {
    type leafref {
      path "/ncs:devices/ncs:device/ncs:name";
    }
  }
  leaf node-name {
  tailf:info "Nodes configured on Device";
    type leafref {
      path "deref(../device)/../ncs:config/bigip:net/bigip:interface/bigip:name";
    }
  }

  leaf node-description {
    type string;
  }
}

```

}  
}

---

<div class="post-metadata">

**Author:** ![jlawitzke](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/jlawitzke/32/54_2.png) [@jlawitzke](https://dmap-community.ductus.global/u/jlawitzke)\
**Post date:** [February 25, 2015, 8:13pm UTC](https://dmap-community.ductus.global/t/using-leafref-to-access-a-device-ned/53/2 "2015-02-25T20:13:59Z")

</div>

I’m sorry, but this is a forum for ConfD related discussion. For questions regarding the NCS product, you should use the Post-Sales support RT system.

I think your leafref path might be wrong. Instead of “deref(…/device)/…/ncs:config/…” you probably want “deref(…/device)/ncs:config/…”.

However, to follow up on this question, please, use the commercial support channel as this public forum site is specific to the ConfD product and not the NCS product.
