Re: [netmod] References to the "tags" typedef

Andy Bierman <andy@yumaworks.com> Fri, 04 October 2019 08:49 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 7E24D120288 for <netmod@ietfa.amsl.com>; Fri, 4 Oct 2019 01:49:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 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_NONE=-0.0001, SPF_HELO_NONE=0.001, 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 u4_d_cLyHKvC for <netmod@ietfa.amsl.com>; Fri, 4 Oct 2019 01:49:09 -0700 (PDT)
Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::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 00947120846 for <netmod@ietf.org>; Fri, 4 Oct 2019 01:49:08 -0700 (PDT)
Received: by mail-lj1-x234.google.com with SMTP id a22so5693641ljd.0 for <netmod@ietf.org>; Fri, 04 Oct 2019 01:49:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dfAXWW8BlLNmnuG4oJDkk2gJkZ1OomjnML78ggscjaw=; b=jxn0Jgol+e1Qwf7XncAeonbCR2aWl6oWImNew7o8R1xwLC3J6J5Z68Jlwvb1mtJPGw ooUF9lNi9FiD7k2/VoMiM/aAn+nD60OAYqzmK2JSw8dcL4OafLP4rovtDz1DbXAjbox7 p6MqjjlKSVQVEqdl6xKmWu2xxAjna4a5T8x3WBQF6d8HSBwrQrIsIx8skhB/4kzDlFUH 9wYs4IlOrgw9ZHl7hC3QOWVKZH/EDKsw7CsQ5sbcKG1o3VDL5lccXY51Qk0zuAKD/WMW T5JPY0ukhziGeHFmugQT74e3q9nZhixTRmhKrea80PMLO66qGI1F1K4kDYc6Ghbyk66X 12CQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dfAXWW8BlLNmnuG4oJDkk2gJkZ1OomjnML78ggscjaw=; b=GXBkFXsFD8oDxJDBJwS1A4HRN1J/U+ecVy5vDyroCZjmW4GqMAP4WDY1HIweSbggSR pInWqOOqBaYYSiGDSOXXqKgbOkiRhCru8QddHBy8rlMA4SaLuPDwx89sQTBahx9apmmy maQqa02gOhplhetPE1uHYae9gmn20TnUtYkAWC1F4UbPuOuHn4QoVUVg/gQMvWq7gwl4 v/e0B4SLV+/AhcPWYmThfdInWoNUWG4zUD+/S9M0qPXlL/7JMnMyEq1eKD5a/x4XwbFL dAnur2lCcnprRMT71LTEOri60IN7AtmbK8fdS93W7Sh7M/7ipOUNHmpgbiG/VUkCUcQp yAsQ==
X-Gm-Message-State: APjAAAVID8LdfE5sk5F1IRdcRFGKYapuePIO9qnBzstndb3rR8UQ5C8p RUWeDo+Zdvsg5326ZuPbursNhEB0UP9cGvmbBmpHAQ==
X-Google-Smtp-Source: APXvYqyzRzMMVqWhtj0HEboC0b5a5IKy3ks+YQyt4i7ZoU7VX1QHqt7oXnMVqOImbe3MnyDNsKzRxiGxhcrQ8V3xKT8=
X-Received: by 2002:a2e:8889:: with SMTP id k9mr6379044lji.252.1570178946956; Fri, 04 Oct 2019 01:49:06 -0700 (PDT)
MIME-Version: 1.0
References: <MN2PR11MB4366172C3044D238A5BE7C30B59F0@MN2PR11MB4366.namprd11.prod.outlook.com> <824BC817-DAFD-41CE-88B7-D24A32F22E19@gmail.com> <1B318BB7-9214-45DC-94AC-E164198CF97D@chopps.org> <MN2PR11MB436662777568D8D4746FCED0B59E0@MN2PR11MB4366.namprd11.prod.outlook.com>
In-Reply-To: <MN2PR11MB436662777568D8D4746FCED0B59E0@MN2PR11MB4366.namprd11.prod.outlook.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Fri, 4 Oct 2019 01:48:55 -0700
Message-ID: <CABCOCHT_+26pNbsfO_A39rMcsHdmL8YWyUrZW84AOLUcYGYFzg@mail.gmail.com>
To: "Rob Wilton (rwilton)" <rwilton@cisco.com>
Cc: Christian Hopps <chopps@chopps.org>, Mahesh Jethanandani <mjethanandani@gmail.com>, "netmod@ietf.org" <netmod@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000005e16ee059411c62a"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/EQdGwFvJ3pC-Q2hs3PgD_Bn0X64>
Subject: Re: [netmod] References to the "tags" typedef
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
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, 04 Oct 2019 08:49:13 -0000

On Fri, Oct 4, 2019 at 1:18 AM Rob Wilton (rwilton) <rwilton@cisco.com>;
wrote:

> Hi Chris, Mahesh,
>
> > -----Original Message-----
> > From: Christian Hopps <chopps@chopps.org>;
> > Sent: 03 October 2019 20:50
> > To: Mahesh Jethanandani <mjethanandani@gmail.com>;
> > Cc: Christian Hopps <chopps@chopps.org>;; Rob Wilton (rwilton)
> > <rwilton@cisco.com>;; netmod@ietf.org
> > Subject: Re: [netmod] References to the "tags" typedef
> >
> >
> >
> > > On Oct 3, 2019, at 2:34 PM, Mahesh Jethanandani
> > <mjethanandani@gmail.com>; wrote:
> > >
> > >
> > >
> > >> On Oct 3, 2019, at 2:37 AM, Rob Wilton (rwilton) <rwilton@cisco.com>;
> > wrote:
> > >>
> > >> Hi Chris,
> > >>
> > >> I know that this is late, but ...
> > >>
> > >> The YANG packages draft (https://tools.ietf.org/html/draft-rwilton-
> > netmod-yang-packages-01, but an updated version will be posted soon), is
> > currently using the module-tags typedef to allow a package definition to
> > contain a list of tags.
> > >>
> > >> E.g.
> > >> module: ietf-yang-package
> > >>      +--ro yang-package
> > >>         +--ro name                      yang:yang-identifier
> > >>         +--ro version                   yang-sem-ver
> > >>         +--ro revision-date?            yanglib:revision-identifier
> > >>         +--ro location*                 inet:uri
> > >>         +--ro description?              string
> > >>         +--ro reference?                string
> > >>         +--ro previous-version?         yang-sem-ver
> > >>         +--ro tag*                      tags:tag
> > >>         +--ro referentially-complete?   Boolean
> > >>         ...
> > >>
> > >> This package definition goes into an instance data document, for which
> > the schema should just be ietf-yang-package, but by it importing ietf-
> > module-tags.yang, it effectively also pulls in the "container
> module-tags"
> > into the schema for the package definition, that I don't think should be
> > there.
> > >>
> > >> If we keep package tags, then I think that there are two ways to fix
> > this:
> > >>
> > >> (1) Split ietf-module-tags into an ietf-module-tags-types.yang and a
> > ietf-module-tags.yang.  But it would be very late to do this, and the
> > packages draft isn't even a workgroup document at this stage.
> > >
> > > I know it is late. But what will it take to split the tags-types module
> > from the tags module?
> >
> > I do not understand why this is important at all. What does "pulls in"
> > exactly mean?
>
> To put YANG instance data into a document you need to know what the schema
> is associated with the instance data.
>
> Ideally, I want the schema for a YANG package instance data document to
> just be the ro yang-package structure described above (actually now defined
> using YANG data extension from draft-ietf-netmod-yang-data-ext).
>
> To use the "tags:tag" typedef, ietf-yang-package had an import on
> "ietf-module-tags" which both defines a tags type and also a "module-tags"
> container as well.  I want the typedef, but not the container, because I
> don't want the schema for the package file to be:
>       +--ro yang-package  <-- I do want this
>       |  +--ro name                      yang:yang-identifier
>       |  ...
>       +--ro module-tags   <--  I don't want this
>          +- ...
>
> There are a few solutions:
>
> 1) Split ietf-module-tags into a ietf-module-tags-types.yang that only
> defines the typedef and the extension, and hence the ietf-module-tags.yang
> only defines the module-tags container, and ietf-yang-packages.yang can
> just import ietf-module-tags-types.yang
> 2) Have ietf-yang-package.yang define its own "tags" type, hence there is
> no dependency on "ietf-module-tags.yang" at all.
> 3) Tweak the schema specification for simplified-inline-schema in
> instance-data documents so that the use of ietf-module-tags.yang module
> effectively becomes "import-only" rather than "implemented".
> 4) Don't worry about the fact that the file schema for a YANG package
> contains more than it should.
>
> I strongly dislike (4) as an option.
> But I think that probably either (2) or (3) would be OK as a solution.
>
> Hence, it is probably not necessarily to split ietf-module-tags.yang into
> two files, because there are other solutions available.  It isn't even
> clear to me that (1) is necessarily the best solution anyway ...
>
>
I think this is just an implementation detail.
There is no problem using just a typedef from a an imported module.
It does not cause any data nodes to be part of the importing module.



> Thanks,
> Rob
>
>
>
Andy


> >
> > Thanks,
> > Chris.
> >
> > >
> > >>
> > >> (2) Have the package draft define its own "package tag" typedef, and
> > not have an import reference on module-tags at all.  Probably if we do
> > keep package tags, then we should also consider a mechanism by which they
> > can be updated on a device equivalently to module tags.
> > >>
> > >> I'm currently thinking that the second choice might be a better
> > approach at this time, but wanted to check whether you or the WG had an
> > opinion.
> > >>
> > >> Thanks,
> > >> Rob
> > >>
> > >>
> > >>
> > >>> -----Original Message-----
> > >>> From: netmod <netmod-bounces@ietf.org>; On Behalf Of Christian Hopps
> > >>> Sent: 25 September 2019 17:19
> > >>> To: netmod@ietf.org
> > >>> Subject: Re: [netmod] I-D Action:
> > >>> draft-ietf-netmod-module-tags-09.txt
> > >>>
> > >>> This adds the deprecated non-NMDA state module.
> > >>>
> > >>> Thanks,
> > >>> Chris.
> > >>>
> > >>>> On Sep 25, 2019, at 12:15 PM, internet-drafts@ietf.org wrote:
> > >>>>
> > >>>>
> > >>>> A New Internet-Draft is available from the on-line Internet-Drafts
> > >>> directories.
> > >>>> This draft is a work item of the Network Modeling WG of the IETF.
> > >>>>
> > >>>>      Title           : YANG Module Tags
> > >>>>      Authors         : Christian Hopps
> > >>>>                        Lou Berger
> > >>>>                        Dean Bogdanovic
> > >>>>  Filename        : draft-ietf-netmod-module-tags-09.txt
> > >>>>  Pages           : 18
> > >>>>  Date            : 2019-09-25
> > >>>>
> > >>>> Abstract:
> > >>>> This document provides for the association of tags with YANG
> modules.
> > >>>> The expectation is for such tags to be used to help classify and
> > >>>> organize modules.  A method for defining, reading and writing a
> > >>>> modules tags is provided.  Tags may be registered and assigned
> > >>>> during module definition; assigned by implementations; or
> > >>>> dynamically defined and set by users.  This document also provides
> > >>>> guidance to future model writers; as such, this document updates
> > RFC8407.
> > >>>>
> > >>>>
> > >>>> The IETF datatracker status page for this draft is:
> > >>>> https://datatracker.ietf.org/doc/draft-ietf-netmod-module-tags/
> > >>>>
> > >>>> There are also htmlized versions available at:
> > >>>> https://tools.ietf.org/html/draft-ietf-netmod-module-tags-09
> > >>>> https://datatracker.ietf.org/doc/html/draft-ietf-netmod-module-tags
> > >>>> -09
> > >>>>
> > >>>> A diff from the previous version is available at:
> > >>>> https://www.ietf.org/rfcdiff?url2=draft-ietf-netmod-module-tags-09
> > >>>>
> > >>>>
> > >>>> Please note that it may take a couple of minutes from the time of
> > >>>> submission until the htmlized version and diff are available at
> > >>> tools.ietf.org.
> > >>>>
> > >>>> Internet-Drafts are also available by anonymous FTP at:
> > >>>> ftp://ftp.ietf.org/internet-drafts/
> > >>>>
> > >>>> _______________________________________________
> > >>>> 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
> > >
> > > Mahesh Jethanandani
> > > mjethanandani@gmail.com
>
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod
>