ConfD User Community

Auto-generate the value for leaf


#1

So, I have a yang model

container xyz_config {

list xyz_name {
key name;
leaf name { type string; mandatory true;}
leaf xyz_id{                            
         type uint16;     // auto generate 
         config false;                   
      }                
 }

is it possible to generate the ID per container config ? I know there is way to solve this by hooks. But I am wondering if confd CLI has support to do the same?

Thanks


#2

Perhaps It could be done by clispec command, but I think hook is easier.