<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" []>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc strict="yes" ?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<?rfc iprnotified="no" ?>

<rfc category="info"
     docName="draft-shytyi-netmod-vysm-02"
     ipr="trust200902">

  <!-- category values: std, bcp, info, exp, and historic ipr values:
       trust200902, noModificationTrust200902,
       noDerivativesTrust200902, or pre5378Trust200902 you can add the
       attributes updates="NNNN" and obsoletes="NNNN" they will
       automatically be output with "(if approved)" -->

  <front>

    <title abbrev="Virtualization Yang Service Model (VYSM)">
    Virtualization YANG Servise Model (VYSM) 
    </title>

    <author initials='D.' surname="Shytyi" fullname='Dmytro Shytyi'>
	    <organization>SFR/ALTICE</organization>
      <address>
        <postal>
          <street>
          </street>
          <city>
            Paris area
          </city>
          <region>
            Ile-de-France
          </region>
          <code>
          </code>
          <country>
            France
          </country>
        </postal>
        <phone>
        </phone>
        <email>
          ietf.dmytro@shytyi.net
        </email>
		<uri>
		http://dmytro.shytyi.net
		</uri>
      </address>
    </author>
	
	    <author initials='L.' surname="Beylier" fullname='Laurent Beylier'>
      <organization>SFR/ALTICE</organization>
      <address>
        <postal>
          <street>
          </street>
          <city>
            Paris area
          </city>
          <region>
            Ile-de-France
          </region>
          <code>
          </code>
          <country>
            France
          </country>
        </postal>
        <phone>
        </phone>
        <email>
        </email>
		<uri>
		</uri>
      </address>
    </author>
    

    <author initials='L.' surname="IANNONE" fullname='LUIGI IANNONE'>
      <organization>Telecom ParisTech</organization>
      <address>
        <postal>
          <street>
          </street>
          <city>
            Paris
          </city>
          <region>
            Ile-de-France
          </region>
          <code>
          </code>
          <country>
            France
          </country>
        </postal>
        <phone>
        </phone>
        <email>
        </email>
      </address>
    </author>

    <!-- Meta-data Declarations -->
    <date/>
    <area>Internet</area>

    <workgroup>Network Working Group</workgroup>

    <!-- WG name at the upperleft corner of the doc, IETF is fine for
         individual submissions.  If this element is not present, the
         default is "Network Working Group", which is used by the RFC
         Editor as a nod to the history of the IETF. -->

    <keyword>
      service, yang, model, nso
    </keyword>

    <!-- Keywords will be incorporated into HTML output files in a
         meta tag but they have no effect on text or nroff output. If
         you submit your draft to the RFC Editor, the keywords will be
         used for the search engine. -->

    <abstract>
      <t>
	This document provides a specification of the Virtual Network Functions YANG Service Model (VYSM). 
	The VNF YANG Service Model serves as a base framework for managing an universal Customer-Premises Equipment (uCPE) NFV subsystem from the Orchestrator.
      </t>
    </abstract>
  </front>


  <middle>
	  <section title="Introduction"
		   anchor="Introduction">
      <t>
	Network Function Virtualization is a technology that allows to virtualize the network services running on dedicaded hardware. 
	This technology became a base for universal Customer-Premises Equipment(uCPE). This document defines the uCPE as harware with x86 capabilities (whitebox or greybox)
	that has a hypervisor. In other words, uCPE is a host that may run multiple Virtual Machines with guest OSs, where each Guest OS may represent a Physical Network Function. 
	This document presents the VNF YANG Service Model (VYSM) to manage from an Orchestrator the Network Function Virtualization Infrastructure inside the uCPE.
      </t>
 
    </section>
    
    <section title="Terminology"
	    anchor="Terminology">
      <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">RFC 2119</xref>.
      </t>
      <t>
	Link - is an entity that enables link layer communication of nodes.       
      </t>
      <t>
	Port - node connector to the link.
     </t>
     <t>
	NE - Network Element.
     </t>
     <t>
	NSYM - Network Service Yang Module.
     </t>
     <t>
	VYSM - VNF YANG Service Model.
     </t>
    </section>
    <section
	title="Universal CPE"
	anchor="uCPE">
	<t>
		Firstly, this document defines the platform that is controlled with VYSM - universal CPE (uCPE). The uCPE as harware with x86 capabilities that is generally running Linux distibution with additinal virtualisation layer. Virtualization layer provides virtual compute, virtual storage and virtual network resources. Each VNF runnning in the uCPE requires the amount of virtual resources (for example: 4 vCPUs, 4GB RAM, 40GB storege, 4 vPorts). VNFs MAY be interconnected between each other and physical ports via Virtual Networks. The figure below presents the uCPE architecture.
	</t> 
	<t>
        <figure align="center">
          <artwork align="center">
		<![CDATA[

----------------------------------------|--------------
VNF1		VNF2		VNF3	|	
----------------------------------------|
Virtual		Virtual		Virtual	| uCPE software
Compute		Storage		Networks|
----------------------------------------|---------------
PHY x86 	RAM+PHY		PHYsical| uCPE Hardware			
processor	storage 	ports	|

	
		]]>
          </artwork>
        </figure>

	</t>

   </section>

    <section title="Virtual Network Function YANG Service Model"
	    anchor="service">
	<t>
	Secondly, this document defines and classifies the VYSM as Network Service YANG Module(NSYM) layer component <xref target="RFC8199">RFC 8199</xref>. Thus it inherits the characteristics of the NSYM Layer.
	VYSM is a modeled representation of the specific service requirements. It provides abstraction of services configuration and operations 
	that MAY be implemented in Network Elemets(NEs). Thus VYSM does not describe all configuration to be performed on the devices, but provides
	the configuration that is required for the "Network Service to Network Element(s)" decomposition process <xref target="RFC8199">RFC 8199</xref>.
	Example of the decomposition is presented in  the figure below. 
	</t>
	<t>
		The Network Service YANG module exposes the configuration commands via the Northbound interfaces
		of the orchestrator. Therefore the set of the commands modeled in the VYSM can be inputed via Notrhbound interfaces(for example CLI).
		In the example the command "vm VNF1" is passed via Northbound interface to the orchestrator. It defines the virtual machine name. 
		Further the same configuration MAY be transormed to the one or multiple Network Element payloads (for example xml for NETCONF) that carry an equivalent of commands such as "nf nf-name VNF1"

	</t>
	<t>
        <figure align="center">
          <artwork align="center">
		<![CDATA[

		             +-+-+-+-+-+-+-+-+-+                                                                                                                       
                             |                 |                                                                                                                       
                             |  config t       |                                                                                                                       
                             |      vm VNF1    |                                                                                                                       
                             +-+-+-+-+-+-+-+-+-+                                                                                                                       
                                      #                                                                                                                                
                                      #                                                                                                                                
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
:                                                                   :
:  +-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+                             :
:  |  Network Service YANG Module     |                             :
:  +-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+                             :
:                   #                               		    :
:     ##############################               orchestrator     :
:     #             #              #                                :
: '---------' '------------' '-----------'                          :
: 'Module1  ' ' Module 2   ' '  Module3  ' <= Network Element 	    :
: '---------' '------------' '-----------'    YANG Modules          : 
:      #             #               #                              :
:      #             #               #######################        :
:      ####          ##############                        #        :
:	  #                       #                        #        :
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
          #                       #                        #         
 Network  #  element 1    Network # element 2      Network # element3
++-+-+-+-+-+-+-+-+-+-+  -+-+-+-++-+-+-+-+-+-+-+-+-  +-+-+-+-+-+-+-+-+
| domains domain VNF1|  |tenants tenant name VNF1|  |nf nf-name VNF1|
++-+-+-+-+-+-+-+-+-+-+  -+-+-+-++-+-+-+-+-+-+-+-+-  +-+-+-+-+-+-+-+-+

		]]>
          </artwork>
        </figure>

	</t>
    </section>
    
     <section 
        title="VNF YANG Service Model tree diagram overview"
	anchor="Overview">
      <t>
	This section provides an overview of the VNF Service YANG Model (VSYM) that MAY be made with "pyang" utility. The figure below presents the tree diagram of VYSM. 
      </t>

      <t>
        <figure align="center">
          <artwork align="center">
            <![CDATA[ 
module: ietf-vysm
  +--rw virtualization* [name]
     +--rw name          string
     +--rw device*       string
     +--rw links* [link]
     |  +--rw link    string
     +--rw interfaces* [interface]
     |  +--rw interface    string
     |  +--rw ports* [port]
     |     +--rw port    string
     |     +--rw link?   -> ../../../links/link
     +--rw switches* [switch]
     |  +--rw switch    string
     |  +--rw ports* [port]
     |     +--rw port    string
     |     +--rw name?   string
     |     +--rw link?   -> ../../../links/link
     +--rw vms* [vm]
        +--rw vm             string
        +--rw ports* [port]
        |  +--rw port    string
        |  +--rw name?   string
        |  +--rw link?   -> ../../../links/link
        +--rw ram?           string
        +--rw cpu?           string
        +--rw storages* [id]
        |  +--rw id          string
        |  +--rw location?   string
        +--rw day0-config
           +--rw location?        string
           +--rw day0-var-path?   string
           +--rw variable* [name]
              +--rw name     string
              +--rw value?   string
	]]>
          </artwork>
        </figure> 
      </t>
  
	</section> 
    <section 
	    title="Specification of the VNF YANG Service Model"
	    anchor="Specification" >
      <t>
	This section presents the specification of the VYSM.
      </t>
	  
     <t>
        <figure align="center">
          <artwork align="center">
            <![CDATA[ 
<CODE BEGINS> file "ietf-vysm@2018-07-01.yang"
module ietf-vysm {
  namespace "urn:ietf:params:xml:ns:yang:ietf-vysm";
  prefix ietf-vysm;
	organization 
	"SFR/ALTICE";
 	contact 
		"Dmytro Shytyi
		EMail:ietf.dmytro@shytyi.net";
	description
		"This is a Network Function Virtualization (NFV) YANG 
		service model.";	
	revision 2018-07-01 {
		description 
		"Initial revision.";
		reference 
        "draft-shytyi-netmod-vysm-01";
	}

  list virtualization {
    key name;
    leaf name {
		type string;
  		description "Name of the instance of the service";
    }

    // may replace this with other ways of refering to the devices.
    leaf-list device {
		type string;
		description "List of the devices in available in the
		orchestrator";
    }
	
  list links{
		key link;
		leaf link{
			type string;
		description "Name of the virtual link from the pool
		of the links";
		}
	  description "Pool of the virtual links that connect VMs and 
	  Interfaces";
	}
	list interfaces{
		key interface;
		leaf interface{
			type string;
			 description "Name of physical interface";
		}
		list ports{
			key port;
			leaf port{
				type string;
			description "Name of the connector";
			}
			leaf link{
				type leafref{
					path "../../../links/link";
				}
			  description "Link that is connected to 
			  the port via connector";
			}
			description "Set of the connectors the 
			physical interface has";
		}
		description "Set of physical interfaces";
	}
	list switches{
	  key switch;
		leaf switch{
			type string;
			description "Name of the forwarding domain";
		}
		list ports{
			key port;
			leaf port{
				type string;
				description "Name of the connector";
			}
			leaf name{
			  type string;
				description "Name of the subconnector";
			}
			leaf link{
				type leafref{
					path "../../../links/link";
				}
			description "Link that is connected to the
			switch via port";
			}
		  description "Set of the connectors the 
		  forwarding domain has";
		}
		description "Set of the forwarding domains";

	}
	
	list vms{
		key vm;
		leaf vm{
			type string;
		description "Name of the Virtual Machine";
		}
		list ports{
			key port;
			leaf port{
				type string;
				description "Name of the connector";
			}
			leaf name{
				type string;
				description "Name of the subconnector";
			}
			leaf link{
				type leafref{
					path "../../../links/link";
				}
				description "Link that connects the
				VM with a switch or	Interface 
				via connector";
			}
		  description "Set of Virtual Machine connectors";
		}

		leaf ram{
			type string;
			description "Amount of memory to allocate for
			the Guest OS";
		}
		leaf cpu{
			type string;
			description "Amount of cpus to allocate for the
			Guest OS";
		}
		list storages{
			key id;
			leaf id{
				type string;
				description "Name of the Storage";
			}
			leaf location{
				type string;
				description "External location where
				the image is saved.";
			}
			description "Virtual storge of the image 
			for the Virtual Machine";
		}
		container day0-config{
		      leaf location{
		        type string;
		        description "0day configuration location";
		      }
		      leaf day0-var-path{
		        type string;
		        description "path of the file that contains the
		        0day variables";
		      }
		      list variable{
		        key name;
		        leaf name{
		          type string;
		          description "variable name";
		        }
		        leaf value{
		          type string;
		          description "variable value";
			  }
		      description "list of variables";
		      }
		      description "0day configuration:init config";
		
		}
		description "Set of the Virtual Machines configured 
		on the universal Customer-Premises Equipment";
	}
	description "This is an RFS skeleton service";
  }
  }
}
<CODE ENDS>
   	]]>
          </artwork>
        </figure>
      </t>

 
    </section>


    <!-- Possibly a 'Contributors' section ... -->

    <section anchor="Security" title="Security Considerations">
    <t>
      At this time, no security considerations are addressed by this
      memo.
    </t>
    </section>    

    <section anchor="IANA" title="IANA Considerations">
      <t>
	No request to IANA at this time.
      </t>
    </section>

    <section anchor="Acknowledgements"
             title="Acknowledgements">
      <t>
	  At this time, no acknowledgements are addressed by this
      memo.
      </t>

    </section>

  </middle>


  <back>
    <references title="Normative References">

      <?rfc
	include="http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119"
	?>
      <?rfc
	include="http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8199"
     	?>

    </references>

    
  </back>
</rfc>
