You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

This is an example for a complex service which embeds two instances of a simpler service. Instantiation of this complex service includes instantiation of 2 instances of the simple service.


Global type definitions


Global types
node_types:
  onap.nodes.Service:
    description: |
      a base of the ONAP concrete service types generated by SDC
    derived_from: tosca.nodes.Root
    properties:
      catalog_info:
        type: onap.datatypes.CatalogInfo
        description:
        required: true
        # generated by Design Time Catalog once, then never changed
      classification:
        type:
          type: string
        role:
          type: string
        function:
          type: string
    attributes:
      instance_name:
        type: string
        description: the name of the run-time instance of in the deployment
    interfaces:
      # TODO: define service-level interfaces 


Simple Service

Simple service topology


Simple service, topology
###### Simple service, topology
topology_template:
  substitution_mappings:
    node_type: operatorXXX.services.Service123
    capabilities:
    requirements:
      - data_link: [node_01, unprotected]
      - admin_link: [node_02, admin_link]
    
  node_templates:
    node_01:
      type: vendorXXX.nodes.VerySpecialFirewall
      requirements:
        - protected:
            node: vl_01
            capability: link
        - unprotected:
            capability: onap.capabilities.Linkable  # dangling
  
    vl_01:
      type: onap.nodes.VL
      
    node_02:
      type: vendorXXX.nodes.VerySpecialVnf
      requirements:
        - inbound_link:
            node: vl_01
            capability: link
        - admin_link:
            capability: onap.capabilities.Linkable  # dangling
      

TODO: Drill down to the VNF topology

Simple Service Type


Simple service, type definition
###### Simple service, type definition
node_types:
  operatorXXX.services.Service123:
    derived_from: onap.nodes.Services
  capabilities:
  requirements:
    - data_link:
        capability: onap.capabilities.Linkable  # dangling
    - admin_link:
        capability: onap.capabilities.Linkable  # dangling


Complex Service


Complex service topology


Complex service, topology
###### Complex service topology
topology_template:
  substitution_mappings:
    node_type: operatorYYY.services.Service789
    capabilities:
    requirements:
      - admin_link_01: [node_01, admin_link]
      - admin_link_02: [node_02, admin_link]
    
  node_templates:
    node_01:
      type: operatorXXX.services.Service123
      requirements:
        - data_link:
            node: vl_01
            capability: link
        - admin_link:
            capability: onap.capabilities.Linkable  # dangling
  
    node_02:
      type: operatorXXX.services.Service123
      requirements:
        - data_link:
            node: vl_01
            capability: link
        - admin_link:
            capability: onap.capabilities.Linkable  # dangling
      
    vl_01:
      type: onap.nodes.VL
  

Complex service type


Complex service, type definition
###### Complex service type definition
node_types:
  operatorYYY.services.Service789:
    derived_from: onap.nodes.Services
  capabilities:
  requirements:
    - admin_link_01:
        capability: onap.capabilities.Linkable
    - admin_link_02:
        capability: onap.capabilities.Linkable



  • No labels