[netconf] Re: Adoption call for notif-yang-04

Thomas.Graf@swisscom.com Fri, 14 June 2024 08:11 UTC

Return-Path: <Thomas.Graf@swisscom.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 7FB2AC14F6FE for <netconf@ietfa.amsl.com>; Fri, 14 Jun 2024 01:11:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.404
X-Spam-Level:
X-Spam-Status: No, score=-4.404 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=swisscom.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2EjnQ5lLbVcJ for <netconf@ietfa.amsl.com>; Fri, 14 Jun 2024 01:10:55 -0700 (PDT)
Received: from mail.swisscom.com (mailout110.swisscom.com [138.188.166.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4E5B1C15199C for <netconf@ietf.org>; Fri, 14 Jun 2024 01:10:53 -0700 (PDT)
Received: by mail.swisscom.com; Fri, 14 Jun 2024 10:10:46 +0200
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=swisscom.com; s=iscm; t=1718352646; bh=lGr69s3hAOhj/Pmd5pLjSd9kDwhNxOVUmgCz0GWCc0M=; h=From:To:CC:Subject:Date:References:In-Reply-To; b=Gk39h/x5JVeoTC0YjSX/dckuwywj42mLTvgaojnLILZgoxQbP/GSGrWRiKc3Czw/8 4YeVVJDVfu2YrbyP0QH2dNbx9Gdvy+rwC4E3wcWKoQ3GRSOYWtMCEKaQho0nrIPrAo 7hitU0tlV80j6uSgFXjqrDg/Fs8beQ/CLzukUU672lU48AdIKsJnAv8d4tTbZAsn5T XCb4yQJrOYEKSuSpmRzDOSxg5VGw6N7Q0FOWAJBmAqNVMowCJBpMh5B4wG+w0IlMPd 47YCmnfQyXW7bviUNn7ep8qcp4Wd9aSd/xbsKT24katE8PSvJPEMJd3KkXKz7WALBG HTPY1990iHnQQ==
MIME-Version: 1.0
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg="sha-256"; boundary="----=_Part_736018_374757932.1718352645746"
X-Mailer: Totemo_TrustMail_(Notification)
From: Thomas.Graf@swisscom.com
To: kent+ietf@watsen.net
Thread-Topic: [netconf] Adoption call for notif-yang-04
Thread-Index: AQHaiG/R3p/msZJOZkmEIn20P4DSh7Ft+tQAgABYjICABlPSgIABLAKAgBrkXpCAABk3AIAAUlsAgA1knNCAJ5BygIABKo7g
Date: Fri, 14 Jun 2024 08:10:42 +0000
Message-ID: <0c05e57e06474f5db28b085049f863db@swisscom.com>
References: <0100018eb57a21d8-26b38f41-a625-4d44-9248-09b349fd4212-000000@email.amazonses.com> <DU2PR02MB10160110D4C72D682BA884802880E2@DU2PR02MB10160.eurprd02.prod.outlook.com> <CABCOCHT4Yy8gUKxmR9__ZcAEULiK8g-S7-B6EaLO8s0nk0FjTg@mail.gmail.com> <0100018f07521d0a-17e021b3-295a-4c50-8316-58632d7a7107-000000@email.amazonses.com> <CACvbXWGS_Er8bK0u4suNs0oHD7B6avObk8uu6bET_-7xWHcdbQ@mail.gmail.com> <355358f23f374b8dba8a20c00fea03f4@swisscom.com> <CABCOCHRVEQBocBAspUHJFE0vp8AkO1KCimPdUV9+H0kpg1TgYA@mail.gmail.com> <0100018f64a85d1c-f98eabaf-771e-473d-a1c3-40b8f9b51dc4-000000@email.amazonses.com> <0e02c89bdb8d445db0a3f83b30b01887@swisscom.com> <0100019012301ba8-cbf266f3-b215-4454-879e-193606dfd926-000000@email.amazonses.com>
In-Reply-To: <0100019012301ba8-cbf266f3-b215-4454-879e-193606dfd926-000000@email.amazonses.com>
Accept-Language: en-US, de-CH
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
msip_labels: MSIP_Label_2e1fccfb-80ca-4fe1-a574-1516544edb53_ActionId=11efaf2f-15ef-48a8-80de-06b5937de1a7;MSIP_Label_2e1fccfb-80ca-4fe1-a574-1516544edb53_ContentBits=0;MSIP_Label_2e1fccfb-80ca-4fe1-a574-1516544edb53_Enabled=true;MSIP_Label_2e1fccfb-80ca-4fe1-a574-1516544edb53_Method=Standard;MSIP_Label_2e1fccfb-80ca-4fe1-a574-1516544edb53_Name=C2 Internal;MSIP_Label_2e1fccfb-80ca-4fe1-a574-1516544edb53_SetDate=2024-06-14T07:09:35Z;MSIP_Label_2e1fccfb-80ca-4fe1-a574-1516544edb53_SiteId=364e5b87-c1c7-420d-9bee-c35d19b557a1;
x-originating-ip: [138.188.161.184]
X-CFilter-Loop: Reflected
X-Trustmail: processed
Message-ID-Hash: 6PJLFAWQ3K5CJZFWOIPZKFLIB646SSO7
X-Message-ID-Hash: 6PJLFAWQ3K5CJZFWOIPZKFLIB646SSO7
X-MailFrom: Thomas.Graf@swisscom.com
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-netconf.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: netconf@ietf.org, pierre.francois@insa-lyon.fr
X-Mailman-Version: 3.3.9rc4
Precedence: list
Subject: [netconf] Re: Adoption call for notif-yang-04
List-Id: NETCONF WG list <netconf.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/e_PsL-RK0f7jXKpeQSPdiHxgRno>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netconf>
List-Help: <mailto:netconf-request@ietf.org?subject=help>
List-Owner: <mailto:netconf-owner@ietf.org>
List-Post: <mailto:netconf@ietf.org>
List-Subscribe: <mailto:netconf-join@ietf.org>
List-Unsubscribe: <mailto:netconf-leave@ietf.org>

Dear Kent,

See my answers inline.

Best wishes
Thomas


From: Kent Watsen <kent+ietf@watsen.net>
Sent: Thursday, June 13, 2024 5:21 PM
To: Graf Thomas, INI-NET-VNC-HCS <Thomas.Graf@swisscom.com>
Cc: Andy Bierman <andy@yumaworks.com>; Per Andersson <per.ietf@ionio.se>; mohamed.boucadair@orange.com; netconf@ietf.org; alex.huang-feng@insa-lyon.fr; benoit.claise@huawei.com; pierre.francois@insa-lyon.fr
Subject: Re: [netconf] Adoption call for notif-yang-04


Be aware: This is an external email.


Hi Thomas,


On May 19, 2024, at 5:46 AM, Thomas.Graf@swisscom.com<mailto:Thomas.Graf@swisscom.com> wrote:

Dear Kent,


  *   Code I’ve written in the past manually-validates the envelope and then, separately, validates the payload via the YANG “notification” definition.

I would phrase "manually-validates" differently. I think you have excluded from validation because it can't be validated. That’s what we have seen during IETF 117 hackathon when using yanglint.

KW> The word “manual” was out of place.   What I meant was that the code validates in two-steps: first the envelop is validated using generic schema, then the payload is validated using the specific schema.



TG> I think we are on the same page but lets try to be precise that we have a solid base. I would like to learn wherever you have the same understanding. You are refering to the XSD defined in https://datatracker.ietf.org/doc/html/rfc5277#section-4 for the event notification envelop and the notifications schemas in the ietf-subscribed-notifications YANG module described in https://datatracker.ietf.org/doc/html/rfc8639#section-4 resp. ietf-yang-push YANG module described in https://datatracker.ietf.org/doc/html/rfc8641#section-5. Correct?





https://datatracker.ietf.org/doc/html/rfc8639#section-4

  /*

   * NOTIFICATIONS

   */



  notification replay-completed {

    sn:subscription-state-notification;

    if-feature "replay";

    description

      "This notification is sent to indicate that all of the replay

       notifications have been sent.";

    leaf id {

      type subscription-id;

      mandatory true;

      description

        "This references the affected subscription.";

    }

  }



https://datatracker.ietf.org/doc/html/rfc8641#section-5

     /*

      * NOTIFICATIONS

      */



     notification push-update {

       description

         "This notification contains a push update that in turn contains

          data subscribed to via a subscription.  In the case of a

          periodic subscription, this notification is sent for periodic

          updates.  It can also be used for synchronization updates of

          an on-change subscription.  This notification shall only be

          sent to receivers of a subscription.  It does not constitute

          a general-purpose notification that would be subscribable as

          part of the NETCONF event stream by any receiver.";

       leaf id {

         type sn:subscription-id;

         description

           "This references the subscription that drove the

            notification to be sent.";

       }

       anydata datastore-contents {

         description

           "This contains the updated data.  It constitutes a snapshot

            at the time of update of the set of data that has been

            subscribed to.  The snapshot corresponds to the same

            snapshot that would be returned in a corresponding 'get'

            operation with the same selection filter parameters

            applied.";

       }

       leaf incomplete-update {

         type empty;

         description

           "This is a flag that indicates that not all datastore

            nodes subscribed to are included with this update.  In

            other words, the publisher has failed to fulfill its full

            subscription obligations and, despite its best efforts, is

            providing an incomplete set of objects.";

       }

     }


TG> If correct, then I think the word payload is misplaced. I would word that the YANG-push notification schema is defined in XSD for the notification statement and in YANG for the rest of the YANG-push notification schema. This would be in line with

https://datatracker.ietf.org/doc/html/rfc8639#section-1.4


   o  The <notification> message of [RFC5277], Section 4<https://datatracker.ietf.org/doc/html/rfc5277#section-4> is used.

TG> And lets agree that schema is equally necessary for encoding, decoding and validating of messages.

TG> Is my assessment correct? Do you also come to the same conclusion?

TG> I find reading that YANG-Push is based on notifications in https://datatracker.ietf.org/doc/html/rfc8639#section-1.4 and notifications can be encoded in JSON according to https://www.rfc-editor.org/rfc/rfc7951#section-1 for an implementer rather misleading. Would you agree?

KW> I don’t understand.  Can you say some more?  Also, what remediation do you have in mind?


TG> Sure. RFC 7951 and RFC 9254 describing encoding rules how YANG. Both RFC's describing in the abstract and introduction that notifications are in scope but missing encoding rules for YANG. The only related information I was able to find is an example in the encoding rule section on anydata https://www.rfc-editor.org/rfc/rfc7951#section-5.5. In RFC 8639 and RFC 8641 it is assumed that the notification messages are JSON and CBOR encodable. However the encoding rules for notifications in RFC 7951 and RFC 9254 and the YANG module for https://datatracker.ietf.org/doc/html/rfc5277#section-4 is missing. Does that clarify?



TG> Where I am puzzled is that this problem has already being reported in an errata for RC5277: https://www.rfc-editor.org/errata/eid6770 and discussed on the netconf mailing list here: https://mailarchive.ietf.org/arch/msg/netconf/VF8QwvhG8nLii6dXTYZYThrNhgc/. It received the same push back reasoning as Med did on https://mailarchive.ietf.org/arch/msg/netconf/Abw9mRHZos_yK9-x1HWHCVyv_xM/.



TG> I believe the root cause that notifications can't be encoded in JSON and CBOR due to missing YANG module does not lie in RFC 5277, it lies in Section 1.4 of RFC 8639. I highlighted in green the paragraphs describing where RFC 8639 is defining new elements and in yellow where it is based on RFC 5277. Agree?



https://datatracker.ietf.org/doc/html/rfc8639#section-1.4



   o  This document defines a transport-independent capability;

      [RFC5277<https://datatracker.ietf.org/doc/html/rfc5277>] is specific to NETCONF.



   o  For the new operations, the data model defined in this document is

      used instead of the data model defined in Section 3.4 of<https://datatracker.ietf.org/doc/html/rfc5277#section-3.4>

      [RFC5277]<https://datatracker.ietf.org/doc/html/rfc5277#section-3.4>.



   o  The RPC operations in this document replace the operation

      <create-subscription> as defined in [RFC5277], Section 4<https://datatracker.ietf.org/doc/html/rfc5277#section-4>.



   o  The <notification> message of [RFC5277], Section 4<https://datatracker.ietf.org/doc/html/rfc5277#section-4> is used.



   o  The included contents of the "NETCONF" event stream are identical

      between this document and [RFC5277<https://datatracker.ietf.org/doc/html/rfc5277>]



   o  A publisher MAY implement both the Notification Management Schema

      and RPCs defined in [RFC5277<https://datatracker.ietf.org/doc/html/rfc5277>] and this document concurrently.



   o  Unlike [RFC5277<https://datatracker.ietf.org/doc/html/rfc5277>] this document enables a single transport session

      to intermix notification messages and RPCs for different

      subscriptions.



   o  A subscription "stop-time" can be specified as part of a

      notification replay.  This supports a capability analogous to the

      <stopTime> parameter of [RFC5277<https://datatracker.ietf.org/doc/html/rfc5277>]  However, in this

      specification, a "stop-time" parameter can also be applied without

      replay.



From: Kent Watsen <kent+ietf@watsen.net<mailto:kent+ietf@watsen.net>>
Sent: Saturday, May 11, 2024 12:38 AM
To: Andy Bierman <andy@yumaworks.com<mailto:andy@yumaworks.com>>
Cc: Graf Thomas, INI-NET-VNC-HCS <Thomas.Graf@swisscom.com<mailto:Thomas.Graf@swisscom.com>>; Per Andersson <per.ietf@ionio.se<mailto:per.ietf@ionio.se>>; BOUCADAIR Mohamed IMT/OLN <mohamed.boucadair@orange.com<mailto:mohamed.boucadair@orange.com>>; netconf@ietf.org<mailto:netconf@ietf.org>; Alex Huang Feng <alex.huang-feng@insa-lyon.fr<mailto:alex.huang-feng@insa-lyon.fr>>; Benoit Claise <benoit.claise@huawei.com<mailto:benoit.claise@huawei.com>>; pierre.francois@insa-lyon.fr<mailto:pierre.francois@insa-lyon.fr>
Subject: Re: [netconf] Adoption call for notif-yang-04


Be aware: This is an external email.






On May 10, 2024, at 1:43 PM, Andy Bierman <andy@yumaworks.com<mailto:andy@yumaworks.com>> wrote:

It is quite rigid and XML-specific:

   <notification>
       <eventTime>...</eventTime>
       < **event element**  />
   </notification>

<snip/>
YANG is incapable of representing this XSD correctly (no SubstitutionGroup).

True, not even an “anydata” helps.  If the goal is to be able to validate the entire “notification” message, I don’t see how that’s possible.

Code I’ve written in the past manually-validates the envelope and then, separately, validates the payload via the YANG “notification” definition.

K.