§Use case: ref: https://wiki.onap.org/display/DW/vCPE+with+Tosca+VNF+Test+Guide

This example show the mapping NS.CSAR to SOL001 v2.5.1.


vCPE NSD template
tosca_definitions_version: tosca_simple_yaml_1_2
metadata:
  nsd_invariant_id: c3887fb3-d1b2-477f-86c4-fd641ee9a7cf
  nsd_name: vcpe
  nsd_file_structure_version: "1.0.0"
  nsd_designer: ONAP
  nsd_release_date_time: "2018-11-05 12:00:00"
description: VCPE Network Service
imports:
  - Definitions/etsi_nfv_sol001_nsd_2_5_1_types.yaml
node_types:
  onap.vcpe.NS:
    derived_from: tosca.nodes.nfv.NS
    properties:
      descriptor_id:
        type: string
        constraints: [ valid_values: [ b1bb0ce7-ebca-4fa7-95ed-4840d70a1111 ] ]
        default: b1bb0ce7-ebca-4fa7-95ed-4840d70a1111
      designer:
        type: string
        constraints: [ valid_values: [ MyServiceONAP] ]
        default: MyServiceONAP
      name:
        type: string
        constraints: [ valid_values: [ VCPEService ] ]
        default: VCPEService
      version:
        type: string
        constraints: [ valid_values: [ '1.0.0' ] ]
        default: '1.0.0'
      invariant_id:
        type: string
        constraints: [ valid_values: [ c3887fb3-d1b2-477f-86c4-fd641ee9a7cf] ]
        default: c3887fb3-d1b2-477f-86c4-fd641ee9a7cf
      flavour_id: 
        type: string
        constraints: [ valid_values: [ simple ] ]
        default: simple
  
topology_template:
  substitution_mappings:
    node_type: onap.vcpe.NS
    requirements:
      #virtual_link:  #what is external connection of the VNF?

  node_templates:
    vcpe_service:
      type: onap.vcpe.NS
      properties:
        descriptor_id: b1bb0ce7-ebca-4fa7-95ed-4840d70a1111
        designer: MyServiceONAP
        name: VCPEService
        version: '1.0.0'
        invariant_id: c3887fb3-d1b2-477f-86c4-fd641ee9a7cf
        flavour_id: simple
      interfaces:
        Nslcm: 
          instantiate:
            implementation: instantiate.workflow.yaml
          terminate:
            implementation: terminate.workflow.yaml
    
    vCPE_Infrastructure_GW_demo_app:
      type: tosca.nodes.nfv.VNF
      properties:
        descriptor_id: 3fca3543-07f5-492f-812c-ed462e4f94f4
        provider: onap
        product_name: vcpe_vgw
        software_version: '1.0.0'
        descriptor_version: '1.0.0'
        flavour_id: simple
        flavour_description: simple
        vnfm_info: ['etsivnfm:v2.5.1']
        vnf_profile:
          instantiation_Level: level_1
          min_number_of_instances: 1
          max_number_of_instances: 3
      requirements:
        - virtual_link: vcpe_public_net

    vCPE_Infrastructure_vGMUX_demo_app:
      type: tosca.nodes.nfv.VNF
      properties:
        descriptor_id: 0408f076-e6c0-4c82-9940-272fddbb82de
        provider: onap
        product_name: vcpe_vgmux
        software_version: '1.0.0'
        descriptor_version: '1.0.0'
        flavour_id: simple
        flavour_description: simple
        vnfm_info: ['etsivnfm:v2.5.1']
        vnf_profile:
          instantiation_Level: level_1
          min_number_of_instances: 1
          max_number_of_instances: 3
      requirements:
        - virtual_link: vcpe_public_net

    vCPE_Infrastructure_demo_app:
      type: tosca.nodes.nfv.VNF
      properties:
        descriptor_id: b1bb0ce7-2222-4fa7-95ed-4840d70a1100
        provider: onap
        product_name: vcpe_infra
        software_version: '1.0.0'
        descriptor_version: '1.0.0'
        flavour_id: simple
        flavour_description: simple
        vnfm_info: ['etsivnfm:v2.5.1']
        vnf_profile:
          instantiation_Level: level_1
          min_number_of_instances: 1
          max_number_of_instances: 3
      requirements:
        - virtual_link: vcpe_public_net

    vCPE_Infrastructure_Metro_vBNG_demo_app:
      type: tosca.nodes.nfv.VNF
      properties:
        descriptor_id: b1bb0ce7-2222-4fa7-95ed-4840d70a1101
        provider: onap
        product_name: vcpe_vbng
        software_version: '1.0.0'
        descriptor_version: '1.0.0'
        flavour_id: simple
        flavour_description: simple
        vnfm_info: ['etsivnfm:v2.5.1']
        vnf_profile:
          instantiation_Level: level_1
          min_number_of_instances: 1
          max_number_of_instances: 3
      requirements:
        - virtual_link: vcpe_public_net

    vCPE_Infrastructure_BGREMU_demo_app:
      type: tosca.nodes.nfv.VNF
      properties:
        descriptor_id: b1bb0ce7-2222-4fa7-95ed-4840d70a1102
        provider: onap
        product_name: vcpe_vbrgemu
        software_version: '1.0.0'
        descriptor_version: '1.0.0'
        flavour_id: simple
        flavour_description: simple
        vnfm_info: ['etsivnfm:v2.5.1']
        vnf_profile:
          instantiation_Level: level_1
          min_number_of_instances: 1
          max_number_of_instances: 3
      requirements:
        - virtual_link: vcpe_public_net

    vcpe_public_net:
      type: tosca.nodes.nfv.NsVirtualLink
      properties:
        connectivity_type:
          layer_protocol: ipv4
        # version: 1.0.0 #not defined in SOL001 v2.5.1
        vl_profile:
          max_bit_rate_requirements:
            root: 10000000
            leaf: 10000000
          min_bit_rate_requirements:
            root: 10000000
            leaf: 10000000
          # networkName: oam-zte #not defined in SOL001 v2.5.1
          # cidr: 172.30.23.0/24 #not defined in SOL001 v2.5.1
          # dhcpEnabled: false   #not defined in SOL001 v2.5.1