<commit_before>VNF Descriptor Template Guide
=============================
Overview
--------

This document explains VNFD template structure and its various fields based
on TOSCA standards `V1.0 CSD 03 <http://docs.oasis-open.org/tosca/tosca-nfv/
v1.0/tosca-nfv-v1.0.html>`_.

The behavioural and deployment information of a VNF in Tacker is defined in a
template known as VNF Descriptor (VNFD). The template is based on TOSCA
standards and is written in YAML. It is on-boarded in a VNF catalog.

Each VNFD template will have below fields:

::

    tosca_definitions_version:
       This defines the TOSCA definition version on which the template is based.
       The current version being tosca_simple_profile_for_nfv_1_0_0.

    tosca_default_namespace:
       This is optional. It mentions default namespace which includes schema,
       types version etc.

    description:
       A short description about the template.

    metadata:
       template_name: A name to be given to the template.

    topology_template:
       Describes the topology of the VNF under node_template field.
       node_template:
           Describes node types of a VNF.
           VDU:
               Describes properties and capabilities of Virtual Deployment
               Unit.
           CP:
               Describes properties and capabilities of Connection Point.
           VL:
               Describes properties and capabilities of Virtual Link.

For examples, please refer sample VNFD templates available at `GitHub <https:
//github.com/openstack/tacker/tree/master/samples/tosca-templates/vnfd>`_.

Node types
----------
A VNF includes **VDU/s**, **connection point/s** and **virtual link/s**. Hence
a valid VNFD must have these 3 components. Each component is referred as a
node and can have certain type, capabilities, properties, attributes and
requirements. These components are described under **node_templates** in the
VNFD template. **node_templates** is a child of **topology_template**.

VDU
---
Virtual Deployment Unit is a basic part of VNF. It is the VM that hosts the
network function.

:type:
    tosca.nodes.nfv.VDU.Tacker
:properties:
    Describes the properties like image to be used in VDU, availability zone in
    which VDU is to be spawned, management driver to be used to manage the VDU,
    flavor describing physical properties for the VDU to be spawned, monitoring
    policies for the VDU, providing user data in form of custom commands to the
    VDU. A complete list of VDU properties currently supported by Tacker are
    listed `here <https://github.com/openstack/tacker/blob/master/tacker/vnfm/
    tosca/lib/tacker_nfv_defs.yaml>`_ under **properties** section of
    **tosca.nodes.nfv.VDU.Tacker** field

Specifying VDU properties
^^^^^^^^^^^^^^^^^^^^^^^^^
A very simple VDU with 10 GB disk, 2 GB RAM, 2 CPUs, cirros image and in nova
availability zone can be described as:

::

  topology_template:
    node_templates:
      VDU1:
        type: tosca.nodes.nfv.VDU.Tacker
        properties:
          image: cirros-0.3.5-x86_64-disk
          availability_zone: nova<commit_msg>Fix broken link to tacker_nfv_defs in docs<commit_after>VNF Descriptor Template Guide
=============================
Overview
--------

This document explains VNFD template structure and its various fields based
on TOSCA standards `V1.0 CSD 03 <http://docs.oasis-open.org/tosca/tosca-nfv/
v1.0/tosca-nfv-v1.0.html>`_.

The behavioural and deployment information of a VNF in Tacker is defined in a
template known as VNF Descriptor (VNFD). The template is based on TOSCA
standards and is written in YAML. It is on-boarded in a VNF catalog.

Each VNFD template will have below fields:

::

    tosca_definitions_version:
       This defines the TOSCA definition version on which the template is based.
       The current version being tosca_simple_profile_for_nfv_1_0_0.

    tosca_default_namespace:
       This is optional. It mentions default namespace which includes schema,
       types version etc.

    description:
       A short description about the template.

    metadata:
       template_name: A name to be given to the template.

    topology_template:
       Describes the topology of the VNF under node_template field.
       node_template:
           Describes node types of a VNF.
           VDU:
               Describes properties and capabilities of Virtual Deployment
               Unit.
           CP:
               Describes properties and capabilities of Connection Point.
           VL:
               Describes properties and capabilities of Virtual Link.

For examples, please refer sample VNFD templates available at `GitHub <https:
//github.com/openstack/tacker/tree/master/samples/tosca-templates/vnfd>`_.

Node types
----------
A VNF includes **VDU/s**, **connection point/s** and **virtual link/s**. Hence
a valid VNFD must have these 3 components. Each component is referred as a
node and can have certain type, capabilities, properties, attributes and
requirements. These components are described under **node_templates** in the
VNFD template. **node_templates** is a child of **topology_template**.

VDU
---
Virtual Deployment Unit is a basic part of VNF. It is the VM that hosts the
network function.

:type:
    tosca.nodes.nfv.VDU.Tacker
:properties:
    Describes the properties like image to be used in VDU, availability zone in
    which VDU is to be spawned, management driver to be used to manage the VDU,
    flavor describing physical properties for the VDU to be spawned, monitoring
    policies for the VDU, providing user data in form of custom commands to the
    VDU. A complete list of VDU properties currently supported by Tacker are
    listed `here <https://github.com/openstack/tacker/blob/master/tacker/tosca/
    lib/tacker_nfv_defs.yaml>`_ under **properties** section of
    **tosca.nodes.nfv.VDU.Tacker** field

Specifying VDU properties
^^^^^^^^^^^^^^^^^^^^^^^^^
A very simple VDU with 10 GB disk, 2 GB RAM, 2 CPUs, cirros image and in nova
availability zone can be described as:

::

  topology_template:
    node_templates:
      VDU1:
        type: tosca.nodes.nfv.VDU.Tacker
        properties:
          image: cirros-0.3.5-x86_64-disk
          availability_zone: nova
{'fraction_non_alphanumeric': 0.08087764253683537, 'fraction_numerical': 0.007687379884689302, 'mean_word_length': 3.1357615894039736, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4038257', 'n_tokens_mistral': 1796, 'n_tokens_neox': 1754, 'n_words': 725}