Re: [L3sm] New Version Notification for draft-wu-l3sm-rfc8049bis-03.txt

David Ball <daviball@cisco.com> Mon, 18 September 2017 10:30 UTC

Return-Path: <daviball@cisco.com>
X-Original-To: l3sm@ietfa.amsl.com
Delivered-To: l3sm@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 23BB3134212 for <l3sm@ietfa.amsl.com>; Mon, 18 Sep 2017 03:30:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -12.601
X-Spam-Level:
X-Spam-Status: No, score=-12.601 tagged_above=-999 required=5 tests=[BAYES_40=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.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 1jEFBWoEvHmb for <l3sm@ietfa.amsl.com>; Mon, 18 Sep 2017 03:30:16 -0700 (PDT)
Received: from aer-iport-4.cisco.com (aer-iport-4.cisco.com [173.38.203.54]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5214B133053 for <l3sm@ietf.org>; Mon, 18 Sep 2017 03:30:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=4739; q=dns/txt; s=iport; t=1505730616; x=1506940216; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to; bh=k3NdC08SyQI6C36MNmCtIzXrZ5/Fl0Z4r9dBdbaGGhE=; b=G9hQrVE2M6F18T4Fudp3Wfu6BLc2P9Vj5rb1PZqSm2z/wYWJc0Ll77l6 2FeOyACbg1nBDR9UtUFNEbXibGPD4LzdS/ELkS5rYAId1VVDuo+W6gzep AkLiqbT9vARXX6tJ2vRhQQqli7h1mB/EAqjJKL7Lzyj/N8ZGxHnBg2b5T 4=;
X-IronPort-AV: E=Sophos;i="5.42,412,1500940800"; d="scan'208,217";a="657545739"
Received: from aer-iport-nat.cisco.com (HELO aer-core-3.cisco.com) ([173.38.203.22]) by aer-iport-4.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Sep 2017 10:30:14 +0000
Received: from [10.63.23.208] (dhcp-ensft1-uk-vla370-10-63-23-208.cisco.com [10.63.23.208]) by aer-core-3.cisco.com (8.14.5/8.14.5) with ESMTP id v8IAUCfd006742; Mon, 18 Sep 2017 10:30:13 GMT
To: Qin Wu <bill.wu@huawei.com>, "Jan Lindblad (jlindbla)" <jlindbla@cisco.com>, "l3sm@ietf.org" <l3sm@ietf.org>
Cc: "Benoit Claise (bclaise)" <bclaise@cisco.com>, Stephane Litkowski <stephane.litkowski@orange.com>, Kenichi Ogaki <ke-oogaki@kddi.com>, Luis Tomotaki <luis.tomotaki@verizon.com>, "adrian@olddog.co.uk" <adrian@olddog.co.uk>
References: <B8F9A780D330094D99AF023C5877DABA9AB358A5@nkgeml513-mbs.china.huawei.com>
From: David Ball <daviball@cisco.com>
Message-ID: <2185ebfb-f142-9b8f-a02d-59ffd6453db6@cisco.com>
Date: Mon, 18 Sep 2017 11:30:12 +0100
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0
MIME-Version: 1.0
In-Reply-To: <B8F9A780D330094D99AF023C5877DABA9AB358A5@nkgeml513-mbs.china.huawei.com>
Content-Type: multipart/alternative; boundary="------------D2CA8C489D88E61BFDDEF4FE"
Content-Language: en-GB
Archived-At: <https://mailarchive.ietf.org/arch/msg/l3sm/9kwbhgnX-PoFzWJO4LJB-DukVL8>
Subject: Re: [L3sm] New Version Notification for draft-wu-l3sm-rfc8049bis-03.txt
X-BeenThere: l3sm@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: L3VPN Service YANG Model discussion group <l3sm.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/l3sm>, <mailto:l3sm-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/l3sm/>
List-Post: <mailto:l3sm@ietf.org>
List-Help: <mailto:l3sm-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/l3sm>, <mailto:l3sm-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Sep 2017 10:30:18 -0000

I think a clearer way to achieve this (if it is the desired behaviour) is:

leaf address-family { ... }
leaf address {
     when ../address-family;
     mandatory true;
}

This has the same effect as below (either both must be specified, or 
neither are), but avoids confusing the reader with a choice that only 
has one option.


     David


On 16/09/2017 04:04, Qin Wu wrote:
>
> Another option could be to introduce an optional choice here with one 
> alternative, with both elements mandatory.
>
> choice automatic-or-specific-address {
>
>   case specific-address {
>
>     leaf address-family {
>
>       mandatory true;
>
>       ...
>
>     }
>
>     leaf address {
>
>       mandatory true;
>
>       ...
>
>     }
>
>   }
>
>   description "By default address allocation happens automatically. 
> Customer may override using these settings.";
>
> }
>
> Either way, they would both be optional, but come and go as one unit.
>

-- 
David Ball
<daviball@cisco.com>;