[yang-doctors] YANG dialects?

Andy Bierman <andy@yumaworks.com> Wed, 18 December 2019 19:27 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 0B24C120B93 for <yang-doctors@ietfa.amsl.com>; Wed, 18 Dec 2019 11:27:53 -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 ZaQCifj6btX8 for <yang-doctors@ietfa.amsl.com>; Wed, 18 Dec 2019 11:27:51 -0800 (PST)
Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) (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 7BA46120B6A for <yang-doctors@ietf.org>; Wed, 18 Dec 2019 11:27:51 -0800 (PST)
Received: by mail-lf1-x130.google.com with SMTP id 15so2550315lfr.2 for <yang-doctors@ietf.org>; Wed, 18 Dec 2019 11:27:51 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=776EOl1+wKn42p8+JqIsxjLqMLi5+aezey3UMelnr84=; b=L4q6DPvXz63itEWOrcGSHqnvIX9lEhOIZs9SPWgZpbdQ6G7+suqqXeBi0iswwKArd2 lXOV9VfwDn2poYJEbWhj7coo+Av4z5zfzEDWEkCl9LJNrxbilu51J2H0D107Z+zIkVjf x5ioHzQjjPN5ScJAPnqaNUDtoa234uXpd0dosDtbqaSGvWpHMK8nEZTZfqx5qV9KGgnT wot9pN9NWYAn7dMM383CavO8l1Unh9117NOXv9TKNmtTiO8KGUH8fmAiOjfz9O5aXPEI Ntfv3hkU93ntpMG4rBOW5smIby6xXFbs3Yjb5bLk7R01WTVbG/FLYTGMP9bcdl4SEy4u VMpQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=776EOl1+wKn42p8+JqIsxjLqMLi5+aezey3UMelnr84=; b=N3lnzsSvjsA6lJY7cTV5fZHfBugF5pzj71nlnQyeACz3KjkgNyn0eZyKx7OhKMuNDx jnSD5l9wj9GNE1/7ePqDrKb6E81FWNn4nPkWy3x8EKVVqjA2kU6mrbdD6lXZDgynxPmF rh2vgIaWgWXv6ChxD3ZRZZuaODBnTJGYJTjwTRv/lL4gocVKyFuwO96g7ffFJ2x8jWzv 3UEOvZc87VlrE5vyMDQSfmdCer3DaprLLg8jEH7uMHBr6wmydGl5XzK1U3qlhFjuRoF1 SqRy4MltJQidjjGxV4eiLvZl+85wDsJHynL7wsMWi68jKaStL7obldOn06une1ftbNyc 4q7w==
X-Gm-Message-State: APjAAAXhDoM3DJYuDu/dLRwCk3XVvVt/hQ4RQSpomUS1XfHvnuekjXZB rWJqTbifa/jCTSar26LHRsdM036pij00242KPmhi9PX7ndcB0w==
X-Google-Smtp-Source: APXvYqyoS5w7Bew8mSiVt+TXmHx0T3cvgvwN8EqGxpevfb4J0/LWA/MiLButn5yqZs2WcJUIkL7ZtFDg+CdA1YEzdEE=
X-Received: by 2002:a05:6512:15d:: with SMTP id m29mr2931238lfo.51.1576697269186; Wed, 18 Dec 2019 11:27:49 -0800 (PST)
MIME-Version: 1.0
From: Andy Bierman <andy@yumaworks.com>
Date: Wed, 18 Dec 2019 11:27:37 -0800
Message-ID: <CABCOCHTB+V6sV8hRcAC+OfseBBN=jUQnHQxzEVB_1drWhaEVXg@mail.gmail.com>
To: YANG Doctors <yang-doctors@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000a60d0b0599ff70d5"
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/pekXsV_iEF0cwH_suAwxCECDUok>
Subject: [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 19:27:53 -0000

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.
I suspect it is more than that.

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?

For starters, can somebody explain the different rules pyang is checking
here?


Andy