Re: [yang-doctors] question regarding conditional/optional statements
Ing-Wher Chen <Ing-Wher_Chen@jabil.com> Fri, 08 September 2017 16:51 UTC
Return-Path: <Ing-Wher_Chen@jabil.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 54003132C32 for <yang-doctors@ietfa.amsl.com>; Fri, 8 Sep 2017 09:51:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.9
X-Spam-Level:
X-Spam-Status: No, score=-2.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, T_KAM_HTML_FONT_INVALID=0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=jabil.onmicrosoft.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 O7ATKPIyDPpY for <yang-doctors@ietfa.amsl.com>; Fri, 8 Sep 2017 09:51:55 -0700 (PDT)
Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0134.outbound.protection.outlook.com [104.47.40.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 56153132710 for <yang-doctors@ietf.org>; Fri, 8 Sep 2017 09:51:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jabil.onmicrosoft.com; s=selector1-jabil-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=SmM9YY72GOm1z+hrR1abkx6GP56Sf33kry4qnomtkj8=; b=S2Awo+CVVMKNra+XFYeHmNSrG0kkMxBt0i+VOmwHJtAN9OtCH6mVcVneYFmjjIX2HJ5yobqyQPBKdWte3OCKv4I6DzVy5rSFrv9FlJeabvP6EwXpyWzUtz18rUqgQh5RbMt5mStwZJ0Ib7L7h2YxgNC91iNhR9/vuK+aglGQB7Q=
Received: from BN1PR0201MB0833.namprd02.prod.outlook.com (10.160.170.153) by BN1PR0201MB0817.namprd02.prod.outlook.com (10.160.170.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10; Fri, 8 Sep 2017 16:51:52 +0000
Received: from BN1PR0201MB0833.namprd02.prod.outlook.com ([fe80::e977:bcad:88d8:bb9a]) by BN1PR0201MB0833.namprd02.prod.outlook.com ([fe80::e977:bcad:88d8:bb9a%14]) with mapi id 15.20.0013.022; Fri, 8 Sep 2017 16:51:52 +0000
From: Ing-Wher Chen <Ing-Wher_Chen@jabil.com>
To: "Acee Lindem (acee)" <acee@cisco.com>, "Benoit Claise (bclaise)" <bclaise@cisco.com>, Andy Bierman <andy@yumaworks.com>, Norm Strahle <nstrahle@juniper.net>
CC: "yang-doctors@ietf.org" <yang-doctors@ietf.org>, "Aseem Choudhary (asechoud)" <asechoud@cisco.com>
Thread-Topic: [yang-doctors] question regarding conditional/optional statements
Thread-Index: AdMWuspFVk5k9TDdRCeshA4HU2pVBgK3uz6QAcV3ttAAAafYgAACwMxQ
Date: Fri, 08 Sep 2017 16:51:52 +0000
Message-ID: <BN1PR0201MB08339B91D401B677EB5687C1C3950@BN1PR0201MB0833.namprd02.prod.outlook.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> <17685d4e-7c4b-d0c7-acae-c9732cd2e479@cisco.com> <BN1PR0201MB0833E5422B9C8B2B1949419AC3950@BN1PR0201MB0833.namprd02.prod.outlook.com> <D5D82DAB.C7068%acee@cisco.com>
In-Reply-To: <D5D82DAB.C7068%acee@cisco.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-dg-ref: PG1ldGE+PGF0IG5tPSJib2R5Lmh0bWwiIHA9ImM6XHVzZXJzXGljaGVuXGFwcGRhdGFccm9hbWluZ1wwOWQ4NDliNi0zMmQzLTRhNDAtODVlZS02Yjg0YmEyOWUzNWJcbXNnc1xtc2ctMDAzNjRmM2ItOTRiNi0xMWU3LTg3ZmMtMTg1ZTBmOWYwNmFhXGFtZS10ZXN0XDAwMzY0ZjNjLTk0YjYtMTFlNy04N2ZjLTE4NWUwZjlmMDZhYWJvZHkuaHRtbCIgc3o9IjIzOTI0IiB0PSIxMzE0OTM2MzEwOTA3OTA5ODEiIGg9ImtOWWdXaVVNRTlYTGJkUnIxTnFSUkhKVitIND0iIGlkPSIiIGJsPSIwIiBibz0iMSIvPjwvbWV0YT4=
authentication-results: spf=none (sender IP is ) smtp.mailfrom=Ing-Wher_Chen@jabil.com;
x-originating-ip: [98.191.72.170]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; BN1PR0201MB0817; 6:0OiUpK98/02qL+FkAzt4bm8j2i1uJvaaPhT8C3V4ta9kOSu8/F5tN4j/9FumJwFA+7izkPGx6NZ9NHfsNV3eVEkFZwo1RXgSgDr5D0caHW1VaWQbtR1nrlxw+9oFY3drxmlIoHEGadunrnAKihk7/ndo3L27BR5+f7vF97aF64VUwP4nVVasw7IY26TzzIG3Y5tE2YBjkQkMb52yn+oYGhEA8Qdr8SMKfTabgdTlzegCw3hpGenVukhf9yr1QUH6GYVTC/geQthi4Ye4GHy5RABiSCI39xpYnb3oEOsHs73bTOvtV0dY1wVURkWH+Uf+0t13TQNa8ZOOdVhnTcNgyw==; 5:TjVmGyQpTFP2Tht+iYC07vsCLjNzMY47NboaNwCbza8SD4ZXXNaPgXuu6OwamaY3HnWZXBeRgdFvpVvXR1kB0UP6jUwDSCCJ3bggYf2TkpQaFEXxEZ0naQneHVwT9mEmJYutbnZg+SiSA7/BsBKBX8ibv9WRheIFyxPikMEX9Gw=; 24:anBgRLTijHobgcHLTnZtSe/dBMGFE25MoWIlaVOXrnYm9lXYbPxP9yp0UsIFl8xb4vbJJ5vx69QvQfpk8qyUXot5chM+Tj8nDwwRk01CUGE=; 7:ztucfc1Ruy+nkms8YL7evUCbhl8m9VRk5IH6qESyq/9T0lAh6CrPZLZYI28BPp9N6X+JOEPXq2FP2x0GkGy9pdkZWUu4Ymh1WdTnRPby7ECxeygePvUgLFQRxxdaFaob8/nbdWELjKCnS2YZBPobGrfN6ye1G3llHwj4fESXKURyvlj45v1w4/wGO1VUzSBAhmfSZXw10igenIY1yg7RWgGHERNCUXKUtAuEbR4piDo=
x-ms-exchange-antispam-srfa-diagnostics: SSOS;
x-ms-office365-filtering-correlation-id: 2a9c0b06-2fb6-4653-30b9-08d4f6d9e7c7
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BN1PR0201MB0817;
x-ms-traffictypediagnostic: BN1PR0201MB0817:
x-exchange-antispam-report-test: UriScan:(158342451672863)(278428928389397)(138986009662008)(95692535739014)(21748063052155)(21534305686606);
x-microsoft-antispam-prvs: <BN1PR0201MB0817C9311F5348E639FFC950C3950@BN1PR0201MB0817.namprd02.prod.outlook.com>
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6041248)(20161123562025)(20161123558100)(20161123564025)(20161123560025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN1PR0201MB0817; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN1PR0201MB0817;
x-forefront-prvs: 04244E0DC5
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39860400002)(199003)(24454002)(377454003)(189002)(5250100002)(76176999)(86362001)(7696004)(966005)(54356999)(72206003)(50986999)(101416001)(7736002)(9326002)(53546010)(105586002)(606006)(8936002)(3660700001)(189998001)(14454004)(81166006)(81156014)(3280700002)(2906002)(8676002)(25786009)(4326008)(2900100001)(478600001)(106356001)(9686003)(102836003)(99286003)(53376002)(54896002)(8666007)(3846002)(6116002)(790700001)(55016002)(74316002)(2950100002)(93886005)(33656002)(53936002)(1941001)(229853002)(236005)(19609705001)(97736004)(6306002)(68736007)(54906002)(6436002)(6246003)(66066001)(5660300001)(6506006); DIR:OUT; SFP:1102; SCL:1; SRVR:BN1PR0201MB0817; H:BN1PR0201MB0833.namprd02.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en;
received-spf: None (protection.outlook.com: jabil.com does not designate permitted sender hosts)
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_BN1PR0201MB08339B91D401B677EB5687C1C3950BN1PR0201MB0833_"
MIME-Version: 1.0
X-OriginatorOrg: jabil.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Sep 2017 16:51:52.0509 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: bc876b21-f134-4c12-a265-8ed26b7f0f3b
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR0201MB0817
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/UbcNclSD2xrPcSn0dMDPgR4cZDQ>
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: Fri, 08 Sep 2017 16:51:59 -0000
Hi Acee, Option 5 is to let each implementation return the data it supports without any content declaration, from https://mailarchive.ietf.org/arch/msg/yang-doctors/UZBkI-VfhFndZVq8PP77AxajPIg . The model will define (optional) counters. An implementation returns the counters it supports, and skips the counters it doesn’t support. Thanks, Helen From: Acee Lindem (acee) [mailto:acee@cisco.com] Sent: Friday, September 8, 2017 11:22 AM To: Ing-Wher Chen <Ing-Wher_Chen@jabil.com>; Benoit Claise (bclaise) <bclaise@cisco.com>; Andy Bierman <andy@yumaworks.com>; Norm Strahle <nstrahle@juniper.net> Cc: yang-doctors@ietf.org; Aseem Choudhary (asechoud) <asechoud@cisco.com> Subject: Re: [yang-doctors] question regarding conditional/optional statements Hi Helen, Which is option 5? Thanks, Acee From: yang-doctors <yang-doctors-bounces@ietf.org<mailto:yang-doctors-bounces@ietf.org>> on behalf of Ing-Wher Chen <Ing-Wher_Chen@jabil.com<mailto:Ing-Wher_Chen@jabil.com>> Date: Friday, September 8, 2017 at 10:41 AM To: "Benoit Claise (bclaise)" <bclaise@cisco.com<mailto:bclaise@cisco.com>>, Andy Bierman <andy@yumaworks.com<mailto:andy@yumaworks.com>>, Norm Strahle <nstrahle@juniper.net<mailto:nstrahle@juniper.net>> Cc: YANG Doctors <yang-doctors@ietf.org<mailto:yang-doctors@ietf.org>>, "Aseem Choudhary (asechoud)" <asechoud@cisco.com<mailto:asechoud@cisco.com>> Subject: Re: [yang-doctors] question regarding conditional/optional statements Hi Benoit, We finally have a conclusion and plan to use option 5. Thank you to everyone who provided input. Thanks, Helen From: Benoit Claise [mailto:bclaise@cisco.com] Sent: Wednesday, August 30, 2017 10:10 AM To: Andy Bierman <andy@yumaworks.com<mailto:andy@yumaworks.com>>; Norm Strahle <nstrahle@juniper.net<mailto:nstrahle@juniper.net>> Cc: yang-doctors@ietf.org<mailto:yang-doctors@ietf.org>; Ing-Wher Chen <Ing-Wher_Chen@jabil.com<mailto:Ing-Wher_Chen@jabil.com>>; Aseem Choudhary (asechoud) <asechoud@cisco.com<mailto:asechoud@cisco.com>> Subject: Re: [yang-doctors] question regarding conditional/optional statements 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 like yangcatalog.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<mailto: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)