Re: [Netconf] [yang-doctors] YANG Doctor question: empty mandatory choice? (was RE: YangPush now)

Robert Wilton <rwilton@cisco.com> Fri, 27 July 2018 11:12 UTC

Return-Path: <rwilton@cisco.com>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4CC1A130F1F; Fri, 27 Jul 2018 04:12:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.511
X-Spam-Level:
X-Spam-Status: No, score=-14.511 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, USER_IN_DEF_DKIM_WL=-7.5] autolearn=unavailable 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 d9A4mPx4kd4L; Fri, 27 Jul 2018 04:12:00 -0700 (PDT)
Received: from aer-iport-2.cisco.com (aer-iport-2.cisco.com [173.38.203.52]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 696DD130EBB; Fri, 27 Jul 2018 04:11:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=3651; q=dns/txt; s=iport; t=1532689919; x=1533899519; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=qc4T6n5rwgnV17Q6GLdJUZ4BWcC6EvUFBZRk5RODbhU=; b=T9bA1roP2d8ikdBeUoPFm2MbD7wNlr1HiIhB5k+o7vTijVqOeSrD7Q/O CHFTSS8o+fU6ymTZkDlIaZv5g91QwB16LRDNzYjrunURGyPAwQR3qVVFm Jf6FykLnswgWJCjanmPCdnSc3Gwl9xlthLQmEjVvqX0boJtxv9/NbgG9L 0=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0CJAQDf/Fpb/xbLJq1RBwMZAQEBAQE?= =?us-ascii?q?BAQEBAQEBBwEBAQEBhDF/KIN+iGWNPQgklVGBegsYC4QDRgKDGjUXAQIBAQI?= =?us-ascii?q?BAQJtHAyFNgEBAQEDAQEhDwEFNgsOAgsQBQIBAgIJHQICGwwoCAYBDAYCAQG?= =?us-ascii?q?DHAGBfw+tbYEuhF6FYAUFgQaIDoFBP4ERJwyCX4MbAQEBgTQLAQE/JoI6gjU?= =?us-ascii?q?gAoxojSMJjzAGiC2FWYxchViBQwE1gVIzGggbFTuCaYIlFxGDZ4RhhT8+MAG?= =?us-ascii?q?NGoI6AQE?=
X-IronPort-AV: E=Sophos;i="5.51,408,1526342400"; d="scan'208";a="5437455"
Received: from aer-iport-nat.cisco.com (HELO aer-core-2.cisco.com) ([173.38.203.22]) by aer-iport-2.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Jul 2018 11:11:57 +0000
Received: from [10.63.23.106] (dhcp-ensft1-uk-vla370-10-63-23-106.cisco.com [10.63.23.106]) by aer-core-2.cisco.com (8.15.2/8.15.2) with ESMTP id w6RBBuYa030300; Fri, 27 Jul 2018 11:11:56 GMT
To: "Eric Voit (evoit)" <evoit=40cisco.com@dmarc.ietf.org>, Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
Cc: "yang-doctors@ietf.org" <yang-doctors@ietf.org>, "netconf@ietf.org" <netconf@ietf.org>
References: <727ae35abd394a85812168615acce2d3@XCH-RTP-013.cisco.com> <20180726221120.bv3mtlitoqqov2zm@anna.jacobs.jacobs-university.de> <1b58e76f527442c3a0fa34437b9f0cd4@XCH-RTP-013.cisco.com>
From: Robert Wilton <rwilton@cisco.com>
Message-ID: <7a87a2c9-9af6-2555-e661-519e0352d1bf@cisco.com>
Date: Fri, 27 Jul 2018 12:11:56 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1
MIME-Version: 1.0
In-Reply-To: <1b58e76f527442c3a0fa34437b9f0cd4@XCH-RTP-013.cisco.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Content-Language: en-US
X-Outbound-SMTP-Client: 10.63.23.106, dhcp-ensft1-uk-vla370-10-63-23-106.cisco.com
X-Outbound-Node: aer-core-2.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/fTuupw91fccecgK-d_iETcO1IXA>
Subject: Re: [Netconf] [yang-doctors] YANG Doctor question: empty mandatory choice? (was RE: YangPush now)
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.27
Precedence: list
List-Id: Network Configuration WG mailing list <netconf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netconf>, <mailto:netconf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netconf/>
List-Post: <mailto:netconf@ietf.org>
List-Help: <mailto:netconf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netconf>, <mailto:netconf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 27 Jul 2018 11:12:02 -0000

Hi Eric,

Perhaps you don't need the transport leaf directly under the subscription.

One option would be for the standard to state:
  - Implementations MUST support multiple receivers with the same 
transport, and MAY support receivers with different transports.

A YANG "multiple-transports" feature could be defined to indicate that 
the device support receivers with multiple transports (so that the 
client can determine what is allowed).

If the device didn't implement the multiple-transports feature then this 
could probably be enforced with an must statement under each particular 
transports, although I'm not convinced that this really matters.

Thanks,
Rob


On 27/07/2018 00:35, Eric Voit (evoit) wrote:
> Hi Juergen,
>
>> From: Juergen Schoenwaelder, July 26, 2018 6:11 PM
>> To: Eric Voit (evoit) <evoit@cisco.com>
>> Cc: Kent Watsen <kwatsen@juniper.net>et>; yang-doctors@ietf.org;
>> netconf@ietf.org
>> Subject: Re: [yang-doctors] YANG Doctor question: empty mandatory
>> choice? (was RE: [Netconf] YangPush now)
>>
>> On Thu, Jul 26, 2018 at 07:22:40PM +0000, Eric Voit (evoit) wrote:
>>
>>> For all receivers in a subscription, the selected transport choice
>>> case in Kent’s suggestion above MUST match to the value of the
>>> “transport” leaf which is one level higher in the tree.  I.e.:
>>>
>>>      +--rw subscriptions
>>>         +--rw subscription* [identifier]
>>>            +--rw transport                                  transport {configured}?
>>>            +--rw receivers
>>>               +--rw receiver* [name]
>>>               +--rw (transport)
>>>                  +--rw :(NETCONF)
>>>                  |  +--rw (NETCONF specific call home parameters)
>>>                  +--rw :(HTTP2)
>>>                      +--rw (HTTP2 specific parameters)
>>>
>>> (Note on the tree above, I inserted the NETCONF and HTTP2 cases of
>>> transport for illustration purposes for the question below.  These two
>>> cases would actually be incorporated via separate augmentations to the
>>> ietf-subscribed-notifications.yang model.)
>>>
>>> Considering above, It seems difficult to enforce that the transport
>>> cases selected under all receivers for a single subscription MUST be
>>> identical, and also MUST match to the value of the “transport” leaf
>>> under the subscription.
>> Why is the transport leaf needed if the choice cases identify the transport?
>> Why do all receivers of a subscription have to use the same transport?
> One transport for all receivers was a voted WG decision at IETF 101.  Some of the reasons from threads like:
> https://www.ietf.org/mail-archive/web/netconf/current/msg13875.html
> https://www.ietf.org/mail-archive/web/netconf/current/msg14899.html
>
> include:
> (1) Simpler YANG model
> (2) Simpler implementation possible as a single configured subscription need be connected to only one transport
> (3) Simpler implementation in that there is no expectation set on the publisher that there will be no transport loss if the transport type is reconfigured for a particular receiver mid-subscription.
> (4) Separation of implementation/troubleshooting concerns, as only one transport is involved
>
> Eric
>
>   
>> /js
>>
>> --
>> Juergen Schoenwaelder           Jacobs University Bremen gGmbH
>> Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
>> Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>
> _______________________________________________
> yang-doctors mailing list
> yang-doctors@ietf.org
> https://www.ietf.org/mailman/listinfo/yang-doctors