ConfD User Community

Ethernet service instance dependency not working

Hello experts,

I am using service instance in one of my configuration model, i am trying to introduce tailf dependency between the service instance deletion and my command which uses the service instance id. But the tailf:cli-diff-delete-before does not re-order my command and the service instance deletion based on the following dependency addition. can someone please help

Please find below the command format, order of configuration and expected re-ordering and actual ordering

command format
connect

Existing configuration:
interface GigabitEthernet1
no shutdown
service instance 10 ethernet
exit
service instance 12 ethernet
exit
exit
connect test GigabitEthernet1 10 GigabitEthernet1 12

Xpath /native/interface/GigabitEthernet/ios-eth:service/ios-eth:instance/ios-eth:id

Yang Model used:
container source-service-instance-id {
tailf:cli-drop-node-name;
tailf:cli-sequence-commands;
tailf:cli-incomplete-command;
tailf:cli-hide-in-submode;
leaf service-instance-id {
tailf:cli-drop-node-name;
tailf:cli-incomplete-command;
description
“Service Instance ID”;

tailf:cli-diff-create-after “/ios:native/ios:interface/ios:GigabitEthernet/ios-eth:service/ios-eth:instance” {
tailf:cli-when-target-set;
}
tailf:cli-diff-delete-before “/ios:native/ios:interface/ios:GigabitEthernet/ios-eth:service/ios-eth:instance” {
tailf:cli-when-target-delete;
}
type uint16 {
range “1…8000”;
}
}

My order of configuration:
service instance deletion:
interface GigabitEthernet1
no service instance 10 ethernet <— Service instance is deleted before my command
no service instance 12 ethernet
exit
my command: no connect test

Expected reordering: <— based on the dependency in the yang, this should be the ordering
my command: no connect test
service instance deletion:
interface GigabitEthernet1
no service instance 10 ethernet
no service instance 12 ethernet
exit

Actual ordering: <— I am seeing that the ordering is same as configuration, no re-ordering could be seen
service instance deletion:
interface GigabitEthernet1
no service instance 10 ethernet
no service instance 12 ethernet
exit
my command: no connect test

Can someone help to understand what is that i am missing in order enforce the dependency so that it re-orders based on the dependency.

I think the combination of all the CLI extensions used is too much for ConfD to comprehend correctly, do yo really need all of them? For instance, I’d say there are too many “drop” and “hide”, maybe some of them may be removed.

Btw., your formatting makes it quite difficult to understand the issue, have a look at this topic.