Re: [Lsr] [netmod] A question on the parameter overriding in draft-ietf-isis-yang-isis-cfg

Martin Bjorklund <mbj@tail-f.com> Mon, 10 June 2019 08:04 UTC

Return-Path: <mbj@tail-f.com>
X-Original-To: lsr@ietfa.amsl.com
Delivered-To: lsr@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6D1521200C1; Mon, 10 Jun 2019 01:04:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, 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 6ObsQmxChbIw; Mon, 10 Jun 2019 01:04:55 -0700 (PDT)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id E7894120096; Mon, 10 Jun 2019 01:04:54 -0700 (PDT)
Received: from localhost (unknown [173.38.220.61]) by mail.tail-f.com (Postfix) with ESMTPSA id 2262D1AE0B11; Mon, 10 Jun 2019 10:04:53 +0200 (CEST)
Date: Mon, 10 Jun 2019 10:04:56 +0200 (CEST)
Message-Id: <20190610.100456.969581487209060819.mbj@tail-f.com>
To: bill.wu@huawei.com
Cc: j.schoenwaelder@jacobs-university.de, xufeng.liu.ietf@gmail.com, lsr@ietf.org, netmod@ietf.org
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <B8F9A780D330094D99AF023C5877DABAA496568F@nkgeml513-mbx.china.huawei.com>
References: <B8F9A780D330094D99AF023C5877DABAA496568F@nkgeml513-mbx.china.huawei.com>
X-Mailer: Mew version 6.7 on Emacs 25.2 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=utf-8
Content-Transfer-Encoding: base64
Archived-At: <https://mailarchive.ietf.org/arch/msg/lsr/Ug-rPQrQDndAUhGlb1owXZHXH-U>
Subject: Re: [Lsr] [netmod] A question on the parameter overriding in draft-ietf-isis-yang-isis-cfg
X-BeenThere: lsr@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Link State Routing Working Group <lsr.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/lsr>, <mailto:lsr-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/lsr/>
List-Post: <mailto:lsr@ietf.org>
List-Help: <mailto:lsr-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/lsr>, <mailto:lsr-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 10 Jun 2019 08:04:57 -0000

Hi,

Qin Wu <bill.wu@huawei.com>; wrote:
> I think what they are looking for in RFC7950 is generic overridden
> rule, i.e., a parent node statement can be overridden by its child
> node substatement.

See Per's reply to the netmod list.  In summary, in this case you
should do:

  container priority {
    leaf value {
      type uint8;
      default 64;
    }
    container level-1 {
      leaf value {
        type uint8;
        description
          "If not configured, use the value of ../../value.";
      }
    }
    container level-2 {
      leaf value {
        type uint8;
        description
          "If not configured, use the value of ../../level-1/value.";
      }
    }
  }



/martin




> 
> -Qin
> -----邮件原件-----
> 发件人: netmod [mailto:netmod-bounces@ietf.org] 代表 Juergen
> Schoenwaelder
> 发送时间: 2019年6月9日 23:28
> 收件人: Xufeng Liu <xufeng.liu.ietf@gmail.com>;
> 抄送: lsr@ietf.org; NETMOD WG <netmod@ietf.org>;
> 主题: Re: [netmod] A question on the parameter overriding in
> draft-ietf-isis-yang-isis-cfg
> 
> Hi,
> 
> YANG does not have 'levels'. This seems to be an ISIS specific
> question you should ask on the ISIS list.
> 
> /js
> 
> On Sun, Jun 09, 2019 at 10:35:11AM -0400, Xufeng Liu wrote:
> > In Section 2.3. and many other locations, the current IS-IS model 
> > applies the parameter overriding rule as below:
> > 
> > [Quote]:
> > 
> > 2.3
> > <https://tools.ietf.org/html/draft-ietf-isis-yang-isis-cfg-35#section-2..3>;.
> > Per-Level Parameters
> > 
> > 
> >    Some parameters allow a per level configuration.  In this case, the
> >    parameter is modeled as a container with three configuration
> >    locations:
> > 
> >    o  a top-level container: corresponds to level-1-2, so the
> >       configuration applies to both levels.
> > 
> >    o  a level-1 container: corresponds to level-1 specific parameters.
> > 
> >    o  a level-2 container: corresponds to level-2 specific parameters.
> > 
> >                +--rw priority
> >                |  +--rw value?     uint8
> >                |  +--rw level-1
> >                |  |  +--rw value?   uint8
> >                |  +--rw level-2
> >                |     +--rw value?   uint8
> > 
> >    Example:
> > 
> >            <priority>
> >                <value>250</value>
> >                <level-1>
> >                    <value>100</value>
> >                </level-1>
> >                <level-2>
> >                    <value>200</value>
> >                </level-2>
> >            </priority>
> > 
> >    An implementation SHOULD prefer a level specific parameter over a
> >    level-all parameter.  As example, if the priority is 100 for the
> >    level-1, 200 for the level-2 and 250 for the top-level configuration,
> >    the implementation should use 100 for the level-1 and 200 for the
> >    level-2.
> > 
> > [End of Quote]
> > 
> > 
> > In the model, all three value leaves above have a default statement 
> > “default 64”, which brings up my question for the following example:
> > 
> > 
> >            <priority>
> >                <value>250</value>
> >                <level-1>
> >                    <value>100</value>
> >                </level-1>
> >            </priority>
> > 
> > 
> > The user does not provide a configured value for level-2. According to
> > Section 7.6.1. of RFC7950, because the default value is in use, “the 
> > server MUST operationally behave as if the leaf was present in the 
> > data tree with the default value as its value”. This means the 
> > priority value for level-2 will be 64 (the default value), so the 
> > value 250 can never take effect as intended in the above quoted
> > Section 2.3.
> > 
> > 
> > Is my understanding correct?
> > 
> > 
> > Since this is a generic question, I am CC’ing NETMOD WG too.
> > 
> > 
> > Thanks,
> > 
> > - Xufeng
> 
> > _______________________________________________
> > netmod mailing list
> > netmod@ietf.org
> > https://www.ietf.org/mailman/listinfo/netmod
> 
> 
> -- 
> Juergen Schoenwaelder           Jacobs University Bremen gGmbH
> Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
> Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>
> 
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod