Seems that I better address this subject to ietf-netmode.

Sorry for the trouble.

Regards, Bart

From: netconf <netconf-boun...@ietf.org> On Behalf Of Bogaert, Bart (Nokia - 
BE/Antwerp)
Sent: Friday, May 8, 2020 4:55 PM
To: netc...@ietf.org
Subject: [netconf] Question related to ietf-netconf-with-defaults

Hi,

I have a question related to the with-defaults capability and the how a NC 
server should be dealing with schema-defaults.


  1.  Assume the following model:

module leaf-has-default {
  yang-version 1.1;
  namespace "http://www.example.com/lhd";;
  prefix lhd;

  container contains-leafs {
    leaf num-value {
      type uint32;
      default 1;
    }
    leaf string-value {
      type string;
      default "bla";
    }
  }
}


  1.  The server does not support ietf-netconf-with-defaults


Using an RPC we configure the node 'string-value' to "bla" (which coincides 
with the schema-default).  But the optional 'num-value' has been defined with a 
schema-default.  I'm assuming that the server will return the value 1 in case 
it receives a get-config request, correct?


  1.  Now assume that the model is changed so that the schema-default of 
num-value is changed to 5 and the schema-default is changed to "blabla" and the 
server is restarted with this new module (or does an in-service upgrade)

My assumption is that the server now:

  *   returns 5 for the node 'num-value' (new schema-default and node was not 
configured explicitly)
  *   but still returns 'bla' for the node 'string-value' (as this node was 
configured explicitly but happened to be configured to the schema-default0 to 
the same get-config request.

Is that understanding correct?

I'm not looking at this topic from the view-point whether this is good 
YANG-practice but from the viewpoint of what must be expected from a NC server 
implementation.

Best regards, Bart
_______________________________________________
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to