Re: [YANG] mandatory & default

Ladislav Lhotka <lhotka@cesnet.cz> Mon, 28 January 2008 08:18 UTC

Return-path: <yang-bounces@ietf.org>
Received: from [127.0.0.1] (helo=stiedprmman1.va.neustar.com) by megatron.ietf.org with esmtp (Exim 4.43) id 1JJPCF-00045u-LM; Mon, 28 Jan 2008 03:18:27 -0500
Received: from yang by megatron.ietf.org with local (Exim 4.43) id 1JJPCE-00043i-0F for yang-confirm+ok@megatron.ietf.org; Mon, 28 Jan 2008 03:18:26 -0500
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1JJPCD-00040y-Da for yang@ietf.org; Mon, 28 Jan 2008 03:18:25 -0500
Received: from office2.cesnet.cz ([195.113.144.244]) by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1JJPCB-00019b-5k for yang@ietf.org; Mon, 28 Jan 2008 03:18:25 -0500
Received: from [172.29.2.201] (asus-gx.lhotka.cesnet.cz [195.113.161.161]) by office2.cesnet.cz (Postfix) with ESMTP id 17011D800BD for <yang@ietf.org>; Mon, 28 Jan 2008 09:18:18 +0100 (CET)
Subject: Re: [YANG] mandatory & default
From: Ladislav Lhotka <lhotka@cesnet.cz>
To: yang@ietf.org
In-Reply-To: <20080125.233824.88508964.mbj@tail-f.com>
References: <4799FD8F.1090402@andybierman.com> <20080125.233824.88508964.mbj@tail-f.com>
Content-Type: text/plain; charset=utf-8
Organization: CESNET
Date: Mon, 28 Jan 2008 09:18:17 +0100
Message-Id: <1201508297.30693.63.camel@missotis>
Mime-Version: 1.0
X-Mailer: Evolution 2.12.1
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 21c69d3cfc2dd19218717dbe1d974352
X-BeenThere: yang@ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: YANG modeling Language for NETCONF <yang.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/yang>, <mailto:yang-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/yang>
List-Post: <mailto:yang@ietf.org>
List-Help: <mailto:yang-request@ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/yang>, <mailto:yang-request@ietf.org?subject=subscribe>
Errors-To: yang-bounces@ietf.org

Martin Bjorklund píše v Pá 25. 01. 2008 v 23:38 +0100:
> >   - An extension is needed (e.g., with-defaults=false) to change the
> >     behavior of RFC 4741 wrt/ returning a subset of all nodes without
> >     any filter defined
> 
> Or, if you, for a moment, try to view thing from the other side, you
> need an extension with-defaults=true to actually get the default
> values, since they are not stored in the configuration data store.

The important point is whether they are defined in the data model. If
they are mandatory, then the device must tell their value - unless
instructed otherwise (either by a filter or by a default-handling
extension).

And I don't want to have a special data model for each device that
implements a particular subset of permitted mtu values.

> 
> > Phil seems to be arguing that nodes that contain the agent-specified
> > default value are not really there.
> 
> Right, since they are not there in his implementation.  Why would you
> store stuff that's not even needed to store?  That's just a waste of
> resources.

Well, if the devices can be potentially asked (under any circumstances)
what the value is, it must be able to return it - it doesn't matter
whether it is physically stored, computed on the fly or whatever.

I think the confusion again stems from different interpretations of
validity. IMO the most straightforward one is that I take a concrete
full configuration (e.g., as an XML document) and compare it to the data
model it is supposed to comply to. In particular, if an element is
mandatory in the DM, I must see it in the configuration. Note that no
context or other info is needed for this validation, like whether the
configuration comes from the device or from the manager etc. 

Lada

-- 
Ladislav Lhotka, CESNET
PGP Key ID: E74E8C0C



_______________________________________________
YANG mailing list
YANG@ietf.org
https://www1.ietf.org/mailman/listinfo/yang