Re: [Softwires] draft-ietf-softwire-yang: YANG compilation issues
Linhui Sun <lh.sunlinh@gmail.com> Thu, 01 September 2016 06:18 UTC
Return-Path: <lh.sunlinh@gmail.com>
X-Original-To: softwires@ietfa.amsl.com
Delivered-To: softwires@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4765D12D119; Wed, 31 Aug 2016 23:18:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.699
X-Spam-Level:
X-Spam-Status: No, score=-2.699 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 ML9P67pL7sxD; Wed, 31 Aug 2016 23:18:53 -0700 (PDT)
Received: from mail-wm0-x231.google.com (mail-wm0-x231.google.com [IPv6:2a00:1450:400c:c09::231]) (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 E1AFE12D0C6; Wed, 31 Aug 2016 23:18:49 -0700 (PDT)
Received: by mail-wm0-x231.google.com with SMTP id c133so61140245wmd.1; Wed, 31 Aug 2016 23:18:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ZvFrycjcAHW8F141wjiqvNF1Ok7e6e0pt6xP0QzpClU=; b=dum+jQWo4IgfDF+q757Je6gypFXTF682LYLRwrBnIWTnnSMS6rheCaUqRcaB05hfBM vLk+SpqLx2hLTn5nKoCHdqYNPXzURWbnV4KCDwffKwooHdIqGXJyf+Gf264i4ldfLR1C 2SjYbHdkj+xXHmxgtk/+btEdA3Zazx0Uy1yVLT1sawngNBsL5ZyXrlMyA7gnEnuHPmfD yHzqT4mAZTeOIb46n7kx3mCSshFhYKka5lTb3wukrhYJjEmOMGlsf8poiIsBTvqp6fy2 cxgYrkR43WwBIzoDhDvcjwCvpsDrtkc+SUYQveNzxrdRBcjM4gOA0E94meQKTStU3VBs CLmQ==
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:from:date :message-id:subject:to:cc; bh=ZvFrycjcAHW8F141wjiqvNF1Ok7e6e0pt6xP0QzpClU=; b=ENIqn3QRSabcjq3nPQiKE+T3Z6j5QWgGcvEkRrssdYH7NGwLxm8l68elHGk1MwUKCr r56M0D1BxwT2Vf//4GqeMPCzyxytciFr17UsL6NbVA3QOvl3UvCx9lOdA2KYpL58PCce EAFgpAAAWM0kDERuPixZRAAA0FjAshjYf0JsUBP8d4dvzJF1SORL+AlIsqeY6kiZCtwo i81Nuuu0XxDj8YAwP9K6Ulx1bvmTKid5UyH3f3mHv758olP4Vz7NtBGbCgEk0CwBSDtP Mj2TEplXkUwSOtFo1mH3Kh+3kMHASB5fMB74p8Zfzy939SP91/IfYCvDwfwkwycKUP15 dEWg==
X-Gm-Message-State: AE9vXwMgtk/lmpgGTPVMna/YGCFzoPBnLxtSXEHfXXbZkGyN73/I6BMl6F3BdJ6GIwM4KaK/1omEdsFkSZlR0g==
X-Received: by 10.28.97.2 with SMTP id v2mr12680588wmb.31.1472710728437; Wed, 31 Aug 2016 23:18:48 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.28.97.214 with HTTP; Wed, 31 Aug 2016 23:18:27 -0700 (PDT)
In-Reply-To: <46651b19-a40e-5957-d750-4a80cbac2c25@cisco.com>
References: <46651b19-a40e-5957-d750-4a80cbac2c25@cisco.com>
From: Linhui Sun <lh.sunlinh@gmail.com>
Date: Thu, 01 Sep 2016 14:18:27 +0800
Message-ID: <CAO_YprY_8Qqt7vR1R_mgFQ=gQTMh7yTzaLJPTf4=k_LwAtBYig@mail.gmail.com>
To: Benoit Claise <bclaise@cisco.com>
Content-Type: multipart/alternative; boundary="001a114a4c86d356b6053b6c2f1a"
Archived-At: <https://mailarchive.ietf.org/arch/msg/softwires/R_ErGGxOr_lE2-CYqp47Wod33Og>
Cc: Softwires WG <softwires@ietf.org>, Per Hedeland <per@tail-f.com>, draft-ietf-softwire-yang@ietf.org
Subject: Re: [Softwires] draft-ietf-softwire-yang: YANG compilation issues
X-BeenThere: softwires@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: softwires wg discussion list <softwires.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/softwires>, <mailto:softwires-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/softwires/>
List-Post: <mailto:softwires@ietf.org>
List-Help: <mailto:softwires-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/softwires>, <mailto:softwires-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 01 Sep 2016 06:18:55 -0000
Hi Benoit and Per, Thanks for the info, we will correct this in the next version. Best, Linhui 2016-08-31 18:59 GMT+08:00 Benoit Claise <bclaise@cisco.com>: > draft-ietf-softwire-yang authors, > > Per and I have been investigating the YANG compilation error for this > document. > See http://www.claise.be/IETFYANGPageCompilation.html: > > ietf-softwire@2016-06-04.yang:215: error: a 'default' value cannot be > given when 'mandatory' is "true" > > The error refers to: > > container port-set { > description > "For Lightweight 4over6, the default value > of offset should be 0, to configure one contiguous > port range."; > uses port-set { > refine psid-offset { > default "0"; <========= > } > } > > > > grouping port-set { > description > "Use the PSID algorithm to represent a range of transport layer > ports."; > leaf psid-offset { > type uint8 { > range 0..16; > } > mandatory true; <==== If I remove this line, it works fine. > description > "The number of offset bits. In Lightweight 4over6, the default > value is 0 for assigning one contiguous port range. In MAP-E/T, > the default value is 6, which excludes system ports by default > and assigns distributed port ranges. If the this parameter is > larger than 0, the value of offset MUST be greater than 0."; > } > > > You can refine-add/modify a default, but the result must be valid YANG, > and 6020 7.6.4 (and draft-ietf-netmod-rfc6020bis-14) says > > The "default" statement MUST NOT be present on nodes where > "mandatory" is true. > > I.e. if you want to refine-add a default to a mandatory leaf, you must > also refine-remove the mandatory-ness: > > refine psid-offset { > default "0"; > mandatory false; > } > > (Having a default on a mandatory leaf doesn't make sense, since it can > never take effect - you are required to configure a value for the leaf.) > > Regards, Per and Benoit > > > _______________________________________________ > Softwires mailing list > Softwires@ietf.org > https://www.ietf.org/mailman/listinfo/softwires > >
- [Softwires] draft-ietf-softwire-yang: YANG compil… Benoit Claise
- Re: [Softwires] draft-ietf-softwire-yang: YANG co… Linhui Sun