Re: [Lsr] LSR Working Last Call for draft-ietf-ospf-yang - YANG is too complicated

tom petch <ietfc@btconnect.com> Thu, 23 August 2018 11:57 UTC

Return-Path: <ietfc@btconnect.com>
X-Original-To: lsr@ietfa.amsl.com
Delivered-To: lsr@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A3BBB129C6A for <lsr@ietfa.amsl.com>; Thu, 23 Aug 2018 04:57:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 3.188
X-Spam-Level: ***
X-Spam-Status: No, score=3.188 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RATWARE_MS_HASH=2.148, RATWARE_OUTLOOK_NONAME=2.95, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=btconnect.onmicrosoft.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 mBRmXmV-gojs for <lsr@ietfa.amsl.com>; Thu, 23 Aug 2018 04:57:03 -0700 (PDT)
Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00113.outbound.protection.outlook.com [40.107.0.113]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 77A30128CB7 for <lsr@ietf.org>; Thu, 23 Aug 2018 04:57:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=btconnect.onmicrosoft.com; s=selector1-btconnect-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JJ9ZQJhq36ykPt0FxvDNlNHgWM9VezqiOq09jEAhn4k=; b=UKctcUdt7sIauTWTqiapHzPu/bSkWGJvFqlAvF93oM4vgiN4D4e3/bvfMq20+fSy8FUYwih3ElctgAbfkqg+57+leHyzOHWz5YL2rU4FogDqTrd70L0wHDNqWp/+8uWvbQRIEqu0to5/CGzbe4hHtJczRejdQ0twPLow6ZfD7Ws=
Received: from VI1PR07MB0831.eurprd07.prod.outlook.com (10.161.107.154) by VI1PR07MB4126.eurprd07.prod.outlook.com (52.134.21.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1080.11; Thu, 23 Aug 2018 11:56:59 +0000
Received: from VI1PR07MB0831.eurprd07.prod.outlook.com ([fe80::715f:f4a2:caef:d939]) by VI1PR07MB0831.eurprd07.prod.outlook.com ([fe80::715f:f4a2:caef:d939%2]) with mapi id 15.20.1080.010; Thu, 23 Aug 2018 11:56:59 +0000
From: tom petch <ietfc@btconnect.com>
To: "Acee Lindem (acee)" <acee@cisco.com>, Jeff Tantsura <jefftant.ietf@gmail.com>, "lsr@ietf.org" <lsr@ietf.org>
Thread-Topic: [Lsr] LSR Working Last Call for draft-ietf-ospf-yang - YANG is too complicated
Thread-Index: AQHUOthlxyXen5QXq0aIpv7GXX6hSA==
Date: Thu, 23 Aug 2018 11:56:59 +0000
Message-ID: <026601d43ad7$e966e000$4001a8c0@gateway.2wire.net>
References: <1E45CAE5-8C79-4476-9953-E473C6499311@gmail.com> <02d701d43a2e$1e153540$4001a8c0@gateway.2wire.net> <6862CE66-0A87-41BA-BA86-8BC3FD919279@cisco.com>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-clientproxiedby: HE1PR0401CA0052.eurprd04.prod.outlook.com (2603:10a6:3:19::20) To VI1PR07MB0831.eurprd07.prod.outlook.com (2a01:111:e400:508e::26)
authentication-results: spf=none (sender IP is ) smtp.mailfrom=ietfc@btconnect.com;
x-ms-exchange-messagesentrepresentingtype: 1
x-originating-ip: [81.131.229.47]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; VI1PR07MB4126; 6:rqAwTywgh4hqAufAx5r4aeCLM10bB6MOfLZ5GQxMCPq4TxuWbryRZ+BQoxnb/3CQgV0kZpsXz353CU988gEEF/ps/XJ+3I2KUxwyOyGx5tB8wocqftN9M3hb01H3jJ5VUA+NK78jb6gretOO1ALxw2sBqKYIsPwwnaQajMa4OxIbbBuDvxIxHU6NRm/Nq8f/li/l8OyUAp5fa1EWk5+AAgFfvyjAnX1+XOz9qGmMvvT8ZkxHNg+gPp1x1STPIR2a3iqKOHKz6PLcehc/v2tBHk0R0u1+av0Ub2Ill6umCkGCiNVtn9qcCiI9gHUpKRupLG3Il8QROiVD7Usy4JC3PaqOzxCa/+zDnDbUAAHS9zJIczHH+QpnXNT9IpPgs0GCrw6/YIryUQzUkgElyURoDfXwy2CThKOF6Y1PiFEFToHhtUbEoAYrQpj9IUw+7RfOWYTtSREqoyn+Abshfrxf7Q==; 5:J+/njsa/ziF5dQZVXNGvt6+UpxGLFiEF7ln4y+Tgu4cjPfffeIWShOlJ0xJ5/QF53IASav5S0QLRrh+LfLGCp2Or+CzMCqk+tgedGQUVcuqyyvRBuyZ5CousTq06bEBOg5Mt0x4PPlyb7Aefk0RTptq/LM6Uw/kSJvTvjCeZjbY=; 7:DCXQhK6rLi3MQROx8fXhcPLautDeNNnMzd3y5BYAk7Qy6h7E24afjBlDDPMob2mfGgYRUgYQ1w3CmPjUdzH3seOMZTXT8fSVAVojChWm+T3wsKHQhFBb34NXdMtW3NSwrECjD1WoaDIPRMFp0VQimzuwt0+s81r+14Aru8lezT8pvtoguSbNo8ahCzUCcP2vGuG1p/7+ogimTXjuUhB2JQSg/2k+Ut7N5fhDRbSDr7w0fM7VYSERValxL9zdmiAX
x-ms-office365-filtering-correlation-id: 46e1951e-43ff-4887-f1df-08d608ef87ee
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7193020); SRVR:VI1PR07MB4126;
x-ms-traffictypediagnostic: VI1PR07MB4126:
x-microsoft-antispam-prvs: <VI1PR07MB41267CF0B52A8EEADB7ED587A0370@VI1PR07MB4126.eurprd07.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(178726229863574)(120809045254105)(85827821059158)(219612443155931)(95692535739014);
x-ms-exchange-senderadcheck: 1
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(3231311)(944501410)(52105095)(10201501046)(93006095)(93001095)(3002001)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(20161123564045)(20161123562045)(201708071742011)(7699016); SRVR:VI1PR07MB4126; BCL:0; PCL:0; RULEID:; SRVR:VI1PR07MB4126;
x-forefront-prvs: 0773BB46AC
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(366004)(39860400002)(136003)(346002)(376002)(189003)(199004)(13464003)(2906002)(44736005)(5660300001)(2900100001)(97736004)(14496001)(26005)(186003)(33896004)(53546011)(386003)(68736007)(76176011)(486006)(6506007)(14444005)(229853002)(53936002)(9686003)(6486002)(6436002)(86152003)(102836004)(6512007)(476003)(256004)(6306002)(446003)(3846002)(84392002)(6116002)(7736002)(316002)(66066001)(81166006)(305945005)(81156014)(8676002)(105586002)(99286004)(8936002)(52116002)(1556002)(110136005)(6246003)(39060400002)(25786009)(86362001)(478600001)(966005)(14454004)(2501003)(5250100002)(106356001); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR07MB4126; H:VI1PR07MB0831.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:0;
received-spf: None (protection.outlook.com: btconnect.com does not designate permitted sender hosts)
x-microsoft-antispam-message-info: cXcuQZN4dNVzVM+C2xH0RzJDRFtAM1sRRJeBL9QSHhLumeC+rFGvI9J1sMjiHAVs2JgYLU3c9Nnv4DS0P33iHq+opt6NDDRojDjBgenYP2RHMnMMujPijAVHehKz513QXXHajX50heyJ/NGrpoJXelgU7cA2JYQgLvV8rtGRtLwukdA5DHpr7jo/zItLAFQsWDuX766u3keYlkzYFKJmNExfnKj4R0/sc9ukatGj3TB3ihhZ/arNfDe+hFM2OZdIpNJt8l7RKcyeFV4b1l7BLkMZcJbfa2UXhC8xcLVUfEKvaOIWpjHhsqhX83FsJivpNsGMDL4ar/wuvYaa+grqSJ51f2Lj7lhixKpk0/ehti0=
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="utf-8"
Content-ID: <34A4E1C080131343AC5C91D0328480C3@eurprd07.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: btconnect.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 46e1951e-43ff-4887-f1df-08d608ef87ee
X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Aug 2018 11:56:59.5387 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: cf8853ed-96e5-465b-9185-806bfe185e30
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR07MB4126
Archived-At: <https://mailarchive.ietf.org/arch/msg/lsr/chmdm-H5GxjvavpdfjvLCrqvpGw>
Subject: Re: [Lsr] LSR Working Last Call for draft-ietf-ospf-yang - YANG is too complicated
X-BeenThere: lsr@ietf.org
X-Mailman-Version: 2.1.27
Precedence: list
List-Id: Link State Routing Working Group <lsr.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/lsr>, <mailto:lsr-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/lsr/>
List-Post: <mailto:lsr@ietf.org>
List-Help: <mailto:lsr-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/lsr>, <mailto:lsr-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 23 Aug 2018 11:57:05 -0000

Acee

Tweaking the subject line slightly since this is a more generic point.

My point about
    refine "version/ospfv2/ospfv2" {
     must "derived-from-or-self( "
     + "../../../../../../../../../../"
     + "rt:type, 'ospf:ospfv2')" {
     description "OSPFv2 LSA.";
was more about the difficulty of validating these conditionals in YANG.
It could be worse e.g.
  augment "/nw:networks/nw:network/nt:link/tet:te/"
        + "tet:te-link-attributes/"
        + "tet:max-resv-link-bandwidth/"
        + "tet:te-bandwidth/tet:technology" {
    when "../../../../../../nw:network-types/tet:te-topology/"
       + "otntopo:otn-topology" {

occurring 100 or so times in an I-D.  Tools can check the syntax, they
can (almost) never check the semantics. It takes something more
intelligent, more knowledgeable than a tool to spot that e.g.
    RFC 5178 - OSPFv3 Graceful Restart";
is wrong and I think the same of complicated YANG expressions.

If complicated expressions occur once, I could check them; 100 times, no
way.  Every other language (almost) I have used allows me to say
     must "derived-from-or-self( "
     + "../../../../../../../../../../"
     + "rt:type, 'ospf:ospfv2')" {
is equivalent to
 ospfv2 {type boolean}
so I need check the complicated expression once, subsequent uses being
just
 ospfv2
which is then obviously right or wrong.

You only have any one 'complicated' expression occurring half a dozen
times or so, but then there are a number of them, conditional on OSPF
version, LSA type and so on. If one instance of one expression was
syntactically valid but not quite right, perhaps missing 'or-self' or
/.. or some such, would anyone ever notice?

I see this as the biggest single defect in YANG that has only become
apparent with the use it is put to in the Routing Area; and it is YANG
that needs to change (IMHO).

Tom Petch

----- Original Message -----
From: "Acee Lindem (acee)" <acee@cisco.com>
To: "tom petch" <ietfc@btconnect.com>; "Jeff Tantsura"
<jefftant.ietf@gmail.com>; <lsr@ietf.org>
Sent: Thursday, August 23, 2018 12:23 AM
Subject: Re: [Lsr] LSR Working Last Call for draft-ietf-ospf-yang


> Hi Tom,
>
> Thanks much Tom - I agree with your comments. See one inline.
>
> I will likely work on these prior to the end of the WG last call
period.
>
> On 8/22/18, 11:41 AM, "tom petch" <ietfc@btconnect.com> wrote:
>
>     ---- Original Message -----
>     From: "Jeff Tantsura" <jefftant.ietf@gmail.com>
>     Sent: Friday, August 17, 2018 9:14 PM
>
>     Acee,
>
>     The draft is in good shape, support.
>
>     <tp>
>
>     Mmm that sounds like a good challenge.  I had a quick look and
noticed:
>
>     - NMDA gets discussed in s.2.1; I like to see support for it
mentioned
>     earlier, in Abstract and Introduction, something I have seen the
IESG
>     request recently
>
>     - there is no explanation of the legend used in the tree diagrams;
if
>     appropriate, this can be fixed with an Informative Reference to
RFC8340
>
>     - s.2.4 NSR needs expanding IMHO
>
>     - s.2.4 I would like a list of features, all 20 of them, not just
>     "such as NSR, max-LSA, etc"
>     so I don't have to reverse engineer the YANG module to find them;
as and
>     when new features come along, I expect there will be a delay
before they
>     make it into YANG so a clear list for those supported by this
module
>     would be useful
>
>     - sometimes it is 'link state database ', sometimes 'Link State
>     Database', sometimes 'Link State database'; I would like
consistency
>     (and prefer the capitalised version)
>
> I agree.
>
>     - the YANG module as
>     version 1.1
>     but RFC7950 is not mentioned or referenced; odd
>
>     - the YANG module has
>     RFC 5178 - OSPFv3 Graceful Restart";
>     which I think should be RFC 5187
>
> Yup.
>
>     - the YANG module has
>     "RFC XXXX - YANG Data Model for Bidirectional Forwarding Detection
>     (BFD)";
>     "RFC XXXX: A YANG Data Model for OSPF.";
>     "RFC XXXX - SPF Back-off algorithm for link state IGPs";  RFC8405
>              reference "draft-ietf-bfd-yang-xx.txt:
>
>     I suggest using a larger namespace than 'XXXX'; perhaps 'XXXX' and
>     'YYYY' (since  "RFC XXXX - SPF Back-off algorithm for link state
IGPs"
>     is in fact RFC8405 and is already in the Normative References)
along
>     with a note to the RFC Editor telling them what 'YYYY' and 'XXXX'
should
>     be replaced with.
>
>      reviewing the technical bits is going to be a challenge; I
struggle to
>     interpret such as
>              when "derived-from("
>                 +
"../../../../../areas/area[area-id=current()/../area-id]/"
>                 + "area-type, 'stub-nssa-area')" {
>     or
>                      refine "version/ospfv2/ospfv2" {
>                        must "derived-from-or-self( "
>                           + "../../../../../../../../../../"
>                           + "rt:type, 'ospf:ospfv2')" {
>                          description "OSPFv2 LSA.";
>
>     I note the use of "derived-from-or-self " as opposed to
"derived-from "
>     but it will take me longer to work out if the usage is
appropriate.
>
> In cases where the leaf should take on a specific identity rather than
the general identity, It should simply be derived-from(). I'll revisit
these.
>
> Thanks,
> Acee
>
>     Tom Petch
>
>     Cheers,
>
>     Jeff
>
>
>
>     From: Lsr <lsr-bounces@ietf.org> on behalf of "Acee Lindem (acee)"
>     <acee=40cisco.com@dmarc.ietf.org>
>     Date: Friday, August 17, 2018 at 13:09
>     To: "lsr@ietf.org" <lsr@ietf.org>
>     Subject: [Lsr] LSR Working Last Call for draft-ietf-ospf-yang
>
>
>
>     This begins an LSR WG last call for the subject draft. Please send
your
>
>     comments to this list prior to 12:00 AM GMT, September 8th, 2018.
>
>
>
>     Given the size of the model and the US Labor Day Holiday, we’re
allowing
>     a full 3 weeks.
>
>
>
>     For your convenience, here is a URL:
>
>
>
>     https://datatracker.ietf.org/doc/draft-ietf-ospf-yang/
>
>
>
>     Note there is one obsolete reference left as an exercise for the
>     reviewers. Note that the document has already been through a
couple YANG
>     doctor reviews.
>
>
>
>     Thanks,
>     Acee
>
>     _______________________________________________ Lsr mailing list
>     Lsr@ietf.org https://www.ietf.org/mailman/listinfo/lsr
>
>
>
>
>     ------------------------------------------------------------------
------
>     --------
>
>
>     > _______________________________________________
>     > Lsr mailing list
>     > Lsr@ietf.org
>     > https://www.ietf.org/mailman/listinfo/lsr
>     >
>
>
>
>