Commit 825d4644 authored by Laurent Vreck's avatar Laurent Vreck
Browse files

Added the yaml example files extracted via the Tosca tools

parent 451dfff5
Loading
Loading
Loading
Loading
+69 −0
Original line number Diff line number Diff line
# A.10-01.yaml
tosca_definitions_version: tosca_simple_yaml_1_3

description: the service template of a PNFD

imports:
  - etsi_nfv_sol001_pnfd_types.yaml

node_types:
  MyCompany.examplePnf.1_0:
    derived_from: tosca.nodes.nfv.PNF
    properties:
      descriptor_id:
        type: string
        constraints: [ equal: b1bb0ce7-ebca-4fa7-95ed-4840d70a2233 ]
        default: b1bb0ce7-ebca-4fa7-95ed-4840d70a2233
      function_description:
        type: string
        constraints: [ equal: an example PNF ]
        default: an example PNF
      provider:
        type: string
        constraints: [ equal: MyCompany ]
        default: MyCompany
      version:
        type: string
        constraints: [ equal: '1.0' ]
        default: '1.0'
      descriptor_invariant_id:
        type: string
        constraints: [ equal: 1111-2222-ccaa-bbdd ]
        default: 1111-2222-ccaa-bbdd
      name:
        type: string
        constraints: [ equal: ExamplePnf ]
        default: ExamplePnf
    requirements:
      - virtual_link:
          capability: tosca.capabilities.nfv.VirtualLinkable

topology_template:
  substitution_mappings:
    node_type: MyCompany.examplePnf.1_0
    requirements:
      virtual_link: [ pnfExtCp_1, external_virtual_link ] 

  node_templates:
    pnf_mainPart:
      type: MyCompany.examplePnf.1_0
      properties:
        descriptor_id: b1bb0ce7-ebca-4fa7-95ed-4840d70a2233
        function_description: an example PNF
        provider: MyCompany
        version: '1.0'
        descriptor_invariant_id: 1111-2222-ccaa-bbdd
        name: ExamplePnf

    pnfExtCp_1:
      type: tosca.nodes.nfv.PnfExtCp
      properties:
        trunk_mode: false
        layer_protocols: [ ipv4 ]
        role: leaf
        description: External connection point to access this pnf
      requirements:
      # - external_virtual_link:
        - dependency: pnf_mainPart
  
+31 −0
Original line number Diff line number Diff line
# A.11-MyExampleNs.yaml
tosca_definitions_version: tosca_simple_yaml_1_3

description: my service
imports:
  - etsi_nfv_sol001_nsd_types.yaml  
  - MyExampleNs_Type.yaml # contains the NS node type definition


topology_template:
  inputs:
    flavour_id:
      type: string
      description: NS deployment flavour selected by the consumer. It is provided in the SOL005 API       

  node_templates: 
    myexampleNs:
        type: tosca.MyExampleNS
        directives:
          - substitute
        properties:
          descriptor_id: b1bb0ce7-ebca-4fa7-95ed-4840d70a1177
          designer: MyCompany
          name: ExampleService
          version: '1.0'
          invariant_id: 1111-2222-aaaa-bbbb
          flavour_id: {get_input: flavour_id }

        # requirements:
          #- virtual_link # mapped in lower-level templates
+63 −0
Original line number Diff line number Diff line
# A.11-MyExampleNs_Type.yaml
tosca_definitions_version: tosca_simple_yaml_1_3

description: type definition of tosca.MyExampleNS

imports:
  - etsi_nfv_sol001_nsd_types.yaml  # all of TOSCA NSD types as defined in ETSI GS NFVSOL 001

data_types:
  MyCompany.datatypes.nfv.NsInstantiateNsAdditionalParameters:
    derived_from: tosca.datatypes.nfv.NsOperationAdditionalParameters
    properties:
      parameter_1:
        type: string
        required: true
        default: value_1
      parameter_2:
        type: string
        required: true
        default: value_2

node_types:
  tosca.MyExampleNS:
    derived_from: tosca.nodes.nfv.NS
    properties:
      descriptor_id:
        type: string
        constraints: [ valid_values: [ b1bb0ce7-ebca-4fa7-95ed-4840d70a1177 ] ]
        default: b1bb0ce7-ebca-4fa7-95ed-4840d70a1177
      designer:
        type: string
        constraints: [ valid_values: [ MyCompany] ]
        default: MyCompany
      name:
        type: string
        constraints: [ valid_values: [ ExampleService ] ]
        default: ExampleService
      version:
        type: string
        constraints: [ valid_values: [ '1.0' ] ]
        default: '1.0'
      invariant_id:
        type: string
        constraints: [ valid_values: [ 1111-2222-aaaa-bbbb ] ]
        default: 1111-2222-aaaa-bbbb
      flavour_id: 
        type: string
        constraints: [ valid_values: [ small, big ] ]
        default: small
    requirements:
      - virtual_link:
          capability: tosca.capabilities.nfv.VirtualLinkable
          relationship: tosca.relationships.nfv.VirtualLinksTo
    interfaces:
      Nslcm:
        type: tosca.interfaces.nfv.Nslcm
        operations:
          instantiate:
            inputs: 
              additional_parameters:
                type: MyCompany.datatypes.nfv.NsInstantiateNsAdditionalParameters
                required: false
+83 −0
Original line number Diff line number Diff line
# A.11-MyExampleNs_big.yaml
tosca_definitions_version: tosca_simple_yaml_1_3

description: myExampleNs with big flavour
imports:
  - etsi_nfv_sol001_nsd_types.yaml  # all of TOSCA NSD types as defined in ETSI GS NFVSOL 001
  - MyExampleNs_Type.yaml # contains the NS node type definition
  - example_VNF1.yaml # uri of the yaml file which contains the tosca.nodes.nfv.example_VNF1 node type definition, this file might be included in the NSD file structure
  - example_VNF2.yaml # uri of the yaml file which contains the tosca.nodes.nfv.example_VNF2 node type definition, this file might be included in the NSD file structure
  - example_VNF3.yaml # uri of the yaml file which contains the tosca.nodes.nfv.example_VNF3 node type definition, this file might be included in the NSD file structure

topology_template:
  substitution_mappings:
    node_type: tosca.MyExampleNS
    substitution_filter:
      properties:  
        - flavour_id: { equal: big }
    requirements:
       virtual_link: [ VNF_1, virtual_link_2 ]  

  node_templates:
    MyExampleNS:
      type: tosca.MyExampleNS
      # properties:
        #
      interfaces:
        Nslcm:
          operations:
            instantiate:
              implementation: instantiate.workflow.yaml
            terminate:
              implementation: terminate.workflow.yaml
            scale:
              implementation: scale.workbook.yaml

    VNF_1:
      type: tosca.nodes.nfv.example_VNF1
      properties:
        # no property assignments needed for required properties that have a default value assigned in the node type definition, e.g. descriptor_id
        flavour_id: simple
        vnf_profile:
          instantiation_level: level_1
          min_number_of_instances: 2
          max_number_of_instances: 6
      requirements:
        - virtual_link_1: Ns_VL
        # - virtual_link_2: # map to virtual_link requirement of the NS node
    
    VNF_2:
      type: tosca.nodes.nfv.example_VNF2
      properties:
        flavour_id: simple
        vnf_profile:
          instantiation_level: level_1
          min_number_of_instances: 1
          max_number_of_instances: 3
      requirements:
        - virtual_link_1: Ns_VL

    VNF_3:
      type: tosca.nodes.nfv.example_VNF3
      properties:
        flavour_id: simple
        vnf_profile:
          instantiation_level: level_1
          min_number_of_instances: 1
          max_number_of_instances: 3
      requirements:
        - virtual_link_1: Ns_VL

    Ns_VL:
      type: tosca.nodes.nfv.NsVirtualLink
      properties:
        connectivity_type:
          layer_protocols: [ipv4]
          flow_pattern: mesh
        vl_profile:
          max_bitrate_requirements:
             root: 1000
          min_bitrate_requirements:    
             root: 1000

+69 −0
Original line number Diff line number Diff line
# A.11-MyExampleNs_small.yaml
tosca_definitions_version: tosca_simple_yaml_1_3

description: myExampleNs with small flavour
imports:
  - etsi_nfv_sol001_nsd_types.yaml  # all of TOSCA NSD types as defined in ETSI GS NFVSOL 001
  - MyExampleNs_Type.yaml # contains the NS node type definition
  - example_VNF1.yaml # uri of the yaml file which contains the tosca.nodes.nfv.example_VNF1 node type definition, this file might be included in the NSD file structure
  - example_VNF2.yaml # uri of the yaml file which contains the tosca.nodes.nfv.example_VNF2 node type definition, this file might be included in the NSD file structure

topology_template:
  substitution_mappings:
    node_type: tosca.MyExampleNS
    substitution_filter:
      properties:  
        - flavour_id: { equal: small }
    requirements:
       virtual_link: [ VNF_1, virtual_link_2 ]  

  node_templates:
    MyExampleNS:
      type: tosca.MyExampleNS
      # properties:
        #
      interfaces:
        Nslcm:
          operations:
            instantiate:
              implementation: instantiate.workflow.yaml
            terminate:
              implementation: terminate.workflow.yaml

    VNF_1:
      type: tosca.nodes.nfv.example_VNF1
      properties:
        # no property assignments needed for required properties that have a default value assigned in the node type definition, e.g. descriptor_id
        flavour_id: simple
        vnf_profile:
          instantiation_level: level_1
          min_number_of_instances: 2
          max_number_of_instances: 6
      requirements:
        - virtual_link: Ns_VL
        # - virtual_link_2: # map to virtual_link requirement of the NS node
    
    VNF_2:
      type: tosca.nodes.nfv.example_VNF2
      properties:
        flavour_id: simple
        vnf_profile:
          instantiation_level: level_1
          min_number_of_instances: 1
          max_number_of_instances: 3
      requirements:
        - virtual_link_1: Ns_VL

    Ns_VL:
      type: tosca.nodes.nfv.NsVirtualLink
      properties:
        connectivity_type:
          layer_protocols: [ipv4]
          flow_pattern: mesh
        vl_profile:
          max_bitrate_requirements:
             root: 1000
          min_bitrate_requirements:    
             root: 1000

Loading