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

Andy Bierman <andy@yumaworks.com> Fri, 29 May 2015 16:50 UTC

Return-Path: <andy@yumaworks.com>
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 B72881ACDDC for <rtg-yang-coord@ietfa.amsl.com>; Fri, 29 May 2015 09:50:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.979
X-Spam-Level:
X-Spam-Status: No, score=-1.979 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FM_FORGED_GMAIL=0.622, 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 FSunNjNFm3QI for <rtg-yang-coord@ietfa.amsl.com>; Fri, 29 May 2015 09:50:12 -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 4D22D1ACD8F for <Rtg-yang-coord@ietf.org>; Fri, 29 May 2015 09:50:05 -0700 (PDT)
Received: by lbcue7 with SMTP id ue7so52246559lbc.0 for <Rtg-yang-coord@ietf.org>; Fri, 29 May 2015 09:50:03 -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:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=1mrrChULlGi0khrVGJCHvmk7b2qPMMELVzrpAoMi6wg=; b=Rnqtj6krUSq5mRWJ6QXtBOjJIZzBth7bsUv4z3Dk2Yo4nbfrjDw30xQj63M0ci6gfp F1P44CG4pMTwXyoQ6u0ibaHNQqNd6rv/PZMHQRiIMfPZsSdx8+ienDflThCGoHIM5C4j HITTPOIV+/6XH9OJv+VGQwOGrOaljdUow1Q2zluWqIXnW+DBUyLsIGZ2Fi8anjUwUKS6 21mEZzBD04qpJlr69FvH+2oNoYx2J4ETYDklCWeCNl8AyN8DKgAv7sXl2dQUh9ujIdKv e1SOoljRwLGY0u9BzV4MCDe0yYPwJbHEX0FOTpZtnOGEfvCITinVSiwnVqNFngjTP2Ts tuPQ==
X-Gm-Message-State: ALoCoQnk5iAilYqSmVCL9hZQrhWaBbi+hjEzsKvAGrhdompROT2rTa5rZiaoGKc6Q74OeLu8CkfS
MIME-Version: 1.0
X-Received: by 10.152.115.207 with SMTP id jq15mr1237734lab.119.1432918203839; Fri, 29 May 2015 09:50:03 -0700 (PDT)
Received: by 10.112.200.102 with HTTP; Fri, 29 May 2015 09:50:03 -0700 (PDT)
In-Reply-To: <m2twuvpcuq.fsf@Birdie.nat6.vcit.vutbr.net>
References: <331A2562-6D35-4D49-911E-9881CCE5D6A1@nic.cz> <C4730376-085F-4660-B4F7-9BA4FC9B234A@gmail.com> <m2twuvpcuq.fsf@Birdie.nat6.vcit.vutbr.net>
Date: Fri, 29 May 2015 09:50:03 -0700
Message-ID: <CABCOCHQiymptCa6yANWuXmxOG_xGTf52_h_X2=Ug4aE8jdQeFQ@mail.gmail.com>
From: Andy Bierman <andy@yumaworks.com>
To: Ladislav Lhotka <lhotka@nic.cz>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Archived-At: <http://mailarchive.ietf.org/arch/msg/rtg-yang-coord/3P-NdV18I3U5r30sgt1gkLwenZI>
Cc: Mahesh Jethanandani <mjethanandani@gmail.com>, "rtg-yang-coord@ietf.org" <Rtg-yang-coord@ietf.org>
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: Fri, 29 May 2015 16:50:17 -0000

On Fri, May 29, 2015 at 9:28 AM, Ladislav Lhotka <lhotka@nic.cz> wrote:
> Mahesh Jethanandani <mjethanandani@gmail.com> writes:
>
>> And the error that will pop up as result will be something like this:
>>
>> Warning: top-level NP container ‘twamp-client' is mandatory
>> ietf-twamp.yang:59.9: warning(1048): top-level object is mandatory
>>
>
> This is actually something else, the case I am writing about leads to
> this error message in pyang:
>
> knot-dns.yang:322 (at knot-dns.yang:169): error: cannot augment mandatory node record-type
>
> (and it is a hard error rather than warning).
>


It is not an error to augment a mandatory node.
It is an error to augment any node with mandatory nodes.
Big difference.

> Lada

Andy

>
>>> On May 28, 2015, at 2:28 AM, 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
>>
>> Mahesh Jethanandani
>> mjethanandani@gmail.com
>>
>>
>>
>
> --
> 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