Re: [netmod] regarding draft-bierman-netmod-yang-data-ext-00

Kent Watsen <kwatsen@juniper.net> Sat, 02 September 2017 16:59 UTC

Return-Path: <kwatsen@juniper.net>
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 E9B68132FD6 for <netmod@ietfa.amsl.com>; Sat, 2 Sep 2017 09:59:31 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.021
X-Spam-Level:
X-Spam-Status: No, score=-2.021 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, 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 bT5Bu5yxs0kv for <netmod@ietfa.amsl.com>; Sat, 2 Sep 2017 09:59:30 -0700 (PDT)
Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0134.outbound.protection.outlook.com [104.47.37.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 DFE03132FAC for <netmod@ietf.org>; Sat, 2 Sep 2017 09:59:29 -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=UDMIZUggPl2h6J0QFLFV8hko8J5z6Ifeoil4vPbETVA=; b=CrPhB6mDPP3J35dEjnHXaY2yZSbBdDVDZ9WgQzBf2/A2yJNl4PfygiEXAeX3WOz2Ktvufr1i1kjJyK4l0+Hm3SUvxh09Az0Sr28tT39nTexL2xdN1YJbkjPw7T5WWK4mTAcnJBbyS/NUsYKG3c3onT2RA0PQlaO4XEsBANU717U=
Received: from BN3PR0501MB1442.namprd05.prod.outlook.com (10.160.117.151) by BN3PR0501MB1236.namprd05.prod.outlook.com (10.160.183.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.35.3; Sat, 2 Sep 2017 16:59:27 +0000
Received: from BN3PR0501MB1442.namprd05.prod.outlook.com ([10.160.117.151]) by BN3PR0501MB1442.namprd05.prod.outlook.com ([10.160.117.151]) with mapi id 15.20.0035.006; Sat, 2 Sep 2017 16:59:27 +0000
From: Kent Watsen <kwatsen@juniper.net>
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
CC: Andy Bierman <andy@yumaworks.com>, "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: [netmod] regarding draft-bierman-netmod-yang-data-ext-00
Thread-Index: AQHTIz66ZM/zAubP+UmCwbr4E6YP36KgO1WA///OrQCAAEdAgP//1FYAgABdHoCAAQ1oAA==
Date: Sat, 02 Sep 2017 16:59:27 +0000
Message-ID: <B20865BF-F5A7-4772-A7A5-45CEA6ADD1CE@juniper.net>
References: <57AA997C-6E52-49D2-B6AF-7DDE8F13D7B3@juniper.net> <CABCOCHSA_dqNwy=xj4vj8bCHKaJhisx0qCccYCyyBdLWXeW2Rw@mail.gmail.com> <56D58AA8-E71E-4CA1-B81E-70E2EDD94E91@juniper.net> <CABCOCHShmLL03Z7H=ZAFFj9N+=qqDjHttprR-_ev6i+0g21iJQ@mail.gmail.com> <E4E11358-9E08-415E-ADBC-B4F3A2F81AE7@juniper.net> <20170901205511.3hgalynjpur2gjqf@elstar.local>
In-Reply-To: <20170901205511.3hgalynjpur2gjqf@elstar.local>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/f.20.0.170309
x-originating-ip: [66.129.241.10]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; BN3PR0501MB1236; 6:2Rk8z1IluZ3w2mnWuxOOM1j0cCMzD0H/Vobx40C0vfpD99GywhdGsEqryKN8fG5+ATjeuhZR5bl85uWQWxioM/vDPPXRbxh+GHsKrIHAfR0h/1GGrlp7XZB8Nr/AQ3mB7cJrBMB+oTwTA76yxexrqTR10TMatU/sVRjLZ5/YiRX5nY8Rwy83uZyA8yB3nJgw0f6qxPqR+mna3ZUD1XvhHk70Zs93IIaqP+zT2W4RpJZKBlOPIfOfvGBIE5JHExeNK6f8UmYXkyuG4fqkgQPPqtDAVP/3DlwIelEB1IWn2HYyBswnWh9QNsYtAGcvYsvcuCZz204XlQyrHm9g8yOQJA==; 5:2jqxfFaMei05LXoUWZrGU79RWxLnsYj8MQXOAIowXPXS9ca3UpU6DWIf6Okn9nma2QmltRX0k82lLEBBTX8K6WQSdDkjDs8MxAHTXb3ZRdlYUhReZD7fLG8ZlT+Vrs2FKRC3tMOtDTuic4cCESlIfw==; 24:aO7dj16GLxuSCWMg8sW0hhGAjspvGpbhVaQg+50Z2ak9N0Ax4O/hBP+QpaZf5BwxeMvlQ/sw7yHIImzdydPO87Vm3l4s+7vvpLhM4LJd3s0=; 7:ssuIlEimXB//odh6RZXAQfEEZphdrLdkwxGNRsWYdZfBkbC0oYTD49UgNG3SjMyHx02/45JLc5IT50Ajb1e3S6Rq9hAxhyTxd50jqgO5AXuJW4N8cnq+Ai9Tr2yXuLV3hz1uIroWlxuYLammHdJ9SWAhEZE9K0CP96tOmBdhROhYpGbeiiVEFXFWcuFx6i35J0o5JcIHjL6ePIH6BlzFWVJFiHIKj1oGk8HlAe84iqE=
x-ms-exchange-antispam-srfa-diagnostics: SSOS;
x-ms-office365-filtering-correlation-id: ba244d3b-2c4a-4748-1c08-08d4f223f893
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:BN3PR0501MB1236;
x-ms-traffictypediagnostic: BN3PR0501MB1236:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=kwatsen@juniper.net;
x-exchange-antispam-report-test: UriScan:;
x-microsoft-antispam-prvs: <BN3PR0501MB123678D34C04495F79E8701FA5930@BN3PR0501MB1236.namprd05.prod.outlook.com>
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(100000703101)(100105400095)(6055026)(6041248)(20161123558100)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123555025)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN3PR0501MB1236; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN3PR0501MB1236;
x-forefront-prvs: 04180B6720
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(39860400002)(189002)(199003)(83506001)(102836003)(86362001)(81166006)(81156014)(8676002)(6512007)(68736007)(53936002)(14454004)(6486002)(36756003)(189998001)(105586002)(106356001)(7736002)(305945005)(6916009)(99286003)(6436002)(6116002)(77096006)(8936002)(110136004)(3280700002)(83716003)(4001350100001)(3846002)(478600001)(3660700001)(229853002)(2950100002)(54906002)(6246003)(2900100001)(2906002)(82746002)(97736004)(6506006)(5660300001)(230783001)(33656002)(76176999)(4326008)(66066001)(50986999)(54356999)(25786009)(101416001)(93886005); DIR:OUT; SFP:1102; SCL:1; SRVR:BN3PR0501MB1236; H:BN3PR0501MB1442.namprd05.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en;
received-spf: None (protection.outlook.com: juniper.net does not designate permitted sender hosts)
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="utf-8"
Content-ID: <72E1A7CB568DE34A96D1A393DB6501A9@namprd05.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: juniper.net
X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Sep 2017 16:59:27.3156 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: bea78b3c-4cdb-4130-854a-1d193232e5f4
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0501MB1236
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/bCRQR2C6sJEWiAUWEmcffpmJofw>
Subject: Re: [netmod] regarding draft-bierman-netmod-yang-data-ext-00
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: Sat, 02 Sep 2017 16:59:32 -0000


>> Gotcha.  What do other people think, would a "uses-yang-data"
>> statement be generally more useful?
>
> But does this mean we also do uses-yang-container, uses-yang-list,
> uses-yang-xyz to other definitions as well? I do not think this is
> desirable and why would yang-data be any different?


Oh, no.  I view yang-data as a body-stmt, not a data-def-stmt,
akin to 'rpc' and 'notification'.  But back to the draft's 
proposed solution, I understand that augment-stmt is a top-level 
body-stmt, but it's also a uses-stmt, and in that context, it is
a sibling to the refine-stmt.  Already ANIMA has a need to both
augment and refine a yang-data defined structure.  To me, a
'uses-yang-data' statement seems just one step more general than
a 'augment-yang-data' statement.

Specially, if we were updating YANG:

   // just added last entry
   body-stmts          = *(extension-stmt /
                           feature-stmt /
                           identity-stmt /
                           typedef-stmt /
                           grouping-stmt /
                           data-def-stmt /
                           augment-stmt /
                           rpc-stmt /
                           notification-stmt /
                           deviation-stmt /
                           yang-data-stmt)

   // something like this?
   yang-data-stmt            = yang-data-keyword sep identifier-arg-str optsep
                         (";" /
                          "{" stmtsep
                              ;; these stmts can appear in any order
                              [status-stmt]
                              [description-stmt]
                              [reference-stmt]
                              *(typedef-stmt / yang-data-grouping-stmt)
                              *data-def-stmt
                              [uses-yang-data-stmt]
                          "}") stmtsep

   // like 'uses-stmt', but with a different keyword
   uses-yang-data-stmt       = uses-yang-data-keyword sep identifier-ref-arg-str optsep
                         (";" /
                          "{" stmtsep
                              ;; these stmts can appear in any order
                              [when-stmt]
                              *if-feature-stmt
                              [status-stmt]
                              [description-stmt]
                              [reference-stmt]
                              *refine-stmt
                              *uses-augment-stmt
                          "}") stmtsep

   // like 'grouping-stmt', but with 'action' and 'notification' removed
   yang-data-grouping-stmt       = yang-data-grouping-keyword sep identifier-arg-str optsep
                         (";" /
                          "{" stmtsep
                              ;; these stmts can appear in any order
                              [status-stmt]
                              [description-stmt]
                              [reference-stmt]
                              *(typedef-stmt / yang-data-grouping-stmt)
                              *data-def-stmt
                          "}") stmtsep


   yang-data-keyword              = %s"yang-data"
   uses-yang-data-keyword         = %s"uses-yang-data"
   yang-data-grouping-keyword     = %s"yang-data-grouping"


How close to this can we get using an extension statement, so that a
future adoption to YANG will be as seamless as possible?

K.