Re: [netmod] yang-data-ext issues

Ladislav Lhotka <lhotka@nic.cz> Wed, 02 May 2018 06:54 UTC

Return-Path: <lhotka@nic.cz>
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 1D81F12D870 for <netmod@ietfa.amsl.com>; Tue, 1 May 2018 23:54:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=no
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 5MOToLjnl7Yl for <netmod@ietfa.amsl.com>; Tue, 1 May 2018 23:54:15 -0700 (PDT)
Received: from trail.lhotka.name (trail.lhotka.name [77.48.224.143]) by ietfa.amsl.com (Postfix) with ESMTP id 3587E12D872 for <netmod@ietf.org>; Tue, 1 May 2018 23:54:15 -0700 (PDT)
Received: by trail.lhotka.name (Postfix, from userid 109) id 6391F182015D; Wed, 2 May 2018 08:59:08 +0200 (CEST)
Received: from localhost (unknown [195.113.220.121]) by trail.lhotka.name (Postfix) with ESMTPSA id 4B8541820051; Wed, 2 May 2018 08:59:05 +0200 (CEST)
From: Ladislav Lhotka <lhotka@nic.cz>
To: Kent Watsen <kwatsen@juniper.net>, Andy Bierman <andy@yumaworks.com>
Cc: NetMod WG <netmod@ietf.org>
In-Reply-To: <C9640A34-AC7F-4890-A3FA-C1CC0D056626@juniper.net>
References: <87muxq1pk9.fsf@nic.cz> <CABCOCHSwB8m6Uk82MZHnjnVi=0ofRohqEPT0Q06NM=+3n5gtFA@mail.gmail.com> <065a363753a67ee12f8bde6224009207b5fe7ee7.camel@nic.cz> <20180427.120325.419501937185262392.mbj@tail-f.com> <11da9315-40d9-60cd-d32f-b0ac4a5640c4@cisco.com> <45f5a97d205a9251b382687f54865c62250787cb.camel@nic.cz> <99aac5c0-aa2f-1a35-8a5c-ad97635e5a40@cisco.com> <b9211ebacd24ffdd558ecf4da5bfa1ad71cfdabb.camel@nic.cz> <20180427144708.6ekknrajexvz5yvf@elstar.local> <4305e62a9d301da22f89a0dd9a34c9c4882735af.camel@nic.cz> <CABCOCHSKfDCOpQJ4bX2ueHSj-e90ZyHVC1z3h9WMfPkn2OMMvw@mail.gmail.com> <87d0yglra0.fsf@nic.cz> <C9640A34-AC7F-4890-A3FA-C1CC0D056626@juniper.net>
Mail-Followup-To: Kent Watsen <kwatsen@juniper.net>, Andy Bierman <andy@yumaworks.com>, NetMod WG <netmod@ietf.org>
Date: Wed, 02 May 2018 08:54:18 +0200
Message-ID: <87sh7a8s4l.fsf@nic.cz>
MIME-Version: 1.0
Content-Type: text/plain
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/S9O2Ly8JvbSFJYkuF0Bem7B1w6s>
Subject: Re: [netmod] yang-data-ext issues
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.22
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, 02 May 2018 06:54:18 -0000

Kent Watsen <kwatsen@juniper.net> writes:

> Lada writes:
>> Andy writes:
>>>IMO, the yang-data defined in RFC 8040 has a clear purpose, and it
>>>is sufficient for that purpose, which is a YANG representation of
>>>an instance document (such as a protocol message or file).
>>
>> The same is basically true even without the extension. For example, I
>> fail to see any benefit from using yang-data in a module like
>> ietf-zerotouch-information.
>
> I don't understand this, how else would you propose to define the
> JSON-or-XML encoded payload of the CMS structure?

Do the same, just remove the extension. I don't see any terrible things
happening, and *all* tools shoud be able to process it easily.

>
>
>>> I am in favor if keeping the yang-data in RFC 8040 and not
>>> creating a new version of it that is unconstrained.
>>> There does not seem to be consensus on how to do this,
>>> or even consensus that it is a good idea.
>>
>> If the extension is deemed necessary, I would also prefer this 
>> approach to making the extension a Proposed Standard.
>
> I don't understand talk about abandoning this draft.  There is no question
> that it is needed (e.g., anima vouch, zerotouch, tail-f's
> "structure"),

So let me pose this question - why is it actually needed in these cases?
I can see some need whenever such data has to be mixed with normal
configuration and state data in the same module, but it is (I guess) not
the case in the above applications.

> and RFC 8040 is unsatisfactory because 1) it doesn't allow a top-level
> 'choice' between two containers and 2) it requires drafts to reference 
> RFC 8040, even though the drafts may have nothing to do with RESTCONF.
>
> Sure, maybe we have convinced ourselves that yang-data is not needed
> to model error-info, but that doesn't negate the other use case.
>
> We need a way to indicate that some data-model represents a stand-alone
> data structure.  It is not configuration, operational state, an RPC, or
> a notification.  It can only appear as a descendent of the 'module'

That's fine, but YANG wasn't designed to be a general schema language,
and I am against making such fundamental changes via extensions.

Lada

> statement.  All 'action', 'notification', 'config', and 'if-feature'
> descendent statements are ignored.  For the purpose of 'must' and '
> when' statements, the yang-data structure is its own context root.  It
> has a namespace and a unique local name (unique only to other yang-data
> defined within the same module; it's okay if an RPC, notification, or
> top-level data node has the same name).  Anything else?
>
>
> Kent // contributor
>
>
>

-- 
Ladislav Lhotka
Head, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67