clicon / clixon

YANG-based toolchain including NETCONF and RESTCONF interfaces and an interactive CLI
http://www.clicon.org/
Other
212 stars 72 forks source link

Clixon backend transactions for choice/case is not logical #361

Closed olofhagsand closed 1 year ago

olofhagsand commented 2 years ago

Given YANG:

   choice c {
      case x {
        leaf first { type boolean; }
     }
     case y {
        leaf second { type boolean; } 
        leaf third { type boolean; }
    }

An edit in the datastore such as:

  1. <first/> -> <second/>will result in a change event
  2. <first/> -> <third/> will result in a del + add event

This is not logical.

It is proposed to change the behavior so that all changes in a choice or choice+case is changed to be a del + add event . This may have consequnces on existing transaction callback code.