Re: [Rtg-yang-coord] container with presence

Ladislav Lhotka <lhotka@nic.cz> Thu, 28 May 2015 09:33 UTC

Return-Path: <lhotka@nic.cz>
X-Original-To: rtg-yang-coord@ietfa.amsl.com
Delivered-To: rtg-yang-coord@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B8C491A0222 for <rtg-yang-coord@ietfa.amsl.com>; Thu, 28 May 2015 02:33:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.661
X-Spam-Level:
X-Spam-Status: No, score=-0.661 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HELO_EQ_CZ=0.445, HOST_EQ_CZ=0.904, T_RP_MATCHES_RCVD=-0.01] autolearn=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 sKM4RALGvWwk for <rtg-yang-coord@ietfa.amsl.com>; Thu, 28 May 2015 02:33:11 -0700 (PDT)
Received: from mail.nic.cz (mail.nic.cz [IPv6:2001:1488:800:400::400]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id AE4AF1A00EA for <Rtg-yang-coord@ietf.org>; Thu, 28 May 2015 02:33:11 -0700 (PDT)
Received: from birdie.labs.nic.cz (unknown [195.113.220.110]) by mail.nic.cz (Postfix) with ESMTPSA id D574414035A for <Rtg-yang-coord@ietf.org>; Thu, 28 May 2015 11:33:09 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=nic.cz; s=default; t=1432805589; bh=0nw0ckOWyVmUwuZlWVHjzkqhJgeJuLpNt1nP7IJuBx0=; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date: Content-Transfer-Encoding:Message-Id:References:To; b=UDuVxtJ/IiVuSj5vA4nQQelJZBTpIVJHOzFKzkxDBidrKvtgGj8bOCnbV8hkkk5sG nVOIYN66KdxwnyMXhoKOOp2UY+20L/k2NViA+xNwmxUv/iWTKigtV9NrSMuygYEMYM rPTghFjc1GNVfvAyXXomipu+KtR8jN/h5jN98fKA=
Content-Type: text/plain; charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\))
From: Ladislav Lhotka <lhotka@nic.cz>
In-Reply-To: <331A2562-6D35-4D49-911E-9881CCE5D6A1@nic.cz>
Date: Thu, 28 May 2015 11:33:10 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <A7355F5E-1000-44F9-A835-24AAB08B1C22@nic.cz>
References: <331A2562-6D35-4D49-911E-9881CCE5D6A1@nic.cz>
To: Rtg-yang-coord@ietf.org
X-Mailer: Apple Mail (2.2098)
X-Virus-Scanned: clamav-milter 0.98.6 at mail
X-Virus-Status: Clean
Archived-At: <http://mailarchive.ietf.org/arch/msg/rtg-yang-coord/AyOHjXzYEzr-35jdB8KywYkwjV4>
Subject: Re: [Rtg-yang-coord] container with presence
X-BeenThere: rtg-yang-coord@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "\"List to discuss coordination between the Routing related YANG models\"" <rtg-yang-coord.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rtg-yang-coord>, <mailto:rtg-yang-coord-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/rtg-yang-coord/>
List-Post: <mailto:rtg-yang-coord@ietf.org>
List-Help: <mailto:rtg-yang-coord-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rtg-yang-coord>, <mailto:rtg-yang-coord-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 28 May 2015 09:33:12 -0000

Sorry, the example is wrong, the presence statement should of course be inside the container:

     augment "/rt:routing/rt:routing-instance/rt:routing-protocols/"
         +"rt:routing-protocol" {
       when "rt:type = 'isis:isis'" {
         description
          "This augment is only valid when routing protocol
           instance type is isis.";
       }
       description
        "This augments a routing protocol instance with ISIS
         specific parameters.";
       container isis {
         presence "IS-IS routing protocol";
         ...
       }
     }

Lada

> On 28 May 2015, at 11:28, Ladislav Lhotka <lhotka@nic.cz> wrote:
> 
> Hi,
> 
> I have a suggestion for the authors of all routing protocol modules: the container that encapsulates all configuration data for a given protocol should be a container with presence (see sec. 7.5.1 in RFC 6020) because then the configuration data may include mandatory items that are otherwise forbidden at the top level of an augment.
> 
> See also YANG 1.1 issue Y26:
> 
> https://svn.tools.ietf.org/svn/wg/netmod/yang-1.1/issues.html#sec-27
> 
> For example, in the the ietf-isis it should look like this:
> 
>     augment "/rt:routing/rt:routing-instance/rt:routing-protocols/"
>         +"rt:routing-protocol" {
>       when "rt:type = 'isis:isis'" {
>         description
>          "This augment is only valid when routing protocol
>           instance type is isis.";
>       }
>       presence "IS-IS routing protocol”;
>       ...
>     }
> 
> I am also including this recommendation in the routing-cfg draft.
> 
> Lada
> --
> Ladislav Lhotka, CZ.NIC Labs
> PGP Key ID: E74E8C0C
> 
> 
> 
> 
> _______________________________________________
> Rtg-yang-coord mailing list
> Rtg-yang-coord@ietf.org
> https://www.ietf.org/mailman/listinfo/rtg-yang-coord

--
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: E74E8C0C