Re: [netmod] Request to review the YANG compiler annotations draft.

Jan Lindblad <janl@tail-f.com> Mon, 04 July 2016 09:41 UTC

Return-Path: <janl@tail-f.com>
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 A5B8312D0C9 for <netmod@ietfa.amsl.com>; Mon, 4 Jul 2016 02:41:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.326
X-Spam-Level:
X-Spam-Status: No, score=-3.326 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RP_MATCHES_RCVD=-1.426, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 axQQ8OwTHbgT for <netmod@ietfa.amsl.com>; Mon, 4 Jul 2016 02:41:07 -0700 (PDT)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id BD77412D0C2 for <netmod@ietf.org>; Mon, 4 Jul 2016 02:41:07 -0700 (PDT)
Received: from [10.147.40.74] (unknown [173.38.220.42]) by mail.tail-f.com (Postfix) with ESMTPSA id AE2CA1AE0352; Mon, 4 Jul 2016 11:41:05 +0200 (CEST)
Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\))
Content-Type: multipart/signed; boundary="Apple-Mail=_84DB551E-39D2-48D2-A120-0FD0CBA34BF9"; protocol="application/pgp-signature"; micalg="pgp-sha512"
X-Pgp-Agent: GPGMail 2.6b2
From: Jan Lindblad <janl@tail-f.com>
In-Reply-To: <CAJtQF=nrmRLqhtjhTvXNCB0f5GMDUD98GkGToJT+eFyka7uozg@mail.gmail.com>
Date: Mon, 04 Jul 2016 11:41:04 +0200
Message-Id: <7E403B20-86AD-418A-91CC-8A366935A666@tail-f.com>
References: <25452548.1467414626550.JavaMail.wam@elwamui-little.atl.sa.earthlink.net> <CABCOCHQxMVtVzj99QKD89LTWwpdAk72dArMuS5VHw2EpZ17Mqw@mail.gmail.com> <CAJtQF=nrmRLqhtjhTvXNCB0f5GMDUD98GkGToJT+eFyka7uozg@mail.gmail.com>
To: Vinod Kumar <vinods.kumar@gmail.com>
X-Mailer: Apple Mail (2.3124)
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/WbTHXODK2nV2F7bKyOML9K9ZDQ4>
Cc: Randy Presuhn <randy_presuhn@mindspring.com>, netmod@ietf.org
Subject: Re: [netmod] Request to review the YANG compiler annotations draft.
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.17
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: Mon, 04 Jul 2016 09:41:10 -0000

Vinod,

I would think that different implementations would want to choose their own values for the implementation details below, so this sort of information should definitely not be part of the standard YANG modules. Being able to provide this sort of information as annotations in YANG, however, is often very useful. Many projects do.

The standard YANG extension keyword already allows this practice, so if you just replace the equals sign below "=" with space " ", this would already be valid YANG and presumably useful for your implementation, assuming you declare your extensions properly.

I don't see any need to change or extend YANG for your use case.

/jan

> Views on received suggestions/comments
> We accept the mechanism of decorating YANG modules/submodules with annotations is NOT a correct approach, as pointed out, there are maintenance issues.
> As suggested, we can choose one of the alternative which defines the annotations in separate module/sub-module. For Example: similar to augment, we can use the compiler-annotation extension to have an argument, which identifies the target node which is being annotated.
> ca:compiler-annotation /candidate-servers/server{
>   ca:app-data-structure{
>     ca:data-structure="map";
>     ca:key="name";
>   }
>   ca:app-derived{
>     ca:extended-name="special-server";
>   }
> }


--
Jan Lindblad, janl@tail-f.com, +46 702855728
Solutions Architect/Business Development, Tail-f
Tail-f is now a part of Cisco