Re: [i2rs] network-type: container vs. identity?

"Alexander Clemm (alex)" <alex@cisco.com> Tue, 12 July 2016 16:29 UTC

Return-Path: <alex@cisco.com>
X-Original-To: i2rs@ietfa.amsl.com
Delivered-To: i2rs@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 525CD12D1DC for <i2rs@ietfa.amsl.com>; Tue, 12 Jul 2016 09:29:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -15.808
X-Spam-Level:
X-Spam-Status: No, score=-15.808 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.287, 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 Yf7k241Uk5eW for <i2rs@ietfa.amsl.com>; Tue, 12 Jul 2016 09:29:50 -0700 (PDT)
Received: from alln-iport-8.cisco.com (alln-iport-8.cisco.com [173.37.142.95]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9B14412D185 for <i2rs@ietf.org>; Tue, 12 Jul 2016 09:29:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=4333; q=dns/txt; s=iport; t=1468340990; x=1469550590; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=eo+csP9U3Z7iwfqtuflKKW6/Uhr1UJ3fCS8mYbphSZs=; b=Wp4cr8gCn+elYfdHZu3wCwUZeRP8mq/E47fGcxcwKv00PtwciTVruJ2F ci3mMqJuGkrTWz/pQUjxOyKnpjubB25SR9kh6waQW12jFV9xGddPDatZh WZAVQhYXf6dHZOn1cINIIi3yts2L6Fpc6velIMZ4b9R+vhnjltb9z4sDU 8=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0A/AgACGoVX/40NJK1TCYM+VnwGuQOBeSKFdgKBNTgUAQEBAQEBAWUnhFwBAQUBAR8BBUUCBAQDDAQCAQgRBAEBAQEDCxgCAwInCxQJCAEBBAENBQiIKA6Tcp0YAY8PAQEBAQEBAQEBAQEBAQEBAQEBAQEBFwV+iXmEGgODIoJdBYgckH8Bhg6IPoFxhFmIa5ATAR42g3Fuh2FFfwEBAQ
X-IronPort-AV: E=Sophos;i="5.28,352,1464652800"; d="scan'208";a="296760751"
Received: from alln-core-8.cisco.com ([173.36.13.141]) by alln-iport-8.cisco.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 12 Jul 2016 16:29:49 +0000
Received: from XCH-RTP-002.cisco.com (xch-rtp-002.cisco.com [64.101.220.142]) by alln-core-8.cisco.com (8.14.5/8.14.5) with ESMTP id u6CGTnVg007677 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Tue, 12 Jul 2016 16:29:49 GMT
Received: from xch-rtp-001.cisco.com (64.101.220.141) by XCH-RTP-002.cisco.com (64.101.220.142) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Tue, 12 Jul 2016 12:29:48 -0400
Received: from xch-rtp-001.cisco.com ([64.101.220.141]) by XCH-RTP-001.cisco.com ([64.101.220.141]) with mapi id 15.00.1210.000; Tue, 12 Jul 2016 12:29:48 -0400
From: "Alexander Clemm (alex)" <alex@cisco.com>
To: "Zhangxian (Xian)" <zhang.xian@huawei.com>, Robert Varga <nite@hq.sk>, "draft-ietf-i2rs-yang-network-topo@tools.ietf.org" <draft-ietf-i2rs-yang-network-topo@tools.ietf.org>
Thread-Topic: [i2rs] network-type: container vs. identity?
Thread-Index: AdHYy2fqE/Tzjev7QKGinU6EIX1VyACuKDcAADqEloAABUsgkA==
Date: Tue, 12 Jul 2016 16:29:48 +0000
Message-ID: <6a5706ada23a4354b08fdc543571453c@XCH-RTP-001.cisco.com>
References: <C636AF2FA540124E9B9ACB5A6BECCE6B7DEDFCE6@SZXEMA512-MBS.china.huawei.com> <5c0b2dee-fe0b-139d-1b1e-dc6936ff747d@hq.sk> <C636AF2FA540124E9B9ACB5A6BECCE6B7DEFF3AF@SZXEMA512-MBS.china.huawei.com>
In-Reply-To: <C636AF2FA540124E9B9ACB5A6BECCE6B7DEFF3AF@SZXEMA512-MBS.china.huawei.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [10.41.60.103]
Content-Type: text/plain; charset="iso-2022-jp"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/i2rs/i2WatAja1X2o89wwqdmtjP5qZSE>
Cc: "i2rs@ietf.org" <i2rs@ietf.org>
Subject: Re: [i2rs] network-type: container vs. identity?
X-BeenThere: i2rs@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: "Interface to The Internet Routing System \(IRS\)" <i2rs.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/i2rs>, <mailto:i2rs-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/i2rs/>
List-Post: <mailto:i2rs@ietf.org>
List-Help: <mailto:i2rs-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/i2rs>, <mailto:i2rs-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 12 Jul 2016 16:29:52 -0000

Hi Xian,

the way it is structured with containers and all will allow you to indicate the various network types that apply to a network.  If there is a hierarchy of network types, you would have a hierarchy of containers.  In your case  network-types --> ietf-te-topology--> otn-topology.  Network will indicate each of the network types that it instantiates.  

You could model a hierarchy of network types also through a hierarchy of identities, as you indicate in your example.  Sure, in your example this is a viable alternative, but it is not clear what you would gain through that.  For one, in the case of "otn-topology", the fact that the same topology is also an ietf-te-topology is rather implicit, not explicit.  Per Robert's point, if for some reason you have multiple traits and want to "compose" a network to encompass multiple types, this is straightforward to do with the current pattern, not so straightforward with identities.   

--- Alex


-----Original Message-----
From: i2rs [mailto:i2rs-bounces@ietf.org] On Behalf Of Zhangxian (Xian)
Sent: Tuesday, July 12, 2016 7:49 AM
To: Robert Varga <nite@hq.sk>; draft-ietf-i2rs-yang-network-topo@tools.ietf.org
Cc: i2rs@ietf.org
Subject: Re: [i2rs] network-type: container vs. identity?

Hi, Robert, 

   Thank you for your clarification. Just make sure I get your point, let me try with a (real) example. 

   At the moment, we have the following relationship among different topology types ( using the diagram from https://tools.ietf.org/html/draft-ietf-i2rs-yang-l3-topology-02 as base):

            +-----------------------------+
           |  +-----------------------+  |
           |  |    ietf-network |  |
           |  +----------^------------+  |
           |         |            |
           |  +-----------------------+  |
           |  | ietf-network-topology |  |-------< [ietf-te-topology]------<[ otn-topology] ( as an example)
           |  +----------+------------+  |
           +-------------^---------------+
                         |
                         |
             +-----------^-------------+
             | l3-unicast-igp-topology |
             +----+---------------+----+
                  ^               ^
                  |               |
                  |               |
         +--------^-----+      +-----^---------+
         | ospf-topology|    | isis-topology |
         +--------------+       +---------------+

So, this shows support of more than two levels of relationships and many branches. Is that what you mean by multiple traits and composition? Although I do not see an example using this identity for this, but I wonder if the following way of using identity is supported and can be used to cater your need? 

Identity network-types {
  Description "base type for network types"; }

Identity type-topology {
 Base "network-types";
}

Identity type-l3-unicast-igp {
 Base " type-topology ";
}

Identity type-ospf {
 Base "type-l3-unicast-igp";
}

I am cooking the codes up with my limited understanding of YANG, so I might be wrong. If so, please do let me know. 

Cheers,
Xian

-----Original Message-----
From: Robert Varga [mailto:nite@hq.sk]
Sent: 2016年7月11日 18:54
To: Zhangxian (Xian); draft-ietf-i2rs-yang-network-topo@tools.ietf.org
Cc: i2rs@ietf.org
Subject: Re: [i2rs] network-type: container vs. identity?

On 07/08/2016 05:47 AM, Zhangxian (Xian) wrote:
> Hi, Authors,
> 
>  
> 
>    while using this model as a base to augment for technology-specific 
> topologies, I wonder why the leaf network-types is a container, 
> instead of being as a identity?
> 
>  
> 
> I remember I asked Alex offline before, but the response I got was 
> that the identity was also under consideration at that time. Given the 
> latest version (June 2016 version) still use container, I wonder if 
> the authors can explain why the alternative is discarded? Thank you.

The idea is to be able to have multiple traits, for example for composition.

Bye,
Robert


_______________________________________________
i2rs mailing list
i2rs@ietf.org
https://www.ietf.org/mailman/listinfo/i2rs