Re: [netmod] comments on draft-ietf-netmod-yang-instance-file-format-04

Balázs Lengyel <balazs.lengyel@ericsson.com> Sun, 17 November 2019 18:12 UTC

Return-Path: <balazs.lengyel@ericsson.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 9C1D5120816 for <netmod@ietfa.amsl.com>; Sun, 17 Nov 2019 10:12:38 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.001
X-Spam-Level:
X-Spam-Status: No, score=-2.001 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=ericsson.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 itgLLl8_wyOy for <netmod@ietfa.amsl.com>; Sun, 17 Nov 2019 10:12:36 -0800 (PST)
Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on0631.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0e::631]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0DF3D12010C for <netmod@ietf.org>; Sun, 17 Nov 2019 10:12:35 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xphr+RskHNlJH1zx646MkEY6YLq7XC1LyGIvn+GpV0OlJHcHPVKLHMisbFYTdSzFPFG7JWOD5NAOnzW7ESMKEqnbliIyZ+jnqKWgfKgFAQ998zIXJvMfv0dVlOab8/JGjhYsfqvZBBm7mgoEnX9ojgW9xpuVEBeE/D0ABzrZKH5PWwBd7efkN8W0pOa2zFdY7TEPUL9v4NI1ISdnLWlajn0BsWHxwXAIxeUjVsbIHEuI2ZqZ5/OMOUaQxx6HvU8QuDqf5CdXEWBS8dVc3doBs340cHRnRSHAyj4bOubjSklQzkHCzD6SJURgjW4JUe/SDpTVb5xTnkfkJck4lBke8g==
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=5BYMN728GmEhcld9u2LHkhBd2h5gj3DEt6lWZVNHII4=; b=PlKNSb9FM495uVuCERjwWe7WxJ5v1jErj1oEDY5UkFF7EeSRpoMzgeI3vXrg5PftR7dXINbS8ZdVISIjHwrhxRG1f0Eh/CrmNfdkJUqQ1KeD8Bd0rzDQszvJZq7o0ghpc4vLtGUx5f20D1JdPG5lwWC/dOyV82sxJ10vHRw21fsc4FxrZjw70a5w9gKR3tJURErdd5OGvc45w9sBQW4TNCV/PajUiLEV4CEM4AtQxyeYwSEcwwbhN5kqPuw3cOljfX8BznNk6kYY55TIfB/nINneSMSptakmdTe7jBpJlJPeTn2SqBEu6VJsvEkPMWy4gn4GUypGYl67GcoNyTvHAA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ericsson.com; dmarc=pass action=none header.from=ericsson.com; dkim=pass header.d=ericsson.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5BYMN728GmEhcld9u2LHkhBd2h5gj3DEt6lWZVNHII4=; b=UK4CzUlSONHrJhzayoHVBU4iJMVW1P8W2FV9/BKZSYqfmHo+G7za3Ck/tylRZgF44Np5My1BULWNd6TODrR6ckWLXOBbaWTfIUtsIBuW4TtUMU48Be8rsz/RsiEwks40mOJjEejzDIhraOWmHzM6wWhzg0hZ9gCiF2d2+S7/o70=
Received: from AM7PR07MB6214.eurprd07.prod.outlook.com (10.186.170.77) by AM7PR07MB6262.eurprd07.prod.outlook.com (10.186.171.206) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2474.10; Sun, 17 Nov 2019 18:12:33 +0000
Received: from AM7PR07MB6214.eurprd07.prod.outlook.com ([fe80::749e:982d:1c62:367b]) by AM7PR07MB6214.eurprd07.prod.outlook.com ([fe80::749e:982d:1c62:367b%4]) with mapi id 15.20.2474.012; Sun, 17 Nov 2019 18:12:33 +0000
From: Balázs Lengyel <balazs.lengyel@ericsson.com>
To: Martin Bjorklund <mbj@tail-f.com>
CC: "andy@yumaworks.com" <andy@yumaworks.com>, "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: [netmod] comments on draft-ietf-netmod-yang-instance-file-format-04
Thread-Index: AQHVf2MbQga78mSle0Opwa3noseNw6dUAaKAgCraSXCAAKy9gIAQCmdggAA8/YCAABCJgA==
Date: Sun, 17 Nov 2019 18:12:33 +0000
Message-ID: <AM7PR07MB6214D41C265D4AEEC63A0F7AF0720@AM7PR07MB6214.eurprd07.prod.outlook.com>
References: <AM7PR07MB62148A605167BD4D046A2E3DF0790@AM7PR07MB6214.eurprd07.prod.outlook.com> <20191107.091655.653448067546159616.mbj@tail-f.com> <AM7PR07MB6214B5582C8EA2CB2924DA05F0720@AM7PR07MB6214.eurprd07.prod.outlook.com> <20191117.175235.2089925675266198271.mbj@tail-f.com>
In-Reply-To: <20191117.175235.2089925675266198271.mbj@tail-f.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=balazs.lengyel@ericsson.com;
x-originating-ip: [31.133.148.242]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 55049c77-8a36-410a-84e1-08d76b89b7f7
x-ms-traffictypediagnostic: AM7PR07MB6262:
x-microsoft-antispam-prvs: <AM7PR07MB6262618F79A250E021F1A5BFF0720@AM7PR07MB6262.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:8882;
x-forefront-prvs: 02243C58C6
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(366004)(39860400002)(346002)(376002)(396003)(136003)(199004)(189003)(13464003)(102836004)(26005)(66946007)(305945005)(66556008)(66476007)(66616009)(966005)(66446008)(66066001)(6506007)(53546011)(99286004)(4326008)(446003)(11346002)(64756008)(7736002)(85182001)(14454004)(3846002)(2906002)(52536014)(33656002)(76116006)(316002)(8676002)(54906003)(6916009)(81156014)(81166006)(74316002)(6116002)(76176011)(7696005)(8936002)(478600001)(85202003)(486006)(256004)(6246003)(71200400001)(186003)(66574012)(71190400001)(5660300002)(6306002)(476003)(6436002)(9686003)(55016002)(25786009)(86362001)(229853002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM7PR07MB6262; H:AM7PR07MB6214.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: AmRt70crPENnPUvf1ZUh9juk6LsutVHBOy6HlPGGa9F+7KQCPLOn6HGJ5HHk4JTajLQouAZjazjjks+v3cCUSGZawlJExbqc1UavmHvzX8w+VK8ysF42vHIqhkb3C3c9v5xcoGItzHP1at53DcUc87oOufqjMQGoRFPbQzZXNX31CHzZkXUpnfyuCm1ORtfBZf7Yeat7UXF2QZn/PeHZqLEC8DPncVqoeh8reiUgYGlC8AkKhpYs0R3eD2CnGc+050eeF24/5HvKFlVdRkI6nTcT3550jgWJ0KEVxXtB/1Ek1gs7LIhgGMMaqcEXXbMTQ9CvJBED6u1j0dXHUDf6p5sSfj5lmBokNPfrUaVLx9i/FnhfYBH4n90bCDpIKdmuZCm4Ci2WPv/t08DGhAD13bNcrHf8X7tQnlpjwJp7z4IQ9lM6SdiUI58e5lFXSu6g
x-ms-exchange-transport-forked: True
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg="SHA1"; boundary="----=_NextPart_000_0340_01D59DB5.A2800D00"
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 55049c77-8a36-410a-84e1-08d76b89b7f7
X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Nov 2019 18:12:33.5974 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: KhqtzC8DMPV5dL/R/4VGrKDks9MQC1pXhz7/Rp9MTNJEm1O754BafVbe1a6XqsuaVhThe2K4dh+QzJXjtDJ7t+izccN8ywzx6aXTjKOd9kQ=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR07MB6262
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/JEQRpSdmtigci3J1Hpq1CZSdjIk>
Subject: Re: [netmod] comments on draft-ietf-netmod-yang-instance-file-format-04
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: Sun, 17 Nov 2019 18:12:38 -0000


-----Original Message-----
From: Martin Bjorklund <mbj@tail-f.com> 
Sent: 2019. november 18., hétfő 0:53
To: Balázs Lengyel <balazs.lengyel@ericsson.com>
Cc: andy@yumaworks.com; netmod@ietf.org
Subject: Re: [netmod] comments on draft-ietf-netmod-yang-instance-file-format-04

> > On Thu, Oct 10, 2019 at 5:06 AM Martin Bjorklund <mbj@tail-f.com <mailto:mbj@tail-f.com> > wrote:
> > 
> > 
> >   o  leaf-list module
> > 
> >     The type of this leaf-list is a string with:
> > 
> >       pattern '.+@\d{4}-\d{2}-\d{2}\.yang';
> > 
> >     I think the revision needs to be optional, and the suffix ".yang"
> >     dropped, since it doesn't add any value:
> > 
> >       pattern '.+(@\d{4}-\d{2}-\d{2})?';
> > 
> >    (same for inline-spec).
> > 
> >  
> > 
> > IMO the filespec SHOULD follow the pattern in
> > https://tools.ietf.org/html/rfc7950#section-5.2
> > 
> > BALAZS: It does follow the pattern except that I made the revision date mandatory. It is needed to properly understand the instance data.
> > 
> >  
> > 
> > Except a new file extension SHOULD be used.
> > 
> > Suggest: .yif == YANG Instance File
> > 
> >  
> > 
> > Obviously it would be a horrible idea to use .yang since that 
> > extension
> > 
> > is already used to identify a YANG schema file.
> > 
> > BALAZS: The leaf-list lists not the instance data files but the content defining YANG modules, so IMO “.yang” is an appropriate extension. It is really a YANG schema file we are listing.
> 
> No, you are not listing a file name, you are listing the name and, optionally, the revision of a YANG *module*.  It can internally be stored as a .yang file a .yin file, or as a blob in a database.
> 
> Hence, we should not have the ".yang" suffix here.
> BALAZS2:
> OK, I will add the '.yin' possibility.

IMO this is even worse.  Which suffix should I use?  What difference does it make?

> I would like to keep the file extension because 
> ietf-yang-type@2015-12-07.yang looks more familiar

I think it is a bad idea to use something that looks familiar but change the meaning of it.  It is *not* a filename, it is a pair modulename + optional revision; an identifier for the module.

, will be easier to understand, than just
> ietf-yang-types@2019-12-07
> IMHO in practice systems might very well use it for file lookup.

But if I use this for file lookup, and I use YIN, and I try to use an instance file that lists the modules as ".yang", this won't work.


Perhaps solve this by changing the leaf-list into:

  container inline-modules {
    list module {
      key name;
      leaf name { ... }
      leaf revision { ... }
    }
  }

/martin

BALAZS3: People explicitly asked for a short, simple solution, so reusing the well-known module-file-naming format seemed logical,  and nobody misunderstood it till now.
I would really like to avoid creating a list with 2 separate leaf's: longer, more complex. It goes against the express wishes of other group members.
If you prefer we can drop the file extension. IMHO it will look strange.


I think a file loader can have the intelligence to look for a yin if yang is not found or vice-versa.
/Balazs