[yang-doctors] Unsupported schema tree w/ cyclic dependencies + schema node identifier clarification

Ebben Aries <exa@arrcus.com> Fri, 22 March 2019 00:12 UTC

Return-Path: <exa@arrcus.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 C8C16131259 for <yang-doctors@ietfa.amsl.com>; Thu, 21 Mar 2019 17:12:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.891
X-Spam-Level:
X-Spam-Status: No, score=-1.891 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, T_SPF_PERMERROR=0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=netorgft1331857.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 Ws3RgR3-hIyN for <yang-doctors@ietfa.amsl.com>; Thu, 21 Mar 2019 17:12:50 -0700 (PDT)
Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-eopbgr750057.outbound.protection.outlook.com [40.107.75.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 7C5D512958B for <yang-doctors@ietf.org>; Thu, 21 Mar 2019 17:12:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NETORGFT1331857.onmicrosoft.com; s=selector1-arrcus-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=xEFThE70h8LyXBUG3X2u266MqHvpvYFMRr/0zi99vI0=; b=VreFXbQV1OCCqsEcJIXvn/UiszECgh9LhdZqsus4zERt9LU5N8E52cdhaBzRLnJwotO0CoB8KoAGRTiaC/o7Khhw7bkCfpBlKewosMNseZZZ70tdXuDGrysFDNhX5qH32NDz9p8/NsSm/nYRftCZHYkcTDvE/OdBkh/u8S73FWA=
Received: from BYAPR18MB2375.namprd18.prod.outlook.com (20.179.90.216) by BYAPR18MB3016.namprd18.prod.outlook.com (20.179.94.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1730.16; Fri, 22 Mar 2019 00:12:46 +0000
Received: from BYAPR18MB2375.namprd18.prod.outlook.com ([fe80::718b:7ac3:17ca:c664]) by BYAPR18MB2375.namprd18.prod.outlook.com ([fe80::718b:7ac3:17ca:c664%3]) with mapi id 15.20.1730.013; Fri, 22 Mar 2019 00:12:46 +0000
From: Ebben Aries <exa@arrcus.com>
To: "yang-doctors@ietf.org" <yang-doctors@ietf.org>
Thread-Topic: Unsupported schema tree w/ cyclic dependencies + schema node identifier clarification
Thread-Index: AQHU4EP5YYanB23cdUGtd1BYnLXijQ==
Date: Fri, 22 Mar 2019 00:12:46 +0000
Message-ID: <20190322001243.qek4neyeee4ezspl@localhost>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-clientproxiedby: BYAPR11CA0071.namprd11.prod.outlook.com (2603:10b6:a03:80::48) To BYAPR18MB2375.namprd18.prod.outlook.com (2603:10b6:a03:12d::24)
authentication-results: spf=none (sender IP is ) smtp.mailfrom=exa@arrcus.com;
x-ms-exchange-messagesentrepresentingtype: 1
x-originating-ip: [2601:283:4600:80a0:bb8b:26e2:d8d4:bc07]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: caa1a62e-3add-4c3e-32c6-08d6ae5b1c3c
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(7021145)(8989299)(4534185)(7022145)(4603075)(4627221)(201702281549075)(8990200)(7048125)(7024125)(7027125)(7023125)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020); SRVR:BYAPR18MB3016;
x-ms-traffictypediagnostic: BYAPR18MB3016:
x-microsoft-antispam-prvs: <BYAPR18MB30169B37808D0AAB145B5ACCCD430@BYAPR18MB3016.namprd18.prod.outlook.com>
x-forefront-prvs: 09840A4839
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(7916004)(136003)(366004)(376002)(39840400004)(346002)(396003)(189003)(199004)(316002)(9686003)(508600001)(6512007)(2906002)(6506007)(1076003)(8676002)(6486002)(14454004)(7736002)(6436002)(81156014)(53936002)(81166006)(8936002)(6116002)(305945005)(386003)(52116002)(5660300002)(97736004)(2351001)(186003)(71200400001)(71190400001)(106356001)(46003)(33716001)(105586002)(476003)(68736007)(99286004)(86362001)(486006)(102836004)(5640700003)(25786009)(14444005)(6916009)(256004)(2501003); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR18MB3016; H:BYAPR18MB2375.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: arrcus.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam-message-info: 6v1MDbfPSJ3PqAdXFWwGlJUaIUfluwbN0d08Nv70TFz1Svu1Zr33uUgTg4aHOfKdfWTdLu7XTUZtHEgegQ5e2d/rZrtdbGyPgRMAf/j1q9Rl8FBpkULHO3Zqpo31+jrGKE/Kdx01/KSYafN+BwBbaNFK/XSQ56sV0lyMXehhp3448+7M++CNF8f9R7vThoEbbytELNjvg7hjrr6zx2EmefvZ3qRjfbF5az1Du5IOgtaMU+b2Ic2k78LusIOKZcH/kUW4Iwa6LChKs67IC9FP5Pa9OJLPWgjALOYIm1gYCImRP2EZs29PRIh3pj12zuVuGldRlaLAKO490DhU07ZvE3+NH2ALZMdowrQ+rQrF0YFlZF+Yvl1dRSqiRWdg/bn3BA4D3j33d0dfVesoaFoE5X4L4mF9CPL0E9Iu9bZ+G4Y=
Content-Type: text/plain; charset="us-ascii"
Content-ID: <00DFD7EE0B211449B23DCCAC27586810@namprd18.prod.outlook.com>
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: arrcus.com
X-MS-Exchange-CrossTenant-Network-Message-Id: caa1a62e-3add-4c3e-32c6-08d6ae5b1c3c
X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Mar 2019 00:12:46.1610 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 697b3529-5c2b-40cf-a019-193eb78f6820
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR18MB3016
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/MGcLx0EgFx0rpcMoAJK2IP8_MCA>
Subject: [yang-doctors] Unsupported schema tree w/ cyclic dependencies + schema node identifier clarification
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: Fri, 22 Mar 2019 00:12:53 -0000

I have a few questions for the group that have surely come up before...
but maybe I'm missing something...

1. How to handle cases where you only support a non-schema tree portion
of a module where other non-schema statements have a cyclic dependency
back to the schema tree

2. Schema Node Identifier wording in RFC7950


For #1, Let's say you have module A that imports module B for use of an
identity.  Let's call the use of this an identityref to 'base b:foo'

Module B contains typedefs, identities and schema tree and the
implementation prefers to deviate the schema tree completely as
'not-supported' but needs to support this model for resolving imports
and use of identities only (e.g. module A).

However if any of the typedefs in module B have leafrefs to it's own
schema tree, you cannot deviate the entire tree as this breaks the
contained leafref.

Since you cannot deviate on anything other than schema tree nodes [See
#2] (e.g. the typedef) and module A is using an unrelated identity, this
poses a bit of an issue (Assume you must not alter/deviate module A
directly)

Now, this makes me think that for this to not happen, a best practice
would be to always separate out identities, typedefs, etc.. from where
schema trees are defined for such very cases (e.g. types modules) ....
or introduce a method to be able to deviate non-schema tree nodes as
such

** ietf-interfaces is one such module where you can see the
interface-ref/interface-state-ref dependencies back to it's own schema
tree

For #2 - The wording around the deviation statement's target node in
7.20.3 specifies that this be a node in the schema tree as referenced by
Section 6.5.  Maybe I'm missing something but I'm not seeing any
wording around RPCs and Notifications as being part of the schema tree
whereas other statements such as 'typedefs' are not.  As a side effect,
this means that an RPC, Notification or top-level node in the schema
tree cannot have the same name and must remain unique in nomenclature
(as this is how they are each identified per their schema node
identifier)

/ebben