ConfD User Community

Ordering when, when clause is present

Hello experts ,

I have model like the below

  container all {
    description "All routes";
    presence "true";
    uses route-map-group;
  }
  container specifi {
    when 'not(../all)';
    description "specific";
    presence "true";

}

SO what happens here is that when “all” is configured , “specific” is removed.
Which is expected.

Here in our product , the deletion generates a “no specific” command to the device.

Is there a way i could order them such a way “no specific” comes before all
when the cli diff is generated??

Trying to understand if the following is applicable here …

tailf:cli-diff-before path
When displaying C-style configuration diffs, display any changes made to this node before any changes

made to the target node(s).

Thus, the dependency will trigger when any changes (created, modified or deleted) has been made to this node while any changes (created, modified or deleted) has been made to the target node(s).

Thanks a lot.

Either you use two subscription points with different priorities, or in this case, for a single subscriber that use cdb_get_modifications_cli() to get the changes you can perhaps add the tailf:cli-diff-delete-before "../all" extension to the “specific” container.

Perfect!!! Thanks again…
@cohult Amazing as always

1 Like