Re: [yang-doctors] question regarding conditional/optional statements

"Giles Heron (giheron)" <giheron@cisco.com> Thu, 17 August 2017 15:56 UTC

Return-Path: <giheron@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 A7F3F1321B8 for <yang-doctors@ietfa.amsl.com>; Thu, 17 Aug 2017 08:56:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.519
X-Spam-Level:
X-Spam-Status: No, score=-14.519 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, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=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 vnvlNppnXY_3 for <yang-doctors@ietfa.amsl.com>; Thu, 17 Aug 2017 08:56:04 -0700 (PDT)
Received: from alln-iport-3.cisco.com (alln-iport-3.cisco.com [173.37.142.90]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 68AB3132144 for <yang-doctors@ietf.org>; Thu, 17 Aug 2017 08:56:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=8278; q=dns/txt; s=iport; t=1502985364; x=1504194964; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version; bh=T3zij1/Xn/1Bg8EAdEvD35Xw+dL9sC6VfOOVWC9VZ00=; b=Idqv6gE/sevTB2nVo1O3NCtMqa3tlqOpuTcCbe2BNsdbvxSIQeTufRfG IF5QcXqKxHeNm3BceAatnMguOSqmRt+zd0IcoJ8MgLe2aBUChHVTV8dgO Y6nB8YM61EdRaQrKj+d9Ol/D0AfGYKym8vp1cFUsuECRsNGbLmJfJgSSh s=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0BMAQDmu5VZ/5tdJa1cGgEBAQECAQEBAQgBAQEBgm9rZIEVB44LkBGEXo10hTeCEiiFHwIahD4/GAECAQEBAQEBAWsohRkGI1YQAgEIPwMCAgIwFBECBA4FiUxkqh+CJotfAQEBAQEBAQEBAQEBAQEBAQEBAQEBHYMoggKBTIIOgnyFMYJVMIISHwWgSQKHUoxuDIJdj3OWHAEfOIEKdxVbAYcHdodjKoEIgQ8BAQE
X-IronPort-AV: E=Sophos;i="5.41,388,1498521600"; d="scan'208,217";a="472453443"
Received: from rcdn-core-4.cisco.com ([173.37.93.155]) by alln-iport-3.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Aug 2017 15:56:03 +0000
Received: from XCH-RTP-001.cisco.com (xch-rtp-001.cisco.com [64.101.220.141]) by rcdn-core-4.cisco.com (8.14.5/8.14.5) with ESMTP id v7HFu3fG012322 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Thu, 17 Aug 2017 15:56:03 GMT
Received: from xch-rtp-019.cisco.com (64.101.220.159) by XCH-RTP-001.cisco.com (64.101.220.141) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Thu, 17 Aug 2017 11:56:02 -0400
Received: from xch-rtp-019.cisco.com ([64.101.220.159]) by XCH-RTP-019.cisco.com ([64.101.220.159]) with mapi id 15.00.1210.000; Thu, 17 Aug 2017 11:56:02 -0400
From: "Giles Heron (giheron)" <giheron@cisco.com>
To: Jan Lindblad <janl@tail-f.com>
CC: Andy Bierman <andy@yumaworks.com>, "yang-doctors@ietf.org" <yang-doctors@ietf.org>, Ing-Wher Chen <Ing-Wher_Chen@jabil.com>, Norm Strahle <nstrahle@juniper.net>, "Aseem Choudhary (asechoud)" <asechoud@cisco.com>
Thread-Topic: [yang-doctors] question regarding conditional/optional statements
Thread-Index: AdMWuspFVk5k9TDdRCeshA4HU2pVBgAfV2wAAAZRrAAAAQt5gAAFESYAAAIrXoAAAUHdgAAF/LyAAACeGgAAADYXgA==
Date: Thu, 17 Aug 2017 15:56:02 +0000
Message-ID: <E180B2C6-3E5F-43A9-9A20-E7D056D2E23D@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>
In-Reply-To: <36E052B8-9028-4EE6-A393-F68EA3EF926B@tail-f.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-exchange-messagesentrepresentingtype: 1
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [10.60.71.148]
Content-Type: multipart/alternative; boundary="_000_E180B2C63E5F43A99A20E7D056D2E23Dciscocom_"
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/s3X6cWRNuqkuXdHKtujLS7zn98A>
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: Thu, 17 Aug 2017 15:56:06 -0000

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.

Giles