Re: [netmod] [Netconf] magic leaf 'type' in IETF interfaces
Andy Bierman <andy@yumaworks.com> Fri, 14 December 2018 18:12 UTC
Return-Path: <andy@yumaworks.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B6FD2131203 for <netmod@ietfa.amsl.com>; Fri, 14 Dec 2018 10:12:49 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.358
X-Spam-Level:
X-Spam-Status: No, score=-3.358 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-1.459, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks-com.20150623.gappssmtp.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id T7oia7r67Cvg for <netmod@ietfa.amsl.com>; Fri, 14 Dec 2018 10:12:46 -0800 (PST)
Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 133381311FD for <netmod@ietf.org>; Fri, 14 Dec 2018 10:12:45 -0800 (PST)
Received: by mail-lf1-x136.google.com with SMTP id a16so4942068lfg.3 for <netmod@ietf.org>; Fri, 14 Dec 2018 10:12:45 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rrjGOZJVxlzP8n48x9BaksrsPcV1mGpw8eeXmMk9Gu4=; b=eXQdsS6MyNY6RM1uEs7J9hvdt+K5eq3jEVJsispOaWQ+dUDVC3oHr0oisCYrmKaKeJ y5nFD3iz9NUw4yrsD72cCzOj5wDm0wxtppH5icAvrkWJZdcga4qoi55pVtRAfKJM+Is2 SkUkwHN58CPKkkl79NKGUasUp1zzP0Rd4RFcaFIp8IAzhRxclprUfCun6qP4+rjLvcAN LvHRLcUcR5NmW3xNcQFlWFR1zplUYVC9xAfwj0n+5bw/iVqkNS1etSPWFk1TPbaxI2eq F9UsKCayxD0nrDmBn+qQfgJ9OH7Kl0lNPoYIAp0OehG8f0GHjpCWzxbutnQBqdZBjSQR xMcw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rrjGOZJVxlzP8n48x9BaksrsPcV1mGpw8eeXmMk9Gu4=; b=oCie+lVTYoCaCrFW7d+pp8eYQKDcMMsqzgyR2xtoC7ldL7jFrEdOCUhECNFVGxUolM UjtpqokyG48ODskX11QCLMDp0VyymQR5WUqhelig2bPRdrtlxWIqIQl9BwBjMTITkdw8 GmK2i+EB3SPC8UH84208k8cZKYzX9pMKimdxlvxcXTyXnqGPkOhbpixqN/nQSDtmwM0Z aMUeUIrtgcosBifg91z0gzatigxS28DAyl11ntk4fZ8lgK7dfmm5fxiTL8i1veig1+3+ 2DFklAexn31XG5BHRiq9zMb3mXqup4Wq8ATANrUFAgPO9KH5pOGutQdyzs7QWD4ZYLs9 DTuA==
X-Gm-Message-State: AA+aEWZV2Qg2CPNF3yB60i/pUdFkaUzyIqBBglvBOc9Ul3ICIuRMND/M zrEz2bPsJCb8NNQGFiGGeRfGtCq5d/Zt046AL0lprQ==
X-Google-Smtp-Source: AFSGD/XMffVVOYurNzUAl/ElVckLCYusWGxCcmMcBT7t8JvjFaeufm71AnKBRs/gMmFbByb+/7vFGK8n2lAf+ftg7eI=
X-Received: by 2002:a19:750a:: with SMTP id y10mr2389859lfe.43.1544811163974; Fri, 14 Dec 2018 10:12:43 -0800 (PST)
MIME-Version: 1.0
References: <VI1PR07MB39818BD20967B36B8F24DBA69BA10@VI1PR07MB3981.eurprd07.prod.outlook.com>
In-Reply-To: <VI1PR07MB39818BD20967B36B8F24DBA69BA10@VI1PR07MB3981.eurprd07.prod.outlook.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Fri, 14 Dec 2018 10:12:32 -0800
Message-ID: <CABCOCHTtWVBzG1Yg1Y73Lha2DA=ku8D1G-pRqdZrE-LfpwnA0g@mail.gmail.com>
To: "Sterne, Jason (Nokia - CA)" <jason.sterne@nokia.com>
Cc: NetMod WG <netmod@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000ac991c057cff6048"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/tjrO3kcUffKWDQhOE0kFXHXidR4>
Subject: Re: [netmod] [Netconf] magic leaf 'type' in IETF interfaces
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 14 Dec 2018 18:12:50 -0000
On Fri, Dec 14, 2018 at 9:53 AM Sterne, Jason (Nokia - CA/Ottawa) < jason.sterne@nokia.com> wrote: > Hi all, > > > > Cross posting because I'm not sure whether this is more of interest to > NETCONF clients or a general YANG & datastore question. > > > > In IETF Interfaces there is a leaf 'type'. Here is a snippet of the model: > > > > leaf type { > > type identityref { > > base interface-type; > > } > > mandatory true; > > description > > "The type of the interface. > > > > When an interface entry is created, a server MAY > > initialize the type leaf with a valid value > > > > This says that although the leaf is mandatory, a NETCONF client creating a > new interface does not have to specify/provide that leaf. That strikes me > as the first unusual point. > > > > Secondly -> this also means that a NETCONF client may send a config with > elements X, Y, and Z, but then later read back the config to see X, Y, Z > and T (e.g. type). But they never configured the type leaf. > > > > Shouldn't most clients generally assume that what they write, they read > back (unless there are 'choice' or 'when' statements involved of course, > but that are part of the YANG and any auto-clearing behavior from those > would be expected)? > > > > Or does 'anything go' / 'market decides' when it comes to behavior like > this explained in 'description' statements? > > > > Is it just fine that some NETCONF servers auto-magically create some > (extra) data nodes inside a list entry that a client created? (would like > to see opinions from multiple people on this - especially client > developers). > > > > I would think that each and every magic creation/deletion/changes done by > a server (i.e. that aren't part of the YANG, except perhaps part of a > human-readable (non-machine parsable) 'description' statement) would > require some special handling code on the client (or app above the client) > side. > > > > I can imagine several alternatives to the way it was modelled above: > > 1) NMDA approach: make the leaf optional. If the operator doesn't set that > leaf, then reading the conventional datastores doesn't return that leaf. > But reading the operational DS could return the actual system selected > value. > > 2) separate config & state leafs for 'type': make the leaf optional. If > the operator doesn't set that leaf, then reading the conventional > datastores doesn't return that leaf. But have another state leaf called > 'oper-type'. > > > > I'm not proposing to re-open the IETF Interface model. Just using it to > ask questions about server created config data and explore alternatives. > > > I think NMDA says the "type" leaf is mandatory in <intended> not <running>. I agree that YANG could be a lot more expressive about the auto-magic server behavior between <running> and <intended>. Any YANG client will see "mandatory true" and assume a value needs to be provided. > Jason > Andy > _______________________________________________ > Netconf mailing list > Netconf@ietf.org > https://www.ietf.org/mailman/listinfo/netconf >
- [netmod] magic leaf 'type' in IETF interfaces Sterne, Jason (Nokia - CA/Ottawa)
- Re: [netmod] [Netconf] magic leaf 'type' in IETF … Andy Bierman
- Re: [netmod] [Netconf] magic leaf 'type' in IETF … Martin Bjorklund
- Re: [netmod] [Netconf] magic leaf 'type' in IETF … Balázs Lengyel
- Re: [netmod] [Netconf] magic leaf 'type' in IETF … Jan Lindblad
- Re: [netmod] [Netconf] magic leaf 'type' in IETF … Ladislav Lhotka
- Re: [netmod] [Netconf] magic leaf 'type' in IETF … Andy Bierman
- Re: [netmod] [Netconf] magic leaf 'type' in IETF … Jan Lindblad
- Re: [netmod] [Netconf] magic leaf 'type' in IETF … Ladislav Lhotka
- Re: [netmod] [Netconf] magic leaf 'type' in IETF … Andy Bierman
- Re: [netmod] [Netconf] magic leaf 'type' in IETF … Qin Wu
- Re: [netmod] [Netconf] magic leaf 'type' in IETF … Qin Wu
- Re: [netmod] [Netconf] magic leaf 'type' in IETF … Belotti, Sergio (Nokia - IT/Vimercate)
- Re: [netmod] [Netconf] magic leaf 'type' in IETF … Andy Bierman