Re: [Softwires] Review of draft-sun-softwire-yang-02

Qi Sun <sunqi.csnet.thu@gmail.com> Mon, 16 March 2015 08:06 UTC

Return-Path: <sunqi.csnet.thu@gmail.com>
X-Original-To: softwires@ietfa.amsl.com
Delivered-To: softwires@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B33C01A7005 for <softwires@ietfa.amsl.com>; Mon, 16 Mar 2015 01:06:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 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, 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 YxYgiNK5bRqr for <softwires@ietfa.amsl.com>; Mon, 16 Mar 2015 01:06:30 -0700 (PDT)
Received: from mail-wi0-x235.google.com (mail-wi0-x235.google.com [IPv6:2a00:1450:400c:c05::235]) (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 6C9371A7003 for <softwires@ietf.org>; Mon, 16 Mar 2015 01:06:30 -0700 (PDT)
Received: by wifj2 with SMTP id j2so35974769wif.1 for <softwires@ietf.org>; Mon, 16 Mar 2015 01:06:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=Ey8QPwY+wjod2/DfCsHAoJ7lCwn59tWuC27w6L+qnDM=; b=pW+CAC/RuTTSJCQQvTblssn23nGxtM/ia/MfaGLBuRkvh2JqPxpkS27cVsEO3T+PB5 qqb0wkMDRhQ7qUz586rh5GN/DFYYdNiA9xwNsazfEQMKWWVETzkUDVQ88/60+66KA+LZ uYgfngqVrxgTpVQ8bglBsRsbEsluv7H8q+EgSyo5VvRTahxGPptvky5g3C2wYobxvZix Z2biWx+ufHDE4ZBVrQ+/5YD7tAl2nyBEHa631j3btK4rITsD7jJLc6bn0KbNwXvttlG9 YexdLfLqWfwKUu37gDcc9FPVXeHpOZvRNUYlP2GDFEada27zpdBMJsDeCRV15yMVj8pR U6+g==
X-Received: by 10.180.103.40 with SMTP id ft8mr166323650wib.68.1426493189006; Mon, 16 Mar 2015 01:06:29 -0700 (PDT)
Received: from sunqideair.lan ([62.225.30.140]) by mx.google.com with ESMTPSA id r15sm14169465wiw.12.2015.03.16.01.06.27 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 16 Mar 2015 01:06:28 -0700 (PDT)
Content-Type: multipart/alternative; boundary="Apple-Mail=_EFB00176-8BB5-43D0-8D76-0F702B17A1EC"
Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\))
From: Qi Sun <sunqi.csnet.thu@gmail.com>
In-Reply-To: <B8F9A780D330094D99AF023C5877DABA846F54FC@nkgeml501-mbs.china.huawei.com>
Date: Mon, 16 Mar 2015 09:06:24 +0100
Message-Id: <EAF6E88F-9519-4934-AD4B-223A3F604EE9@gmail.com>
References: <B8F9A780D330094D99AF023C5877DABA846E1199@nkgeml501-mbs.china.huawei.com> <951513FB-D0C2-4E72-96DD-222F9CDB4B58@gmx.com> <B8F9A780D330094D99AF023C5877DABA846F54FC@nkgeml501-mbs.china.huawei.com>
To: Qin Wu <bill.wu@huawei.com>
X-Mailer: Apple Mail (2.1874)
Archived-At: <http://mailarchive.ietf.org/arch/msg/softwires/ZfyRfACJwT-5hPwBfAwNOjy3hlE>
Cc: "softwires@ietf.org" <softwires@ietf.org>
Subject: Re: [Softwires] Review of draft-sun-softwire-yang-02
X-BeenThere: softwires@ietf.org
X-Mailman-Version: 2.1.15
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: <http://www.ietf.org/mail-archive/web/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: Mon, 16 Mar 2015 08:06:32 -0000

Hi Qin,

Thanks for your comments! 

On Mar 16, 2015, at 3:54 AM, Qin Wu <bill.wu@huawei.com> wrote:
> Looking at the model again, the way that it is currently defined is wrong. Here’s an updated section of the model that should achieve the above: 
>  
>    |     +--rw (binding-v6info)
>    |     |  +—:(ipv6addr)
>    |     |  |  +--rw binding-ipv6-addr    inet:ipv6-address
>    |     |  +—:(ipv6pref)
>    |     |     +--rw binding-ipv6-prefix  inet:ipv6-prefix
>  
> [Qin]: Based on the above clarification, I think binding-ipv6-addr and binding-ipv6-prefix can not coexist at the same time, both binding-ipv6-addr and binding-ipv6-prefix should be optional leaf or choice, right?
>    |     +--rw (binding-v6info)?
>    |     |  +—:(ipv6addr)
>    |     |  |  +--rw binding-ipv6-addr?    inet:ipv6-address
>    |     |  +—:(ipv6pref)
>    |     |     +--rw binding-ipv6-prefix?  inet:ipv6-prefix

According to the definition of “choice” in RFC6020: http://tools.ietf.org/html/rfc6020#section-4.2.7
   YANG allows the data model to segregate incompatible nodes into
   distinct choices using the "choice" and "case" statements.  The
   "choice" statement contains a set of "case" statements that define
   sets of schema nodes that cannot appear together.  Each "case" may
   contain multiple nodes, but each node may appear in only one "case"
   under a "choice".

Now that we’re using choice-case structure, it guarantees that binding-ipv6-addr and binding-ipv6-prefix cannot be presented at the same time. And either binding-ipv6-addr or binding-ipv6-prefix has to be mandatory node for the complete binding item. So the question marks are not necessary. 

Cheers, 
Qi