Re: [yang-doctors] Encoding "time of activation" in a r/w data tree leaf

Kent Watsen <kent+ietf@watsen.net> Wed, 28 February 2024 13:02 UTC

Return-Path: <0100018defcf6c18-7fc8c0e9-e1e2-4263-87ab-b47d7bfccbeb-000000@amazonses.watsen.net>
X-Original-To: yang-doctors@ietfa.amsl.com
Delivered-To: yang-doctors@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id DF978C14F69E for <yang-doctors@ietfa.amsl.com>; Wed, 28 Feb 2024 05:02:49 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.904
X-Spam-Level:
X-Spam-Status: No, score=-1.904 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=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_BLOCKED=0.001, 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 (1024-bit key) header.d=amazonses.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 o4Pv8s9vNb2Z for <yang-doctors@ietfa.amsl.com>; Wed, 28 Feb 2024 05:02:46 -0800 (PST)
Received: from a48-90.smtp-out.amazonses.com (a48-90.smtp-out.amazonses.com [54.240.48.90]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 06F7CC14F6B5 for <yang-doctors@ietf.org>; Wed, 28 Feb 2024 05:02:45 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=224i4yxa5dv7c2xz3womw6peuasteono; d=amazonses.com; t=1709125364; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc:Content-Transfer-Encoding:Message-Id:References:To:Feedback-ID; bh=i1lraYDff10Wp7h6qXK5+5CnTbuNOej6WOP5Po8oj1A=; b=UKQVBuggLnNIfdZ6Z04XqAuQJEzBOhEsTFsUbFGZercW+KCxwDfcg+1iefwmqU+i uxQoXWVMequTSjqXRbLy7COtzbE0snlyiqe/WLHvEhW1kcf7lbF68iahs0Leps3EkZD RVDjZQfZlDxmVYg1cGyDkWLcijEG96hAcpwjcRhs=
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.400.31\))
From: Kent Watsen <kent+ietf@watsen.net>
In-Reply-To: <ZcZNjdfA6oAgMOLd@localhost>
Date: Wed, 28 Feb 2024 13:02:44 +0000
Cc: YANG Doctors <yang-doctors@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-ID: <0100018defcf6c18-7fc8c0e9-e1e2-4263-87ab-b47d7bfccbeb-000000@email.amazonses.com>
References: <ZawhnG9kGKSQ7pAx@localhost> <ZcZNjdfA6oAgMOLd@localhost>
To: Ebben Aries <exa=40juniper.net@dmarc.ietf.org>
X-Mailer: Apple Mail (2.3774.400.31)
Feedback-ID: 1.us-east-1.DKmIRZFhhsBhtmFMNikgwZUWVrODEw9qVcPhqJEI2DA=:AmazonSES
X-SES-Outgoing: 2024.02.28-54.240.48.90
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/SYglYAMmTepsuq22YCCzi-hWxTE>
Subject: Re: [yang-doctors] Encoding "time of activation" in a r/w data tree leaf
X-BeenThere: yang-doctors@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Email list of the yang-doctors directorate <yang-doctors.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/yang-doctors/>
List-Post: <mailto:yang-doctors@ietf.org>
List-Help: <mailto:yang-doctors-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 28 Feb 2024 13:02:50 -0000

I’m unsure what opportunity there is for a pattern here, but generally feel that opstate should be presented in CF nodes rather than in RPC/action-replies.

FWIW, there is a “last-modified” leaf at these two locations:

	https://github.com/netconf-wg/ssh-client-server/blob/e0b092bcbf7eb3c2d55125bb0705121526e7d121/ietf-ssh-server.yang#L313

	https://github.com/netconf-wg/http-client-server/blob/34a1972eca80aee46e6cb3321d2a4e0c659fa675/ietf-http-server.yang#L207

Kent


> On Feb 9, 2024, at 11:06 AM, Ebben Aries <exa=40juniper.net@dmarc.ietf.org> wrote:
> 
> YANG Doctors,
> 
> Readjusting the subject and resending for comment
> 
> On 2024-01-20 12:40:12, Ebben Aries wrote:
>> Hi Folks,
>> 
>> I'm curious of opinions on the design pattern used during a recent
>> review here.  It is one such where a prescribed "time of activiation" is
>> being encoded in a r/w data tree leaf vs. within the protocol/messaging
>> layer or a YANG 'action'
>> 
>> Examples:
>> 
>>    +--rw requested-start?    yang:date-and-time
>>    +--rw requested-stop?     yang:date-and-time
>>    +--ro actual-start?       yang:date-and-time
>>    +--ro actual-stop?        yang:date-and-time
>> 
>> 
>>   +--rw status
>>      +--rw admin-status
>>      |  +--rw status?        identityref
>>      |  +--rw last-change?   yang:date-and-time
>>      +--ro oper-status
>>         +--ro status?        identityref
>>         +--ro last-change?   yang:date-and-time
>> 
>> Now, a quick search through published/draft modules as well as other
>> published models I'm not sure I've seen an attempt at such a design
>> pattern previously.
>> 
>> This approach is very specific the intent of any surrounding structures
>> and one where a design pattern is likely to diverge for similar
>> intentions.  This was mostly unfolded by questioning an already
>> published module (ietf-vpn-common) where `last-change` has a r/w and r/o
>> variant.
>> 
>> Would love to hear opinions on this approach vs. handling outside of the
>> data tree.
>> 
>> /ebben
>> 
>> 
>> ----- Forwarded message from Ebben Aries <exa@juniper.net> -----
>> 
>> From: Ebben Aries <exa@juniper.net>
>> To: mohamed.boucadair@orange.com
>> Subject: Re: Yangdoctors early review of draft-ietf-opsawg-teas-attachment-circuit-03
>> Date: Sat, 20 Jan 2024 12:28:22 -0700
>> 
>> Hi Med - inline...
>> 
>> On 2024-01-17 11:33:35, mohamed.boucadair@orange.com wrote:
>>> [External Email. Be cautious of content]
>>> 
>>> 
>>> Re-,
>>> 
>>>> [Med] Please note that we are focusing mainly on service and
>>>> network models, for which NETCONF may be the transport protocol,
>>>> but I hear your point.
>>> 
>>> I actually meant
>>> 
>>>> [Med] Please note that we are focusing mainly on service and
>>>> network models, for which NETCONF may NOT be the transport protocol,
>>>> but I hear your point.
>> 
>> Understood and was only referring to an example for a specific protocol.
>> Every protocol would need to account for similar capabilities.
>> 
>> Another option could be to model a YANG 'action' for this purpose but
>> again, alternate protocols need to have awareness on how to map actions
>> intent.
>> 
>> I'd be curious to hear others opinions here as we could end up w/
>> various design patterns for this problem statement.  Encoding as regular
>> leafs in a data tree can make it transport agnostic but one that needs
>> to be clear and common in intent imo.
>> 
>> Thx
>> 
>> /ebben
>> 
>>> Apologies for the inconvenience.
>>> 
>>> Cheers,
>>> Med
>>> 
>>>> -----Message d'origine-----
>>>> De : BOUCADAIR Mohamed INNOV/NET
>>>> Envoyé : mercredi 17 janvier 2024 12:28
>>>> À : 'Ebben Aries' <exa@juniper.net>
>>>> Cc : yang-doctors@ietf.org; draft-ietf-opsawg-teas-attachment-
>>>> circuit.all@ietf.org; opsawg@ietf.org
>>>> Objet : RE: Yangdoctors early review of draft-ietf-opsawg-teas-
>>>> attachment-circuit-03
>>>> 
>>>> Hi Ebben,
>>>> 
>>>> Please see inline.
>>>> 
>>>> Cheers,
>>>> Med
>>>> 
>>>>> -----Message d'origine-----
>>>>> De : Ebben Aries <exa@juniper.net>
>>>>> Envoyé : lundi 15 janvier 2024 16:49
>>>>> À : BOUCADAIR Mohamed INNOV/NET <mohamed.boucadair@orange.com>
>>>> Cc :
>>>>> yang-doctors@ietf.org; draft-ietf-opsawg-teas-attachment-
>>>>> circuit.all@ietf.org; opsawg@ietf.org
>>>>> Objet : Re: Yangdoctors early review of draft-ietf-opsawg-teas-
>>>>> attachment-circuit-03
>>>>> 
>>>>> Thx Med - one comment inline...
>>>>> 
>>>>> On 2024-01-15 06:59:58, mohamed.boucadair@orange.com wrote:
>>>>>> [External Email. Be cautious of content]
>>>>>> 
>>>>>> 
>>>> ...
>>>>>> 
>>>>>>> - For `status/admin-status/last-change`, this leaf is `r/w`
>>>>> and
>>>>>>> while I
>>>>>>>  realize this is reuse from `ietf-vpn-common`, it seems
>>>> that
>>>>> this
>>>>>>> is
>>>>>>>  incorrect and should be reflected as pure `r/o` state.
>>>>>> 
>>>>>> [Med] Actually, no. Unlike the operational status, the client
>>>>> can control that for administrative status as well. Think about
>>>>> scheduled operations for example.
>>>>> 
>>>>> I'm conflicted why this would reside in modeling for the use-
>>>> case you
>>>>> describe as this would entail a pattern that would need to be
>>>>> considered across _all_ modeling.
>>>> 
>>>> [Med] This is fair.
>>>> 
>>>>  I'm not sure I've seen this
>>>>> pattern arise before.
>>>>> 
>>>>> RFC7758 is one such example of how scheduled operations would
>>>> be
>>>>> handled at the protocol messaging layer and not scattered among
>>>> the
>>>>> data-content.
>>>> 
>>>> [Med] Please note that we are focusing mainly on service and
>>>> network models, for which NETCONF may be the transport protocol,
>>>> but I hear your point.
>>>> 
>>>> Given that for the AC models, we do define the following for a
>>>> client to control when a service can be activate/deactivated:
>>>> 
>>>>  grouping op-instructions
>>>>    +-- requested-start?   yang:date-and-time
>>>>    +-- requested-stop?    yang:date-and-time
>>>>    +--ro actual-start?      yang:date-and-time
>>>>    +--ro actual-stop?       yang:date-and-time
>>>> 
>>>> And that for advanced scheduling, the WG is working on a generic
>>>> model (draft-ma-opsawg-schedule-yang) that can be used in a
>>>> future ac augments if needed, I tweaked the draft so that the
>>>> admin last-change is ro instead of rw. The diff to track the
>>>> changes can be seen at:
>>>> 
>>>> * Diff ac-common: https://urldefense.com/v3/__https://boucadair.github.io/attachment-circuit-__;!!NEt6yMaO-gk!EX_FXGmvRZozEz2nAGr4xVgt1ak_n_R0DEq10bp0mvbLDNKWpvOyKInUF8TA_i3-wF-poJ7yyGKzq4Nt8WbNJ4bP$
>>>> model/#go.draft-ietf-opsawg-teas-common-ac.diff
>>>> * diff ac-svc: https://urldefense.com/v3/__https://boucadair.github.io/attachment-circuit-__;!!NEt6yMaO-gk!EX_FXGmvRZozEz2nAGr4xVgt1ak_n_R0DEq10bp0mvbLDNKWpvOyKInUF8TA_i3-wF-poJ7yyGKzq4Nt8WbNJ4bP$
>>>> model/#go.draft-ietf-opsawg-teas-attachment-circuit.diff
>>>> 
>>>> Better?
>>>> 
>>>> Thank you for you patience.
>>> 
>>> ____________________________________________________________________________________________________________
>>> Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
>>> pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
>>> a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
>>> Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.
>>> 
>>> This message and its attachments may contain confidential or privileged information that may be protected by law;
>>> they should not be distributed, used or copied without authorisation.
>>> If you have received this email in error, please notify the sender and delete this message and its attachments.
>>> As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
>>> Thank you.
>>> 
>> 
>> ----- End forwarded message -----
> 
> _______________________________________________
> yang-doctors mailing list
> yang-doctors@ietf.org
> https://www.ietf.org/mailman/listinfo/yang-doctors