Re: [netmod] Question on intefaces-state model

Ladislav Lhotka <lhotka@nic.cz> Tue, 13 June 2017 18:52 UTC

Return-Path: <lhotka@nic.cz>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 56AF7129486 for <netmod@ietfa.amsl.com>; Tue, 13 Jun 2017 11:52:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fM9DvHXaGLWf for <netmod@ietfa.amsl.com>; Tue, 13 Jun 2017 11:52:50 -0700 (PDT)
Received: from trail.lhotka.name (trail.lhotka.name [77.48.224.143]) by ietfa.amsl.com (Postfix) with ESMTP id AABBC129409 for <netmod@ietf.org>; Tue, 13 Jun 2017 11:52:50 -0700 (PDT)
Received: by trail.lhotka.name (Postfix, from userid 109) id AB89B18216B4; Tue, 13 Jun 2017 20:54:20 +0200 (CEST)
Received: from localhost (cst-prg-41-5.cust.vodafone.cz [46.135.41.5]) by trail.lhotka.name (Postfix) with ESMTPSA id C88FE1820E6C; Tue, 13 Jun 2017 20:54:17 +0200 (CEST)
From: Ladislav Lhotka <lhotka@nic.cz>
To: Andy Bierman <andy@yumaworks.com>, Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>, "Bogaert, Bart (Nokia - BE/Antwerp)" <bart.bogaert@nokia.com>, "netmod@ietf.org" <netmod@ietf.org>
In-Reply-To: <CABCOCHSK1h4HQ4LgkYd_Lxp3JYzxYBMmCka64_-iVjq2N_PR7g@mail.gmail.com>
References: <AM2PR07MB06272FF9E8BA4D00B0669F9794CE0@AM2PR07MB0627.eurprd07.prod.outlook.com> <20170612172141.GA52797@elstar.local> <CABCOCHSK1h4HQ4LgkYd_Lxp3JYzxYBMmCka64_-iVjq2N_PR7g@mail.gmail.com>
Date: Tue, 13 Jun 2017 20:52:44 +0200
Message-ID: <m2d1a7iutf.fsf@nic.cz>
MIME-Version: 1.0
Content-Type: text/plain
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/2ISHqVgE9Fpy1JfSDx3kSfUX3yQ>
Subject: Re: [netmod] Question on intefaces-state model
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 13 Jun 2017 18:52:53 -0000

Andy Bierman <andy@yumaworks.com> writes:

> On Mon, Jun 12, 2017 at 10:21 AM, Juergen Schoenwaelder <
> j.schoenwaelder@jacobs-university.de> wrote:
>
>> On Fri, Jun 09, 2017 at 10:55:20AM +0000, Bogaert, Bart (Nokia -
>> BE/Antwerp) wrote:
>> >
>> > We have a question regarding the statistics container as defined in the
>> > interfaces-state model.  This container defines one mandatory leaf
>> > (discontinuity-time) while all other leafs are optional.  What is the
>> > rationale behind this leaf being mandatory and not an optional field?
>> >
>> > It does not make a lot of sense to return a discontinuity-time value and
>> no
>> > counters if none of the counters are relevant for a specific interface.
>> >
>> > Another alternative could be to add, via a deviation, a when clause to
>> the
>> > container indicating for which ifType(s) the container is (or is not)
>> > present. But that would lead to not supporting the IETF interfaces model
>> to
>> > the full extent.
>> >
>>
>> The discontinuity-time is relevant for _any_ counter associated with
>> an interface, regardless whether the counter is defined in the
>> interfaces model or elsewhere. I have a hard time to imagine an
>> interface that has zero counters.
>>
>>
> The mandatory-stmt is very confusing for config=false nodes. Mandatory=true
> means
> an <rpc-reply> must contain an instance of the mandatory leaf.

I don't think it is that confusing. RFC 7950 defines what a valid data
tree means and "mandatory" are among the constraints.

I agree though that in terms of a management protocol it means different
things for config true and false data, but this is true also for default
values and maybe other YANG concepts as well. 

>
> Mandatory=false does not mean optional-to-implement although it sure
> looks that way for config=false nodes.  Only if-feature can make a node
> optional to implement.

I don't think this interpretation is supported by any text in the YANG
spec. State data nodes that are optional needn't be implemented.

Lada

>
>
>
>  /js
>
>
> Andy
>
> --
>> 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/>
>>
>> _______________________________________________
>> netmod mailing list
>> netmod@ietf.org
>> https://www.ietf.org/mailman/listinfo/netmod
>>
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod

-- 
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67