Re: [yang-doctors] Design pattern: Reusable types in type specific modules

Kent Watsen <kent@watsen.net> Wed, 28 February 2024 12:55 UTC

Return-Path: <0100018defc8c76a-839ae33f-2033-4336-9438-eb317817e12f-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 13A17C14F6B5 for <yang-doctors@ietfa.amsl.com>; Wed, 28 Feb 2024 04:55:45 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.906
X-Spam-Level:
X-Spam-Status: No, score=-6.906 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_HI=-5, 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 IFQarhttaUXE for <yang-doctors@ietfa.amsl.com>; Wed, 28 Feb 2024 04:55:41 -0800 (PST)
Received: from a48-95.smtp-out.amazonses.com (a48-95.smtp-out.amazonses.com [54.240.48.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9EBEDC14F697 for <yang-doctors@ietf.org>; Wed, 28 Feb 2024 04:55:30 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=224i4yxa5dv7c2xz3womw6peuasteono; d=amazonses.com; t=1709124929; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc:Content-Transfer-Encoding:Message-Id:References:To:Feedback-ID; bh=h/AezwXmYC1mZQYotHexnMv85DQdvjoKj30xZzeDays=; b=HB3Jxf27iVkeUFkLORSh1pRYeR7+VWgPmsMVEw5hGHN5qB/bV1gqhjextba43iMG k6pRsH5041wQb0iwcZzhMsqMmmjeYwPzB90sHFqrlzR1CtX91k2/rOAp4wcTzLK48XH uVKGhEuitNfsa2v/8jNRcc/Wsp6Vg3/ddeg/ijAk=
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.400.31\))
From: Kent Watsen <kent@watsen.net>
In-Reply-To: <ZcZQ2LpbVFui9IB-@localhost>
Date: Wed, 28 Feb 2024 12:55:29 +0000
Cc: YANG Doctors <yang-doctors@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-ID: <0100018defc8c76a-839ae33f-2033-4336-9438-eb317817e12f-000000@email.amazonses.com>
References: <ZcZQ2LpbVFui9IB-@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.95
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/NbtraM3ulvx0gNHGEpe7EJViLog>
Subject: Re: [yang-doctors] Design pattern: Reusable types in type specific modules
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 12:55:45 -0000

Hi Ebben,

The client-server suite of drafts in NETCONF provide a number of general purpose modules that are expected to be used outside of the original purpose of defining a configuration model for NETCONF and RESTCONF servers.

My solution is to sprinkle if-feature statements everywhere so that implementations can easily turn off the parts they don’t want.   I hate deviations and hence hope this makes it so they’re unnecessary.

Hope it helps.

Kent


> On Feb 9, 2024, at 11:20 AM, Ebben Aries <exa=40juniper.net@dmarc.ietf.org> wrote:
> 
> YANG Doctors,
> 
> I'd like to understand if there has ever been motivation or guidance to
> model authors to question if any types (typedefs, identities or even
> groupings) they are bringing into domain specific work are to be
> used/leveraged outside of the scope of their immediate model work and if
> it's best to choose an alternate pattern to create domain specific types
> modules.
> 
> Outside of the obvious reusable global type modules (ietf-inet-types,
> ietf-yang-types, ietf-routing-types, etc..), there are many published
> modules that bring in reusable common types along side data-trees,
> notifications, rpcs, actions.
> 
> If another module wants to leverage any such types but the
> implementation may not support all other constructs, this is where the
> YANG library implement vs. import-only comes in however to a consumer,
> this is often not well understood or mandated for workflows.  Another
> solution here is to produce deviations which give another common
> misperception and perceived abuse that support is advertised for a model
> (or set of models due to sometimes vast dependency chains) then
> completely negated since only a small subset of a type is the
> dependency.
> 
> Where do we stand on this topic and have we been nudging any authors to
> question if their types should indeed get pulled back into specific
> domain/global types modules?
> 
> Thx
> 
> /ebben
> 
> _______________________________________________
> yang-doctors mailing list
> yang-doctors@ietf.org
> https://www.ietf.org/mailman/listinfo/yang-doctors