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

"Rob Wilton (rwilton)" <rwilton@cisco.com> Fri, 04 October 2019 08:17 UTC

Return-Path: <rwilton@cisco.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 6B4B7120018 for <netmod@ietfa.amsl.com>; Fri, 4 Oct 2019 01:17:43 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.501
X-Spam-Level:
X-Spam-Status: No, score=-14.501 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_HI=-5, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.com header.b=DIOqv5Lo; dkim=pass (1024-bit key) header.d=cisco.onmicrosoft.com header.b=H3ZkUj1v
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 r85FC6ztgoES for <netmod@ietfa.amsl.com>; Fri, 4 Oct 2019 01:17:41 -0700 (PDT)
Received: from rcdn-iport-7.cisco.com (rcdn-iport-7.cisco.com [173.37.86.78]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CED2A120815 for <netmod@ietf.org>; Fri, 4 Oct 2019 01:17:40 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=7473; q=dns/txt; s=iport; t=1570177060; x=1571386660; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=E36Fz65Vjw3OjN3mdc6Xf97RkRBCfmtt/0hwtabGVVg=; b=DIOqv5Lo0EBqb39+plS/QQTbnbcgXgXKBacb7JJ7v6d8cD2QCZHX9kvu B11uBPvGZm8YRGaq/hMAXdF4u1xPPXgvOa1LObXkdws5YqzH0HPLDrHJ6 GgY3DDeXu65K2ILzbbnU3aGToqRc40RYbgSYmYH5ZII803QyMtqb35il0 s=;
IronPort-PHdr: 9a23:H2W/+xE0YphHZ9p+pqVM8Z1GYnJ96bzpIg4Y7IYmgLtSc6Oluo7vJ1Hb+e4z1A3SRYuO7fVChqKWqK3mVWEaqbe5+HEZON0pNVcejNkO2QkpAcqLE0r+eeT1bigmG8JqX15+9Hb9Ok9QS47z
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0AKAAAT/5Zd/51dJa1kGQEBAQEBAQEBAQEBAQwBAQEBAQGBVAMBAQEBAQsBgUpQA21WIAQLKgqHXwOKSIJciWiOEYEugSQDVAkBAQEMAQEYCwoCAQGDe0UCgkcjNQgOAgMJAQEEAQEBAgEFBG2FLQyFSwEBAQECAQEBECgGAQEsBgUBCwQCAQgOAwQBAQEeECEGCx0IAQEEAQ0FCBMHgwGBagMODwECDKJcAoE4iGGCJ4J9AQEFgTgCDkGDAw0LghcJgTQBjA0YgUA/gRFGgU5+PoIaRwEBAgEBFoFJgz2CJpVElzdBCoIjhwiKCYQigjpyhlyPOI4riCCCDY8EAgQCBAUCDgEBBYFUAzSBWHAVGiGCbAlHEBSBT4NzhRSFP3SBKY8iAYEiAQE
X-IronPort-AV: E=Sophos;i="5.67,255,1566864000"; d="scan'208";a="635511324"
Received: from rcdn-core-6.cisco.com ([173.37.93.157]) by rcdn-iport-7.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 04 Oct 2019 08:17:39 +0000
Received: from XCH-RCD-013.cisco.com (xch-rcd-013.cisco.com [173.37.102.23]) by rcdn-core-6.cisco.com (8.15.2/8.15.2) with ESMTPS id x948HdaU015143 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL); Fri, 4 Oct 2019 08:17:39 GMT
Received: from xhs-rtp-002.cisco.com (64.101.210.229) by XCH-RCD-013.cisco.com (173.37.102.23) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 4 Oct 2019 03:17:38 -0500
Received: from xhs-rcd-002.cisco.com (173.37.227.247) by xhs-rtp-002.cisco.com (64.101.210.229) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 4 Oct 2019 04:17:35 -0400
Received: from NAM01-SN1-obe.outbound.protection.outlook.com (72.163.14.9) by xhs-rcd-002.cisco.com (173.37.227.247) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Fri, 4 Oct 2019 03:17:34 -0500
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EUAvQV5NokBI5ZvebAkm3/U002S+EgGub7gJ1NTEcEXe5xk7LA7xVsaiwjNjS20PHuPSODl5GABeDsfQKYsz/YhrUB8O0cPtMKU8QvXNVMBUBSTNh6Yeobf6/IyyZmOfO1dkcV4bGZVmfcb+Zjo8yey5J6vXLUsc5gxC1pI41rC9wb6BIDhMvwfpqEBqBpl/l4KUfJwp8NJN6WQTrSZr1Dgrp9Z77WqUjHumZv7RsQphRREX/ZlbnMrKv29NZ962saLs18S52Fe8yNOrzRD/USiRtaSWYJ3tTOZwmDCVcDo21nlcpve0xRY1eNVZMnqc4A9LtOS/ZnLnF6s5Edhx7A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cbR8OWu6fxGQOEWt12E7212wCcf1PHogZ2eTeG6I1rI=; b=JO1bUK7oyWkQSHRJXms+kWd9EFQe4HuY6+VZk8bNp/8Q/asniFYcqemfmceSVpkQ3DkKrAH9yBYuyOD4pVJu0Y2A8599Ie0VJF//BGk4RVZOhDQDP7RdcOO5cgdZC4G5kXwgTL9FGCIMuM1QnFl58YmIDJPRS9cCpkEp5Oj06rqnjLLXOAeTC0TyLGfLexv0MlOvIboar+FgtU+wS57ncWnz8L2WO2VXhR3r7cujMYDibxoDB5A3zly90oFvh/pm74ntZ8Li6Mwk7o0nj4bsUBCXf/Ue0CA/viQjw7sXXwimSwBCrbym33iv9hD1CMQKEg6x5hdanYjM/hDQNd9qmA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cisco.com; dmarc=pass action=none header.from=cisco.com; dkim=pass header.d=cisco.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.onmicrosoft.com; s=selector2-cisco-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cbR8OWu6fxGQOEWt12E7212wCcf1PHogZ2eTeG6I1rI=; b=H3ZkUj1v5pQAh0gnpQ0iAEWBcr+tfjVfa3hWf8OQRGoacM555l5UOERAUYgVHvWLd0px0BrNKUD2PJUs75m+CBPeTtYeic+jhzOcltFtTIkL6/HW6IXHWo5Ch6HHWxg2WETKknRO8bxcluUvimLDH+OOVOj3T14AxDHGf1IcWeE=
Received: from MN2PR11MB4366.namprd11.prod.outlook.com (52.135.38.209) by MN2PR11MB4013.namprd11.prod.outlook.com (10.255.181.154) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2305.17; Fri, 4 Oct 2019 08:17:34 +0000
Received: from MN2PR11MB4366.namprd11.prod.outlook.com ([fe80::cca:41bd:b0bb:c549]) by MN2PR11MB4366.namprd11.prod.outlook.com ([fe80::cca:41bd:b0bb:c549%2]) with mapi id 15.20.2305.023; Fri, 4 Oct 2019 08:17:34 +0000
From: "Rob Wilton (rwilton)" <rwilton@cisco.com>
To: Christian Hopps <chopps@chopps.org>, Mahesh Jethanandani <mjethanandani@gmail.com>
CC: "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: [netmod] References to the "tags" typedef
Thread-Index: AdV5zjrR87+ocsTFRHuyDJWUSmakTQASvOqAAAKhPIAAGXctcA==
Date: Fri, 04 Oct 2019 08:17:33 +0000
Message-ID: <MN2PR11MB436662777568D8D4746FCED0B59E0@MN2PR11MB4366.namprd11.prod.outlook.com>
References: <MN2PR11MB4366172C3044D238A5BE7C30B59F0@MN2PR11MB4366.namprd11.prod.outlook.com> <824BC817-DAFD-41CE-88B7-D24A32F22E19@gmail.com> <1B318BB7-9214-45DC-94AC-E164198CF97D@chopps.org>
In-Reply-To: <1B318BB7-9214-45DC-94AC-E164198CF97D@chopps.org>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=rwilton@cisco.com;
x-originating-ip: [173.38.220.46]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 1ba873fe-ae72-4c0f-1712-08d748a34f32
x-ms-traffictypediagnostic: MN2PR11MB4013:
x-ms-exchange-purlcount: 6
x-microsoft-antispam-prvs: <MN2PR11MB401382360E5A77CC85BF6F67B59E0@MN2PR11MB4013.namprd11.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:9508;
x-forefront-prvs: 018093A9B5
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(346002)(376002)(396003)(39860400002)(366004)(136003)(189003)(199004)(13464003)(51444003)(305945005)(7736002)(14454004)(74316002)(7696005)(316002)(81166006)(8936002)(71200400001)(71190400001)(966005)(66574012)(478600001)(81156014)(33656002)(66946007)(66476007)(66556008)(2906002)(66446008)(64756008)(76116006)(86362001)(52536014)(6306002)(6436002)(14444005)(55016002)(9686003)(6116002)(66066001)(5660300002)(3846002)(110136005)(8676002)(476003)(229853002)(11346002)(446003)(6246003)(4326008)(26005)(486006)(25786009)(53546011)(6506007)(186003)(76176011)(99286004)(102836004)(256004); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR11MB4013; H:MN2PR11MB4366.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: cisco.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: 7TS8gaxUARcx6nu8BD1s1w4j2Yxet5zjeR6z1nXPDMljo4MYxVCph5yql+QDwQJwJzx/uTuuLyZvO0cCTgd9hS1gCiM0r70cBNwaq/6iaqDvaVKuDin10QHJ7bK8+s/jgOrsTyx1Y7oytgooux7iiUbQqMMK4H2THQ+umhZF32G3OYQQJ3yA1dpVH+Na+6qEy0TH26rx5ZPinX5EOA7dvoOwJOqvyo/61uloQO1tXA61tdSCrzBG/T02pR/qiI8DcDW0AyL9RkqBxUezzMBhksNo+ifaJo7YikwhLtBhS86/ydLF2GtumdMypZisxAfysAl5JTouLDA9o5SrQ9xMqQeufjuObGoZgNnixpDsNuJYOuFfkrRdd3Z6UnrFC1ch2nxrs4yNHwI/SiUz25sWXK8q9k639USaCvTYUZAarAP5Xkyp/337wkrmK9lD+xbyZU1WscT45pWOY5HrResidA==
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-Network-Message-Id: 1ba873fe-ae72-4c0f-1712-08d748a34f32
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Oct 2019 08:17:33.9497 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5ae1af62-9505-4097-a69a-c1553ef7840e
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: R2Iroms/7h+AjgzSPBA4Gsh4PZBxVZM4leKOmo3joIC1mZLv5af1k4NcYDKaQIAh3e/g+cs22C+nlEd1ijo5Aw==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4013
X-OriginatorOrg: cisco.com
X-Outbound-SMTP-Client: 173.37.102.23, xch-rcd-013.cisco.com
X-Outbound-Node: rcdn-core-6.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/yctHu6z6HGBzetnj8hAuvH6oifE>
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:17:44 -0000

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 ...

Thanks,
Rob


> 
> 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