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

Balázs Lengyel <balazs.lengyel@ericsson.com> Wed, 06 November 2019 22:41 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 8376D12011F for <netmod@ietfa.amsl.com>; Wed, 6 Nov 2019 14:41:03 -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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-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 rJgYXejgzLeQ for <netmod@ietfa.amsl.com>; Wed, 6 Nov 2019 14:41:00 -0800 (PST)
Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130050.outbound.protection.outlook.com [40.107.13.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id ABB441200B1 for <netmod@ietf.org>; Wed, 6 Nov 2019 14:40:58 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S6mIvdZF6UveSAByQQJiXQkeZQ5gKktJTq+eah+KJq9747QY+qCS1MtysKPjLfH4NjAP2mdhNARn4fL+0ej1Q3kYRkFJEx0RLdHxzHBPg0nPSaFC3iQMlBtMCdfe1yv16sdl+7xDu/ia2nUQjzdpjhnt732ZxqN6ALXcBgzPiYmrFHMHcBjQNNuIIcq1WaY7eE9CRycKtG0YGdpMBDYZKKN3/5Ztsft6AUDxctplagxsOggDTR+aevfjsBT8dtTo5vl79JlTgH5mwqf3PgZz/T+W7mHY8a3aPL4ZlEbyG2EhWA8EK+6fcXVp2vtQ6Tr24qYKxCNJzU3dGFkURJ316A==
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=3S8fNyM4MSvVL+eKScm5cjXVJpwkD6P3KzjncAItwPI=; b=VLkuFfJXlQJkBcwc00uTgzaZD8gyhTL8v3DAHrSzgFUHx1iH5fvZUL0Eydf5LinyABMqlF6i0u1EHvWDL2u7/afNVuyOmhfgKHG8EV3T/D6qw6kZXJ2xFjBT9UY1fEIQG9wg9A1Au4UuX0BIS/aMbbVeJgVl5xT70x4FtKF8qERWeBsHRIPJAGtGdr5kmdDrpASbshTIo8gFFZ/+sWq2nZ0PR3RaOPbSesZO98k0eIYjvtcmPnJoH9cqhFOl3EDwrK2k7IWQFP4G1ptmF/fJ2IYGmhXvwds0vBk8excNzf8YXjoyBF2CkIL2NACGtbFDy5wCNlcOVfNCZSRMVJAFJA==
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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3S8fNyM4MSvVL+eKScm5cjXVJpwkD6P3KzjncAItwPI=; b=YP44QpOleYbPQH80perxTSJOZej7we2wNZtJT999LIXpZWF71WsezRmLTOJtQ+i7tKcsFBSB///hXmNAO54egPkG/W+UXNbEhUbJ1JnKSWosOcvG0WDUuNP2whA/DUhIyRTSDgkfFJjFrt0WoIOKDRotdZmC/Rehpe74OKH2Ais=
Received: from AM7PR07MB6214.eurprd07.prod.outlook.com (10.186.170.77) by AM7PR07MB6391.eurprd07.prod.outlook.com (10.186.171.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2451.15; Wed, 6 Nov 2019 22:40:55 +0000
Received: from AM7PR07MB6214.eurprd07.prod.outlook.com ([fe80::3c4a:6fb:4b5a:8a]) by AM7PR07MB6214.eurprd07.prod.outlook.com ([fe80::3c4a:6fb:4b5a:8a%7]) with mapi id 15.20.2430.020; Wed, 6 Nov 2019 22:40:55 +0000
From: Balázs Lengyel <balazs.lengyel@ericsson.com>
To: Andy Bierman <andy@yumaworks.com>, Martin Bjorklund <mbj@tail-f.com>
CC: NetMod WG <netmod@ietf.org>
Thread-Topic: [netmod] comments on draft-ietf-netmod-yang-instance-file-format-04
Thread-Index: AQHVf2MbQga78mSle0Opwa3noseNw6dUAaKAgCraSXA=
Date: Wed, 06 Nov 2019 22:40:55 +0000
Message-ID: <AM7PR07MB62148A605167BD4D046A2E3DF0790@AM7PR07MB6214.eurprd07.prod.outlook.com>
References: <20191010.140525.904627955349075516.mbj@tail-f.com> <CABCOCHShFd41gcGLTSjJQMWCA4Ak_QX2iHpng_6DBqLRf23vqw@mail.gmail.com>
In-Reply-To: <CABCOCHShFd41gcGLTSjJQMWCA4Ak_QX2iHpng_6DBqLRf23vqw@mail.gmail.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: [80.98.34.204]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 24a835a0-e1f7-4b10-b9b4-08d7630a6302
x-ms-traffictypediagnostic: AM7PR07MB6391:
x-microsoft-antispam-prvs: <AM7PR07MB639177A72A8DAF7E95BAF660F0790@AM7PR07MB6391.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:8273;
x-forefront-prvs: 02135EB356
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(376002)(346002)(39860400002)(396003)(136003)(366004)(189003)(199004)(86362001)(6246003)(316002)(6436002)(4326008)(966005)(478600001)(5660300002)(14454004)(52536014)(71200400001)(71190400001)(236005)(66066001)(256004)(8936002)(790700001)(3846002)(6116002)(99286004)(81156014)(81166006)(8676002)(85202003)(54896002)(6306002)(110136005)(55016002)(25786009)(2906002)(85182001)(99936001)(26005)(7736002)(102836004)(9686003)(486006)(53546011)(229853002)(6506007)(74316002)(33656002)(66946007)(64756008)(11346002)(66476007)(66616009)(476003)(66556008)(186003)(76116006)(7696005)(76176011)(66446008)(606006)(446003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM7PR07MB6391; H:AM7PR07MB6214.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A: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: n9DOtm8RLxbWgp69sRYFjqCKScS3qdfkZObinNwk3ps0eUeeXI/4rDWHtyZk0fG5L42x1SZQtRZtK/sKDNUMZH1WuSIriW1tFFuGsx4XO/Z02PS8FeoYSS++IW5jXaAeO4GDrgo3ud4IB1emTTJAJjkTVN5jFb7KVKXv8dKtISU7836FJFH+LvgkYd/Wk9udx1ENqYf+e2Pu9wIEmjXq768ijmh3UMB0qSrPYITwurqFM7KGjzd5k6hwvrFYCduzmWD3TV5/X8fy3Hakstfx3y5zJZ031Ekpxg22NoqvSCoTK7hZKUTu3rAD9sCs4PuymVhat+MbmEYbn6RB5SZk/WMZmxynNTyLRIdiBAaNI5f0ITjDEdl3hbV7t2Vm37gVwuS+0+ATCE8zPBCnC5t3KixY/rITr9Glm0Ad80u911G5xZ1Tf0SebgNoct0xcEF6
x-ms-exchange-transport-forked: True
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg="SHA1"; boundary="----=_NextPart_000_092D_01D594FB.A11815B0"
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 24a835a0-e1f7-4b10-b9b4-08d7630a6302
X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Nov 2019 22:40:55.6079 (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: /pvg4biL3+3QmnDSfC7laSfN8Sk0YhfoJU3MqXxWcDkmN96frxtezEhM8xkb0dFMCX4ZW6BUftEbQHxWqxQCRqQ0P6WtrTUlwX6PnAGywHA=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR07MB6391
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/xw2HSeO5WRi9_Xz0WzlY3j3JvyI>
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: Wed, 06 Nov 2019 22:41:04 -0000

See below!    Balazs

 

From: netmod <netmod-bounces@ietf.org> On Behalf Of Andy Bierman
Sent: 2019. október 10., csütörtök 17:34
To: Martin Bjorklund <mbj@tail-f.com>
Cc: NetMod WG <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.



  o  Data node naming.

    The current structure of the model is:

        +--rw (content-schema-spec)?
        |  +--:(simplified-inline)
        |     +--rw module*                 string
        |  +--:(inline)
        |  |  +--rw inline-spec*            string
        |  |  +--rw inline-content-schema   <anydata>
        |  +--:(uri)
        |     +--rw schema-uri?           inet:uri
        ...
        +--rw content-data?         <anydata>


    To make the instance document more understandable, I suggest the
    following structure, which adds a wrapping container for the
    schema, and renames the inline and uri nodes:

        +--rw content-schema
           +--rw (content-schema-spec)?
           |  +--:(simplified-inline)
           |     +--rw module*                 string
           |  +--:(inline)
           |  |  +--rw inline-module*          string
           |  |  +--rw inline-schema           <anydata>
           |  +--:(uri)
           |     +--rw same-schema-as-file?    inet:uri
        ...
        +--rw content-data?         <anydata>



 

+1, except not in favor of so many ways to specify schema.

That means the file reader MUST support all of them.

 

BALAZS: All 3 formats have been explicitly requested by earlier commenters. I see a rational for each:

Simplified-inline: it is simple and usually enough

Inline: if you need to specify not just the modules but also the supported features and deviations you need this full format

Uri: if you don’t really want to specify the content-schema in detail, e.g., because you are generating many files with the same schema, all you need is reference that identifies the content-schema

 

Which one would you like to implementing? Maybe we could make the inline method optional with a feature (feature if-feature),

 

Andy
_______________________________________________
netmod mailing list
netmod@ietf.org <mailto:netmod@ietf.org> 
https://www.ietf.org/mailman/listinfo/netmod