[netmod] YANG 1.0 behavior for leafref

Andy Bierman <andy@yumaworks.com> Tue, 15 September 2015 22:15 UTC

Return-Path: <andy@yumaworks.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 673B21B2BFE for <netmod@ietfa.amsl.com>; Tue, 15 Sep 2015 15:15:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.978
X-Spam-Level:
X-Spam-Status: No, score=-1.978 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham
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 nQjTzZ9sCX6O for <netmod@ietfa.amsl.com>; Tue, 15 Sep 2015 15:15:22 -0700 (PDT)
Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com [209.85.217.173]) (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 CF1131B2BF8 for <netmod@ietf.org>; Tue, 15 Sep 2015 15:15:21 -0700 (PDT)
Received: by lbbvu2 with SMTP id vu2so21341254lbb.0 for <netmod@ietf.org>; Tue, 15 Sep 2015 15:15:20 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=r0YNkp0oXpkS5YfsSzPK8qFOgWPoGenxFC+tf+U1YmQ=; b=R/Afy7r+7qUO4O3gujVgNLlewDGwYBtTmCpk4fDyuTcYs7QgVegI8HjeA5MuPiaHJV Tbhtjwz9bM2u2sgtX3HMBRgH3g8eg7atXJav5Vf5UXmF4utmxv5ePeOnL9RQjZsBduqa Kmk9phos/RzFAvnmWHiZSXmJNi8Mrfn2Y3ebzDMFdSKGoLCi+/pwmqjUNo4yhlGkLyK7 9g4w0rbOqNkfe/c2CmbPBa/W8qHRWe/p+NkLOyOm1xB4NInTWsWt7AGOvzaEemTl9dqi krkWiEnHBhvHyZtppw7Y3GsADiZLBJeOAQjnLZR2AdJtOUp55mWnDqOgQFpzJqOuqI8C PaTA==
X-Gm-Message-State: ALoCoQlLo8Kge20XfjWkK+nBZdNBDO4+c1c1wPzqAmbhQYFUGMlhpNHox/nJc8pUjfvouXaEdBOY
MIME-Version: 1.0
X-Received: by 10.112.156.167 with SMTP id wf7mr25077826lbb.88.1442355320077; Tue, 15 Sep 2015 15:15:20 -0700 (PDT)
Received: by 10.112.200.104 with HTTP; Tue, 15 Sep 2015 15:15:20 -0700 (PDT)
Date: Tue, 15 Sep 2015 15:15:20 -0700
Message-ID: <CABCOCHSAjtm5fO2OZWiYZvfYmLAjQ6ZdO3q-bTu41=Yv=y8k3Q@mail.gmail.com>
From: Andy Bierman <andy@yumaworks.com>
To: "netmod@ietf.org" <netmod@ietf.org>
Content-Type: multipart/alternative; boundary="001a11c27b267e57e7051fd084ad"
Archived-At: <http://mailarchive.ietf.org/arch/msg/netmod/WR1MGgV5c568eZvZhUUuJJzVcVM>
Subject: [netmod] YANG 1.0 behavior for leafref
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 15 Sep 2015 22:15:23 -0000

Hi,

The leafref text was changed to allow the require-instance-stmt in YANG 1.1

RFC 6020, sec. 9.9. is quite clear that this sub-statement is not allowed.

9.9.1.  Restrictions

   A leafref cannot be restricted.

9.13.1.  Restrictions

   An instance-identifier can be restricted with the "require-instance"
   statement (Section 9.13.2).


However, the ABNF on page 149 clearly contradicts the text in 9.9.1:

  leafref-specification =
                         ;; these stmts can appear in any order
                         path-stmt stmtsep
                         [require-instance-stmt stmtsep]

   path-stmt           = path-keyword sep path-arg-str stmtend

   require-instance-stmt = require-instance-keyword sep
                            require-instance-arg-str stmtend



So which normative text is correct?
Is instance-required-stmt allowing in YANG 1.0?


Andy