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:[email protected]] 
Sent: 2016年7月11日 18:54
To: Zhangxian (Xian); [email protected]
Cc: [email protected]
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
[email protected]
https://www.ietf.org/mailman/listinfo/i2rs

Reply via email to