[core] Re: Coreconf Notifications
Andy Bierman <andy@yumaworks.com> Wed, 24 July 2024 18:53 UTC
Return-Path: <andy@yumaworks.com>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 47F65C14F721 for <core@ietfa.amsl.com>; Wed, 24 Jul 2024 11:53:33 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.106
X-Spam-Level:
X-Spam-Status: No, score=-2.106 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_NONE=-0.0001, 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=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks.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 ij0CO_W4Sicq for <core@ietfa.amsl.com>; Wed, 24 Jul 2024 11:53:29 -0700 (PDT)
Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8F519C1D875E for <core@ietf.org>; Wed, 24 Jul 2024 11:53:29 -0700 (PDT)
Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1fd66cddd07so927105ad.2 for <core@ietf.org>; Wed, 24 Jul 2024 11:53:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks.com; s=google; t=1721847209; x=1722452009; darn=ietf.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=drEGJKLu4FRISvQTFDTfe2bl0R9QAt5KZq2mdfGucrs=; b=Vyfgav0W5wQPr6iA8l86FVFBGBkFtGe8TETymxmaNIDLztS9rfeMPiHYesRzDRjqJp neiu+ff+JFO3Uc/USWL8CeczDcg59xdGHPap+fHhRhqULe5mG9a58ksWU7RlSyTnJ1f7 agay75UWRninpm0iNwhoEA/B72qlsyTAeGiRtHtmhyvIpo0KrGjUZvrQQ/B9EiGA4Bo1 ddMyAqf4Nht7AM6MzDqEz88iGO45+rPiRGgpimRTlmmijiPN6Xz1QWs7gmQMvCLL3uOF r7rtWVUPiafzu6lxt8B8RwYJMTKokYXG0uSU3ihjJHtExQOluimVrFQ6PpiGlBudkXRl 2IHw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721847209; x=1722452009; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=drEGJKLu4FRISvQTFDTfe2bl0R9QAt5KZq2mdfGucrs=; b=B39Ipld0BYzvs0iCjrfaoqKm36hKNXOrXmynE21M8J6nPfkMrWM77+mEY+x1avUKdF /w0OZlylhBIzYyQFagc9Tj7t8ERgwFwW/2R5hm9+wft0OyByAztPk/3TQFvF+AR+Ff4V o53yFDZpQFSIw5huanMpomFQ7Wh5QQY8DfHQQma/oJPnwGtlvhwh8SyZ889P87YMCKpQ ScnbztIUPzx+myHxwpv9oZNSKQvoupMMx3My2aBZmXTkP9HaLCOAMCgEQhnqoSVOctP6 mXD+jTTF1PwnSVVm0FMnLUwPpsw2xeiyLkayH5uWqK2zl8BdF5/BirM9ppSqR8Hwq/0f Afzg==
X-Forwarded-Encrypted: i=1; AJvYcCXNaQ1u9vacE7JpjE4fzOJg/+WmYHqCJ+Y/Sa3PSLcDvRBepHbmy3KQQZZ5bWFP8QPTNj6cyDQdZrlWCiuv
X-Gm-Message-State: AOJu0YzYgMa7iU99Y6krJEmKLm/U3PQY6/eVIaC6bHzU9n/Im2oVL86t +/5WnJz3uctDMeSUyYMZbqeiEB/WjN22xlpN6Z3EmVoD3/i8kCrqJoF31ipNFl3stjPJIJ3xEfj CQRdiSqyHBbt54gNIbb2j0H/GNWDJkeFqwscrfg==
X-Google-Smtp-Source: AGHT+IFl9x98yF2Z2felpNmWiGSuTAlVYNKIQrqEoK0VFDh2VKkjn/dy9EPTlqt+5diwJ//6T9VHWyhwrnx8h4dnVdI=
X-Received: by 2002:a17:90a:fb8f:b0:2c7:22d6:98e with SMTP id 98e67ed59e1d1-2cf237f8df3mr461317a91.19.1721847208885; Wed, 24 Jul 2024 11:53:28 -0700 (PDT)
MIME-Version: 1.0
References: <E2DFFA8E-9766-4CB4-BCAA-6897402B8FB2@insa-lyon.fr> <5C0595E7-2071-4A6F-A0C8-6F9DE138535F@tzi.org> <C4AE55E1-0907-4BBD-A2BA-802063E10B50@insa-lyon.fr> <397772B6-6DAE-4A2D-BFD0-7A77ABE1415E@tzi.org> <E0D2CFE6-B0BD-4F0A-9F5C-4C29ADF16861@insa-lyon.fr>
In-Reply-To: <E0D2CFE6-B0BD-4F0A-9F5C-4C29ADF16861@insa-lyon.fr>
From: Andy Bierman <andy@yumaworks.com>
Date: Wed, 24 Jul 2024 11:53:17 -0700
Message-ID: <CABCOCHT6B+9fjJL_UBArfcV1KO9SJBoV+588goWsDJ5_x_1x0A@mail.gmail.com>
To: Alex Huang Feng <alex.huang-feng@insa-lyon.fr>
Content-Type: multipart/alternative; boundary="0000000000003e5dbe061e02cb38"
Message-ID-Hash: 6ELYCCFF2EBKYE7ODDXFD6HVMQCLBDYG
X-Message-ID-Hash: 6ELYCCFF2EBKYE7ODDXFD6HVMQCLBDYG
X-MailFrom: andy@yumaworks.com
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-core.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: draft-ietf-core-comi@ietf.org, core@ietf.org, Pierre Francois <pierre.francois@insa-lyon.fr>, Vivekananda Boudia <vivekananda.boudia@insa-lyon.fr>, "Thomas. Graf" <Thomas.Graf@swisscom.com>, Benoit Claise <benoit.claise@huawei.com>
X-Mailman-Version: 3.3.9rc4
Precedence: list
Subject: [core] Re: Coreconf Notifications
List-Id: "Constrained RESTful Environments (CoRE) Working Group list" <core.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/IJigsCTvzKWmSMU_uAaQhcDRtuA>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Owner: <mailto:core-owner@ietf.org>
List-Post: <mailto:core@ietf.org>
List-Subscribe: <mailto:core-join@ietf.org>
List-Unsubscribe: <mailto:core-leave@ietf.org>
On Wed, Jul 24, 2024 at 11:25 AM Alex Huang Feng < alex.huang-feng@insa-lyon.fr> wrote: > Dear Carsten, > > My apologies, checking again, you are right, tags are needed for RFC9254. > > What I want to raise (and discuss) in this thread is NOT how the datetime > specified in the leaf “eventTime” is encoded in CBOR. > I agree with Carsten that draft-bormann-cbor-yang-standin-00 can be used > in draft-ahuang-netconf-notif-yang for better encoding the datetime. > > As I said on the mic during the WG meeting, there is a gap on how YANG > notifications are currently encoded in the different YANG encodings (XML, > JSON, CBOR). > Having a common structure for such notifications is beneficial to YANG > tooling (such as the integration of YANG into the Kafka Schema registry > https://github.com/network-analytics/draft-daisy-kafka-yang-integration/blob/main/schema-registry-yangkit-integration-03.pdf > ) > > What I am referring to as a structure is the metadata that needs to be > present in the notification header. > The current understanding at NETCONF WG is that the notification header > MUST have a eventTime leaf, as specified in RFC5277. > RFC5277 was dedicated to XML, but YANG notifications have been generalised > with YANG-Push [RFC8641]. > > I have implemented notifications in XML, JSON, and CBOR with no problems adapting the XSD in RFC 5277. The XSD describes an XML element but it is easy to construct this pattern in JSON or CBOR. RFC 5277 is widely deployed and in constant use. RFC 6241, 8639, 8641 and others have normative references to this RFC. I am strongly opposed to declaring RFC 5277 obsolete. Andy The current understanding is that in XML, a notification is encoded as > follows: > > <notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0"> > <eventTime>2007-07-08T00:04:00Z</eventTime> <— eventTime present > <event xmlns="http://example.com/event/1.0"> > <eventClass>fault</eventClass> > <reportingEntity> > <card>ATM1</card> > </reportingEntity> > <severity>minor</severity> > </event> > </notification> > > JSON as: > > { > "ietf-notification:notification": { > "eventTime": "2023-02-10T08:00:11.22Z”, <—eventTime present > "yang-defining-notif:event": { > "eventClass": "fault", > "reportingEntity": { > "card": "ATM1" > }, > "severity": "minor" > } > } > } > > And CBOR (diag-notation) I would expect: > { > "ietf-notification:notification": { > "eventTime": "2023-02-10T08:00:11.22Z”, <— eventTime present > "yang-defining-notif:event": { > "eventClass": "fault", > "reportingEntity": { > "card": "ATM1" > }, > "severity": "minor" > } > } > } > > That is what we are trying to solve with > https://datatracker.ietf.org/doc/html/draft-ahuang-netconf-notif-yang-05; > having a common schema for all the YANG notifications and having a YANG > module defining such structure. > > That is why I was suggesting to the authors of draft-ietf-core-comi-18 to > use this draft as reference rather than RFC5277 (as Thomas Graf was saying, > RFC5277 is expected to be obsoleted) > > On a second note, I’d be happy to hear any feedback from the CORE WG > whether updating RFC9254 is the way to go to solve this issue with CBOR > notifications in > https://datatracker.ietf.org/doc/html/draft-ahuang-netconf-notif-yang-05. > > Cheers, > Alex > > On 20 Jul 2024, at 08:42, Carsten Bormann <cabo@tzi.org> wrote: > > Hi Alex > > On 2024-07-20, at 00:37, Alex Huang Feng <alex.huang-feng@insa-lyon.fr> > wrote: > > > Thanks for the pointers, will check out this draft. My text does not state > that the timestamp needs to be encoded as text-encoded date-time. > > > I would expect that you would want to encode these using standard YANG > means, and (without YANG-CBOR with stand-in tags) that would be the RFC > 3339 date-times used in RFC 6991. > (Which resolution do you need in practice for eventtime, by the way?) > > > Are you suggesting that the draft should state the usage of tags for > date-times? For implementations that does not support tags, isn’t it > contra-productive? > > > You cannot do YANG-CBOR without CBOR tags, so I don’t think there is an > actual problem. > > By the way, you may want to look at the CoRE telemetry spec [1]. > This is six years old (we just didn’t have the RFCs in place for YANG-CBOR > and YANG SID at the time, so the draft was a bit premature), but it solves > many of the problems being discussed right now. > (Henk will be at the Hackathon, so please talk to him about that.) > > Grüße, Carsten > > [1]: > https://datatracker.ietf.org/doc/html/draft-birkholz-yang-core-telemetry-01 > > >
- [core] Coreconf Notifications Alex Huang Feng
- [core] Re: Coreconf Notifications Andy Bierman
- [core] Re: Coreconf Notifications Thomas.Graf
- [core] Re: Coreconf Notifications Andy Bierman
- [core] Re: Coreconf Notifications Carsten Bormann
- [core] Re: Coreconf Notifications Andy Bierman
- [core] Re: Coreconf Notifications Alex Huang Feng
- [core] Re: Coreconf Notifications Henk Birkholz
- [core] Re: Coreconf Notifications Carsten Bormann
- [core] Re: Coreconf Notifications Alex Huang Feng
- [core] Re: Coreconf Notifications Andy Bierman
- [core] Re: Coreconf Notifications Thomas.Graf
- [core] Re: Coreconf Notifications Carsten Bormann
- [core] Re: Coreconf Notifications Alex Huang Feng
- [core] Re: Coreconf Notifications Carsten Bormann
- [core] Re: Coreconf Notifications Andy Bierman