Subject: [netmod] why is default a config-only property?

From: Andy Bierman <[email-masked]>
Date: Wed, 16 Sep 2009 08:42:05 -0700

Hi,

I never got an answer to my example about the operStatus leaf

  leaf operStatus {
     config false;
     type enumeration {
       enum normal;
       enum bad;
       enum realbad;
       enum etc;
     }
     default normal;
  }

  leaf error-counter {
    config false;
    type yang:zero-based-counter32;
    default 0;
  }

The concept of filtering out the default value because
the values of interest are never the default certainly
applies to config=false leafs.

I am curious why YANG ignores this aspect of the default property.
It makes it even more strange because leafs can be defined
in a grouping with a default (but not config-stmt), and the
config-stmt can be patched in later via refine or deviate.

Andy

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Wed, 16 Sep 2009 18:06:18 +0200

> applies to config=false leafs.

In the explicit config model, there is no filtering of defaults.

/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: Andy Bierman <[email-masked]>
Date: Wed, 16 Sep 2009 09:16:04 -0700

> In the explicit config model, there is no filtering of defaults.

OK -- what's the 'explicit config model', and what does
it have to do with the <get> operation processing
non-config data for an <rpc-reply>?

Andy

---

From: Martin Bjorklund <[email-masked]>
Date: Wed, 16 Sep 2009 23:19:36 +0200 (CEST)

> I am curious why YANG ignores this aspect of the default property.

Where does it say that default does not apply to config false nodes?

/martin

---

From: Andy Bierman <[email-masked]>
Date: Fri, 18 Sep 2009 22:01:49 -0700

> Where does it say that default does not apply to config false nodes?

It doesn't.
There has been some discussion on the list that
default did not apply if config=false.
There is text in the with-defaults draft
that for state data, the default has no affect (report-all).

I agree this text in with-defaults is wrong,
and the yang-07 text is correct wrt/ default
applying to any leaf.  There is text in 7.13.3 and 7.14
that says default applies to rpc output and notification
content, which is no different than state data available
to <get>.

Andy