Re: [netmod] yang-data-ext issues

Robert Wilton <rwilton@cisco.com> Tue, 24 April 2018 09:01 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 D461D124BFA for <netmod@ietfa.amsl.com>; Tue, 24 Apr 2018 02:01:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.51
X-Spam-Level:
X-Spam-Status: No, score=-14.51 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, T_DKIMWL_WL_MED=-0.01, URIBL_BLOCKED=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
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 grSTleYKnA4w for <netmod@ietfa.amsl.com>; Tue, 24 Apr 2018 02:01:57 -0700 (PDT)
Received: from aer-iport-1.cisco.com (aer-iport-1.cisco.com [173.38.203.51]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D5CE712025C for <netmod@ietf.org>; Tue, 24 Apr 2018 02:01:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=4155; q=dns/txt; s=iport; t=1524560517; x=1525770117; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=zTdTEEhTDKlkfBiwkDPjZXDLIpjqLzAvxEg/IVuPK4E=; b=mI7WvAuppG4xVvao4Ng/tsEo6lyu891/vTsRRUJuxhR/HN++gqFz9LHq Yj2MUYLLvcoTCS9C30j+0+hlz4+Sfp1w9/Lod8A8hdOXGm3N4Rn1bPepJ L/iesNFS9lhHA5roOtrwZ9ZH1tgKiPy1YU6ilyq2ttmfr/DBrCuS9NmHh w=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0CWAAAA8t5a/xbLJq1cGQEBAQEBAQE?= =?us-ascii?q?BAQEBAQcBAQEBAYQkeiiDaogCXo1lCCGBD5MCgXgLGAuEAkYCgxE0GAECAQE?= =?us-ascii?q?BAQEBAmwcDIUiAQEBAQIBAQEhDwEFNgsQCw4KAgImAgInMAYBDAYCAQEXhGw?= =?us-ascii?q?ID6YdghyEWINygjQFgQmIVz+BMgyCXIMRAQGBOYMnglQCl3cIjjoGh0qFBIs?= =?us-ascii?q?NhSGBJRw4gVIzGggbFTuCQ4sQhT8+MI18gkYBAQ?=
X-IronPort-AV: E=Sophos;i="5.49,322,1520899200"; d="scan'208";a="3374186"
Received: from aer-iport-nat.cisco.com (HELO aer-core-4.cisco.com) ([173.38.203.22]) by aer-iport-1.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Apr 2018 09:01:54 +0000
Received: from [10.63.23.54] (dhcp-ensft1-uk-vla370-10-63-23-54.cisco.com [10.63.23.54]) by aer-core-4.cisco.com (8.14.5/8.14.5) with ESMTP id w3O91seg019241; Tue, 24 Apr 2018 09:01:54 GMT
To: Martin Bjorklund <mbj@tail-f.com>, andy@yumaworks.com
Cc: netmod@ietf.org
References: <CABCOCHQXqPpXT031qaZ5psPr4C8rsC6E2PkaL2nNLB7K-H_37g@mail.gmail.com> <20180423.214923.1209533731960312602.mbj@tail-f.com> <CABCOCHTwdBbo_qtBu=_OunOtLNBXmWCWVZ8ajr0LFZPDFpNEFg@mail.gmail.com> <20180423.220815.526647366558506966.mbj@tail-f.com>
From: Robert Wilton <rwilton@cisco.com>
Message-ID: <dfc9aadd-0661-de66-d386-0ddc1d3990a6@cisco.com>
Date: Tue, 24 Apr 2018 10:01:54 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0
MIME-Version: 1.0
In-Reply-To: <20180423.220815.526647366558506966.mbj@tail-f.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/kkqLSg61haRDQw0XQlkPLJ9vyyU>
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: Tue, 24 Apr 2018 09:01:59 -0000


On 23/04/2018 21:08, Martin Bjorklund wrote:
> Andy Bierman <andy@yumaworks.com>; wrote:
>>> ....
>>>> I do not understand the need for a yang-data structure that represents
>>> data
>>>> that can be instantiated anywhere and everywhere.
>>> AFAIK noone is proposing that.
>>>
>>>> I do not want to break
>>>> existing tools that expect sibling data nodes in the same module
>>> namespace
>>>> to
>>>> be unique local-names.
>>>>
>>>> I would rather stick with the yang-data in RFC 8040 than introduce a new
>>>> extension
>>>> with no restrictions.  Standard YANG extensions should be interoperable
>>> and
>>>> have
>>>> a clear purpose.
>>> Of course.
>>>
>>>> If we do not need to define what a YANG extension does in
>>>> a way that can be observed somehow, then it does not need to be a
>>> standard.
>>>
>>> Agreed.
>>>
>>> Not sure how any of this helps with the original issue though.
>>>
>>>
>> You proposed that duplicate nodes were OK:
>>
>> module X {
>> prefix x;
>>
>> x:yang-data A {
>>     list foo { ... }
>> }
>>
>> x:yang-data B {
>>    container foo { ... }
>> }
>>
>> }
>>
>>
>> I do not want to allow any duplicates.
> Yes, I got that.
>
>> There are no encoding and parsing rules for instance data
>> that support this sort of duplicate.
> This is not correct, as I have demonstrated earlier, and I think you
> also accepted; if different structures are defined for different rpcs'
> error-infos, then these structures can have the same child node names.
>
> I think that we have to agree on the basics before disussing
> solutions:
>
>    1)  Should we do anything at all?
>
>        (i.e., keep using yang-data in RFC 8040)
There is also an option 1(b) which is to move the current yang-data 
definition on RFC 8040 into it's own document, just to fix the 
references issue.

>
>    2)  Should we define structures that only can be used in
>        standalone instance documents?
>
>        (i.e., *more* restrictive than yang-data in RFC 8040)
I don't think that we should define something more restrictive that 
yang-data in RFC 8040.

>
>    3)  Should we define structures that can be used in standalone
>        instance documents, error-info contents, and other places that
>        we might not know right now?
>
>        (i.e., *less* restrictive than yang-data in RFC 8040)
I don't know about this one because I'm not sure that I understand the 
problem space well enough.

For some of the categories above would a choice statement + groupings 
works just as well as a yang-data extension?

A different thought, one that has probably been considered before:
  - Could all yang data definitions be defined using groupings instead.  
I.e. a grouping without any associated uses statements.
  - Perhaps an extra statement under the grouping could be used to 
indicate whether the grouping represents a yang data definition.

Thanks,
Rob


>
>
> Since the current draft says:
>
>     The "yang-data" extension statement from RFC
>     8040 [RFC8040] is defined for this purpose, however it is limited in
>     its functionality.
>
>     The intended use of the "yang-data" extension is to model all or part
>     of a protocol message, such as the "errors" definition in ietf-
>     restconf.yang [RFC8040], or the contents of a file.  However,
>     protocols are often layered such that the header or payload portions
>     of the message can be extended by external documents.  The YANG
>     statements that model a protocol need to support this extensibility
>     that is already found in that protocol.
>
>
> I thought we are doing (3).
>
>
>
> /martin
>
>
>
>> yang-data definitions define conceptual data nodes (e.g, /x:foo)
>> Only one data-def-stmt (in yang-data or otherwise) can define a data node
>> /x:foo.
>> The descriptive names for the yang-data (A or B) do not define namespaces.
>>
>>
>>
>>> /martin
>>>
>>>
>> Andy
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod
> .
>