Re: [netmod] Interface Extensions YANG draft

Robert Wilton <rwilton@cisco.com> Wed, 15 July 2015 14:15 UTC

Return-Path: <rwilton@cisco.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6B50C1A914E for <netmod@ietfa.amsl.com>; Wed, 15 Jul 2015 07:15:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -13.911
X-Spam-Level:
X-Spam-Status: No, score=-13.911 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, J_CHICKENPOX_29=0.6, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_DKIM_WL=-7.5] 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 64YiO2jNtO3t for <netmod@ietfa.amsl.com>; Wed, 15 Jul 2015 07:15:01 -0700 (PDT)
Received: from aer-iport-1.cisco.com (aer-iport-1.cisco.com [173.38.203.51]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5D12E1A913D for <netmod@ietf.org>; Wed, 15 Jul 2015 07:15:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=2964; q=dns/txt; s=iport; t=1436969701; x=1438179301; h=message-id:date:from:mime-version:to:subject:references: in-reply-to:content-transfer-encoding; bh=LfTiRviiee5QyAVNi2LLme6OOjdEUDlD49LGT3Gp7RU=; b=YTKc1zBJpWIM/R7cLW0mpN6jy3tB1ToRTZSY/VUTlvN4/pLjl2zSzYMi fd5tTo8k1Qbs0gKa9B2Hr3sn0Lqb4eAsAg/WhnjKkjZtBj1F+D50jGPOH jy3AGToiY9a6lYyhbqUL/yNysGJmFSS3nx2eswZYYRqQGj1K6ZQprQ2dF E=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0CsBAAOaqZV/xbLJq1bhFCDJLgzh20CgXISAQEBAQEBAYEKhCQBAQQjDwEFQBEJAg4KAgIFFggDAgIJAwIBAgE0EQYBDAYCAQGIKp0nnRmWLwEBAQEBAQEDAQEBAQEBARuBIooqhQ2CaIFDAQSMMIgNjA6BQIQYgm2QMSZjgxo9MYJLAQEB
X-IronPort-AV: E=Sophos;i="5.15,480,1432598400"; d="scan'208";a="585062615"
Received: from aer-iport-nat.cisco.com (HELO aer-core-2.cisco.com) ([173.38.203.22]) by aer-iport-1.cisco.com with ESMTP; 15 Jul 2015 14:14:59 +0000
Received: from [10.63.23.119] (dhcp-ensft1-uk-vla370-10-63-23-119.cisco.com [10.63.23.119]) by aer-core-2.cisco.com (8.14.5/8.14.5) with ESMTP id t6FEEwah010814; Wed, 15 Jul 2015 14:14:59 GMT
Message-ID: <55A66AE2.9070106@cisco.com>
Date: Wed, 15 Jul 2015 15:14:58 +0100
From: Robert Wilton <rwilton@cisco.com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0
MIME-Version: 1.0
To: Qin Wu <bill.wu@huawei.com>, wangzitao <wangzitao@huawei.com>, "netmod@ietf.org" <netmod@ietf.org>
References: <559D4BA1.30605@cisco.com> <E6BC9BBCBCACC246846FC685F9FF41EAC2BB4A@szxeml501-mbx.china.huawei.com> <55A39FEC.4090406@cisco.com> <20150713113006.GA6797@elstar.local> <55A3CEAF.7090800@cisco.com> <20150713145229.GA237@elstar.local> <55A3EF1B.4050907@cisco.com> <B8F9A780D330094D99AF023C5877DABA847C3527@nkgeml501-mbs.china.huawei.com> <55A62A85.2050602@cisco.com> <B8F9A780D330094D99AF023C5877DABA847C5BB9@nkgeml501-mbs.china.huawei.com>
In-Reply-To: <B8F9A780D330094D99AF023C5877DABA847C5BB9@nkgeml501-mbs.china.huawei.com>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Archived-At: <http://mailarchive.ietf.org/arch/msg/netmod/bsVliuAF4PJdRu05gnfAyah589Y>
Subject: Re: [netmod] Interface Extensions YANG draft
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 15 Jul 2015 14:15:03 -0000

Hi Qin,

Please see inline ...

On 15/07/2015 12:21, Qin Wu wrote:
> -----邮件原件-----
> 发件人: Robert Wilton [mailto:rwilton@cisco.com]
> 发送时间: 2015年7月15日 17:40
> 收件人: Qin Wu; wangzitao; netmod@ietf.org
> 主题: Re: [netmod] Interface Extensions YANG draft
>
> Hi Qin,
>
> <snip>
>
> The parent interface leaf is just one of the augmentations and is effectively the minimal information that you need to have a logical sub-interface.
>
> [Qin]: I see, sounds like tunnel interface defined in the draft-wwz-netmod-yang-tunnel-cfg-00 also intends to support several similar properties which make me believe you guys has some same goal. Both augment if:interface with interface specific, I am wondering which one draft has better model design, one is to place all common properties in one place while the other is distribute common properties in several places within if:interface.
Yes, there is some overlap here, and I agree that there is a question of 
direction.  It is the requirement to use XML namespaces that made me 
think that defining a given property in single place that spans across 
interfaces is easier to use.

If you take the MTU lead as an example - this has been defined by both 
models.

If you follow the way that I have proposed then the path 
"/if:interfaces/if:interface[if:name = XXX]/if-cmn:l2-mtu" is valid for 
any interface (that implements the interfaces-common YANG module).  E.g. 
a YANG client has a well defined path to access the MTU item for any 
interface.

An alternative approach, is for each type of interface to define an mtu 
leaf for that given interface type.  With a bit of effort you could get 
the MTU node to have the same name and semantics for all interface 
types, but it would always have a different namespace for each interface 
type.  Hence, to write a client function that generically gets/sets the 
MTU on an interface you need to know the interface type to be able to 
map it to the appropriate namespace that the MTU leaf has been defined 
in.  I thought that this would be awkward and hence better to just 
define it in a single place.

So if an approach like draft-wilton-netmod-intf-ext-yang-00 is agreed 
then I think that it might somewhat change the structure of 
draft-wwz-netmod-yang-tunnel-cfg-00 in the following way:
  - ip-address would be defined by the ip-cfg YANG module.
  - encapsulation method could potentially augment from the 
encapsulation choice node that has been defined in 
draft-wilton-netmod-intf-ext-yang-00
  - MTU would be defined by l2-mtu in draft-wilton-netmod-intf-ext-yang-00
  - QoS I would suggest would be defined by DiffServ or other QoS 
feature implementation.

I.e. in essence I would think that perhaps gen-tunnel should only define 
properties that are strictly common to all tunnel interfaces, but that 
are not more widely common across all/most interfaces.

Thanks,
Rob