Re: [Netconf] YANG Doctor question: empty mandatory choice?

"Einar Nilsen-Nygaard (einarnn)" <> Thu, 02 August 2018 16:04 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 1293C130E1B for <>; Thu, 2 Aug 2018 09:04:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -14.51
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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id z5QYFMeyslXb for <>; Thu, 2 Aug 2018 09:04:44 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 568E3130E0E for <>; Thu, 2 Aug 2018 09:04:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;;; l=41090; q=dns/txt; s=iport; t=1533225884; x=1534435484; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version; bh=eUdvQJpczCGriMOqoiYxQga1ckKrpjcDFJCF77sSVmc=; b=fiwSk4XkMtGERzJhdMy8UNbQZePeaH1VH7aYypwyDpWZtSYsVGWWTD3n HBxfIH60MRBJxAmCL5KR30mK1sIKLabh4qr+rIJYOCE1I3ZFHKOjL3Ve8 Y3Mke5KCXsv+zIm4aMC4n8bLkhoKxxzTDZkNtb7VrMm5PTk6oACzqeQWa s=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-AV: E=Sophos;i="5.51,436,1526342400"; d="scan'208,217";a="422286988"
Received: from ([]) by with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Aug 2018 16:04:43 +0000
Received: from ( []) by (8.15.2/8.15.2) with ESMTPS id w72G4gVY021058 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL); Thu, 2 Aug 2018 16:04:43 GMT
Received: from ( by ( with Microsoft SMTP Server (TLS) id 15.0.1320.4; Thu, 2 Aug 2018 12:04:42 -0400
Received: from ([]) by ([]) with mapi id 15.00.1320.000; Thu, 2 Aug 2018 12:04:42 -0400
From: "Einar Nilsen-Nygaard (einarnn)" <>
To: Kent Watsen <>
CC: Alexander Clemm <>, Martin Bjorklund <>, "" <>, "" <>
Thread-Topic: [Netconf] YANG Doctor question: empty mandatory choice?
Date: Thu, 2 Aug 2018 16:04:42 +0000
Message-ID: <>
References: <> <> <> <>
In-Reply-To: <>
Accept-Language: en-US
Content-Language: en-US
x-mailer: Apple Mail (2.3445.9.1)
x-ms-exchange-messagesentrepresentingtype: 1
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: []
Content-Type: multipart/alternative; boundary="_000_78F7B695FB2A4308B031B7447596B04Bciscocom_"
MIME-Version: 1.0
Archived-At: <>
Subject: Re: [Netconf] YANG Doctor question: empty mandatory choice?
X-Mailman-Version: 2.1.27
Precedence: list
List-Id: Network Configuration WG mailing list <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Thu, 02 Aug 2018 16:04:47 -0000


On 2 Aug 2018, at 16:11, Kent Watsen <<>> wrote:

I am sympathetic to Eric's and Einar's observation that a given subscription, having multiple receivers, is likely to have all the receivers using the same transport and encoding.

einarnn> Absolutely. I see very few real world cases where it is likely that we will see same subscription with different receivers using different encodings. It is a step too far IMO.

The thought behind this is that, assuming there are multiple distinct applications, each application will selfishly create its own subscription; it will not try to see if there is another existing subscription that matches its needs.

einarnn> This is the likely outcome if you are in a multi-manager scenario anyway. We shouldn’t be trying to optimise anything related to thinking that distinct consumers will try to reuse others’ subscriptions in a spirit of good citizenship. It just won’t, pragmatically, happen. What would be way more likely to happen to support this is that the distribution out to multiple distinct consumers will happen by way of middleware put in place by the customer.

Thus, in effect, the *only* purpose for there being a *list* of receivers is for enabling high availability, which I think is okay.  I wish the text was clearer about this objective.

einarnn> Agreed. Let’s just move past this issue



What I object to is the way that this restriction is currently implemented using identities, which requires the "notif" models to do something right.  Better would be a "must" expression that says the count of the descendants is exactly one.  Can you do that?

Kent // contributor

===== original message =====

I am wondering why we are reopening the issue of multiple encodings/transports per receiver vs per subscription?

Having single transport / encoding per subscription is a simpler design (feedback from implementors; simplifies dealing with any error conditions due to encoding that would affect one receiver but not others in the same subscription; Einar has explained this in the past) and, while I am in general a fan of general design, there does not seem to be business requirements and scenarios that demand this - and even if there were, this would constitute merely an optimization (since if you have different receivers who want different encodings/tranport, you can always simply create another subscription).

If in the future there is really desire to add this as an additional feature, we can put this into a -bis version.  (Adding stuff will be easier than taking things away.)  Let's just be done.

--- Alex

-----Original Message-----
From: Netconf [] On Behalf Of Martin
Sent: Tuesday, July 31, 2018 7:51 AM
Subject: Re: [Netconf] YANG Doctor question: empty mandatory choice?

Kent Watsen <<>> wrote:
[removing yang-doctors list, and updating subject line accordingly]

Why do all receivers of a subscription have to use the same

This was something that Martin and Eric worked out before we did
the first Last Call.  Eric doesn't seem to know the particular
reason, other than Martin seems to think it’s easier.

No; I personally also prefer a design where each receiver has its
own transport + encoding.


The original model had a common "encoding" for all receivers, and
then a receiver-specific transport - I think this is even worse,


and suggested to have transport + encoding defined together
preferrably receiver-specifc or else common for all receivers.

If the WG now believes that the transport + encoding should be done
per receiver, this should be fairly easy to change.

I also prefer per receiver, and I think that doing so will simplify
the model, as neither the mandatory "transport" nor the [not
mandatory?] "encoding" leaves have to be specified.

In particular, my thoughts are that the "notif" model should provide
for the encoding selection, if needed (it's not needed for NETCONF, or
COAP I imagine).

I agree.  I think this would be a cleaner design.


In the case of RESTCONF, we could update the ietf-restconf-client and
ietf-restconf-server models to include an "encodings" leaf-list, to
configure the RESTCONF server which encodings it should support.  We
likely need to do something similar to configure which HTTP versions
should be supported.  Now, in a general RC server, the server could
support both but, if the restconf-notif draft has its own list of
restconf-servers (i.e., it uses the "restconf-server-grouping" itself,
see my July 19 email for a YANG example), then a constraint could be
added limiting the number "supported" to just one.  Thus, when the RC
server reboots, and connects to the receiver and *automatically* (no
client RPC) starts pushing notifications, it can know what encoding to

I'm still unsure if its legal for an RC server to automatically push
notifications without a client-initiated RPC of any sort, and I'm also
uncertain if supporting *configured* subscriptions for NC or RC is
needed (see my message July 20 email).  So, some of this may work
itself out as we progress.

I know that we're not defining the *configured* notif drafts in this
first effort, the we are publishing the SN draft with a configuration
model, my only concern now is configuration model presented in the SN

Kent // contributor

Netconf mailing list<>

Netconf mailing list<>