Re: [netmod] Request to review the YANG compiler annotations draft.
Andy Bierman <andy@yumaworks.com> Fri, 01 July 2016 23:53 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 D573112D74A for <netmod@ietfa.amsl.com>; Fri, 1 Jul 2016 16:53:33 -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 BarDobZojOXj for <netmod@ietfa.amsl.com>; Fri, 1 Jul 2016 16:53:31 -0700 (PDT)
Received: from mail-vk0-x234.google.com (mail-vk0-x234.google.com [IPv6:2607:f8b0:400c:c05::234]) (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 E915A12D73E for <netmod@ietf.org>; Fri, 1 Jul 2016 16:53:30 -0700 (PDT)
Received: by mail-vk0-x234.google.com with SMTP id m127so112336897vkb.3 for <netmod@ietf.org>; Fri, 01 Jul 2016 16:53:30 -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=C0EM3C8e3FdKDtPumlHT31SMRGwM+GU/7itfCx7DFhw=; b=cmjVc4OKGWNGx5ef4KnMTbQDaUzikZ2LqWOP6qVTmm6ofbPvKzGdVeL9zB8cxjt1rH g7+pzIveMdUYyXx7CaTLlL081UlEDfOuTobchwLKcRNEsX4CF91GtkAsFK9yvQZdUTAT 4w/av/48kLJulXQ18r76VrCTzgWaVy4YyJUaPaV0HgLpgDZbYBZev/62xXGYfOwQDOhn OeJLUZYIjdry8r/PAcg2I+TbbasbRrBFhvKhQ9BkEEwF5jQqWNGodZ9FcRqKnmAdl0Q/ 8KTyLqpKrpjgFaBjPumu5g18m9WN2THSaEBvP/DpLwfHrI57mE1HvpjmpJErJzkG1ymV VktA==
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=C0EM3C8e3FdKDtPumlHT31SMRGwM+GU/7itfCx7DFhw=; b=j4zM0eUyiehKlJ8T1RLxi77wavj4iKvrcDDP1+aC/4hS129gqhodKAk1RA1kPVkTOX ygHdQAdK+6Lu11dTP4FKWgh345JoBF6HrjcoY6Ymovk+UA/hD2ZwtLqbwyI5bFiXCclo bsfULyYDOy/iO5Veo4qi90kk3be86C6M0K7mFt4VFMQsm9hP7eM5CXE/TtrAP8rMAy3b TpAGTnhkwps+CqDBzr44UWfggZ5nLMQT3oXAjqwOBaZLWE5wF4neORWxP8EqnDMyuo7O KtluZvrpz86mCtTsmmOTeaZ2ivMQITKHEEOQyq8gRi+2yZL/ZYBR7+4VUV05YZJM7fl6 GvqQ==
X-Gm-Message-State: ALyK8tJ57EODOt7HiZh/8jGY8eJg+11MEoX15hLylIYZ29lhaBwk/NDX7EbMUC8hZw9sIkYO6wPl6KG+IQH3Fw==
X-Received: by 10.159.55.204 with SMTP id q70mr421862uaq.16.1467417210001; Fri, 01 Jul 2016 16:53:30 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.103.20.2 with HTTP; Fri, 1 Jul 2016 16:53:29 -0700 (PDT)
In-Reply-To: <25452548.1467414626550.JavaMail.wam@elwamui-little.atl.sa.earthlink.net>
References: <25452548.1467414626550.JavaMail.wam@elwamui-little.atl.sa.earthlink.net>
From: Andy Bierman <andy@yumaworks.com>
Date: Fri, 01 Jul 2016 16:53:29 -0700
Message-ID: <CABCOCHQxMVtVzj99QKD89LTWwpdAk72dArMuS5VHw2EpZ17Mqw@mail.gmail.com>
To: Randy Presuhn <randy_presuhn@mindspring.com>
Content-Type: multipart/alternative; boundary="94eb2c04cbfa8a38d105369bb13c"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/Dg1wMNlE_4pjxq-GD0OqsUU8JHM>
Cc: "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 23:53:34 -0000
On Fri, Jul 1, 2016 at 4:10 PM, Randy Presuhn <randy_presuhn@mindspring.com> wrote: > Hi - > > Some lessons learned from annotating SMI files for code generation > are probably applicable here. > (1) doing annotations "in-line", regardless of the grammatical > tricks used to support those annotations, is problematic > from a software configuration management perspective. > (a) as new versions of the module definition appear, > it becomes necessary to "re-apply" annotations. > This is particularly a nuisance when different > organizations are involved. > (b) when the same module needs to be annotated in > different ways for different purposes, as when used > in multiple products built using different development > environments. > > This is why commercial SDKs support separate annotations, deviations, and module/submodule files. Ideally the module sources are common across all platforms, but annotations and deviations can be platform and revision specific. I understand the need for standard extensions like nacm:default-deny-all that are tied to a standard module, but not tool-specific annotations. (2) As others have already mentioned, working within the > language framework for annotation syntax is a big win > *if* you're doing annotations in-line, but see (1). > > YANG allows either inline or separate module (sort of) Side issue... We use the deviation statement to patch in extensions same as other deviations. That's why I do not like all the text in 7.20.3 about deviating from the standard and 'server does not implement faithfully'. https://tools.ietf.org/html/draft-ietf-netmod-rfc6020bis-14#section-7.20.3 The ABNF allows the following, so the RFC text is wrong: deviation /if:interfaces/if:interface { deviate add { ncx:sil-delete-children-first; } } This does not alter the conformance requirements at all. > Randy > Andy > > -----Original Message----- > > From: Vinod Kumar > > Sent: Jul 1, 2016 6:21 AM > > To: Martin Bjorklund > > Cc: "vinods.kumar@huawei.com" , "Anil Kumar S N (VRP Network BL)" , > Gaurav Agarwal , netmod@ietf.org > > Subject: Re: [netmod] Request to review the YANG compiler annotations > draft. > > > > 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. > Looking forward for your opinion/feedback. > Thanks and Regards,Vinod Kumar S. > 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