Re: [yang-doctors] YANG dialects?
Andy Bierman <andy@yumaworks.com> Wed, 18 December 2019 22:58 UTC
Return-Path: <andy@yumaworks.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 473CA120013 for <yang-doctors@ietfa.amsl.com>; Wed, 18 Dec 2019 14:58:57 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-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 dcwRaerfIyHe for <yang-doctors@ietfa.amsl.com>; Wed, 18 Dec 2019 14:58:55 -0800 (PST)
Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) (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 A812112082A for <yang-doctors@ietf.org>; Wed, 18 Dec 2019 14:58:54 -0800 (PST)
Received: by mail-lj1-x22f.google.com with SMTP id p8so4036667ljg.0 for <yang-doctors@ietf.org>; Wed, 18 Dec 2019 14:58:54 -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=YkOdTH+ev1jsKwARaSxTfpjt7UeZcAqaKLV5wfaEdLE=; b=v/KPfWs4Lk2KqLqvg6P+KhDxTBphgeT9bD6+AJLVpsjAoNAeV0DT29o99uYbh8oZgr JG9MJUf+DKeCoN1OtEWtCX9X9KNzF4POzkJevOXb0QlDgZCelv9kUR9I4j+jny7e3VK/ kaLofIyTM/WTsK0CbHSTxn4H+Q8nNGD2yXD3QclEZct63E/1uCPjK4PCbt4tJBVI0CCA 3TxFc3wmhHMqCCP7tnBGJeuULXewWNyn7cWCAXTjOdYb/dnhVwCZxen8+rTxUjmexOO8 4Xo0tMEtQl4MXB/oVX8NkzM/ZpjEKC8w9Phh2p7SQJlQfFCWhYJ49nGC6Q/+iIJfZxDs 5+lg==
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=YkOdTH+ev1jsKwARaSxTfpjt7UeZcAqaKLV5wfaEdLE=; b=J+xyjNVP17HyKF827LY8LYsdhlqEU4t2vu8fCt+o3yD2kZai55+XGbhS+/FbgcMeta gkuo2Ca2f81oL0qr2VLiBMEBqsfVgK86AHHzx21emW564FUndqjUWXox36S0YPkNgHBe Li6P9gxpUegaOIzR0nkR0yskUNjVs+iY8ty6Y+z2LgnVrVkXZl91ukKXclOUv22MEKgP SwYR1H/fpCQTET9z4qwpWG7cWrE8O0saYgS+9dDefC9neecrSnlkOwSi7yyHIe+mb1QW LpvRNbVTKaOpwlpvTdmZQfMyv6IBFwqBQZPdOMn9L6PLi5r0NFYajURgo25ntem+2lJ6 NNnA==
X-Gm-Message-State: APjAAAXKWYeWKIyBPpk1ZmvRUsLs7Ssl7HCXtZtABRhrLQEfqmGPSqek jCWxapcvmX73f7bSO7c5RVEYNeU+xB+YV/MfMLfD/5L4AkApCQ==
X-Google-Smtp-Source: APXvYqwVoeQ/o7ck0FK+FbJHXZbtgjdIPJbyO87Iqoago1cuNliDQueOtJc/+syraDoQqMfM4FXSd1BiLTfNWG3O32Y=
X-Received: by 2002:a2e:9e92:: with SMTP id f18mr3713274ljk.147.1576709932812; Wed, 18 Dec 2019 14:58:52 -0800 (PST)
MIME-Version: 1.0
References: <CABCOCHTB+V6sV8hRcAC+OfseBBN=jUQnHQxzEVB_1drWhaEVXg@mail.gmail.com> <20191218.220130.545256750871048075.mbj@tail-f.com>
In-Reply-To: <20191218.220130.545256750871048075.mbj@tail-f.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Wed, 18 Dec 2019 14:58:41 -0800
Message-ID: <CABCOCHRfNrz+cNMA8ciRYGEM-7aR=S2NYJzU-t8JQ620Zs=hvQ@mail.gmail.com>
To: Martin Bjorklund <mbj@tail-f.com>
Cc: YANG Doctors <yang-doctors@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000075a7d0059a0263a6"
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/IeXAogDxOJwows5btB3AE5tG4a0>
Subject: Re: [yang-doctors] YANG dialects?
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: Wed, 18 Dec 2019 22:58:57 -0000
On Wed, Dec 18, 2019 at 1:01 PM Martin Bjorklund <mbj@tail-f.com> wrote: > Andy Bierman <andy@yumaworks.com> wrote: > > Hi, > > > > I noticed in the help output for pyang 2.1: > > > > --mef Validate the module(s) according to MEF rules. > > --ieee Validate the module(s) according to IEEE rules. > > --ietf Validate the module(s) according to IETF rules. > > --bbf Validate the module(s) according to BBF rules. > > --lint Validate the module(s) according to RFC > 8407rules. > > > > > > I guess --openconfig is missing (since they have their own rules for YANG > > as well) > > > > I hope these different rules are for style only, and not redefining YANG. > > Right, these are style rules. Note the help text for "--lint" - it > verifies the rules defined in RFC 8407. > > All the others invokes --lint, and in addtion validates module names > and namespaces (e.g. --ietf checks that the module is called "ietf-*" > ot "iana-*"). > > > I suspect it is more than that. > > No, not for these validators. > > OK > > I am aware of at least 3 openconfig issues that do not follow YANG rules: > > - repurposing pattern-stmt to use a different syntax > > - referencing config=false nodes from config=true context node for > > when-stmts > > - use of identity strings without prefixes in XPath, where the default > > module does > > not contain the identity (it is in an imported module instead) > > > > Should we just continue hacking the tools in proprietary ways to deal > with > > the inconsistencies? Are there any issues the IETF (or YANG doctors) > > could or should address? > > These module are published and are being used. Vendors that want to > use them will have to work around the problems. There's nothing we > (the IETF) can do about them. However, it is trivial to fix all these > issues so that the modules are valid YANG, but it doesn't seem this is > high on OpenConfig's priority list. > > > Not so easy for all of them. (1) The pattern-stmt disaster cannot be addressed. (2) I see the config=false access issue in ietf-if-extensions@2019-11-04 and ietf-if-l3-vlan@2019-11-04 container dot1q-vlan { must 'count(../../if-ext:forwarding-mode) = 0 or ' + 'derived-from-or-self(../../if-ext:forwarding-mode,' + '"if-ext:layer-3-forwarding")' { forwarding-mode is config=false I am trying to compile ietf-routing-policy and eventually ietf-bgp. 3 different compilers are giving 3 different answers for ietf-routing-policy, related to this dot1q-vlan container. (3) Users want to specify identities without the prefixes. Should tools allow it or follow YANG rules? >From XPath POV it is just a string literal. I know they are supposed to use derived-from (or-self) but they don't follow that rule either. /martin > > Andy > > > > > > For starters, can somebody explain the different rules pyang is checking > > here? > > > > > > Andy >
- Re: [yang-doctors] YANG dialects? Mahesh Jethanandani
- [yang-doctors] YANG dialects? Andy Bierman
- Re: [yang-doctors] YANG dialects? Martin Bjorklund
- Re: [yang-doctors] YANG dialects? Andy Bierman
- Re: [yang-doctors] YANG dialects? Martin Bjorklund
- Re: [yang-doctors] YANG dialects? Ladislav Lhotka
- Re: [yang-doctors] YANG dialects? Schönwälder
- Re: [yang-doctors] YANG dialects? Rob Wilton (rwilton)
- Re: [yang-doctors] YANG dialects? Ebben Aries
- Re: [yang-doctors] YANG dialects? Jan Lindblad
- Re: [yang-doctors] YANG dialects? Rob Wilton (rwilton)
- Re: [yang-doctors] YANG dialects? Schönwälder
- Re: [yang-doctors] YANG dialects? Ladislav Lhotka
- Re: [yang-doctors] YANG dialects? Jan Lindblad
- Re: [yang-doctors] YANG dialects? Ladislav Lhotka
- Re: [yang-doctors] YANG dialects? Andy Bierman
- Re: [yang-doctors] YANG dialects? Jan Lindblad
- Re: [yang-doctors] YANG dialects? Ladislav Lhotka
- Re: [yang-doctors] YANG dialects? Andy Bierman