[netmod] Re: AD review of draft-ietf-netmod-schedule-yang-05

Kent Watsen <kent+ietf@watsen.net> Tue, 20 May 2025 14:17 UTC

Return-Path: <01000196ee0dbdf5-704d1a57-d966-4d7f-acc1-268c4fcc6ddc-000000@amazonses.watsen.net>
X-Original-To: netmod@mail2.ietf.org
Delivered-To: netmod@mail2.ietf.org
Received: from localhost (localhost [127.0.0.1]) by mail2.ietf.org (Postfix) with ESMTP id 9CDBC2AB4766; Tue, 20 May 2025 07:17:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at ietf.org
X-Spam-Flag: NO
X-Spam-Score: -1.894
X-Spam-Level:
X-Spam-Status: No, score=-1.894 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: mail2.ietf.org (amavisd-new); dkim=pass (1024-bit key) header.d=amazonses.com
Received: from mail2.ietf.org ([166.84.6.31]) by localhost (mail2.ietf.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id V8M-HkBCO-aW; Tue, 20 May 2025 07:17:09 -0700 (PDT)
Received: from a8-83.smtp-out.amazonses.com (a8-83.smtp-out.amazonses.com [54.240.8.83]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail2.ietf.org (Postfix) with ESMTPS id A918F2AB470E; Tue, 20 May 2025 07:16:40 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw; d=amazonses.com; t=1747750600; h=From:Message-Id:Content-Type:Mime-Version:Subject:Date:In-Reply-To:Cc:To:References:Feedback-ID; bh=Zhc+Ordj5Kz1CkdL2HYuvWkyJackFhX5D/8fbm9TASs=; b=ddKw5fdhewYIMP+3JHuWey6hI1UMfOwamMIn/VKqz/SXaXhh+F2IsP2or08Qs8m4 HvkErvmXL4EiO0ulEoPKfjHzoFkCcP7pB7jqV3FWK/Ya7QIDXFZob5QnSq2VJQ+XUMJ q4yuDRJ/KkrAjfPLm2Qs5/900C6iDl7xlN4k4H9k=
From: Kent Watsen <kent+ietf@watsen.net>
Message-ID: <01000196ee0dbdf5-704d1a57-d966-4d7f-acc1-268c4fcc6ddc-000000@email.amazonses.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_B55716FA-57CC-4177-978C-2BF109A16FB7"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.400.31\))
Date: Tue, 20 May 2025 14:16:40 +0000
In-Reply-To: <4fa37fbd22c64575883c070f2ab7a8d1@huawei.com>
To: "maqiufang (A)" <maqiufang1=40huawei.com@dmarc.ietf.org>
References: <6B6D6FCD-9FD8-464A-B2B0-72978EC129CA@gmail.com> <4fa37fbd22c64575883c070f2ab7a8d1@huawei.com>
X-Mailer: Apple Mail (2.3774.400.31)
Feedback-ID: ::1.us-east-1.DKmIRZFhhsBhtmFMNikgwZUWVrODEw9qVcPhqJEI2DA=:AmazonSES
X-SES-Outgoing: 2025.05.20-54.240.8.83
Message-ID-Hash: N7YV7747S2WZJEXDY5HVHYN2V35BTA6N
X-Message-ID-Hash: N7YV7747S2WZJEXDY5HVHYN2V35BTA6N
X-MailFrom: 01000196ee0dbdf5-704d1a57-d966-4d7f-acc1-268c4fcc6ddc-000000@amazonses.watsen.net
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-netmod.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: "draft-ietf-netmod-schedule-yang@ietf.org" <draft-ietf-netmod-schedule-yang@ietf.org>, "netmod@ietf.org" <netmod@ietf.org>
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [netmod] Re: AD review of draft-ietf-netmod-schedule-yang-05
List-Id: NETMOD WG list <netmod.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/KJ65hlfvPCwkI90_vjmTVMawIck>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Owner: <mailto:netmod-owner@ietf.org>
List-Post: <mailto:netmod@ietf.org>
List-Subscribe: <mailto:netmod-join@ietf.org>
List-Unsubscribe: <mailto:netmod-leave@ietf.org>

A couple comments below.

Kent // contributor


<snip/>
> Though utc format is favorable for interoperability, I think a local-time + time zone reference still has wide use in a lot of cases, e.g., timestamps in a lot of audits and logs are usually based on the local time of the device, and this document is intended to be common to accommodate different requirements.

IDK if there is any harm from accommodating local+zone formats, but I think that it is (should always be) the case that time is persisted in UTC in the storage layer.   Time is typically sent in UTC over the wire too, leaving it to the client to convert to local time.  FWIW, syslog files are both a persistence-format and a display format, and hence outside YANG ecosystem.   My preference is for a YANG server to send UTC by default, but may send local time if the client passes a parameter (e.g., with-local-time), which would pass the preferred time-zone (e.g., +04:00).



> Section 3.3.1, paragraph 5
> >    The "time-zone-identifier" parameter, if provided, specifies the time
> >    zone reference [RFC7317] of the local date and time values.  This
> >    parameter MUST be specified if any of the date and time values are in
> >    the format of local time.  It MUST NOT be applied to date and time
> >    values which are specified in the format of UTC or time zone offset
> >    to UTC.
>  
> If this is a MUST, why is the parameter not marked mandatory? And because of that, it shows up as optional in the tree diagram.
> I guess it should not be mandatory as it is uncertain whether the date-and-time formats specified in the grouping is in the format of UTC or local time.


> I think there are two questions that were hit. The first is whether the grouping should define default/mandatory statement. I still think that there are some parameters that must have a default value or be defined as mandatory, otherwise the behavior will be unspecified. But I think it would be better for the use-statement to refine with a default/mandatory statement, as it is unsure the default value will be applicable to all cases, and it would be problematic in some cases where a default value is not needed (there is no way to remove a default statement from a grouping).
> 
I agree with this.  The NETCONF WG went through the same discussion with the client-server drafts.


> While the discussion with YangDoctor is that, Reshad understands it might be problematic to have default statement in generic groupings, but he is unsure whether a specific parameter should specify the default value in the description statement without a default statement. This is the one I think it would be good to have more discussion and feedback from the WG. To me, this feels to provide a safeguard to understand the default behavior if neither a default or mandatory statement is refined for a use-statement, and for those that really dislike this default value (they want a new value or don’t need the default value at all), it is always possible for the use-statement to refine the description. That is why I felt the current handling has some merit, but also happy to hear from others.
> 
The biggest problem with a grouping specifying "mandatory" or "default" is that they are mutually exclusive and, whilst they can be "refined", they cannot be removed.  In general, YANG designers should carefully scrutinize the use of either of these statements in groupings.

That said, for the "recurrence-basic" grouping, it seems inconsistent that "frequency" be mandatory and "interval" is not.  It seems that, if the model forces the configuration of one, then it should for the other as well.



FWIW, in a YANG module I have something like this, which seems like a more natural tuple than the "frequency/interval" tuple:

  grouping amount-and-units {
     leaf amount {
       must '../units';
       type uint16 {
         range "1..max";
       } 
     }
     leaf units {
       must '../amount';
       type enumeration {
         enum seconds;
         enum minutes;
         enum hours;
         enum days;
         enum weeks;
         enum months;
         enum years;
       }
     }
   } 
   
   grouping foobar-timeout {  <-- there are many of these
     uses amount-and-units {
       refine "amount" {
         default "3";
       }
       refine "units" {
         default "months";
       }
    }


Kent // contributor