[netconf] Re: transport and encodings for configured subscriptions
Alex Huang Feng <alex.huang-feng@insa-lyon.fr> Tue, 20 August 2024 09:32 UTC
Return-Path: <alex.huang-feng@insa-lyon.fr>
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 30FC1C14F604 for <netconf@ietfa.amsl.com>; Tue, 20 Aug 2024 02:32:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.739
X-Spam-Level:
X-Spam-Status: No, score=-4.739 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_HELO_IP_MISMATCH=2.368, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=insa-lyon.fr
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 fVE7fGPpGRX3 for <netconf@ietfa.amsl.com>; Tue, 20 Aug 2024 02:32:10 -0700 (PDT)
Received: from smtpout02-ext4.partage.renater.fr (smtpout02-ext4.partage.renater.fr [194.254.241.31]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 7B6D2C14F71D for <netconf@ietf.org>; Tue, 20 Aug 2024 02:32:08 -0700 (PDT)
Received: from zmtaauth04.partage.renater.fr (zmtaauth04.partage.renater.fr [194.254.241.26]) by smtpout20.partage.renater.fr (Postfix) with ESMTP id 96ACFBFEA4; Tue, 20 Aug 2024 11:32:01 +0200 (CEST)
Received: from zmtaauth04.partage.renater.fr (localhost [127.0.0.1]) by zmtaauth04.partage.renater.fr (Postfix) with ESMTPS id 7E60D1C0112; Tue, 20 Aug 2024 11:32:01 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1]) by zmtaauth04.partage.renater.fr (Postfix) with ESMTP id 6AC021C05FA; Tue, 20 Aug 2024 11:32:01 +0200 (CEST)
DKIM-Filter: OpenDKIM Filter v2.10.3 zmtaauth04.partage.renater.fr 6AC021C05FA
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=insa-lyon.fr; s=CB289C06-95B8-49FE-9C4B-D197C6D2E7CB; t=1724146321; bh=LXOCS64WxO46SHD/20iWSES08N0M0a19u5280FcrAGk=; h=From:Message-Id:Mime-Version:Date:To; b=PDacdTRd+C9Zd+qCEscKFa3QnhzsST8ZLY6GlyILev1VmwBLDXlAhbYuI/AMbVFww zDd+1/MMjDHMikmkWzJLZ+2pBxL+lAohTUm/79M8hnlIMMl/ytKSMZeROyewyd0FTV vTQY6iYYg3zVw860Q29VCRVOYseXXEckhpsQt7s5T7lJofuW8dOqh17PqkX097EUlP Yiq86L1VzLI9Pns0N+vknVf9j77/Lk+nk/rHNuQKqHUI0koXWa8txvvSBRlSGTfFfV Ic7k4yzjrPLh7jdulIVcDAyL6JBSWed4YCPfHiUlYgvVTf4FSeTL9DoTYQaiV6X70g 5R+9WGPQhlgvQ==
Received: from zmtaauth04.partage.renater.fr ([127.0.0.1]) by localhost (zmtaauth04.partage.renater.fr [127.0.0.1]) (amavis, port 10026) with ESMTP id lDo9atDObn_O; Tue, 20 Aug 2024 11:32:01 +0200 (CEST)
Received: from 91.243.137.200 (unknown [194.254.241.249]) by zmtaauth04.partage.renater.fr (Postfix) with ESMTPA id D473C1C0112; Tue, 20 Aug 2024 11:32:00 +0200 (CEST)
From: Alex Huang Feng <alex.huang-feng@insa-lyon.fr>
Message-Id: <E5B3C75D-94B4-4B7D-9638-1BBE498B75E3@insa-lyon.fr>
Content-Type: multipart/alternative; boundary="Apple-Mail=_0D389A9D-0680-4650-9B1B-D66D7ECCCDE6"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\))
Date: Tue, 20 Aug 2024 11:31:49 +0200
In-Reply-To: <CABCOCHQN-xPts8A_gtJ-LvinUNz+z1eTG4_Rp3nizpSEPY89-w@mail.gmail.com>
To: "netconf@ietf.org" <netconf@ietf.org>
References: <1425bd7fc32446ceb22d01e255cc28fb@huawei.com> <010001913e443b5c-a44b71c3-6bb8-4708-be4c-490543bd6d84-000000@email.amazonses.com> <CABCOCHQ7-KYVL-ea5QvDxRPRZwA7atWrZCbFTFhz4MOo27vDTg@mail.gmail.com> <147d7c6444a341fdaec9c39acb6f3c1f@huawei.com> <8331660fe6474bd38b59c0331c3d2aa0@huawei.com> <CABCOCHRzA55tXSVj9hkqjywnseb=bVNQpq-c2W5AJTc1nciojg@mail.gmail.com> <010001914be7340e-f222d403-505f-45e9-a82d-6b420af38ee4-000000@email.amazonses.com> <CABCOCHQkcYHQ6839rrH=VOD2JfuqyJaakANPikSBzJWG8r_U-w@mail.gmail.com> <010001914c1e18ed-933ff479-0e5c-450c-9b73-11b50328a1b3-000000@email.amazonses.com> <CABCOCHS9xGmHTj4iUuURH7KnmYd28OL6tnmW0v30M67jLRHBxA@mail.gmail.com> <CABCOCHQN-xPts8A_gtJ-LvinUNz+z1eTG4_Rp3nizpSEPY89-w@mail.gmail.com>
X-Mailer: Apple Mail (2.3776.700.51)
X-Virus-Scanned: clamav-milter 0.103.8 at clamav02
X-Virus-Status: Clean
X-Renater-Ptge-SpamState: clean
X-Renater-Ptge-SpamScore: -100
X-Renater-Ptge-SpamCause: gggruggvucftvghtrhhoucdtuddrgeeftddrudduiedgudeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecutffgpfetvffgtfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffktgggufffjgevvfhfofesrgdtmherhhdtjeenucfhrhhomheptehlvgigucfjuhgrnhhgucfhvghnghcuoegrlhgvgidrhhhurghnghdqfhgvnhhgsehinhhsrgdqlhihohhnrdhfrheqnecuggftrfgrthhtvghrnhephefgtdettedvvefgjeetffefgfefkeegfeetieegfedtveektefgjeevveevgfehnecuffhomhgrihhnpehgihhthhhusgdrtghomhdpihgvthhfrdhorhhgpdhrfhgtqdgvughithhorhdrohhrghenucfkphepudelgedrvdehgedrvdeguddrvdegleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduleegrddvheegrddvgedurddvgeelpdhhvghlohepledurddvgeefrddufeejrddvtddtpdhmrghilhhfrhhomheprghlvgigrdhhuhgrnhhgqdhfvghnghesihhnshgrqdhlhihonhdrfhhrpdhnsggprhgtphhtthhopeegpdhrtghpthhtohepnhgvthgtohhnfhesihgvthhfrdhorhhgpdhrtghpthhtohepkhgvnhhtodhivghtfhesfigrthhsvghnrdhnvghtpdhrtghpthhtoheprghnugihseihuhhmrgifohhrkhhsrdgtohhmpdhrtghpthhtohepmhgrqhhiuhhfrghnghdupeegtdhh uhgrfigvihdrtghomhesughmrghrtgdrihgvthhfrdhorhhg
Message-ID-Hash: M7NZLLCPNLEPQRFE4UGXBQSGRHKW5G2L
X-Message-ID-Hash: M7NZLLCPNLEPQRFE4UGXBQSGRHKW5G2L
X-MailFrom: alex.huang-feng@insa-lyon.fr
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: Kent Watsen <kent+ietf@watsen.net>, maqiufang1=40huawei.com@dmarc.ietf.org
X-Mailman-Version: 3.3.9rc4
Precedence: list
Subject: [netconf] Re: transport and encodings for configured subscriptions
List-Id: NETCONF WG list <netconf.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/nK_nUTCtBRokXpBIlEErZZcaxyc>
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 Qiufang, Andy, Kent, NETCONF, Thank you Qiufang for spotting this issue in UDP-Notif (and the gap on RFC8639). This was not intended, I based the YANG on the HTTPS-Notif draft to have the same way of configuring a “Configured Subscription” for both transports. The example in RFC8639 is misleading for “Configured Subscriptions”. I added “base sn:configurable-encoding;” to the "udp-notif" identity to solve this issue (-15 iteration in https://github.com/netconf-wg/udp-notif/blob/main/draft-ietf-netconf-udp-notif-15.txt#L972) identity udp-notif { base sn:transport; base sn:configurable-encoding; description "UDP-Notif is used as transport for notification messages and state change notifications."; } I think this “base sn:configurable-encoding” also needs to be added to the identity "https" from ietf-https-notif-transport.yang to allow HTTPS-Notif to be configured with specific encodings. From a past mail thread (https://mailarchive.ietf.org/arch/msg/netconf/wI6akVDCqd9kHv6OsuD2l8nwHi8/) I see that this was the way it was intended to be implemented: >>>>> thread > There have been requests for an establish-subscription RPC to request > an alternative encoding (e.g., binary with CBOR). Since there are > lots of instances for which this is possible, trying not to exclude > it. Hmm, ok. It would have been nice to not have this leaf for transports that don't support it, and even better if the encoding would depend on the transport. This *can* be done with some new identities: identity configurable-encoding { description "If a transport identity derives from this identity, it means that it supports configurable encodings."; } identity http-2 { base transport; base configurable-encoding; } leaf encoding { when 'derived-from(../transport, "sn:configurable-encoding")'; } You can also have transport-specific encodings, instead of generic encondings, in order to make it impossible to set e.g. "xml" encoding on a comi transport (if that is a transport…). <<<<<end thread So even though I like Andy’s errata (https://www.rfc-editor.org/errata/eid8073) I think not adding the “transport" base to “configurable-encoding” was intentional. @Qiufang, would you agree that, with this new identify in the YANG module, the examples in the appendix are valid now? Regards, Alex > On 13 Aug 2024, at 16:54, Andy Bierman <andy@yumaworks.com> wrote: > > Hi, > > It is possible the fix is simpler: > > > > identity udp-notif { > base sn:transport; > base sn:configurable-encoding; > description > "UDP-Notif is used as transport for notification messages > and state change notifications."; > } > > The identityref requires the 'transport' match. > The when-stmt requires the 'configurable-encoding' match. > The Errata I submitted would not be needed. > > > Andy > > On Tue, Aug 13, 2024 at 7:38 AM Andy Bierman <andy@yumaworks.com <mailto:andy@yumaworks.com>> wrote: >> >> >> On Tue, Aug 13, 2024 at 7:22 AM Kent Watsen <kent+ietf@watsen.net <mailto:kent%2Bietf@watsen.net>> wrote: >>> Hi Andy, >>> >>>> Look at configurable-encoding. >>>> Look at the when-stmt in the 'encoding' leaf. >>>> >>>> Note that is not possible to have the when-stmt be true if the sibling 'transport' leaf is set. >>>> >>>> The 'configurable-encoding' identity is not a valid transport. >>>> The YANG module has been incorrect for configured subscriptions from the start. >>> >>> My implicit question is if the issue in 8639 affects the https-notif and udp-notif drafts? >>> >>> Do their identities need to inherit from configurable-encoding instead, once it is fixed? >>> >> >> >> identity udp-notif { >> base sn:transport; >> description >> "UDP-Notif is used as transport for notification messages >> and state change notifications."; >> } >> >> identity encode-cbor { >> base sn:encoding; >> description >> "Encode data using CBOR as described in RFC 9254."; >> reference >> "RFC 9254: CBOR Encoding of Data Modeled with YANG"; >> } >> >> >> Set the leaves: >> >> transport = udp-notif >> encoding = encode-cbor >> >> >> >> If the udp-transport is set for the 'transport' leaf it will be accepted since the base is correct (transport) >> but the when-stmt for the encoding leaf is false because udp-notif is not derived from 'configurable-encoding. >> >> So change udp-notif to be base 'configurable-encoding' so the when-stmt is true. >> But now the base 'transport' is not met so it is not a valid value for transport. >> >> >> leaf transport { >> if-feature "configured"; >> type transport; >> description >> "For a configured subscription, this leaf specifies the >> transport used to deliver messages destined for all >> receivers of that subscription."; >> } >> leaf encoding { >> when 'not(../transport) or derived-from(../transport, >> "sn:configurable-encoding")'; >> type encoding; >> description >> "The type of encoding for notification messages. For a >> dynamic subscription, if not included as part of an >> 'establish-subscription' RPC, the encoding will be populated >> with the encoding used by that RPC. For a configured >> subscription, if not explicitly configured, the encoding >> will be the default encoding for an underlying transport."; >> } >> >> If the configurable-encoding identity was fixed then udp-transport could be declared with that base. >> >> If the encoding leaf when-stmt was simply removed, the base 'transport' would be correct. >> >> >>> K. >>> >> >> Andy >> > _______________________________________________ > netconf mailing list -- netconf@ietf.org > To unsubscribe send an email to netconf-leave@ietf.org
- [netconf] transport and encodings for configured … maqiufang (A)
- [netconf] Re: transport and encodings for configu… Andy Bierman
- [netconf] Re: transport and encodings for configu… Kent Watsen
- [netconf] Re: transport and encodings for configu… Andy Bierman
- [netconf] Re: transport and encodings for configu… maqiufang (A)
- [netconf] Re: transport and encodings for configu… maqiufang (A)
- [netconf] Re: transport and encodings for configu… Andy Bierman
- [netconf] Re: transport and encodings for configu… Kent Watsen
- [netconf] Re: transport and encodings for configu… Andy Bierman
- [netconf] Re: transport and encodings for configu… Kent Watsen
- [netconf] Re: transport and encodings for configu… Andy Bierman
- [netconf] Re: transport and encodings for configu… Andy Bierman
- [netconf] Re: transport and encodings for configu… Alex Huang Feng
- [netconf] Re: transport and encodings for configu… Thomas.Graf