Re: [netmod] Deviating away /interfaces-state

Ladislav Lhotka <lhotka@nic.cz> Mon, 10 September 2018 11:27 UTC

Return-Path: <lhotka@nic.cz>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4CE10130E8C for <netmod@ietfa.amsl.com>; Mon, 10 Sep 2018 04:27:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7
X-Spam-Level:
X-Spam-Status: No, score=-7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nic.cz
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 Gt3caxtKwz5N for <netmod@ietfa.amsl.com>; Mon, 10 Sep 2018 04:27:18 -0700 (PDT)
Received: from mail.nic.cz (mail.nic.cz [IPv6:2001:1488:800:400::400]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B3EA3130E8B for <netmod@ietf.org>; Mon, 10 Sep 2018 04:27:18 -0700 (PDT)
Received: from birdie (unknown [IPv6:2001:1488:fffe:6:9816:7bff:fe7f:18bf]) by mail.nic.cz (Postfix) with ESMTPSA id 85C70601BB for <netmod@ietf.org>; Mon, 10 Sep 2018 13:27:15 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1536578835; bh=h01Lk9KGP8XfiRSEaVjYaGUHqpJrzOIL/c3uSpQEkOk=; h=From:To:Date; b=UYtFwPLtCLzFeysSBRfgSLxtVAL2a4CHfKoHhYRMK4w0N/fuCH+rv6lCCOk+1Lgmt fT6QYdosP3d6kLmUNa3/xyS9be5CAUjbZRCw7/IL+6Mz8GLsjNhaAJkcdLC3lnLQa1 3taA80GvzDaO0meNoLzrB6MtfGse6nYAvIxw6JnU=
Message-ID: <b9f1035d53e984f83e231679417750891276198e.camel@nic.cz>
From: Ladislav Lhotka <lhotka@nic.cz>
To: netmod@ietf.org
Date: Mon, 10 Sep 2018 13:27:15 +0200
In-Reply-To: <0f5dc759-39d8-791d-e4d8-b1559565b768@ericsson.com>
References: <0f5dc759-39d8-791d-e4d8-b1559565b768@ericsson.com>
Organization: CZ.NIC
Content-Type: text/plain; charset="UTF-8"
X-Mailer: Evolution 3.28.5
Mime-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: clamav-milter 0.99.2 at mail
X-Virus-Status: Clean
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/SUlQVh2G56KsywVmb-kQrdp-DF0>
Subject: Re: [netmod] Deviating away /interfaces-state
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
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: Mon, 10 Sep 2018 11:27:21 -0000

On Mon, 2018-09-10 at 11:48 +0200, Balazs Lengyel wrote:
> Hello,
> We would like to remove the if:interfaces-state with a deviation as it will
> never contain any information. So we wanted to use 
> deviation /if:interfaces-state {
>   deviate not-supported;
> }
> 
> However after this we get an error as ietf-interfaces has a definition:

I think this check really goes overboard. Sec. 9.9.2 in RFC 7950 says:

   The "path" expression evaluates to a node set consisting of zero,
   one, or more nodes.  If the "require-instance" property is "true",
   this node set MUST be non-empty.

However, evaluating an XPath expression make sense only in the context of a
concrete instance data tree. Therefore, no error should be reported unless an
instance of a leaf with the "instance-state-ref" type exists. With the typedef
below, we are two steps away from that.

Lada  

>      /*
>       * Legacy typedefs
>       */
> 
>      typedef interface-state-ref {
>        type leafref {
>          path "/if:interfaces-state/if:interface/if:name";
>        }
>        status deprecated;
>        description
>          "This type is used by data models that need to reference
>           the operationally present interfaces.";
>      }
> 
> Here the path statement will point at a non-existent branch.
> 
> So is there a correct way to indicate we do not support /interface-state ?
> regards Balazs 
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod
-- 
Ladislav Lhotka
Head, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67