Subject: Re: [Netconf] Updates to subscription drafts posted

From: Martin Bjorklund <[email-masked]>
Date: Mon, 08 Jan 2018 12:44:20 +0100 (CET)

Hi,

"Eric Voit (evoit)" <[email-masked]> wrote:
> Hi,
> 
> At the end of IETF Singapore, we subscription draft authors promised
> an update to the subscription drafts.  As of today, the yang-push
> and subscribed-notification drafts have been updated. 
> 
> Below are a list of the elements updated.   And below that are the
> four current known open issues.   If you know of anything else which
> needs to be done, please chime in! 
> 
> 
> ---------------------------------------------------------------------------
> draft-ietf-netconf-yang-push-12  -  Changes per the latest version...
> ---------------------------------------------------------------------------

[...]

> (4) YANG model: Streams all made as leafrefs to the  streams
> container (rather than string).  As a result, elements of the stream
> container are all now "rw", as YANG doesn't allow configured
> subscriptions to point to configuration false streams. 

(I think this change relates to subscribed-notifications, rather than
yang-push).

I strongly object to this change.  You can't just change the streams
container to be config true; this completely changes the semantics of
how streams work!  The whole idea with the current streams definition
is that it is state data, provided by the server.   The text says:

   It is out of the scope of this document
   to identify a) how streams are defined, b) how event records are
   defined/generated, and c) how event records are assigned to streams.

And even if we now were to address the problem of user-configurable
streams, I don't think the proposed leafref is correct.

YANG does allow references from configuration to state, if you use
"require-instance false".  You should then explain what happens to a
configured subscription if the stream doesn't exist.

/martin

---

From: "Eric Voit (evoit)" <[email-masked]>
Date: Mon, 8 Jan 2018 20:45:02 +0000

Hi Martin,

> From: Martin Bjorklund, January 8, 2018 6:44 AM
> 
> Hi,
> 
> > an update to the subscription drafts.  As of today, the yang-push and
> > subscribed-notification drafts have been updated.
> >
> > (4) YANG model: Streams all made as leafrefs to the  streams container
> > (rather than string).  As a result, elements of the stream container
> > are all now "rw", as YANG doesn't allow configured subscriptions to
> > point to configuration false streams.
> 
> (I think this change relates to subscribed-notifications, rather than yang-push).
> 
> I strongly object to this change.  You can't just change the streams container to
> be config true; this completely changes the semantics of how streams work!
> The whole idea with the current streams definition
> And even if we now were to address the problem of user-configurable streams,
> I don't think the proposed leafref is correct.
> 
> YANG does allow references from configuration to state, if you use "require-
> instance false".  You should then explain what happens to a configured
> subscription if the stream doesn't exist.

I agree.   I also don't like making streams "rw".     What you describe above is what I tried initially.  However I kept getting errors from yanglint, so I thought it wasn't possible.  

It turns out there is actually a yanglint error for validating this "require-instance false" case when you are pulling your leafref definitions from a grouping.  I will start another thread with Benoit (with you cc'ed) to close this error. 

Based on this, the YANG excerpt below is now in the subscribed-notifications.yang file.  This should cover your request.

        leaf stream {
          type stream-ref {
            require-instance false;
          }
          mandatory true;
          description
            "Indicates the stream of event records to be considered for
            this subscription.   If a stream has been removed, and no 
            longer can be referenced by an active subscription, send a 
            'subscription-terminated' notification with 
            'stream-unavailable' as the reason.  If a configured 
            subscription refers to a non-existent stream, move that
            subscription to the 'invalid' state.";
        }

Eric