Re: [Netconf] mbj's WGLC review of subscribed-notifications-16

"Eric Voit (evoit)" <evoit@cisco.com> Mon, 17 September 2018 15:26 UTC

Return-Path: <evoit@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 56567130E95 for <netconf@ietfa.amsl.com>; Mon, 17 Sep 2018 08:26:16 -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_HIGH=-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 uRuM6re0CULb for <netconf@ietfa.amsl.com>; Mon, 17 Sep 2018 08:26:13 -0700 (PDT)
Received: from rcdn-iport-3.cisco.com (rcdn-iport-3.cisco.com [173.37.86.74]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 24E84130E86 for <netconf@ietf.org>; Mon, 17 Sep 2018 08:26:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=19414; q=dns/txt; s=iport; t=1537197972; x=1538407572; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=kZ949GV5SSOlQxZO/65uv76+ojKKjGNPc04c7yszyFs=; b=TIhu+zGjlSrDU6xQfLUKFeHClcOLpXmzIxFNKXCRC9/fjrpnSJzoOr19 +r8zRjCJzN4qTo98xyJvo8eQ3lcISIIhVAu2XBFwxYVkfwot6q9zvVGzq KTrW1BbqmKYftXicu9OZUByV8CkKQfGRgglznKwwqGTHF90SZ9NFkDwRc w=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0CEAAABx59b/4MNJK1RChkBAQEBAQEBAQEBAQEHAQEBAQGBUIFeKmV/KAqDaIgVjCqCDYM9kw6BegsnhEUCF4NbITQYAQMBAQIBAQJtHAyFOAEBAQECASMRQwIFCwIBCBUDAgIJHQICAjAVEAIEAQ0FCIJOTIF5CA+lKYEuigEFgQuJYheBQT+BEoMSgxsCgTYLAQElECOCR4JXAogzhS2OFU8JAoY7iVAfgUOHTIV+i12ISwIRFIElHTiBVXAVO4JshgGFFIU+b4sQgR+BHgEB
X-IronPort-AV: E=Sophos;i="5.53,385,1531785600"; d="scan'208";a="442981833"
Received: from alln-core-1.cisco.com ([173.36.13.131]) by rcdn-iport-3.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Sep 2018 15:26:10 +0000
Received: from XCH-RTP-001.cisco.com (xch-rtp-001.cisco.com [64.101.220.141]) by alln-core-1.cisco.com (8.15.2/8.15.2) with ESMTPS id w8HFQAqG024094 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL); Mon, 17 Sep 2018 15:26:10 GMT
Received: from xch-rtp-013.cisco.com (64.101.220.153) by XCH-RTP-001.cisco.com (64.101.220.141) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 17 Sep 2018 11:26:09 -0400
Received: from xch-rtp-013.cisco.com ([64.101.220.153]) by XCH-RTP-013.cisco.com ([64.101.220.153]) with mapi id 15.00.1395.000; Mon, 17 Sep 2018 11:26:09 -0400
From: "Eric Voit (evoit)" <evoit@cisco.com>
To: "Reshad Rahman (rrahman)" <rrahman@cisco.com>, Martin Bjorklund <mbj@tail-f.com>
CC: "netconf@ietf.org" <netconf@ietf.org>
Thread-Topic: [Netconf] mbj's WGLC review of subscribed-notifications-16
Thread-Index: AQHUSS2c6fWPWMQnpECqHWzj9l2RFqTpyY1wgALe1QCAACWmwIABR3cAgAB1RYD//78NEIAAdR+AgAXjfaA=
Date: Mon, 17 Sep 2018 15:26:09 +0000
Message-ID: <8c2e43f64a1d4b61a203245b69a18eea@XCH-RTP-013.cisco.com>
References: <20180912.113446.2017030234338816835.mbj@tail-f.com> <013a970e210d4b9693116818f3d5688e@XCH-RTP-013.cisco.com> <20180913.092134.395462318086733174.mbj@tail-f.com> <20180913.162117.1031242545011500593.mbj@tail-f.com> <e8c6e0a67fb34c5097a9db11f7d4db99@XCH-RTP-013.cisco.com> <AF866A9E-9458-4FE6-949B-B10F4C7049A3@cisco.com>
In-Reply-To: <AF866A9E-9458-4FE6-949B-B10F4C7049A3@cisco.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [10.118.56.234]
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-Outbound-SMTP-Client: 64.101.220.141, xch-rtp-001.cisco.com
X-Outbound-Node: alln-core-1.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/a0zpNd2Vu5OEcaQzuGYumU2yiIo>
Subject: Re: [Netconf] mbj's WGLC review of subscribed-notifications-16
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.29
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: Mon, 17 Sep 2018 15:26:16 -0000

I have placed Xpath and subtree examples into section A.4 of:
https://github.com/netconf-wg/notif-netconf/blob/master/draft-ietf-netconf-netconf-event-notifications-12.txt

I will upload NETCONF-Notif v12 once comments on subscribed-notifications slow...

Eric

> From: Reshad Rahman, September 13, 2018 1:28 PM
> 
> PSI.
> 
> On 2018-09-13, 11:08 AM, "Eric Voit (evoit)" <evoit@cisco.com> wrote:
> 
>     Hi Martin,
> 
>     I am fine with the three text clarifications proposed, and will incorporate.
> More in-line...
> 
>     > From: Martin Bjorklund, September 13, 2018 10:21 AM
>     >
>     > Hi,
>     >
>     > One problematic thing below.
>     >
>     > Martin Bjorklund <mbj@tail-f.com> wrote:
>     > > Hi,
>     > >
>     > > Thank you for addressing my comments.  More inline.
>     > >
>     > >
>     > > "Eric Voit (evoit)" <evoit@cisco.com> wrote:
>     > > > Hi Martin,
>     > > >
>     > > > Much incorporated.  Latest is at:
>     > > > https://github.com/netconf-wg/rfc5277bis/blob/master/draft-ietf-netc
>     > > > onf-subscribed-notifications-17.txt
>     > > >
>     > > > Specific responses in-line...
>     > > >
>     > > > > From: Martin Bjorklund, September 12, 2018 5:35 AM
>     > > > >
>     > > > > "Eric Voit (evoit)" <evoit@cisco.com> wrote:
>     > > > > > Thanks for the comments Martin,  thoughts in-line...
>     > > > > >
>     > > > > > > From: Martin Bjorklund, September 10, 2018 1:42 PM
>     > > > >
>     > > > > [...]
>     > > > >
>     > > > > > > o  Section 2.1
>     > > > > > >
>     > > > > > >   The text says:
>     > > > > > >
>     > > > > > >     It is out of the scope of this document
>     > > > > > >     to identify [...] b) how event records are defined
>     > > > > > >
>     > > > > > >   Is this really what we want?  Shouldn't this document specify
> that
>     > > > > > >   an event record is an instance of a YANG "notification"
> statement?
>     > > > > > >   Do we want to support event records that are not defined in
> YANG?
>     > > > > > >
>     > > > > > >   This was discussed in the thread "comments on
>     > > > > > >   draft-ietf-netconf-subscribed-notifications-12", and it seems that
>     > > > > > >   noone really have any use case for non-YANG-defined event
> records,
>     > > > > > >   accessed with YANG-defined operations.
>     > > > > >
>     > > > > > Yes this was discussed previously.  My reading was that others
>     > > > > > wanted to support subscription to non-YANG events.
>     > > > > > E.g., see Andy & Tianran's thoughts in
>     > > > > > https://www.ietf.org/mail-
> archive/web/netconf/current/msg14764.h
>     > > > > > tml
>     > > > >
>     > > > > Yes, but read on in that thread, see
>     > > > > https://www.ietf.org/mail-
> archive/web/netconf/current/msg14766.htm
>     > > > > l
>     > > > > for a clarification.
>     > > > >
>     > > > > AFAIK, noone has presented a use case for sending non-YANG-
> defined
>     > > > > data here.
>     > > >
>     > > > As anything can be YANG wrapped, per the thread above.  I am fine
>     > > > with this.
>     > > >
>     > > > > > >   I think that this document should state that an event record is an
>     > > > > > >   instance of a YANG "notification" statement.  If not, it is unclear
>     > > > > > >   both how subtree/xpath filters and xml/json/... encodings would
>     > work.
>     > > > > >
>     > > > > > Applying xpath filters against XML based event records seems
>     > > > > > viable to me.
>     > > > >
>     > > > > Where does it say that it has to be XML?  Whatabout mixed-content?
>     > > > > What if such a notification is sent when the encoding is JSON?
>     > > > >
>     > > > > If you want to make this specification open for other data
>     > > > > modeling languages, I think you need to carefully define how that
>     > > > > is supposed to work; essentially similar to how we handle
>     > > > > transports; we have a set of requirement on what a transport
>     > > > > document must define.  IMO this is super complicated and overkill.
>     > > > > This draft is complex enough.
>     > > > > Don't add even more complexity.
>     > > >
>     > > > If you are just saying that we can put everything into a YANG
>     > > > wrapper, that is fine with me.  To clarify this, I have tweaked the
>     > > > first sentence of Section 2.1 to:
>     > > > "An event stream is a named entity on a publisher which exposes a
>     > > > continuously updating set of YANG encoded event records."
>     > >
>     > > Howabout:
>     > >
>     > > OLD:
>     > >
>     > >    An event stream is a named entity on a publisher which exposes a
>     > >    continuously updating set of event records.  Each event stream is
>     > >    available for subscription.  It is out of the scope of this document
>     > >    to identify a) how streams are defined (other than the NETCONF
>     > >    stream), b) how event records are defined/generated, and c) how
> event
>     > >    records are assigned to streams.
>     > >
>     > > NEW:
>     > >
>     > >    An event stream is a named entity on a publisher which exposes a
>     > >    continuously updating set of event records.  An event record is
>     > >    defined with the "notification" YANG statement.  Each event stream is
>     > >    available for subscription.  It is out of the scope of this document
>     > >    to identify a) how streams are defined (other than the NETCONF
>     > >    stream), b) how event records are generated, and c) how event
>     > >    records are assigned to streams.
>     > >
>     > > > And I have tweaked the first sentence of the third paragraph to:
>     > > > "As YANG encoded event records are created by a system,..."
>     > >
>     > > I think the original sentence is better.
>     > >
>     > > Also, some tweaks are needed to the filter leafs in the YANG module:
>     > >
>     > > OLD:
>     > >
>     > >           The subtree filter is applied to the representation of
>     > >           individual, delineated event records as contained within the
>     > >           event stream.  For example, if the notification message
>     > >           contains an instance of a notification defined in YANG, then
>     > >           the top-level element is the name of the YANG notification.
>     > >
>     > > NEW:
>     > >
>     > >           The subtree filter is applied to the representation of
>     > >           individual, delineated event records as contained within the
>     > >           event stream.  The top-level element in the event record is
>     > >           the name of the YANG notification.
>     > >
>     > > and
>     > >
>     > > OLD:
>     > >
>     > >            The XPath expression is evaluated on the representation of
>     > >            individual, delineated event records as contained within
>     > >            the event stream.  For example, if the notification message
>     > >            contains an instance of a notification defined in YANG,
>     > >            then the top-level element is the name of the YANG
>     > >            notification, and the root node has this top-level element
>     > >            as the only child.
>     > >
>     > > NEW:
>     > >
>     > >
>     > >            The XPath expression is evaluated on the representation of
>     > >            individual, delineated event records as contained within
>     > >            the event stream.  The top-level element in the event
>     > >            record is the name of the YANG notification, and the root
>     > >            node has this top-level element as the only child.
>     >
>     >
>     > This text is problematic b/c it doesn't work well with inline notifications.
>     >
>     > Consider the example in section 7.16.3 in RFC 7950:
>     >
>     >        container interfaces {
>     >          list interface {
>     >            key "name";
>     >            leaf name {
>     >              type string;
>     >            }
>     >            notification interface-enabled {
>     >              leaf by-user {
>     >                type string;
>     >              }
>     >            }
>     >          }
>     >        }
>     >
>     > and corresponding XML example:
>     >
>     >      <notification
>     >        xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
>     >        <eventTime>2008-07-08T00:01:00Z</eventTime>
>     >        <interfaces xmlns="urn:example:interface-module">
>     >          <interface>
>     >            <name>eth1</name>
>     >            <interface-enabled>
>     >              <by-user>fred</by-user>
>     >            </interface-enabled>
>     >          </interface>
>     >        </interfaces>
>     >      </notification>
>     >
>     > What, in this example, is the "event record"?  I assume it is this
>     > part:
>     >
>     >        <interfaces xmlns="urn:example:interface-module">
>     >          <interface>
>     >            <name>eth1</name>
>     >            <interface-enabled>
>     >              <by-user>fred</by-user>
>     >            </interface-enabled>
>     >          </interface>
>     >        </interfaces>
>     >
>     > But the element that is the name of the YANG notification is this:
>     >
>     >            <interface-enabled>
>     >              <by-user>fred</by-user>
>     >            </interface-enabled>
>     >
>     >
>     > (With draft-ietf-netconf-notification-message, the "event record"
>     > would be placed in the <notification-contents> anydata)
>     >
>     >
>     > A problem is that the containment hierarchy is defined in RFC 7950 in the
> XML
>     > encoding text.  There is no text in RFC 7951 or RFC 8040 for how to do this
> in
>     > JSON for RESTCONF.  It is natural to do a pure JSON-translation of the XML
>     > example, but this isn't specified anywhere.
>     >
>     >
>     > So I propose the following tweaked changes:
>     >
>     >
>     > OLD:
>     >
>     >    An event stream is a named entity on a publisher which exposes a
>     >    continuously updating set of event records.  Each event stream is
>     >    available for subscription.  It is out of the scope of this document
>     >    to identify a) how streams are defined (other than the NETCONF
>     >    stream), b) how event records are defined/generated, and c) how event
>     >    records are assigned to streams.
>     >
>     > NEW:
>     >
>     >    An event stream is a named entity on a publisher which exposes a
>     >    continuously updating set of event records.  An event record is an
>     >    intantiation of a "notification" YANG statement.  If the
>     >    "notification" is defined as a child to a data node, the
>     >    intantiation includes the hierarchy of nodes that identifies the
>     >    data node in the datastore (see Section 7.16.2 of RFC 7950).  Each
>     >    event stream is available for subscription.  It is out of the scope
>     >    of this document to identify a) how streams are defined (other than
>     >    the NETCONF stream), b) how event records are generated, and c) how
>     >    event records are assigned to streams.
>     >
>     >
>     > and in the YANG module:
>     >
>     > OLD:
>     >
>     >           The subtree filter is applied to the representation of
>     >           individual, delineated event records as contained within the
>     >           event stream.  For example, if the notification message
>     >           contains an instance of a notification defined in YANG, then
>     >           the top-level element is the name of the YANG notification.
>     >
>     > NEW:
>     >
>     >           The subtree filter is applied to the representation of
>     >           individual, delineated event records as contained within the
>     >           event stream.
>     >
>     > and
>     >
>     > OLD:
>     >
>     >            The XPath expression is evaluated on the representation of
>     >            individual, delineated event records as contained within
>     >            the event stream.  For example, if the notification message
>     >            contains an instance of a notification defined in YANG,
>     >            then the top-level element is the name of the YANG
>     >            notification, and the root node has this top-level element
>     >            as the only child.
>     >
>     > NEW:
>     >
>     >
>     >            The XPath expression is evaluated on the representation of
>     >            individual, delineated event records as contained within
>     >            the event stream.
>     >
>     > > (I think it would be useful with some filtering examples, like in
>     > > section 5 of RFC 5277, but I think you have all examples in
>     > > netconf-notif, so they would go into that draft.  (re-reading an old
>     > > thread I found that examples for filters were requested before)).
>     >
>     > And I strongly think that we should add examples in an appendix, even
> though
>     > this is a protocol and encoding neutral document.  Maybe one example
> with
>     > NETCONF XML and one with RESTCONF JSON.  One example can show a
>     > subtree filter and a top-level notif, and the other an XPath filter with an
> inline
>     > notif.
> 
>     We have worked very hard to keep the document protocol agnostic.  Even
> the Appendix A example protocol for configured subscriptions is 'foo'.
> 
>     If you are ok with it, I am completely fine with adding two such NETCONF
> XML filtering examples into a new Appendix section A.4 in NETCONF-Notif.
> Perhaps Reshad would be able to do the same for RESTCONF JSON within
> RESTCONF-Notif.
> 
>     Eric
> 
>     <RR> Yes  if it gets added to NETCONF-Notif, I agree to add similar examples
> tp RESTCONF-Notif.
> 
> Regards,
> Reshad.
> 
>     > /martin
>