Re: [yang-doctors] YANG dialects?

Mahesh Jethanandani <mjethanandani@gmail.com> Wed, 18 December 2019 20:10 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 2B651120A77 for <yang-doctors@ietfa.amsl.com>; Wed, 18 Dec 2019 12:10:35 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=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=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 S97gxAmEeF7n for <yang-doctors@ietfa.amsl.com>; Wed, 18 Dec 2019 12:10:33 -0800 (PST)
Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) (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 AD4BC12081B for <yang-doctors@ietf.org>; Wed, 18 Dec 2019 12:10:33 -0800 (PST)
Received: by mail-pf1-x42f.google.com with SMTP id p14so1825507pfn.4 for <yang-doctors@ietf.org>; Wed, 18 Dec 2019 12:10:33 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=nUUslPgYlA7zBDtVlTUhNWYx/TUZ1daRi98icJpcrt0=; b=HutkrEt0VMkmLPIZ0h+MR1s2XnSEbwkeu6tKvEN7e1JJEEVRbkWhcPDBU8xnDAX895 ao5RpXgsTTM1dAdiS1MCKgPmyAOoSDusMJeGAI+IbVNd5FO+6LJxOmYCehTTEbb9w/s4 lJzc9Mccy0oSFq2OHon5D1DJz/3WRvcKPKkppdVXZtlYgiaGjHDWVA71ecC/gD1R7khd MFvqmFrhVC+WaypRwukDWrexGpx8dKQjQ9J2yGfKn3llUVROVyozNgFvUwe9O+8XVDU6 fjh0kWZm5UJGd7rWtOsCkoAxmyYSnpyzmgQGbUVwaM0vcznlPqs2yIQ3clrNXyZo5ATy ibuQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=nUUslPgYlA7zBDtVlTUhNWYx/TUZ1daRi98icJpcrt0=; b=i+f3igHsy1icCPdgkibjxT839btPxp4cvh2tJgWqjQEs8AcUtiTY2Qma7rh3q8mJr6 /ady8O+InBLi3XVK1mZ60IK1cBeEanM7SUAAO6ef3Ywpc4pjtRUHFywY5sTuPO/gKIFB 3cMyqietUaK+jOLen9HsahiPYyOPOq4ZOvGpuDV2zpJ9rp3J3R2Ly+8Ii2gN/7BtCG27 0W1HjMTMOdll0w5OFd+CJl788dzAQxzeugeqkGZYupjTZYRB20FyMF42dVR2l+PVCZX2 VOrHePRJ+5IhFhQbfbN9yioPoOgdfdZlO2khyAq4L1K8Z929+d7wRNporY1lig5PuREm 94ag==
X-Gm-Message-State: APjAAAXu0KE+flrKLiw6iHzQmh+dYRmX2ZG3/MtsDjoJ1PHLNbAVOlt0 LsgYbylspTrj22qi8UYlYZFd2bGf
X-Google-Smtp-Source: APXvYqxa6hUW6md7QchzBYZntDY0rsZhCatNW+bnDfXJHvf2ze+4ExydjzpkNBf+PoLlfUTGiPBtEQ==
X-Received: by 2002:a63:3cb:: with SMTP id 194mr5099934pgd.123.1576699833106; Wed, 18 Dec 2019 12:10:33 -0800 (PST)
Received: from [10.33.123.64] ([66.170.99.1]) by smtp.gmail.com with ESMTPSA id t137sm4240335pgb.40.2019.12.18.12.10.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Dec 2019 12:10:32 -0800 (PST)
Content-Type: text/plain; charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
From: Mahesh Jethanandani <mjethanandani@gmail.com>
In-Reply-To: <CABCOCHTB+V6sV8hRcAC+OfseBBN=jUQnHQxzEVB_1drWhaEVXg@mail.gmail.com>
Date: Wed, 18 Dec 2019 12:10:30 -0800
Cc: YANG Doctors <yang-doctors@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <3A37A048-11C1-4927-8A03-BFCB0008879A@gmail.com>
References: <CABCOCHTB+V6sV8hRcAC+OfseBBN=jUQnHQxzEVB_1drWhaEVXg@mail.gmail.com>
To: Andy Bierman <andy@yumaworks.com>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/mWwoLIFr_iJ0VYZ21r6eJGVIe9A>
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 20:10:35 -0000


> On Dec 18, 2019, at 11:27 AM, 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.
> I suspect it is more than that..

—mef and —ieee were added because those two use namespaces whose syntax is different from ietf. I suspect the same is true for —bbf. There are no other changes/redefinitions of YANG for those models.

Cheers.

> 
> 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
> 
> 
> 
> 
> _______________________________________________
> yang-doctors mailing list
> yang-doctors@ietf.org
> https://www.ietf.org/mailman/listinfo/yang-doctors

Mahesh Jethanandani
mjethanandani@gmail.com