<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC791 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.0791.xml">
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY I-D.ietf-i2rs-yang-network-topo SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-i2rs-yang-network-topo.xml">
<!ENTITY I-D.ietf-i2rs-yang-l3-topology SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-i2rs-yang-l3-topology.xml">
<!ENTITY I-D.ietf-l3sm-l3vpn-service-model SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-l3sm-l3vpn-service-model.xml">

]>

<rfc category="std" docName="draft-hares-i2rs-service-topo-dm-06.txt"
     ipr="trust200902">
  <?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
  <?rfc toc="yes" ?>
  <?rfc symrefs="yes" ?>
  <?rfc sortrefs="yes"?>
  <?rfc iprnotified="no" ?>
  <?rfc strict="yes" ?>
  
  <front>
    <title abbrev="I2RS Service Topology">A Yang model for I2RS service topology</title>
 	<author fullname="Susan Hares" initials="S" surname="Hares">
      <organization>Huawei</organization>
	   <address> 
        <postal>
          <street>7453 Hickory Hill</street>
          <city>Saline</city>
          <region>MI</region>
          <code>48176</code>
          <country>USA</country>
        </postal>
        <email>shares@ndzh.com</email>
		</address>
    </author>
    <author fullname="Linda Dunbar" initials="L." surname="Dunbar">
      <organization>Huawei</organization>
      <address>
        <postal>
          <street></street>
          <city> </city>
          <region> </region>
          <code></code>
          <country>USA</country>
        </postal>
        <email>linda.dunbar@huawei.com</email>
      </address>
    </author>
	<date year="2016" />
   <area>Routing Area</area>
   <workgroup>I2RS</workgroup>
    <keyword>RFC</keyword>
     <keyword>Request for Comments</keyword>
     <keyword>Service Topology</keyword>
     <keyword>Internet-Draft</keyword>
     <keyword>I2RS</keyword>
    <abstract>
      <t>This document defines  I2RS protocol-independent service layer
	  virtual topology data model.  This data model utilizes the concepts in 
	  the generic I2RS topology model of virtual networks (node, links, termination points) and cross-layer 
	  topologies. This virtual service topology may be a composite layer created
	  from the combination of protocol-dependent service layers. Protocol-dependent
	  services layers include: L3VPN, L2VPN, EVPN, E-Tree, and others. 
	  </t>
    </abstract>
  </front>
  <middle>
    <section anchor="intro" title="Introduction">
      <t>Service topology in <xref target="I-D.ietf-i2rs-yang-network-topo"></xref> includes the
	  a virtual topology for a service layer above the L1, L2, and L3 layers. This virtual
	  topology has the generic topology elements of node, link, and terminating point. 
	  The virtual service topology is a network-wide topology stored on one routing
	  system which an I2RS agent is connected to. </t>
	  <t> The virtual service topology is a composite summary of the 
 	  services available services gathered from the lower layer indications of L3VPN,
	  L2VPN, and EVPN services, E-TREE services, Seamless MPLS topologies within an As
	  and others. This is a "bottoms up" yang module providing composite protocol independent 
	  service topology based on these protocol services.  
	  </t>
	  <t>
      This "bottoms-up" yang model does provide a mechanism to link this bottoms up model
	  to a top-down service model.  One example of a top-down service model for L3 VPNs
	  is the L3 Service yang data model <xref target="I-D.ietf-l3sm-l3vpn-service-model"></xref>.
	  Although the two models are linked, the top-down service model cannot be derived from 
	  the lower layers. 
	  </t>

    <section title="Conventions used in this document">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
      document are to be interpreted as described in <xref
      target="RFC2119">RFC2119</xref>.</t>
    </section>

      <section title="Base Model: the Service-Topology Component">
        <t>The following diagram contains an informal graphical depiction of
        the main elements of the information model:
        <figure>
          <artwork>
            +----------------+
            |    network     | 
            |    topology    |&lt;...
            +----------------+   :
              *           *  :   :
              |           |  :...:
              |           |
      +--------+        +--------+
  ...&gt;|  node  |&lt;.......|link    |&lt;...
  :   +--------+&lt;.......+--------+   :
  :    :   *             : :  *  :   :
  :.....   |             : :  |  :...:
           |             : :  |
.....&gt;+--------+&lt;........: :  |
:     |   TP   |&lt;..........:  |
: ...&gt;+--------+              |
: :                           |
: : .....................+---------+
.........................|Direction|
                         +---------+
						 
	Figure 1 
</artwork>
 </figure>
</t>
<t>
The link between the upper layer and the lower layer occurs by linking the bottoms
up service network topologies to Top-down service topologies at certain service
nodes to support transport of service across a virtual service link.  
</t>
<t>
An example of the top-down service topology link to the bottoms up composite service
topology may help. Suppose a bottoms up topology contains 
a composite of 3 L3VPN network topologies, 2 L2VPN network topologies, 
and 2 EVPN network topologies. Each of these physical networks can support virtual networks
on top of the physical network.  The service network base bottoms up is formed topology
map with all of these topologies.   
</t>
<t>
Suppose an L3SM has three VPN services topologies which 
support three services over 9 virtual topologies transiting the 2 of the L3VPN networks.  
<list style="symbols">
<t>VPN-svc 1: supporting hub-spoke flow for Customer 1 with 2 Cloud identifiers (2 topologies)
 with connecting the customers access at 3 sites </t>
<t>VPN-svc 2: supporting hub-spoke flow disjoint for Customer 2 with 2 Cloud 
identifiers (2 topologies) at 3 sites,  </t>
<t>VPN-svc 3: supporting any-to-any flow for Customer 3 with 1 Cloud Identifier (5 topologies)
at 3 sites. </t>
</list>
Let us examine how VPN-svc 1 links to the composite cloud.  Let us assume 
for simplicity of the example that 
the nodes providing the L3VPN provider equipment (PE) and 
the customer equipment (CE) at all sites are all unique.
The diagram of how the top-down service topology meets 
the bottom up service topology is shown in figure 
</t> 
<t>
<figure>
<artwork>
  
  L3SM topologies 
            Service-topology [VPN-ID:1]
                /               \			
   cloud 1 topology 1         cloud 2 topology-1 
       /     |      \            /     |      \    
  Site-1A site-1B site1-C    site-1A Site-1B Site-1C 
    |          |       |       |         |     |
====|==========|=======|=======|=========|=====|====
    +-------+  |        \    /           /     |
 Bottoms-up |  |         \ /           /       | 
 service    |  |         /\           /        |
 topology   |  |       /    \        |         | 
 L3VPN-Service-topology 1  L3VPN-Service   Topology-2 
            |  |      |       |      |         |
        node1 node2 node3   node4   node5    node6 	
          PE   PE    PE       PE      PE       PE
          |     |     |        |       |        |
         CE    CE     CE      CE      CE       CE 	

    Figure 2 		 
</artwork>
</figure>
</t>
<t>
These two layers of service topologies are by 
two different composite models composite models and
different supporiting models as follows: 
<list style="symbols">
<t>Top-Down Provider Services with supporting L3SM model, 
</t>
<t>Bottom-Up I2RS Composite Services with supporting 
model from L3VPN, L2VPN, EVPN (only L3VPN used).
The links between topologies occur at specific nodes. 
</t>
</list>
</t>
</section>
</section>
<section title="High level Yang architecture">
<t>This section describes the Yang High level architecture.</t>
<section title="Network level">
<t>
The service topology network level defines 
the following high-level yang architeture: 
</t>
<t>
<figure>
<artwork>
module: i2rs-service-topologies
   augment /nw:network/nw:network-types:
      +--rw service-topologies-types
   augment /nw:network:
     +--rw service-topology-attributes
         +--rw name?   string
		 +--rw description? string 
 		 +--rw composite-flag* identity-ref  
         +--rw tdsvc-supports-attributes* 
		    [tdsvc-attr-name] 
		    +--rw tdsvc-attr-name string 
			+--rw tdsvc-supports-attribute* identityref 

		 
Note: Composite flags are bottoms-up flags 

Figure 3 
</artwork>
</figure>
</t>
<t>
The service topology attributes for a network include the following
<list>
<t>name - name of the service topology, </t>
<t>description - description of service topology </t>
<t> composite-flags - bit mask with flags of service layer
 topologies network topology node available to create service
topology from. These topologies include: L3VPN, L2VPN, and EVPN services, E-TREE services, 
 Seamless MPLS topologies within an AS and others. 
</t>
<t>tdsvc-supports-attributes - composite topology supports top-down
services topology attributes
<list>
<t>tdsvc-supports-attr-name - name of top-down service attribute</t>
<t>tdsvc-supports-attribute - identity ref of service attribute 
(e.g. L3SM service for any-to-any)</t>
</list> </t>
</list>
</t>
</section>
<section title="Node level">
<t>
<figure>
<artwork>
module: i2rs-service-topologies
.... 
   augment /nw:network/nw:node
      +--rw node-service-attributes
         +--rw c-svc-node-name?   inet:domain-name
         +--rw c-svc-node-flag*   identityref;
		 +--rw tdsvc-node-supports-attributes* 
		      [tdsvc-node-attr-name]
		    +--rw tdsvc-node-attr-name string;
		    +--rw tdsvc-node-supports-attribute identityref
		   // Top down attributes supported 
		  

</artwork>
</figure>
</t>
<t>
The additional fields in the service attributes
are the following:
<list>
<t>c-svc-node-name - name of network node, </t>
<t>c-svc-node-flag - composite service topology node flag.
The service node can be a member of one of the existing topology type
(L3VPN, L2VPN, EVPN, E-TREE, Seamless MPLS, MPLS-TE, MPLS 
node, or I2RS created). 
</t>
<t>tdsvc-node-supports-attributes - node supports top-down
services topology attributes
<list>
<t>tdsvc-supports-node-attr-name - name of top-down service attribute</t>
<t>tdsvc-supports-node-attribute - identity ref of service attribute 
(e.g. L3SM service for any-to-any)</t>
</list> </t>
</list>
</t>
</section>
<section title="Service Link and Termination point">
<t>
<figure>
<artwork>
   augment /nw:network/nt:link:
      +--rw service-link-attributes
         +--rw c-svc-link-name?     string
         +--rw c-svc-link-type identityref 		 
         +--rw c-svc-link-metric?   uint32
		 +--rw tdsvc-link-supports-attr* [name] 
		    +--rw tdsvc-link-attr-name string
			+--rw tdsvc-link-attribute identityref 
   augment /nw:network/nw:node/nt:termination-point:
      +--rw service-termination-point-attributes
	     +--rw svc-tp-name string
		 +--rw svc-tp-type identityref 
		 +--rw tdsvc-tp-support-attributes
		       +--rw tdsvc-tp-attr-name
			   +--rw tdsvc-tp-support-attribute
			  
 
</artwork>
</figure>
</t>
<t>
The augmentation to the service topology is the service link
attributes which include:
<list>
<t>c-svc-link-name - name of the link,</t>
<t>c-svc-link-type - the service link type supported
by this logical link. 
</t>
<t>metric - the metric of the service type.  This metric
allows the composite link to store a svc level metric. 
0 = no servic metric.  1-n values (1 best, n worse).</t>
<t>svc-attributes - the composite attributes of link</t>
<t>tdsvc-td-support-attributes - link support of Top-down attributes
<list>
<t>tdsvc-supports-node-attr-name - name of top-down service attribute</t>
<t>tdsvc-supports-node-attribute - identity ref of service attribute 
(e.g. L3SM service for any-to-any)</t>
</list> 
</t>
</list>
</t>
<t>
The augmentation to the termination point include the following
<list>
<t>svc-tp-name - name of termination point, </t>
<t>tp-type - type of link (L3VPN, L2VPN, combined) </t>
<t>tdsvc-tp-support-attributes - list of top-level domain-name
attributes this links supports. </t>
</list>
</t>
</section>
</section>
<section title="Yang Data Model">
<t>
<figure>
<artwork>
&lt;CODE BEGINS&gt; file "ietf-i2rs-service-topology@2016-02-q0.yang"

 module ietf-i2rs-service-topology{
  namespace "urn:ietf:params:xml:ns:yang:ietf-i2rs-service-topology";
  prefix i2rs-st;
  
    import ietf-inet-types {
    prefix inet;
  }
  
   import ietf-network {
     prefix nw;
   }
   import ietf-network-topology {
     prefix "nt";
   }  
   
    organization "IETF";
	  contact
     "email: shares@ndzh.com;	 
      email: linda.dunbar@huawei.com;	  
	 ";

   description
     "This module defines a model for the service topology.
	  This service model imports 
	  - ietf-network and ietf-network-topology from
	     draft-ietf-i2rs-yang-network-topo-02.txt,
	  - ietf-routing from draft-ietf-netmod-routing-cfg,
	  - ietf-l3vpn-svc from 
	      draft-ietf-l3sm-l3vpn-service-model.
		  (not defined yet )
	  ";
 
  revision 2016-02-12 {
    description
      "Version 1 - initial version;
	   Version 2 - yang format fixed
	   Version 3 - errro in xml file
	   version 4 - remove next-hops attribute.
	   version 5- links to top-level attributes.
	    version 6 - Remove extra parameters.";
	   
     reference "draft-hares-i2rs-service-topo-dm-05.txt";
  }
  
      identity svc-topo-flag-identity {
        description "Base type for svc flags";
        }
      identity l3vpn-svc-topo {
        base svc-topo-flag-identity;
        description "L3VPN service type";
       }
      identity l2vpn-svc-topo {
        base svc-topo-flag-identity;
        description "L2VPN service type";
       }
       identity EVPN-svc-topo {
        base svc-topo-flag-identity;
        description "EVPN service type";
       }
        identity Seamless-MPLS-svc-topo {
        base svc-topo-flag-identity;
        description "Seamless MPLS service type";
       }
        identity Etree-svc-topo {
        base svc-topo-flag-identity;
        description "Seamless MPLS service type";
       }
        identity I2rs-svc-topo {
        base svc-topo-flag-identity;
        description "I2RS create service topo";
       }
	   
      identity svc-tp-type {
        description "Base type for service
          termination-point type flags";
        }
      identity svc-tp-type-service {
        base svc-tp-type;
        description "service type";
       }
      identity svc-tp-type-ip {
        base svc-tp-type;
        description "service IP";
       }
      identity svc-tp-type-unnum {
                base svc-tp-type;
        description "service unnumbered link";
       }
	   
   
	   identity svc-link-type {
	    description "Base type for composite
		  service link attribute flags";
	    }
		identity svc-link-ip-te {
		  base svc-link-type; 
		  description "service link 
		  that support IP traffic engineering";
		}
		
	 	identity svc-link-ip-multicast {
		  base svc-link-type; 
		  description "service link that 
		  supports IP multicast.";
		}
	 
	   identity tdsvc-support-identity {
        description "Base type for svc flags";
        }
		
		identity td-L3sm-hub-spoke {
		    base tdsvc-support-identity;
        description "Supports L3SM hub-spoke";
        }
	    identity td-L3sm-hub-spoke-disjoint {
		    base tdsvc-support-identity;
        description "Supports L3SM hub-spoke disjoint";
        }
		
		identity td-L3sm-any-any {
		    base tdsvc-support-identity;
        description "Supports L3SM any-any";
        }
	
	
       grouping svc-combo-network-type {
         description "Identify the topology type to be 
		  composite service topology.";
         container svc-combo-network {
           presence "indicates Service layer Network";
           description
           "The presence of the container node indicates
            Service layer which combines networks
			L3VPN, L2VPN, and others";
		  }
       }


      grouping service-topology-attributes {
        leaf name {
		  type string;
          description "name of service
          topology";
		}
        leaf description {
		  type string;
		  description "description 
		  of service attribute";
	    }
		leaf composite-flag {
           type identityref {
              base svc-topo-flag-identity;
		   } 
          description "other topologies
          this topology is configured to
           be a composite of
              (L3VPN, L2VPN, I2RS only)";
        }
       
		list tdsvc-supports-attributes {
		   key tdsvc-attr-name;
		   leaf tdsvc-attr-name {
		    type string;
			description "top-down 
			service support attribute name";
		   }
		  leaf tdsvc-supports-attribute {
             type identityref {
              base tdsvc-support-identity;
		      }
		      description "top-down service
		     attribute this topology supports.";
			 
		   }
		   description "supporting top-down 
           service attributes. ";
		}
		description  "Group of attributes for
              service topology";  
			  	 
      }
	  
	  
      grouping node-svc-attribute {
        leaf c-svc-node-name{
           type inet:domain-name;
           description "Domain name for node";
        }
        leaf c-svc-flag {
          type identityref {
             base svc-topo-flag-identity;
		  }
          description "virtual network
           node can be composite of the
           topologies list
           (L3VPN, L2VPN, I2RS only)";
        }
		
		list tdsvc-node-supports-attributes {
		   key tdsvc-node-attr-name;
		   leaf tdsvc-node-attr-name {
			type string;
			description "name of top-down 
			 service attribute ";
		    }
		    leaf tdsvc-node-supports-attribute {
             type identityref {
              base tdsvc-support-identity;
		      }
		      description "top-down service
		     attribute this topology supports.";
			 
		   }
		   description "list of top-down service
		   attributes this node supports";
		}       
  	
	   description
	   "grouping of composite flag";
      }
 
	grouping service-link-attributes {
        leaf c-svc-link-name {
		  type string;
          description "name of
            service link";
		}
        leaf c-svc-link-type {
          type identityref {
             base svc-link-type;
		  }
          description "other topologies
            this link is current a 
			composite of
            (L3VPN, L2VPN, I2RS only)";
        }
        leaf c-svc-link-metric {
          type uint32;
          description "link metric
		    for servicest to 
			allow TE loading at composite
			service level";
        }
		list tdsvc-link-supports-attributes {
		   key tdsvc-link-attr-name;
		   leaf tdsvc-link-attr-name {
		    type string;
			description "top-down 
			service support attribute name";
		   }
		  leaf c-svc-link-td-support-attribute {
             type identityref {
              base tdsvc-support-identity;
		      }
		      description "top-down service
		     attribute this link supports.";
		   }
		  description "list of service level
		   link attributes";
		}
	    description "grouping of 
		 service link attribute";
      }
	  
  grouping service-termination-point-attributes {
        leaf svc-tp-name {
		 type string;
		 description "name of service 
		  termination point";
		}
        leaf svc-tp-type {
            type identityref {
              base svc-topo-flag-identity;
			}
          description "other topologies
            this link termination point is
            part of (L3VPN, L2VPN, 
		    or I2RS only)";
		  }
        list tdsvc-tp-support-attributes {
		   key tdsvc-tp-attr-name;
		   leaf tdsvc-tp-attr-name {
		    type string;
			description "top-down 
			service support attribute name";
		   }
		  leaf tdsvc-tp-support-attribute {
             type identityref {
              base tdsvc-support-identity;
		      }
		      description "top-down service
		     attribute this link supports.";
		   }
		  description "list of service level
		   link attributes";
		}
	    description "grouping of 
		 service link attribute";
	 
      }
	  
	  
	    augment "/nw:networks/nw:network/nw:network-types" {
        uses svc-combo-network-type;
		description
		"augment the network-tpyes with
		the service-topology-types grouping";
		}

		augment "/nw:networks/nw:network" {
         when "nw:network-types/svc-combo-network" {
           description
             "Augmentation parameters apply only for
			 service network with bottoms up topology";
         }
         description
           "Augment with combo service 
		   topology attributes";
         uses service-topology-attributes;
       }
	
    augment "/nw:networks/nw:network/nw:node"{
	    when "nw:network-types/svc-combo-network" {
           description
             "Augmentation parameters apply only for
			 service network with bottoms up topology";
         }
         uses node-svc-attribute;
	     description
	    "augment the node with the node-svc-attribute";
	  }
  
	augment "/nw:networks/nw:network/nt:link" {
	    when "nw:network-types/svc-combo-network" {
           description
             "Augmentation parameters apply only for
			 service network with bottoms up topology";
        }
		uses service-link-attributes;
		description 
		"augment the link with 
		service-link-attributes";
	}
   augment "/nw:networks/nw:network/nw:node/nt:termination-point"{
	    when "nw:network-types/svc-combo-network" {
           description
             "Augmentation parameters apply only for
			 service network with bottoms up topology";
         }
		uses service-termination-point-attributes;
		description
		"augment the termination-point with
		service-termination-point-attributes";
	}
	
} // module i2rs-service-topology  
} // module i2rs-service-topology  

&lt;CODE ENDS&gt;
</artwork>
</figure>
</t>
</section>
 <section title="IANA Considerations">
   <t>TBD</t>
 </section>
 <section title="Security Considerations">
   <t>TBD</t>
 </section>
</middle>
  <back>
    <references title="Normative References">
	  &RFC2119;
	  &I-D.ietf-i2rs-yang-network-topo;
    </references>
	<references title="Informative References">
        &I-D.ietf-i2rs-yang-l3-topology;
		&I-D.ietf-l3sm-l3vpn-service-model;
	</references>
 </back>
</rfc>