Re: [netmod] Deviating away /interfaces-state

Martin Bjorklund <mbj@tail-f.com> Mon, 10 September 2018 11:58 UTC

Return-Path: <mbj@tail-f.com>
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 0EAAC130EAA for <netmod@ietfa.amsl.com>; Mon, 10 Sep 2018 04:58:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 uy-aGJlmDAjK for <netmod@ietfa.amsl.com>; Mon, 10 Sep 2018 04:58:01 -0700 (PDT)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id 10ED8130EA7 for <netmod@ietf.org>; Mon, 10 Sep 2018 04:58:00 -0700 (PDT)
Received: from localhost (h-80-27.A165.priv.bahnhof.se [212.85.80.27]) by mail.tail-f.com (Postfix) with ESMTPSA id 943D41AE018A; Mon, 10 Sep 2018 13:57:57 +0200 (CEST)
Date: Mon, 10 Sep 2018 13:57:57 +0200
Message-Id: <20180910.135757.1952233423215237363.mbj@tail-f.com>
To: lhotka@nic.cz
Cc: netmod@ietf.org
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <b9f1035d53e984f83e231679417750891276198e.camel@nic.cz>
References: <0f5dc759-39d8-791d-e4d8-b1559565b768@ericsson.com> <b9f1035d53e984f83e231679417750891276198e.camel@nic.cz>
X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/1Hui8vjJ0lvtKCG_5AA_g1UV3UQ>
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:58:03 -0000

Hi,

Ladislav Lhotka <lhotka@nic.cz> wrote:
> 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;
> > }

Yes, this is the proper way to do it.

> > 
> > 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.

It also says about the "path" statement:

   It takes as an
   argument a string that MUST refer to a leaf or leaf-list node.

The intention was that it is an error if the path doesn't refer to a
leaf[-list] schema node, but depending on "require-instance" the leaf
instance might not have to exist.

However, I do agree that it in this particular case, as long as the
type isn't used in the system, it should not be reported as an error.



/martin




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