Subject: [Netconf] 'report-all' (RFC 6243) and leafs without defaults

From: "Sterne, Jason (Nokia - CA)" <[email-masked]>
Date: Tue, 30 Aug 2016 14:07:45 +0000

Hi all,

I was hoping to confirm my understanding of <get-config> for non-configured leafs that don't have a schema default (i.e. no 'default' statement in the YANG).

e.g. from openconfig-bgp:
    leaf tcp-mss {
      type uint16;
      description
        "Sets the max segment size for BGP TCP sessions.";
    }

Or link-up-down-trap-enable* or description from ietf-interfaces.

If there is no default and the client hasn't configured a value, then the leaf is simply absent in a <get-config> reply (assuming 'trim' or 'explicit' modes from RFC 6243). I suppose the typical assumption is that the absence of the leaf implies it is disabled/not in operation/not in use.

If a <get-config> is done using <with-defaults>report-all</with-defaults> then leafs without defaults specified in the YANG model, and that haven't been configured/set by the client, are simply not returned in the response right ? They will be absent from a report-all request just as they were with a trim (or explicit) response.

Regards,
Jason

* In the case of link-up-down-trap-enable the description explains how the server behaves when this leaf isn't configured but that doesn't change the type of response behavior I describe above.

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Tue, 30 Aug 2016 17:49:57 +0200

> If there is no default and the client hasn't configured a value, then the leaf is simply absent in a <get-config> reply (assuming 'trim' or 'explicit' modes from RFC 6243). I suppose the typical as…

If there is no configured value and no default that applies, then the
operationally used value (if any) depends on the semantics of the
leaf.  In some situations, this may mean that an implementation
specific value is actually used (likely true for the tcp-mss
case). For link-up-down-trap-enable, the exact semantics are actually
explained in the description clause. So in this case, there is a clear
specification what a client can assume that is aware of the specific
semantics of the leaf.
 
> If a <get-config> is done using <with-defaults>report-all</with-defaults> then leafs without defaults specified in the YANG model, and that haven't been configured/set by the client, are simply not…

Yes. There simply is no config value. There may be an operationally
used value. (I hope we do not get back into the debate what 'config'
means now...)

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>

---

From: "Sterne, Jason (Nokia - CA)" <[email-masked]>
Date: Tue, 30 Aug 2016 21:09:18 +0000

Thx Juergen.

I guess you are right that the behavior of the server when there is no default in the schema and nothing configured could be pretty much anything (including an operationally used value that isn't in the YANG or may be dynamic, disabled, etc). There is simply no configured value (so reading config should return nothing).

Regards,
Jason

-----Original Message-----
From: Juergen Schoenwaelder [mailto:[email-masked]] 
Sent: Tuesday, August 30, 2016 11:50
To: Sterne, Jason (Nokia - CA)
Cc: Netconf
Subject: Re: [Netconf] 'report-all' (RFC 6243) and leafs without defaults

> If there is no default and the client hasn't configured a value, then the leaf is simply absent in a <get-config> reply (assuming 'trim' or 'explicit' modes from RFC 6243). I suppose the typical as…

If there is no configured value and no default that applies, then the operationally used value (if any) depends on the semantics of the leaf.  In some situations, this may mean that an implementation specific value is actually used (likely true for the tcp-mss case). For link-up-down-trap-enable, the exact semantics are actually explained in the description clause. So in this case, there is a clear specification what a client can assume that is aware of the specific semantics of the leaf.
 
> If a <get-config> is done using <with-defaults>report-all</with-defaults> then leafs without defaults specified in the YANG model, and that haven't been configured/set by the client, are simply not…

Yes. There simply is no config value. There may be an operationally used value. (I hope we do not get back into the debate what 'config'
means now...)

/js