Re: [yang-doctors] Advise
Mahesh Jethanandani <mjethanandani@gmail.com> Thu, 11 March 2021 17:37 UTC
Return-Path: <mjethanandani@gmail.com>
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 3C9EB3A164E
for <yang-doctors@ietfa.amsl.com>; Thu, 11 Mar 2021 09:37:55 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 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, FREEMAIL_FROM=0.001,
HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, 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=gmail.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 kdb1k-cIXPBf for <yang-doctors@ietfa.amsl.com>;
Thu, 11 Mar 2021 09:37:52 -0800 (PST)
Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com
[IPv6:2607:f8b0:4864:20::42d])
(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 DB7953A1603
for <yang-doctors@ietf.org>; Thu, 11 Mar 2021 09:37:52 -0800 (PST)
Received: by mail-pf1-x42d.google.com with SMTP id 16so31209pfn.5
for <yang-doctors@ietf.org>; Thu, 11 Mar 2021 09:37:52 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=from:message-id:mime-version:subject:date:in-reply-to:cc:to
:references; bh=3wkPaxao7UHWEtH1e5I2jjNaRPW3rqOvSTm3KyUpWvU=;
b=ey+AzWS0Yx5cFlRPU3R7DsHCm9ORKjhpE5KhpvLK0sqNWY/T9pz09yJH7vR4n9a9pT
alR9Lbf6WbZvADEOfPZui3ChCgYYl6lGDNLN1voPMlZKX46k76bCSCjATJc8TEUNkCc+
NTAqUAWLRGYqZpwYURPFJZoMbfbJKnMx/TzwLLlu2EiW/TKZwnVQ2GpujIJGp77EF+iP
wu35Aw6Rf0+k0rMsjixy8W3crfKvXnulX0dV0W71CHeam/wowRyPY6rMhMkpRs231IAH
HGcnCC6OVL4cILLrepzGpLuZL1ljltuPEvI5ORARI3sAGyLWFGQ2tn9p64RJwXVO1aAj
cJ/w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:from:message-id:mime-version:subject:date
:in-reply-to:cc:to:references;
bh=3wkPaxao7UHWEtH1e5I2jjNaRPW3rqOvSTm3KyUpWvU=;
b=icjt4WvSsmTzAv+3RJi1rQrcltAcMSuVJAGpejkD4lLtYyAlWE0HnadBzCU01E6fOi
Oo7IeKt7cw4A/JOUxi/y7DNi6ghuDIX6hIXf4ErMxBUs5ouBWeXOdwJ0TQuv8Z8BHva1
lpU8U2vBa6zXSZ2HqDwjZI4Hj/TtitrFDirJeov819tevcZ/Px8fgP2NDapv5/PbVWAN
rXH4xc758MBxTZvAHZZGZp4nelmtW/7ezph4gC8ZBJumi7gU8PjBzGJsiskYIWhMeqLn
Y2CbiDm2AAZ9TtPB36wydKk2J7e+mE0vqyvAeocLxNtkAtFYBlrdj2oYI+WseRR8E85G
QPdA==
X-Gm-Message-State: AOAM53347RHO47WpJokdfxY24HTuWyHZjozxd2I3Md+aBn4XQ0fPsd36
f4pPFdbByfIBMY+4LIytD2M=
X-Google-Smtp-Source: ABdhPJxl2vYJMhsC6Ex9jIqlDLF4H4MvMMmm5Oh+LulJz/bm/RDoGNPT1NdfgRSR8IZ655lsVuvfZw==
X-Received: by 2002:a62:17c4:0:b029:1f5:7cfe:ebc4 with SMTP id
187-20020a6217c40000b02901f57cfeebc4mr8610522pfx.5.1615484272270;
Thu, 11 Mar 2021 09:37:52 -0800 (PST)
Received: from [192.168.1.151] (c-73-93-49-153.hsd1.ca.comcast.net.
[73.93.49.153])
by smtp.gmail.com with ESMTPSA id q25sm2971732pff.104.2021.03.11.09.37.51
(version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
Thu, 11 Mar 2021 09:37:51 -0800 (PST)
From: Mahesh Jethanandani <mjethanandani@gmail.com>
Message-Id: <67AAE912-D31C-4B94-B7BD-BA7EB619E697@gmail.com>
Content-Type: multipart/alternative;
boundary="Apple-Mail=_84457276-0281-4A8A-B960-8C97D918A9F1"
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\))
Date: Thu, 11 Mar 2021 09:37:48 -0800
In-Reply-To: <CABCOCHRNA6=9obLekxRh3BVRJLkQdPjhW6SvDWguJtGu31MGZw@mail.gmail.com>
Cc: YANG Doctors <yang-doctors@ietf.org>
To: Andy Bierman <andy@yumaworks.com>
References: <FFD5660B-5696-4713-A694-3B1B4E807E29@gmail.com>
<CABCOCHRNA6=9obLekxRh3BVRJLkQdPjhW6SvDWguJtGu31MGZw@mail.gmail.com>
X-Mailer: Apple Mail (2.3608.120.23.2.4)
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/Zbf_iw6Ln-YwyBvNXs0xlmbPXmE>
Subject: Re: [yang-doctors] Advise
X-BeenThere: yang-doctors@ietf.org
X-Mailman-Version: 2.1.29
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: Thu, 11 Mar 2021 17:38:02 -0000
Thanks Andy for those comments. Let me relay them back to the authors. > On Feb 28, 2021, at 8:05 AM, Andy Bierman <andy@yumaworks.com> wrote: > > > > On Thu, Feb 25, 2021 at 3:32 PM Mahesh Jethanandani <mjethanandani@gmail.com <mailto:mjethanandani@gmail.com>> wrote: > Hi Fellow YANG experts, > > I am reviewing the YANG model being published as part of draft-ietf-ccamp-flexigrid-yang <https://datatracker.ietf.org/doc/html/draft-ietf-ccamp-flexigrid-yang-09#section-6> which is tightly tied to the YANG model in draft-ietf-ccamp-wson-yang draft, that Acee is reviewing. > > I find the approach that this models and the approach other models have taken from the same WG as unusual, and I was wondering if there was any advise one could give on the design of the model. Maybe it is just me but when I see 80 augment statements in a model, something looks unusual. > > > > It is not unusual for the design patterns that are being used in the IETF. > Operators like the hierarchical design of YANG (and before that CLI). > There are lots of empty containers and choices that are meant to be the root > of augmentations from other modules. > > RFC 8345: > A network has a certain type, such as L2, L3, OSPF, or IS-IS. A > network can even have multiple types simultaneously. The type or > types are captured underneath the container "network-types". In this > model, it serves merely as an augmentation target; network-specific > modules will later introduce new data nodes to represent new network > types below this target, i.e., will insert them below "network-types" > via YANG augmentation. > > The first thing that stood out for me was a presence container that was used to identify the type of topology the model supports, with nothing else in the container. > > augment "/nw:networks/nw:network/nw:network-types" > + "/tet:te-topology" { > description > "Augment network types to define flexi-grid topology type."; > container flexi-grid-topology { > presence > "Its presence identifies the flexi-grid topology type."; > description > "Introduce new network type for flexi-grid topology."; > } > } > That presence container is then used all over the model to support a ‘when’ statement: > > when "/nw:networks/nw:network/nw:network-types" > + "/tet:te-topology/tet-flexig:flexi-grid-topology" { > description > "Augmentation parameters apply only for networks with > flexi-grid topology type."; > } > Could a simple ’type’ node have achieved the same purpose? Or maybe a ‘feature’ statement?? > > > > The P-container is serving as both the instance-enabled flag and the augment root > > A feature applies to all instances, but a when-stmt can be per-instance. However in this case the > XPath does not do that (and probably not what the authors think they wrote). > Then when-stmt is true if ANY network list entry has the P-container instance. > > Since when-stmt applies to instances, not the schema, it is probably pointless to add a > when-stmt to check if the /foo/bar instance exists before augmenting /foo/bar, IFF bar is a list or a P-container. > If the when /foo/bar is used to test augment /another/subtree then maybe a feature would work better. > > > > The rest of the model is a set of 80 augment statement, each augmenting a particular node in the topology defined by the ietf-te-topology model to add a few nodes to that branch of the topology, most of that being one node. > > augment /nw:networks/nw:network/nt:link/tet:te > /tet:information-source-entry/tet:label-restrictions > /tet:label-restriction/tet:label-end/tet:te-label > /tet:technology: > +--:(flexi-grid) > +--ro flexi-n? l0-types:flexi-n > Could this be better designed? As an operator, I would find configuration using this model to be very tedious. Not being an expert of Traffic Engineering (TE), I am not able to comment if this is how TE expects the configuration to happen, or if it this design that is flawed. Any advise? > > > > I don't know in this case without reading the draft and related RFCs. > At some point it is better to gather the augmenting (flexi-grid) parameters together and > use leafrefs to link these data structures to the ietf-network framework, > so there are a limited number of augmentations that point back to the flexi-grid parameters. > > > Mahesh Jethanandani > mjethanandani@gmail.com <mailto:mjethanandani@gmail.com> > > > > > Andy > > > > _______________________________________________ > yang-doctors mailing list > yang-doctors@ietf.org <mailto:yang-doctors@ietf.org> > https://www.ietf.org/mailman/listinfo/yang-doctors <https://www.ietf.org/mailman/listinfo/yang-doctors> Mahesh Jethanandani mjethanandani@gmail.com
- [yang-doctors] Advise Mahesh Jethanandani
- Re: [yang-doctors] Advise Andy Bierman
- Re: [yang-doctors] Advise Mahesh Jethanandani