Re: [yang-doctors] canonical order question
Martin Björklund <mbj+ietf@4668.se> Wed, 22 November 2023 10:29 UTC
Return-Path: <mbj+ietf@4668.se>
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 B0152C14CE2F for <yang-doctors@ietfa.amsl.com>; Wed, 22 Nov 2023 02:29:34 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.104
X-Spam-Level:
X-Spam-Status: No, score=-2.104 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, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=4668.se header.b="dHlp63xA"; dkim=pass (2048-bit key) header.d=messagingengine.com header.b="uvJIZP5B"
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id L5w8mweojB5x for <yang-doctors@ietfa.amsl.com>; Wed, 22 Nov 2023 02:29:30 -0800 (PST)
Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 05FB6C14CE2B for <yang-doctors@ietf.org>; Wed, 22 Nov 2023 02:29:30 -0800 (PST)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 7772B3200B08; Wed, 22 Nov 2023 05:29:27 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 22 Nov 2023 05:29:27 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=4668.se; h=cc:cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1700648966; x=1700735366; bh=l+nAd6dybochnyPQA5jWb6UFOvigwezHn/K A0yX8gpg=; b=dHlp63xAB+scg0rfIuaYIzis2bpol+pj4Q9Xi9xxeahSx8dZM94 pYAlhCB7SyGKDQWBa1Trdsm+gvU8LIqbPhgcNRen1SWUvluoMBlkwVckigKkglye yOzZXYvruyhZiNnEq9emkC/r9MG4khZUGqjABY1NtBAflvRoNV/SncKpFd1MW/Th 6wT/4fRMhfUjtUX7mCv1NJ1VCrlIBHKgQIV6rfWLD33pfs1IhU+1FsGNP9iruzCN RIUadmKzUqdjXvjGXYu+/0ckFa2Er7XLYFxSRgIcDdB4cTYvZq4j+0x+12NKosRv y4+ZyU+6dzU00zblvq1cGyPYoHaRf2bSf8A==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1700648966; x=1700735366; bh=l+nAd6dybochnyPQA5jWb6UFOvigwezHn/K A0yX8gpg=; b=uvJIZP5BHG6359wCrmomAyupeF6aYeFv4LknRHumFwijg+aw4iG mYvcyYR1orlmV5PgaLxXTtgvad+LsECvhoh1RsHscHF5MwExSNRgOoyWodCFSmzO tySwbtN24CYnjmPpe80TywLc1/+RUCJCREDIMDBuGxqXz8IV1dWK/DbVQeLe1j2B qOExI1wyBsAdLVT6XFUhuYCIak43q81qWtcovwuw1uMKbgCYT8ZWsvNmGQO5jZCd w/VhrDz8mU5RYr5Vtoo1iWTxI8QaoMnuDUXWPxwhT9o/ip6NJ2OnFTAUYaK+9bvn gggLpVXCFSCw9hxQMJip+hxphwUzW2whqKQ==
X-ME-Sender: <xms:BthdZXoVjlVPqAdZ28HQf2cyNxFl6FiP0W_C-EzEORxcK-ttOH6HzA> <xme:BthdZRrdOPVL0f4XHijpbw6RvV5bD8Y9dvSRTpsBd71vShd_0t6vewrC1-ixYgpZS o9aI27PYGSMUCknow8>
X-ME-Received: <xmr:BthdZUPYM9ffbNT3sX6llF-274ynlyq52iTjiDe0H2e2vhfJpEJkAG6WguJW1BrKbRb5X0kBREgejox9m3ljvo0H-ook8rWgUQ>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudehuddgudejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffkffvvefuhfgjfhfogggtgfesth ejredtredtvdenucfhrhhomhepofgrrhhtihhnuceujhpnrhhklhhunhguuceomhgsjhdo ihgvthhfseegieeikedrshgvqeenucggtffrrghtthgvrhhnpefggfefledthfdtkeekle eiteekueehteduieejveffheffheegjeekffefgeeggeenucffohhmrghinhepvghrihgt shhsohhnrdhnvghtpdgvrhhitghsshhonhdrtghomhdpfhgrtggvsghoohhkrdgtohhmpd hlihhnkhgvughinhdrtghomhdpthifihhtthgvrhdrtghomhenucevlhhushhtvghrufhi iigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmsghjodhivghtfhesgeeiieekrd hsvg
X-ME-Proxy: <xmx:BthdZa6yBvI6I_ifUxCyasLwQDg_Gj51lMKOlOmSr-8bavY0ABh9Ng> <xmx:BthdZW4sDupzhSW1amgz06DTUKWj1xRZSP4uUnhBzXRCmqyLKFkMPQ> <xmx:BthdZShbQj5XdFBvHYjap2whWz5-5iPbN2yWru_o-j12TFjo89OxJg> <xmx:BthdZbia_Pcnfxu_yz-vO6qTbt-4kGIu1tEfAM-rE_nv-EhdtFuOrQ>
Feedback-ID: icc614784:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 22 Nov 2023 05:29:26 -0500 (EST)
Date: Wed, 22 Nov 2023 11:29:25 +0100
Message-Id: <20231122.112925.1904227441461262662.id@4668.se>
To: scott.mansfield=40ericsson.com@dmarc.ietf.org
Cc: yang-doctors@ietf.org
From: Martin Björklund <mbj+ietf@4668.se>
In-Reply-To: <BL0PR1501MB4130AB9909CDAF5AD4328E728BBAA@BL0PR1501MB4130.namprd15.prod.outlook.com>
References: <BL0PR1501MB4130AB9909CDAF5AD4328E728BBAA@BL0PR1501MB4130.namprd15.prod.outlook.com>
X-Mailer: Mew version 6.8 on Emacs 27.1
Mime-Version: 1.0
Content-Type: Text/Plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/Vp1vnhfqBqHi25Cszoep7TJ3e5Y>
Subject: Re: [yang-doctors] canonical order question
X-BeenThere: yang-doctors@ietf.org
X-Mailman-Version: 2.1.39
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, 22 Nov 2023 10:29:34 -0000
Hi, Scott Mansfield <scott.mansfield=40ericsson.com@dmarc.ietf.org> wrote: > I looked through the mail archive and the pyang issues list on git, so > apologies if I missed this... > > However, > > Clause 14 of RFC 7950 says this... > body-stmts = *(extension-stmt / > feature-stmt / > identity-stmt / > typedef-stmt / > grouping-stmt / > data-def-stmt / > augment-stmt / > rpc-stmt / > notification-stmt / > deviation-stmt) > > > But when I use pyang and the -yang-canonical switch, the output I get > has the notification statements before the augment statements. Is > this ok? Am I reading the ABNF incorrectly? RFC 7950 says: The ABNF grammar [RFC5234] [RFC7405] defines the canonical order. And then the grammar has for example: linkage-stmts = ;; these stmts can appear in any order *import-stmt *include-stmt So, the ABNF says that "import" comes before "include" which means that this is the canonical order. But for body-stmts, the ABNF allows any order of the child statements. Hence the canonical order also allows any order. /martin > > I have attached the before and after for information. > ieee802-dot1q-rstp.yang is the original which has notifications after > the augment statement. I then ran it though pyang with -f yang > -yang-canonical and put the result in ieee802-dot1q-rstp-canon.yang, > but now the notification statements were moved before the augment. > Just trying to understand what the canonical order is. > > Many thanks for the help and experience! > Regards, > -scott. > > > > [http://mediabank.ericsson.net/internet-media/Email_logo_Ericsson.png]<http://www.ericsson.com/> > > Scott Mansfield > Principal Researcher Standardization > > BNEW TS ST STA NAM > Phone: +14692662097 > Mobile: +17249319316 > scott.mansfield@ericsson.com<mailto:scott.mansfield@ericsson.com> > > Ericsson > ericsson.com<http://www.ericsson.com/> > > [http://mediabank.ericsson.net/internet-media/Email_Message.gif]<http://www.ericsson.com/current_campaign> > > Our commitment to Technology for > Good<http://www.ericsson.com/thecompany/sustainability-corporateresponsibility> > and Diversity and > Inclusion<http://www.ericsson.com/thecompany/diversity-inclusion> > contributes to positive change. > Follow us on: Facebook<https://www.facebook.com/ericsson> > LinkedIn<https://www.linkedin.com/company/ericsson> > Twitter<https://twitter.com/Ericsson> > > Legal entity:ERICSSON INC., registration number2047104, registered > office in A Delaware corporation. > This communication is confidential. Our email terms: > www.ericsson.com/en/legal/privacy/email-disclaimer<https://www.ericsson.com/en/legal/privacy/email-disclaimer> >
- Re: [yang-doctors] canonical order question Martin Björklund
- [yang-doctors] canonical order question Scott Mansfield
- Re: [yang-doctors] canonical order question Scott Mansfield
- Re: [yang-doctors] canonical order question Martin Björklund