Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagetext
titleONAP Data Model Normatives
linenumberstrue
collapsetrue
##################################
### ONAP Data Model Normatives ###
##################################


data_types:

interface_types:
  onap.interfaces.node.lifecycle.Standard:
    derived_from: tosca.interfaces.node.lifecycle.Standard
    description: the ONAP resource lifecycle interface, in case it extends the standard TOSCA's
    # here come the extensions

  onap.interfaces.node.lifecycle.VNF:
    # VNFs may need an extended lifecycle interface
    
  onap.interfaces.node.lifecycle.Service:
    # Services may need an extended lifecycle interface
    
capability_types:
  onap.capabilities.Compute:
    # ....

  onap.capabilities.Storage:
    # ....

policy_types:
  onap.policies.scaling.Fixed:
    # ....

  onap.policies.scaling.Variable:
    # ....

  onap.policies.placement.Affinity:
    # ....

  onap.policies.placement.AntiAffinity:
    # ....

  onap.policies.naming.NumSequence:
    # ....


node_types:
  #TODO: provide a description of the metadata for the node templates
  onap.nodes.Resource:
    derived_from: tosca.nodes.Root
    description: the very base of the ONAP resource hierarchy
    interfaces:
      Standard:  # just a reminder that all resources have a standard lifecycle interface
        type: onap.interfaces.node.lifecycle.Standard
    requirements:
      - container:
          capability: tosca.capabilities.Container
          occurrences: [0, UNBOUNDED]
    
  onap.nodes.VNF:
    derived_from: onap.nodes.Resource
    description: an abstract base for the hierarchy of concrete VNF resources
    properties:
      # ECOMP's
      # ONAP IM's
    interfaces:
      Standard:  # just a reminder that 
        type: tosca.interfaces.node.lifecycle.VNF
	#TODO: check on the HPA use case
  requirements:
      - compute:

  onap.nodes.VDU:
    derived_from: onap.nodes.Resource
    description: a virtualization container; contains the software image, states requirements for hardware
    capabilities:
      container: 
        type: onaptosca.capabilities.ComputeContainer
          occurrences: [0, UNBOUNDED]
    requirements:
      - storagecompute:
          type: onap.capabilities.StorageCompute
          occurrences: [0, UNBOUNDED]
	#TODO: check on the HPA use case
  
       - storage:
          type: onap.capabilities.Storage 
          occurrences: [0, UNBOUNDED]

Code Block
languagetext
titleSample VNF
linenumberstrue
collapsetrue
##################################
### Sample VNF                 ###
##################################

node_types:
  com.vendorxxx.SampleVNF:
    derived_from: onap.nodes.VNF
    description: a concrete VNF provided by a vendor
    properties:
      num_of_instances_inside:
        type: integer
    requirements:
      - computecontainer:
          type: onap.capabilities.Compute
      - storage:
          type: onap.capabilities.Storage
    capabilities:
      the_important_capability:
        #...
      
topology_template:
  inputs:
    num_resource_instances:
      description: how many resource instances to create
      type: integer

  node_templates:
    vl_1:

    cp_1:
    
    internal_valuable_resource_1:
      type: com.vendorxxx.ResourceType
      artifacts:
        image: ResourceDockerFile
      capabilities:
        valuable_capability: #....
      requirements:
        - compute container:
			node: vdu_1
			capability: container

    vdu_1:
      type: onap.nodes.VDU
      artifacts:
        image: myImageFile.ovf
      capabilities:
        container:
      requirements:
        - host:
            node_filter:
              capabilities:
                - onap.capabilities.Compute:
                    properties:
                      num_cpus: {in_range: [2, 4]}
                      mem_size: {greater_or_equal: 1GB}
        - storage:
			#...



    
  policies:
    scale_the_value:
      type: onap.policies.scaling.Fixed:
      properties:
        quantity: {get_input: num_resource_instances}
      targets: [internal_valuable_resource_1]

    separate_hosts:
      type: onap.policies.placement.AntiAffinity
      targets: [internal_valuable_resource_1]
      properties:
        distance: PhysicalHost
      
    same_office:
      type: onap.policies.placement.Affinity
      targets: [internal_valuable_resource_1]
      properties:
        scope: DataCenter
      
  substitution_mappings:
    node_type: com.vendorxxx.SampleVNF
    properties:
      num_of_instances_inside:
        mapping: [SELF, num_resource_instances]
    capabilities:
      the_important_capability:
        mapping: [internal_valuable_resource_1, valuable_capability]
    requirements:
      computehost:
        mapping: [internal_valuable_resourcevdu_1, compute]
      storage:
        mapping: [internal_valuable_resource_1, storagehost]
      
Code Block
languagetext
titleService using the Vendor VNF
linenumberstrue
collapsetrue
######################################
### A Sample Service using the Sample VNF ###
######################################

topology_template:
  node_templates:
    vnf_1:
      type: com.vendorxxx.SampleVNF
      properties:
        num_of_instances_inside: 13
      requirements:  # infrastructure requirements, to be sutisfied by the orchestrator
        - compute:
            node_filter:
              capabilities:
                - onap.capabilities.Compute:
                    properties:
                      num_cpus: {in_range: [2, 4]}
                      mem_size: {greater_or_equal: 1GB}


...