Order CLIs sent from same list

Hi Team,

I have list like below,

list list1 {
key key1;
leaf key1 {
type uint8

Here i have configured CLIs like below:
list1 5
list1 10
list1 15
list1 20

I have behaviour of CLI from device side like

  • if i send delete “list1 15” it will delete “list1 20” also.
  • if i send delete “list1 10” it will also delete both “list1 15” and “list1 20”.

It is creating a problem when user send delete RPC for both “list1 15” and “list1 20”. As “list1 20” was already deleted due to request of “list1 15” from device side. Getting “data-missing” error for “list1 20” delete request.

Is there way so that i can order the sending of CLIs which will delete first “list1 20” and then delete “list1 15”?