Re: [netmod] Request to review the YANG compiler annotations draft.
Andy Bierman <andy@yumaworks.com> Fri, 01 July 2016 14:26 UTC
Return-Path: <andy@yumaworks.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 BF11D12D133 for <netmod@ietfa.amsl.com>; Fri, 1 Jul 2016 07:26:27 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.6
X-Spam-Level:
X-Spam-Status: No, score=-2.6 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_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks-com.20150623.gappssmtp.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 rAFepD69ZKme for <netmod@ietfa.amsl.com>; Fri, 1 Jul 2016 07:26:25 -0700 (PDT)
Received: from mail-vk0-x235.google.com (mail-vk0-x235.google.com [IPv6:2607:f8b0:400c:c05::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3DE3112D0A2 for <netmod@ietf.org>; Fri, 1 Jul 2016 07:26:25 -0700 (PDT)
Received: by mail-vk0-x235.google.com with SMTP id m127so95562964vkb.3 for <netmod@ietf.org>; Fri, 01 Jul 2016 07:26:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=cN9TFwq063qKi7Kcf1fn/5wQB7BqeYuLV2tUlqD7qX4=; b=Dqwq41UBHV3uCONSWg+PE1s3uJqtyU48571xgoYEj2Z5gI3v7RKl5etnIahmTSIdMB znZzkIyYahpmJrvjxF+UXGyRfWgYP4YNOGkxxOTKUcH0s3nSJZQ7XHKVgwsmdHyvhbGz Z4gbNNt4x6hKXcGbNLXgxl0Ayg3CoHaTvsO/CynBtSgw/it/xGdG9cOuKTV228JiTiz2 86hjfcEJayS/CJJOxrqOe5Uk8YoQKv3lLK4ws5jHWf2QVCWlkV5ER8vmXqyp6SUdNC42 mhS7g1flTwSV/uIcmlb/yntgs9isGGS2+s4lspMAe6HqtP65XPWOE19ZKDPa0UsNlUu/ iVag==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=cN9TFwq063qKi7Kcf1fn/5wQB7BqeYuLV2tUlqD7qX4=; b=jtCFMl5X7JdjSxScWcivDPdx3QlYoZzkTyoe3e5M6HUc0Eshfo6dijT0HIpSQ4DQRN yEarOVMaQuO2hrKo6pNwa/7fb7i7RoTD5JZrw8Nn/j/CXakYcQagnGH8+09SlbYqRD5v berDuHeyJryITRZYKfKCmfsOcsAwuUz7NL8zCfdHaRSOAALXoqR5+Y3ttKhIC2mLYYb2 WkskTwbzltqI7eqEf1UlAgRIfJgofaghrqDTpRXnFvqAWP5ix6l0N/C2Vu1TkTdSnMrm dV21vXRJi4ZYcPjq14jeIuAZBAKy8bC+YSOWMZ1jliXBCrVBI4YjEobLoEMQwhVrhNe3 UmHg==
X-Gm-Message-State: ALyK8tL+REpKuQagGUgrLLSo6ZTTVSZzbzKt8VhCUkiqXA4pShAuMfhYji1r/hmf5MxHhRU+LfpTQTF9CJQKHg==
X-Received: by 10.31.108.216 with SMTP id j85mr9484080vki.68.1467383184279; Fri, 01 Jul 2016 07:26:24 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.103.20.2 with HTTP; Fri, 1 Jul 2016 07:26:23 -0700 (PDT)
In-Reply-To: <CAJtQF==TCE1cyGqngJqW8PXpFqKp1iukoC8MQsSJzh9Daerpaw@mail.gmail.com>
References: <20160701.104034.227190528657031397.mbj@tail-f.com> <CAJtQF==TCE1cyGqngJqW8PXpFqKp1iukoC8MQsSJzh9Daerpaw@mail.gmail.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Fri, 01 Jul 2016 07:26:23 -0700
Message-ID: <CABCOCHT+c7HTXNNPgeD8yqwX6NOxj0Bj1uoMf=wuH1w8HWdDvw@mail.gmail.com>
To: Vinod Kumar <vinods.kumar@gmail.com>
Content-Type: multipart/alternative; boundary="001a11478f3472e597053693c5e4"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/7Z2FJQseY4QCZX77LHPjgP33BGk>
Cc: "vinods.kumar@huawei.com" <vinods.kumar@huawei.com>, "Anil Kumar S N (VRP Network BL)" <anil.sn@huawei.com>, Gaurav Agarwal <gauravjbp3ster@gmail.com>, "netmod@ietf.org" <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: Fri, 01 Jul 2016 14:26:28 -0000
On Fri, Jul 1, 2016 at 6:21 AM, Vinod Kumar <vinods.kumar@gmail.com> wrote: > Dear Martin, > > Thanks for your valuable comments. > > Initially we also wanted to define them as individual extensions and > use them in the YANG file as indicated by you. > > Below are some reasons, which compelled us to add them as a separate > annotations(metadata) in YANG file. > > - These extensions are not required while defining the schema, it is > only required while implementing a schema in a server or client. It is used > by applications to instruct the YANG utilities or compilers to automate the > application development related to data organization / processing. > - These extension are of internal scope, and should be masked while > server advertises its schema resources. > - These extension values for a given YANG file may not match in server > and client. > > We felt that annotating is a good option, similar to other languages > where-in by looking at annotation itself utilities/compilers can perform > additional functionality as instructed. > > As you have pointed out, it is not a valid YANG 1.0, so we can modify > it as extensions to be compatible. > > We feel that annotation (compiler) support in YANG is an important > requirement which needs to be standardized for all compiler implementation, > hence we believe there is a need to incorporate annotations in YANG 2.0. > > I read your drafts as well. I strongly disagree that we need standard annotations for something as implementation-specific as code generation. This is way out of scope for the IETF. > Looking forward for your opinion/feedback. > > Thanks and Regards, > Vinod Kumar S. > Andy > > On Fri, Jul 1, 2016 at 2:10 PM, Martin Bjorklund <mbj@tail-f.com> wrote: > >> "vinods.kumar" <vinods.kumar@huawei.com> wrote: >> > Dear All, >> > >> > We have written a draft, to add annotation in YANG definition which >> can >> > be used by the YANG compilers. >> > >> > We are implementing these drafts as a reference implementation in the >> IETF >> > 96 hackathon on ONOS YANG utilities. >> > >> > Request you to review the below drafts and provide your >> comments/feedback. >> > >> > Draft(s): >> > >> https://datatracker.ietf.org/doc/draft-agv-netmod-yang-compiler-metadata/ >> > >> > >> > >> https://datatracker.ietf.org/doc/draft-agv-netmod-yang-annotation-ds-and-der >> > ived/ >> >> I have looked at these drafts. I have two high-level comments. >> >> 1) What you propose is not valid YANG. This new syntax would >> require a new version of the YANG language. >> >> 2) What you propose is not necessary; it can be done (and is being >> done in several existing implementations) with current YANG >> syntax and semantics, with normal YANG extension statements. >> >> For example, the draft proposes this: >> >> list server { >> ca:compiler-annotation{ >> @MappedCollection(collection-type='map', map-key='name') >> @OverrideImpl('DefaultServer'); >> } >> ... >> >> It can be done today as: >> >> list server { >> xx:mapped-collection { >> xx:collection-type map; >> xx:map-key name; >> } >> xx:override-impl DefaultServer; >> ... >> >> >> /martin >> >> _______________________________________________ >> netmod mailing list >> netmod@ietf.org >> https://www.ietf.org/mailman/listinfo/netmod >> > > > _______________________________________________ > netmod mailing list > netmod@ietf.org > https://www.ietf.org/mailman/listinfo/netmod > >
- Re: [netmod] Request to review the YANG compiler … Dale R. Worley
- Re: [netmod] Request to review the YANG compiler … Jan Lindblad
- Re: [netmod] Request to review the YANG compiler … Juergen Schoenwaelder
- Re: [netmod] Request to review the YANG compiler … Vinod Kumar
- Re: [netmod] Request to review the YANG compiler … Randy Presuhn
- Re: [netmod] Request to review the YANG compiler … Andy Bierman
- Re: [netmod] Request to review the YANG compiler … Vinod Kumar
- Re: [netmod] Request to review the YANG compiler … Martin Bjorklund
- [netmod] Request to review the YANG compiler anno… vinods.kumar
- Re: [netmod] Request to review the YANG compiler … Andy Bierman