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

Norm Strahle <nstrahle@juniper.net> Fri, 18 August 2017 12:59 UTC

Return-Path: <nstrahle@juniper.net>
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 A144013235B for <yang-doctors@ietfa.amsl.com>; Fri, 18 Aug 2017 05:59:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.02
X-Spam-Level:
X-Spam-Status: No, score=-2.02 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_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=juniper.net
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 58cq8oMbvNnD for <yang-doctors@ietfa.amsl.com>; Fri, 18 Aug 2017 05:59:14 -0700 (PDT)
Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0122.outbound.protection.outlook.com [104.47.36.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 475CE132026 for <yang-doctors@ietf.org>; Fri, 18 Aug 2017 05:59:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=oqkluC5IPRZ1w+BBtegSDZTspb5W4IIC3eFLytePBwI=; b=YNso2W3wPehI4GdrKm7tXrOBDV5URxC7VO5beE3S7iXUbSMay0fplDhtICvk9b9KrFUF7W33QsW3GI3TN9u7DvMAQxRVRgDTvdDxdeD3CGlyJWXzhiTY5kkHmk2nP5ZLOL/W89gOadjgluZkEcjnAnD12Pun3HL+Ym7sbixj0nI=
Received: from DM2PR0501MB1502.namprd05.prod.outlook.com (10.161.224.22) by DM2PR0501MB1373.namprd05.prod.outlook.com (10.160.130.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1385.4; Fri, 18 Aug 2017 12:59:11 +0000
Received: from DM2PR0501MB1502.namprd05.prod.outlook.com ([fe80::c930:96bd:8332:8e62]) by DM2PR0501MB1502.namprd05.prod.outlook.com ([fe80::c930:96bd:8332:8e62%18]) with mapi id 15.01.1385.003; Fri, 18 Aug 2017 12:59:10 +0000
From: Norm Strahle <nstrahle@juniper.net>
To: Andy Bierman <andy@yumaworks.com>, Kent Watsen <kwatsen@juniper.net>
CC: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>, Jan Lindblad <janl@tail-f.com>, "yang-doctors@ietf.org" <yang-doctors@ietf.org>, Ing-Wher Chen <Ing-Wher_Chen@jabil.com>, "Aseem Choudhary (asechoud)" <asechoud@cisco.com>
Thread-Topic: [yang-doctors] question regarding conditional/optional statements
Thread-Index: AdMWuspFVk5k9TDdRCeshA4HU2pVBgAW9agAAAZRqwAAAQt6gAAL2xKAAAn7ZgAAJSDmQA==
Date: Fri, 18 Aug 2017 12:59:10 +0000
Message-ID: <DM2PR0501MB15024D3A6AA8F654C1C7B418CF800@DM2PR0501MB1502.namprd05.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> <DC062E7E-7422-4037-82E4-52B17422B33E@juniper.net> <CABCOCHQJOBXrYLntdg_7iL3wqy9Fkcd10f0ArwPJUNKo9dZAVQ@mail.gmail.com>
In-Reply-To: <CABCOCHQJOBXrYLntdg_7iL3wqy9Fkcd10f0ArwPJUNKo9dZAVQ@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=nstrahle@juniper.net;
x-originating-ip: [66.129.241.10]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; DM2PR0501MB1373; 6:mnRS7U7l4oezmPfLZjV97YrilMYQn+0ubOJlS0+E63y/214pkyIpqXaKkpSF+bl2FIdg4MtOS++AyteMN9XfElhJ3ZZEGg4e7iqh06Qqk0Zx5TN1J6FBsLBJwMMuVYaA7kXyHebkBtnmR82Q/B/rVyLs4patjIC+cVu55nAluQ3sbA8zhPQXQf4jys1RkBsaH6jWFamAps7JLJiF9vA4zFIMR+VFTvY44VevjFRQqtebU5IhHaL7+Y7O6Mr/GLiBWnnCSseIB5txEJYIrJ/tvxaBQTbVdrPSH9WfuW3grp7VrM1sRUGv/jT8VAbGuCxZy5L5Y0yWi5oE0gtd6vOlog==; 5:inBcJmR0cKYwfcDZD36Q2CGOORA4h3g/dUP0pisQz9BWpFtumQEJnRYt3OSx/a9MZ5ijuRGYBB3KhlbXYo51NSPR//QxIT8XmKKIiRaV9OAy2LqcONRJUWLuE/NBK8omEpoYbRKRxAc9ZIxnV6HUqg==; 24:QLtJPVis+1BR2HwplGkl4MwMULsOdpeVwNQGaE8Yu66sUgRuxWQRmQaB9K8ZTwvO3U79/AYe+fUY9AJj0n7N0spW7tCmV8qx58pnrUzXp/0=; 7:ft+cxZOrWiwaF6ElMf1fs3V55i2RYwvm/7qCH/xseDgFh0nQHUPnswtYK5KyUUcS2NQPNBixE4jrJ4/Q54z3O00sh4LjEgkPHxWklOS+pU+0pqCvo+cP2YidN+OUVoKRq2MSMaifDpuLIPQTR+m32ul2uAoMqOv0V6OECP0uQsjAHR5wE0GuQzvS5RbTtenon/Xo9kEDH8+6UGw2Qkt/BV2E6veJxFGp+XMTZO2jVc0=
x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR;
x-forefront-antispam-report: SFV:SKI; SCL:-1; SFV:NSPM; SFS:(10019020)(39860400002)(377454003)(24454002)(189002)(199003)(6436002)(189998001)(66066001)(966005)(68736007)(81166006)(8676002)(8936002)(81156014)(6636002)(2950100002)(2900100001)(14454004)(1941001)(19609705001)(93886005)(97736004)(6506006)(105586002)(101416001)(5250100002)(790700001)(6246003)(2906002)(3846002)(74316002)(102836003)(6116002)(99286003)(236005)(54906002)(55016002)(3280700002)(7696004)(54896002)(6306002)(3660700001)(4326008)(53546010)(86362001)(606006)(7736002)(229853002)(25786009)(50986999)(478600001)(9686003)(106356001)(5660300001)(33656002)(76176999)(54356999)(53936002); DIR:OUT; SFP:1102; SCL:1; SRVR:DM2PR0501MB1373; H:DM2PR0501MB1502.namprd05.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en;
x-ms-office365-filtering-correlation-id: f79760ae-9f63-45e5-6aa5-08d4e638eb47
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(48565401081)(2017052603031)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:DM2PR0501MB1373;
x-ms-traffictypediagnostic: DM2PR0501MB1373:
x-exchange-antispam-report-test: UriScan:(190756311086443)(158342451672863)(138986009662008)(95692535739014)(21748063052155)(21534305686606);
x-microsoft-antispam-prvs: <DM2PR0501MB1373859BB2747E3CD317651FCF800@DM2PR0501MB1373.namprd05.prod.outlook.com>
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(3002001)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(6055026)(6041248)(20161123555025)(20161123558100)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM2PR0501MB1373; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM2PR0501MB1373;
x-forefront-prvs: 040359335D
received-spf: None (protection.outlook.com: juniper.net does not designate permitted sender hosts)
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_DM2PR0501MB15024D3A6AA8F654C1C7B418CF800DM2PR0501MB1502_"
MIME-Version: 1.0
X-OriginatorOrg: juniper.net
X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Aug 2017 12:59:10.5340 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: bea78b3c-4cdb-4130-854a-1d193232e5f4
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0501MB1373
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/Z7LpbzThygrsWP1NPix1GMNm0pY>
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, 18 Aug 2017 12:59:18 -0000

Hey folks, Appreciate all the feedback.  We discussed yesterday among diffserv-ietf modelers yesterday and had a couple comments:


·       We liked explicit statements (deviations, features, flag-bits) rather than implicit – i.e. option 5 – of vendors leaving unsupported leaves out of containers

·       We think if-features or the “bit” flag mechanism are better than deviations, as it at least allows clients to anticipate up front that some items may not be supported.

·       One advantage of using the “bit” flag mechanism – i.e. option 2 - over features is that this allows a vendor to specify per-interface what is supported.  What features a vendor supports for diffserv is very hardware dependent and may vary from interface to interface within a single device. A device may have multiple types and generations of line cards, and thus, the types of stats supported will be different. The bit-flag mechanism allows a device to reflect that to the client explicitly.

Thoughts on all the above are much appreciated.
Thanks,
Norm

From: Andy Bierman [mailto:andy@yumaworks.com]
Sent: Thursday, August 17, 2017 3:03 PM
To: Kent Watsen <kwatsen@juniper.net>
Cc: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>; Jan Lindblad <janl@tail-f.com>; yang-doctors@ietf.org; Ing-Wher Chen <Ing-Wher_Chen@jabil.com>; Norm Strahle <nstrahle@juniper.net>; Aseem Choudhary (asechoud) <asechoud@cisco.com>
Subject: Re: [yang-doctors] question regarding conditional/optional statements



On Thu, Aug 17, 2017 at 11:17 AM, Kent Watsen <kwatsen@juniper.net<mailto:kwatsen@juniper.net>> wrote:



> I believe a feature for every counter is a misuse of YANG feature
> statements, it will get horribly ugly. I recently observe an increase
> of feature statement usage in order to accomodate server
> implementations and the ultimate solution is a feature statement for
> every leaf, list, rpc, action, notification and perhaps even certain
> value sets. This is ridiculous, but a feature for every counter is
> getting damn close to it.

This is a programmatic API.  I appreciate the concern for a bloat of
bits on the wire, but recall that features are listed in yang-library,
a very special module that has a built-in ETag-like hashing mechanism
to allow for efficient comparisons.  I don't see the bloat issue here.

Having feature statements everywhere may be ridiculous, but not illegal.
Implementations need to be able to handle it already, right?

good points.
They all apply equally to deviations and features.

I think the way you used features in the client-server set of modules is a good example
for solving this sort of problem.  The if-feature-stmts are on containers, not
individual leafs.

I don't think special objects that return which other objects are implemented
is good because it is not a generalized solution.  A better approach would be
to enhance the protocols so "not-implemented" and "temp-unavailable" exceptions
can be returned on request (ala with-defaults)


Kent


Andy

_______________________________________________
yang-doctors mailing list
yang-doctors@ietf.org<mailto:yang-doctors@ietf.org>
https://www.ietf.org/mailman/listinfo/yang-doctors