<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC3986 SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3986.xml">
<!ENTITY I-D.xia-sdnrg-nemo-language SYSTEM "http://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.draft-xia-sdnrg-nemo-language-04.xml" >
]>
<?xml-stylesheet type="text/xsl" href="http://xml.resource.org/authoring/rfc2629.xslt" ?>
<!-- ?xml-stylesheet type="text/xsl" href="file://./rfc2629.xslt" ? -->
<!-- used by XSLT processors -->
<!-- OPTIONS, known as processing instructions (PIs) go here. -->
<!-- For a complete list and description of PIs,
please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable PIs that most I-Ds might want to use. -->
<?rfc strict="yes" ?> <!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC): -->
<?rfc toc="yes"?> 
<?rfc tocdepth="3"?> <!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references: -->
<?rfc symrefs="yes"?> <!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="no" ?> <!-- sort the reference entries alphabetically -->
<!-- control vertical white space: 
(using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?> <!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?> <!-- keep one blank line between list items -->
<!-- end of popular PIs -->
<rfc category="info" docName="draft-aranda-nfvrg-recursive-vnf-03" ipr="trust200902">
<front>
  <title abbrev="High-level VNFDs with NEMO">High-level VNF Descriptors using NEMO</title>
  <!-- include author(s) here -->
  <author initials="P. A." surname="Aranda Gutierrez"
          fullname="Pedro A. Aranda Gutierrez">
	<organization abbrev="UC3M">
      Universidad Carlos III Madrid
	</organization>
	<address>
	  <postal>
		<street/>
		<city>Leganes</city>
		<code>28911</code>
		<country>Spain</country>
      </postal>
	  <email>paranda@it.uc3m.es</email>
	</address>
  </author>
  <author initials="D. R." surname="Lopez"
          fullname="Diego R. Lopez">
	<organization abbrev="Telefonica">
      Telefonica I+D
	</organization>
	<address>
      <postal>
		<street>Zurbaran, 12</street>
		<city>Madrid</city>
		<code>28010</code>
		<country>Spain</country>
      </postal>
      <email>diego.r.lopez@telefonica.com</email>
	</address>
  </author>
  <author initials="S." surname="Salsano"
          fullname="Stefano Salsano">
	<organization abbrev="Univ. of Rome Tor Vergata/CNIT">
      Univ. of Rome Tor Vergata/CNIT
	</organization>
	<address>
	  <postal>
		<street>Via del Politecnico, 1</street>
		<city>Rome</city>
		<code>00133</code>
		<country>Italy</country>
      </postal>
	  <email>stefano.salsano@uniroma2.it</email>
	</address>
  </author>
  <author initials="E." surname="Batanero"
          fullname="Elena Batanero ">
	<organization abbrev="Telefonica">
      Telefonica I+D
	</organization>
	<address>
      <postal>
		<street>Zurbaran, 12</street>
		<city>Madrid</city>
		<code>28010</code>
		<country>Spain</country>
      </postal>
      <email>elena.batanerogarcia@telefonica.com</email>
	</address>
  </author>
  <date year="2017" month="March" day="09"/>
  <area>Area</area>
  <workgroup>NFVRG</workgroup>
  <!-- include keywords here -->
  <keyword>VNF</keyword>
  <keyword>NFV</keyword>
  <keyword>NEMO</keyword>
  <keyword>Recursiveness</keyword>
  <keyword>Assembly language</keyword>
  <keyword>Programming languages</keyword>
  <keyword>Human readable</keyword>
  <abstract>
  <t>Current efforts in the scope of Network Function Virtualisation(NFV) propose YAML-based descriptors for Virtual Network Functions (VNFs) and for their composition in Network Services (NS) These descriptors are human-readable but hardly understandable by humans. On the other hand, there has been an effort proposed to the IETF to define a human-readable (and understandable) representation for networks, known as NEMO. In this draft, we propose a simple extension to NEMO to accommodate VNF Descriptors (VNFDs) in a similar manner as inline assembly is integrated in higher-level programming languages.</t>
<t>This approach enables the creation of recursive VNF forwarding graphs in Service Descriptors, practically making them recursive.</t>
  </abstract>
</front>
<middle>
  <section anchor='intro' title='Introduction'>
  <t>
    Currently, there is a lot of on-going activity to deploy NFV in the network. From the point of view of the orchestration, Virtual Network Functions are blocks that are deployed in the infrastructure as independent units. Following the reference architectural model proposed in <xref target='ETSI-NFV-MANO' />, VNFs provide for one layer of components (VNF components(VNFCs)) below, i.e. a set of VNFCs accessible to a VNF provider can be composed into VNFs. However, there is no simple way to use existing VNFs as components in VNFs with a higher degree of complexity.  In addition, Network Service Descriptors (NSD) and VNF Descriptors (VNFDs) specified in <xref target='ETSI-NFV-MANO' /> and used in different open source MANO frameworks are YAML-based files, which despite being human readable, are not easy to understand. 
  </t>
  <t>On the other hand, there has been recently an attempt to work on a modelling language for networks or Network Modelling (NEMO) language. This language is human-readable and provides constructs that support recursiveness. In this draft, we propose an addition to NEMO to make it interact with VNFDs supported by a NFV MANO framework. This integration creates a new language for VNFDs that is recursive, allowing VNFs to be created based on the definitions of existing VNFs.</t>
  <t>This draft uses two example formats to show how low level descriptors can be imported into NEMO. The first one is the format used in the <eref target='https://github.com/nfvlabs/openmano'>OpenMANO</eref> <!-- and <eref target='https://osm.etsi.org/'>OSM</eref> --> framework. The second one follows strictly the specifications provided by ETSI NFV ISG in <xref target='ETSI-NFV-MANO' />. Conceptually, other descriptor formats like TOSCA can also be used at this level. </t>
  </section>
  <section anchor='terminology' title='Terminology and abbreviations'>
  <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"/>.</t>
  </section>
  <section anchor='prior' title='Prior art'>
  <section anchor='vnfds' title='Virtual network function descriptors'>
    <t>Virtual network function descriptors (VNFDs) are used in the Management and orchestration (MANO) framework of the ETSI NFV to achieve the optimal deployment of virtual network functions (VNFs). The Virtual Infrastructure Manager (VIM) uses this information to place the functions optimally. VNFDs include information of the components of a specific VNF and their interconnection to implement the VNF, in the form of a forwarding graph. In addition to the forwarding graph, the VNFD includes information regarding the interfaces of the VNF. These are then used to connect the VNF to either physical or logical interfaces once it is deployed.</t>
    <t>There are different MANO frameworks available. For this draft, we will first concentrate on the example of <eref target='https://github.com/nfvlabs/openmano'>OpenMANO</eref>, which uses a <eref target='yaml.org'>YAML</eref> representation similar to the one specified in <xref target='ETSI-NFV-MANO' />. Then we will provide an example using the exact format specified in <xref target='ETSI-NFV-MANO' />.</t> 
        <section anchor='openmano-vnfds' title='OpenMANO VNFDs'>
           <t>Taking the example from the (public) OpenMANO github repository, we can easily identify the virtual interfaces of the sample VNFs in their descriptors:</t>
    <figure title="Sample VNF and descriptor (source: OpenMANO github)" align="center" anchor="vnfd"><preamble/><artwork><![CDATA[
       +----------------------------+
       |                            |
 mgt0  |     +---------------+      |   ge0
       |     |               |      |
    ---+-----+  Template VM  +------+------
       |     |               |      |
       |     +---+--------+--+      |
       |         |        |         |
       +---------+--------+---------+
                 |        |
               xe0       xe1

vnf:
    name: TEMPLATE
    description: This is a template to help in the creation of 
    # class: parent      # Optional. Used to organize VNFs
    external-connections:
    -   name:              mgmt0
        type:              mgmt
        VNFC:              TEMPLATE-VM
        local_iface_name:  mgmt0
        description:       Management interface
    -   name:              xe0
        type:              data
        VNFC:              TEMPLATE-VM
        local_iface_name:  xe0
        description:       Data interface 1
    -   name:              xe1
        type:              data
        VNFC:              TEMPLATE-VM
        local_iface_name:  xe1
        description:       Data interface 2
    -   name:              ge0
        type:              bridge
        VNFC:              TEMPLATE-VM
        local_iface_name:  ge0
        description:       Bridge interface
]]></artwork><postamble/></figure>
     </section>
         <section anchor='ETSI-vnfds' title='ETSI MANO VNFDs'>
           <t> In this example we consider the VNF represented in Figure 6.4 of <xref target='ETSI-NFV-MANO' />. Its internal diagram, including a VNF component, is represented in Figure <xref target='ETSI-MANO-example' />. A YAML representation of the VNF Descriptor is reported in Figure <xref target='ETSI-MANO-vnfd-example' />. The topology of the interconnection of VNFs is expressed by using the abstraction of Virtual Links, which interconnect Connection Points of the VNFs. The Virtual Links are described by Virtual Link Descriptors (VLD) files. An example YAML representation of the Virtual Link VL1 in the example VNF is reported in Figure <xref target='ETSI-MANO-vnfd-example' />. In order to understand the topology, a (potentially large) set of VNFD and VLD files needs to be analysed. For a human programmer of the service, this representation is not friendly to write and very hard to read/understand/debug.</t>
           <figure title="VNF example" align="center" anchor="ETSI-MANO-example"><preamble/><artwork><![CDATA[
+----------------------------+
|            VNF1            |
+----------------------------+
|                            |
|       +-------------+      |
|       |   VNFC11    |      |
|       +-------------+      |
|       |             |      |
|       |   +----+    |      |
|       |   |CP14|    |      |
|       |   +-+--+    |      |
|       |     |       |      |
|       +-------------+      |
|             |              |
|          +--+----+         |
|     +----+  VL11 +---+     |
|     |    +--+----+   |     |
|     |       |        |     |
|   +-+--+  +-+--+  +--+-+    |
|   |CP11|  |CP12|  |CP13|    |
|   +-+--+  +-+--+  +--+-+    |
|     |       |        |     |
+----------------------------+
      |       |        |
 +----+--+ +--+----+ +-+-----+
 |  VL1  | |  VL2  | |  VL3  |
 +-------+ +-------+ +-------+
]]></artwork><postamble/></figure>

           <figure title="ETSI MANO compliant VNF descriptor example" align="center" anchor="ETSI-MANO-vnfd-example"><preamble/><artwork><![CDATA[
#######################################
# VNF Descriptor of a VNF called vnf1
#######################################
id: vnf1
description_version: '0.1'
vendor: netgroup
version: '0.1'
connection_point:
- id: cp11
  type: ''
  virtual_link_reference: vl11
- id: cp12
  type: ''
  virtual_link_reference: vl11
- id: cp13
  type: ''
  virtual_link_reference: vl11
vdu:
- id: vdu11
  computation_requirement: ''
  virtual_memory_resource_element: ''
  virtual_network_bandwidth_resource: ''
  vnfc:
  - id: vnfc11
    connection_point:
    - id: cp14
      type: NIC
      virtual_link_reference: vl11
virtual_link:
- id: vl11
  connection_points_references:
  - cp11
  - cp12
  - cp13
  - cp14
  connectivity_type: ' E-Line'
  root_requirement: ''
]]></artwork><postamble/></figure>

           <figure title="ETSI MANO compliant Virtual Link descriptor example" align="center" anchor="ETSI-MANO-vld-example"><preamble/><artwork><![CDATA[
############################################
# Virtual Link Descriptor of a VL called vl1
############################################
id: vl1
descriptor_version: '0.1'
test_access: none
vendor: netgroup
connection:
- cp01
- cp11
connectivity_type: E-LAN
number_of_endpoints: 2
root_requirement: ''

]]></artwork><postamble/></figure>

         </section>
      </section>
  
  <section anchor='nemo' title='NEMO'>
    <t>
    The Network Modeling (NEMO) language is described in <xref target='I-D.xia-sdnrg-nemo-language' />. It provides a simple way of describing network scenarios. The language is based on a two-stage process. In the first stage, models for nodes, links and other entities are defined. In the second stage, the defined models are instantiated. The NEMO language also allows for behavioural descriptions. A variant of the NEMO language is used in the <eref target='https://wiki.opendaylight.org/view/NEMO:Main'>OpenDaylight NEMO northbound API</eref>.
    </t>
    <t>
    NEMO allows to define NodeModels, which are then instantiated in the infrastructure. NodeModels are recursive and can be build with basic node types or with previously defined NodeModels. An example for a script defining a NodeModel is shown below:
    </t>
<figure title="Creating a NodeModel in NEMO" align="left" anchor="nodemodel-nemo">
<preamble/>
<artwork>
<![CDATA[
CREATE NodeModel dmz
  Property string: location-fw, string: location-n2,
    string: ipprefix, string: gatewayip, string: srcip,
    string: subnodes-n2;
  Node fw1
    Type fw
    Property location: location-fw,
      operating-mode: layer3; 
...]]>
</artwork>
<postamble/>
    </figure>
  </section>
  </section>
  <section anchor='additional' title='Additional requirements on NEMO'>
  <t>
    In order to integrate VNFDs into NEMO, we need to take into account two specifics of VNFDs, which cannot be expressed in the current language model. Firstly, we need a way to reference the file which holds the VNFD provided by the VNF developer. This will normally be a universal resource identifier (URI). Additionally, we need to make the NEMO model aware of  the virtual network interfaces.
  </t>
  <section anchor='nodemodel-vnfd' title='Referencing VNFDs in a NodeModel'>
    <t>
    As explained in the introduction, in order integrate VNFDs into the NEMO language in the easiest way we need to reference the VNFD as a Universal Resource Identifier (URI) as defined in <xref target='RFC3986'>RFC 3986</xref>. To this avail, we define a new element in the NodeModel to import the VNFD:
    </t>
    <figure><artwork><![CDATA[
CREATE NodeModel <node_model_name> VNFD <vnfd_uri>;]]></artwork></figure>
  </section>
  <section anchor='nodemodel-ifs' title='Referencing the network interfaces of a VNF in a NodeModel'>
    <t>As shown in <xref target='vnfd' />, VNFDs include an exhaustive list of interfaces, including the interfaces to the management network. However, since these interfaces may not be significant for specific network scenarios and since interface names in the VNFD may not be adequate in NEMO, we propose to define a new entity, namely the ConnectionPoint, which is included in the node model .</t>
    <figure><artwork><![CDATA[
CREATE NodeModel <node_model_name>;
  ConnectionPoint <cp_name> at VNFD:<iface_from_vnfd>;
]]></artwork></figure>
  </section>
  <section anchor='example' title='An example'>
    <t>Once these two elements are included in the NEMO language, it is possibly to recursively define NodeModel elements that use VNFDs in the lowest level of recursion. Firstly, we create NodeModels from VNFDs:</t>
<figure title="Import from a sample VNFD from the OpenMANO repository"><artwork><![CDATA[
CREATE NodeModel sample_vnf VNFD https://github.com/nfvlabs
/openmano.git/openmano/vnfs/examples/dataplaneVNF1.yaml;
    ConnectionPoint data_inside at VNFD:ge0;
    ConnectionPoint data_outside at VNFD:ge1;
]]></artwork><postamble/>
</figure>
<t>Then we can reuse these NodeModels recursively to create complex NodeModels:</t>
<figure title="Create a composed NodeModel">
  <preamble/>
    <artwork>
      <![CDATA[
CREATE NodeModel complex_vnf;
    Node input_vnf Type sample_vnf;
    Node output_vnf Type shaper_vnf;
    ConnectionPoint input;
    ConnectionPoint output
    Connection icon Type p2p Endnodes input, input_vnf:data_inside;
    Connection ocon Type p2p Endnodes output, output_vnf:wan;  
    Connection intn Type p2p input_vnf:data_outside, output_vnf:lan;
      ]]>
    </artwork>
  <postamble/>
</figure>
<t>This NodeModel definition creates a composed model linking the sample_vnf created from the VNFD with a hypothetical shaper_vnf defined elsewhere. This definition can be represented graphically as follows:</t>
<figure anchor='extension'>
    <artwork>
      <![CDATA[
    +--------------------------------------------------------+
    |       complex_vnf                                      |
    |      +--------------+           +--------------+       |
 input     |              |           |              |     output
    +------+  sample_vnf  +-----------+  shaper_vnf  +-------+
    |      |              |           |              |       |
    |      +--------------+           +--------------+       |
    |  data_inside   data_outside   lan           wan        |
    +--------------------------------------------------------+
      ]]>
    </artwork>
</figure>
<t>In ETSI NFV, a network service is described by one or more VNFs that are connected through one or more network VNFFGs. This is no more than what is defined in the composed NodeModel shown if <xref target='extension' />. By using NEMO, we provide a simple way to define VNF forwarding graphs (VNF-FGs) in network service descriptors in a recursive way.</t>
  </section>
  </section>
  <section anchor='concl' title='Conclusion'>
  <t>With the strategy defined in this document, we are able to link a low-level VNF description into a high-level description language for networks like NEMO. Effectively, we are introducing recursiveness in VNFDs, allowing complex service descriptors to be built by reusing previously tested descriptors graphs as building blocks.</t>
  <t>Although we have used the OpenMANO descriptor format in this document, other descriptors and concepts (i.e. as those used by <eref target='http://docs.oasis-open.org/tosca/tosca-nfv/v1.0/tosca-nfv-v1.0.html' >TOSCA</eref>) can also be used as the lowest level in this extension to the NEMO language. </t>
  </section>
  <section anchor='iana' title='IANA Considerations'>
  <t>This draft includes no request to IANA.</t>
  </section>
  <section anchor='sec' title='Security Considerations'>
    <t>The VNFD construct as IMPORT allows referencing external resources. Developers using it in NEMO scripts are advised to verify the source of those external resources, and whenever possible, rely on sources with a verifiable identity through cryptographic methods.</t>
  </section>
  <section anchor='acks' title='Acknowledgement'>
    <t>This work has been partially performed in the scope of the SUPERFLUIDITY project, which has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreement No.671566 (Research and Innovation Action).</t>
  </section>
</middle>
<back>
  <references title="Normative References">
    &RFC2119;
    &RFC3986;
    <reference anchor="ETSI-NFV-MANO">
      <front>
      <title>Network Functions Virtualisation (NFV); Management and Orchestration</title>
      <author>
        <organization>ETSI</organization>
      </author>
      <date month="December" year="2014" />
      </front>
      <seriesInfo name="ETSI" value="GS NFV-MAN 001 V1.1.1 (2014-12)" />
     </reference>

  </references>
  <references title="Informative References">
  &I-D.xia-sdnrg-nemo-language;
  <!-- include other bibrefs here -->
  </references>
</back>
</rfc>
