cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
864
Views
5
Helpful
1
Replies

leafref - path to ref current service instance

Could you pls take a look at this and suggest what im doing wrong.

 

leaf out_policy {
      type leafref {
          path "/qos_interface_manager[name=current()/../name]/policies/name";
      }
    }

list policies {
    description "List of policies on target device";
    key name;
    leaf name {
        tailf:info "Policy Name";
        type string;
    }

 

 

Theses are the only policies that exits in this services instance

yaleprinceleidoscom_0-1630927471195.png

 

How ever the leafref shows policies from all the service instances

yaleprinceleidoscom_1-1630927471204.png

 

 

Trying to make it so that the leafref only shows policies that exist in the current service instance.

 

I suspect that this bit is wrong “name=current()/../name”

1 Accepted Solution

Accepted Solutions

path "../../policies/name";

 

 

View solution in original post

1 Reply 1

path "../../policies/name";