Re: [yang-doctors] question regarding conditional/optional statements
Benoit Claise <bclaise@cisco.com> Wed, 30 August 2017 14:10 UTC
Return-Path: <bclaise@cisco.com>
X-Original-To: yang-doctors@ietfa.amsl.com
Delivered-To: yang-doctors@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3306C132E99 for <yang-doctors@ietfa.amsl.com>; Wed, 30 Aug 2017 07:10:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.5
X-Spam-Level:
X-Spam-Status: No, score=-14.5 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.com
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 DlaAp8HsExJg for <yang-doctors@ietfa.amsl.com>; Wed, 30 Aug 2017 07:10:18 -0700 (PDT)
Received: from aer-iport-2.cisco.com (aer-iport-2.cisco.com [173.38.203.52]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 50763132E92 for <yang-doctors@ietf.org>; Wed, 30 Aug 2017 07:10:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=28520; q=dns/txt; s=iport; t=1504102217; x=1505311817; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to; bh=qp+sAuHmwbm8l5RBzavZhScOahvsvSGKKPSIKpIHjQE=; b=ZVo07i2o4C2854dqctwOvHtVwpsZK+weq6YPn1Jb9NECh/tU8N7sifyW WrbowzP/Pi/i3orSq5FN/IGCYyu9hdD/H3VmlTD49PAMAHnuiBdTv3p1c XRJkyvwfa3A0G/q7lmHF/onXMRyPUt0bOwhLIpLdBL+5U9HF/6eXMO82m s=;
X-IronPort-AV: E=Sophos;i="5.41,448,1498521600"; d="scan'208,217";a="654285231"
Received: from aer-iport-nat.cisco.com (HELO aer-core-1.cisco.com) ([173.38.203.22]) by aer-iport-2.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Aug 2017 14:10:15 +0000
Received: from [10.55.221.36] (ams-bclaise-nitro3.cisco.com [10.55.221.36]) by aer-core-1.cisco.com (8.14.5/8.14.5) with ESMTP id v7UEAEUK020641; Wed, 30 Aug 2017 14:10:15 GMT
To: Andy Bierman <andy@yumaworks.com>, Norm Strahle <nstrahle@juniper.net>
Cc: "yang-doctors@ietf.org" <yang-doctors@ietf.org>, Ing-Wher Chen <Ing-Wher_Chen@jabil.com>, "Aseem Choudhary (asechoud)" <asechoud@cisco.com>
References: <BN1PR0201MB0833B05FB5307BDEF2E8E3F5C3820@BN1PR0201MB0833.namprd02.prod.outlook.com> <20170817050647.apfeuvfhfw23ws6n@elstar.local> <BCE95ECB-360D-46E0-B062-371931C0F46A@tail-f.com> <20170817083739.u4vfbtkm34vf5utw@elstar.local> <6991455A-91A6-42A6-86A6-F19A95BCD133@tail-f.com> <20170817120451.syz54lblctjitbm7@elstar.local> <3EA7384C-2D5D-4C00-8479-75277389DE5B@tail-f.com> <CABCOCHR9ooj7VQZhqAzJkAR=9vn4C0okTDKQJ842p-Qa_2YZDg@mail.gmail.com> <36E052B8-9028-4EE6-A393-F68EA3EF926B@tail-f.com> <E180B2C6-3E5F-43A9-9A20-E7D056D2E23D@cisco.com> <CABCOCHTVM-XCSsUsCKPnvzYNWj8+OWD5LJOhOSGfHx2k2XEHzw@mail.gmail.com> <DM2PR0501MB15021350F3E533671AFEA5CDCF830@DM2PR0501MB1502.namprd05.prod.outlook.com> <CABCOCHRr8YokU+rx9F6jvQ=6GOZp0K9J-a+TXY3RHQUTq5M=4A@mail.gmail.com>
From: Benoit Claise <bclaise@cisco.com>
Message-ID: <17685d4e-7c4b-d0c7-acae-c9732cd2e479@cisco.com>
Date: Wed, 30 Aug 2017 16:10:14 +0200
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0
MIME-Version: 1.0
In-Reply-To: <CABCOCHRr8YokU+rx9F6jvQ=6GOZp0K9J-a+TXY3RHQUTq5M=4A@mail.gmail.com>
Content-Type: multipart/alternative; boundary="------------84348082288EDF84A5E32C50"
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/-3LPoJyUTCaeC4nX1aApBgjZWxk>
Subject: Re: [yang-doctors] question regarding conditional/optional statements
X-BeenThere: yang-doctors@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Email list of the yang-doctors directorate <yang-doctors.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/yang-doctors/>
List-Post: <mailto:yang-doctors@ietf.org>
List-Help: <mailto:yang-doctors-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 30 Aug 2017 14:10:26 -0000
Ing-Wher, Reviewing the email thread now, do you have your conclusions? Regards, B. > Hi, > > I guess it depends on what kind of functionality is being provided to > the client. > In this case it looks like there is no expectation of consistency or > requirement > for specific functionality. Features and deviations are both probably > overkill. > > SMIv2 has the concept of GROUP and MANDATORY-GROUP. > In some ways SMIv2 conformance is much better than YANG, > except SNMP never got the capability discovery right. > > Usually the groups have descriptions to say when a server should > implement the group. > If the criteria is "who knows, just implement it if you want" then the > module should make > that clear. > > > Andy > > > On Thu, Aug 17, 2017 at 9:15 AM, Norm Strahle <nstrahle@juniper.net > <mailto:nstrahle@juniper.net>> wrote: > > In our particular case, queue counters, there are several counters > and rates associated with a given queue (packets, bytes, > transmitted, dropped, queued, tail drop, current depth, peak, > average, max, transmit rate, drop rate, etc.) It is easy to see > where most manufactures support most, but likely not all. So, > likely all vendors would need to indicate which it is not > supporting. To me it would seem that a feature at least gives the > client developer the hint up-front that this item is not required > to be supported and to handle the case. There is no clue from a > model that a deviation is likely, so no way to anticipate. So, > wouldn’t a feature be better in this case than a deviation? > > *From:*Andy Bierman [mailto:andy@yumaworks.com > <mailto:andy@yumaworks.com>] > *Sent:* Thursday, August 17, 2017 12:06 PM > *To:* Giles Heron (giheron) <giheron@cisco.com > <mailto:giheron@cisco.com>> > *Cc:* Jan Lindblad <janl@tail-f.com <mailto:janl@tail-f.com>>; > yang-doctors@ietf.org <mailto:yang-doctors@ietf.org>; Ing-Wher > Chen <Ing-Wher_Chen@jabil.com <mailto:Ing-Wher_Chen@jabil.com>>; > Norm Strahle <nstrahle@juniper.net <mailto:nstrahle@juniper.net>>; > Aseem Choudhary (asechoud) <asechoud@cisco.com > <mailto:asechoud@cisco.com>> > *Subject:* Re: [yang-doctors] question regarding > conditional/optional statements > > On Thu, Aug 17, 2017 at 8:56 AM, Giles Heron (giheron) > <giheron@cisco.com <mailto:giheron@cisco.com>> wrote: > > On 17 Aug 2017, at 16:49, Jan Lindblad <janl@tail-f.com > <mailto:janl@tail-f.com>> wrote: > > Have you ever seen a smart client that can cope > with randomly deviated YANG models, unless a > programmer has intervened and created special code > for handing that particular deviating device type? > I have not. > > Doesn't your client build a session-specific schema > tree based on the advertised modules? > > Deviations are clearly better than just not returning > anything. > > They tell the client that the missing counters are not > implemented as opposed > > to possibly a temporary, recoverable condition. > > Deviations are known at session startup time but they > can also be known in advance. > > Vendors use naming conventions to specify the > platform-specific deviations. > > Tools likeyangcatalog.org <http://yangcatalog.org/>can > make this process automated and de-facto standardized. > > NSO itself will be just fine, but I'm worried about the > people building applications on top of NSO, e.g. an L3VPN > application. Let's say a deviation comes up at session > start, what's the application supposed to do then? I can't > think of much that doesn't involve a programmer. > > Declared deviations are clearly better than deviating and > not telling. But they are only really worth anything if > they are known to the application programmer before he > finishes his code. Yangcatalog.org > <http://yangcatalog.org/> helps, but not all modules will > be there and there's also a time dimension. Deviations > found at session start are probably not worth anything > other than as triggers for that special code someone wrote > to handle the situation. > > I feel deviations should not be recommended lightly. In > the particular case that started this discussion, they'd > bring little value. > > right - isn’t deviation supposed to be for the case where you > don’t support something that implementations are generally > expected to support? > > for what Helen wants features seem to be a better fit - at > least to me. > > Features are intended to convey that the functionality is optional. > > Presumably the data model is attempting to deliver some > functionality to the client developer. > > Features correspond well to optional protocol capabilities. > > Generally a single counter is not considered to be high-level > functionality. > > Ask the question "Why is counter FOO missing?" > > A1) because device XYZ does not support it > > A2) because it counts the FIZZBANG protocol, and that protocol is > not used on every device > > If A1 then use deviations. If A2 then use features. > > Giles > > Andy > > > > > _______________________________________________ > yang-doctors mailing list > yang-doctors@ietf.org > https://www.ietf.org/mailman/listinfo/yang-doctors
- [yang-doctors] question regarding conditional/opt… Ing-Wher Chen
- Re: [yang-doctors] question regarding conditional… Kent Watsen
- Re: [yang-doctors] question regarding conditional… Juergen Schoenwaelder
- Re: [yang-doctors] question regarding conditional… Jan Lindblad
- Re: [yang-doctors] question regarding conditional… Martin Bjorklund
- Re: [yang-doctors] question regarding conditional… Juergen Schoenwaelder
- Re: [yang-doctors] question regarding conditional… Jan Lindblad
- Re: [yang-doctors] question regarding conditional… Juergen Schoenwaelder
- Re: [yang-doctors] question regarding conditional… Jan Lindblad
- Re: [yang-doctors] question regarding conditional… Andy Bierman
- Re: [yang-doctors] question regarding conditional… Jan Lindblad
- Re: [yang-doctors] question regarding conditional… Giles Heron (giheron)
- Re: [yang-doctors] question regarding conditional… Andy Bierman
- Re: [yang-doctors] question regarding conditional… Giles Heron (giheron)
- Re: [yang-doctors] question regarding conditional… Norm Strahle
- Re: [yang-doctors] question regarding conditional… Andy Bierman
- Re: [yang-doctors] question regarding conditional… Kent Watsen
- Re: [yang-doctors] question regarding conditional… Andy Bierman
- Re: [yang-doctors] question regarding conditional… Norm Strahle
- Re: [yang-doctors] question regarding conditional… Kent Watsen
- Re: [yang-doctors] question regarding conditional… Juergen Schoenwaelder
- Re: [yang-doctors] question regarding conditional… Juergen Schoenwaelder
- Re: [yang-doctors] question regarding conditional… Acee Lindem (acee)
- Re: [yang-doctors] question regarding conditional… Juergen Schoenwaelder
- Re: [yang-doctors] question regarding conditional… Benoit Claise
- Re: [yang-doctors] question regarding conditional… Ing-Wher Chen
- Re: [yang-doctors] question regarding conditional… Acee Lindem (acee)
- Re: [yang-doctors] question regarding conditional… Ing-Wher Chen
- Re: [yang-doctors] question regarding conditional… Acee Lindem (acee)