ConfD User Community

Implementation callpoint to augmented field

Hi ,
We have a oran-hardware.yang which is augmented ietf-hardware.yang as below:

module: o-ran-hardware
augment /hw:hardware/hw:component:
+--ro label-content
|  +--ro model-name?      
|  +--ro serial-number?   
+--ro product-code             
+--rw energy-saving-enabled?   

module: ietf-hardware
 +--rw hardware
    +--ro last-change?   
    +--rw component* [name]

I would like to access the list component of ietf-hardware through oran-hardware.
So I have created annotation file which has subscription to call point to list "component ".

module o-ran-hardware-ann {

 yang-version 1.1;
namespace "urn:o-ran:hardware:1.0";
prefix o-ran-hw-ann;
import ietf-hardware {
 prefix hw;
}
import o-ran-hardware
{
  prefix how;
}
import tailf-common {
prefix tailf;
}

tailf:annotate "/hw:hardware/hw:component" {
tailf:callpoint cb_op_label;
   }
}

But call point is not getting registered as there is no entry in generated o ran-harware.h header file.

If you can figure out my mistake or wrong understanding then it will be really helpful.

Hi ,
I have provided screen shots of both oran-hardware.yang & ietf-hardware.yang

Below is the screen shot of oran-hardware


Below is the screen shot of ietf-hardware :

Since hw:component is a read-write list, the following

tailf:annotate "/hw:hardware/hw:component" {
  tailf:callpoint cb_op_label;
}

means that you intend to implement the list in an external database. I don’t assume this is exactly the case, you probably only wanted to implement a data provider for the label-content container. So I think you have to annotate that container, i.e. add one more node to the annotate path; maybe with tailf:config false and using tailf:annotate-statement and tailf:annotate-module instead of tailf:annotate you may be able to add the annotation to the augment, but not to a node from another module. (Also, don’t forget to use the annotation module in the compile time.)