Skip to end of metadata
Go to start of metadata

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

Compare with Current View Page History

« Previous Version 2 Next »

Objective

The current implementation (Beijing) of Allotted Resources in TOSCA uses a property on the allotted resource that stores a providing service  identifier (metadata attribute) as a foreign key.  The proposal represents Allotted Resources in TOSCA using correct TOSCA syntax and semantics to define the mapping between allotted resources and their providing [infrastructure] services. 

Basics

Fundamentally, we are redefining an Allotted Resource to be any node type derived directly or indirectly from onap.nodes.Resource which has a requirement for a service with the capability to be an allotted resource provider.  

Allotted Resource Provider Capability 

Define a capability type, onap.nodes.AllottedResourceProvider, that “providing services” will have.  This is used to identify infrastructure services that can produce allotted resources. 

  • Each providing service should declare this capability and populate the “valid_source_types” with the allotted resource node types it can produce.  Since “valid_source_types” is a list, providing services may produce multiple different allotted resources.  Given this is explicitly declared, the orchestrator can validate that a service exists to provide the allotted resource.
  • Allotted resource concrete types will always map to a single providing service type.
  • Allotted Resources declare a requirement for this capability.  Due to N:1 nature of allotted resources to providing services, the requirement can directly specify the providing service type (i.e., node filtering is not required).  This will be a “dangling” requirement, since the actual providing service instance will be chosen at run-time (by SNIRO/OOF)
  • The existence of an AllottedResourceProvider requirement is sufficient to identify an allotted resource.  They do not need to be derived from some root “allotted_resource” type.

We also define a relationship type for the connection between allotted resources and their providing services.  This relationship must be defined on the requirement for an allotted resource provider (in the allotted resource node type).  At this time, there are no specific attributes defined for this relationship.

Capabilities and Relationships
capability_types:
   onap.capabilities.AllottedResourceProvider:
      derived_from: tosca.capabilities.Root
      description:  Capability to produce allotted resources of the listed source types
      valid_source_types:  []
      properties:
         # TBD if any properties needed
      attributes:
         # TBD if any attributes needed

relationship_types:
   onap.relationships.AllottedBy:
      derived_from: tosca.relationships.DependsOn
      description:  Relates an allotted resource to its providing service (provider)

Examples

The following is a simple example of an allotted resource and its providing service.

Allotted Resource Node Type

Allotted Resource Node Type
node_types:
  # Node type for an Allotted Resource.
  # - Can be used directly in a consuming service (i.e., by name)
  # - Defines a provider requirement, which makes this allotted.
  # - Defines the LCM interfaces that interact with the factory service controller
  provider.resource.MyAllottedResource:  
    derived_from:  onap.nodes.Resource
    properties:
      # Properties for this allotted resource type
    attributes:
      # Attributes for this allotted resource type
    capabilities:
      # Any capabilities that this allotted resource exposes
    requirements:
     - provider_service
         node: provider.service.MyProviderService
         capability: onap.capabilities.AllottedResourceProvider
         relationship:  onap.relationships.AllottedBy
    interfaces:
      # LCM interfaces, including instantiation.
      # Contains the resource’s provider-specific controller API calls.


Providing Service Node Type

Providing Service
# Node type for the Providing Service 
# - Defined in the providing service TOSCA model (with a substitution mapping)
# - Defines a Provider capability, which identifies it as an allotted producer.
# - Otherwise is a typical ONAP service, with node templates for VNFs, VLs, and
#   possibly other Allotted Resources that it uses itself.
provider.service.MyProviderService:  
    derived_from:  onap.nodes.Service
    properties:
      # left out for brevity
    attributes:
      # left out for brevity
    capabilities:
      allotted_resource_provider:
        type: onap.capabilities.AllottedResourceProvider
        valid_source_types: [provider.resource.MyAllottedResource]
    interfaces:
      # left out for brevity



Consuming Service Node Templates (snippet)

Consuming Service
node_templates:
    # Direct usage of a my_allotted resource
    allotted_resource:
      type: provider.resource.MyAllottedResource:        properties:
         # Property values for this allotted resource instance

    # Other resource nodes (VNFs, VLs, etc.)
    other_vnf:
      type: provider.resource.my_vnf
    ...

Usage Notes

  1. The LCM interfaces of the allotted resource type contain the code logic for interacting with the appropriate controller that manages the providing service.  Since this is custom to each allotted resource/controller, it cannot simply be derived from the requirements and capabilities in the model.
  2. The consuming service does not require knowledge of the Provider service.  It simply declares a node template of the allotted resource type.  The linkages to the Provider (including the Provider requirement) are encapsulated within the allotted resource node type definition.
  3. When homing an allotted resource, SNIRO/OOF can determine the providing service type from the “AllottedResourceProvider” requirement on the allotted resource node, and search inventory for service nodes of that node type.  Alternatively, if capabilities are captured in AAI, SNIRO/OOF can search directly for service-instance nodes with an AllottedResourceProvider capability with the desired allotted resource as a valid source type.
  4. Infrastructure services (i.e., allotted resource providers) can be composed of PNFs as well as VNFs for producing allotted resources.  However, this would also be encapsulated within the model of the allotted resource/provider service pair and is transparent to the consuming service.

  # Node type for the Providing Service

  # - Defined in the providing service TOSCA model (with a substitution mapping)

  # - Defines a Provider capability, which identifies it as an allotted producer.

  # - Otherwise is a typical ONAP service, with node templates for VNFs, VLs, and

  #   possibly other Allotted Resources that it uses itself.

  provider.service.MyProviderService: 

    derived_from:  onap.nodes.Service

    properties:

      # left out for brevity

    attributes:

      # left out for brevity

    capabilities:

      allotted_resource_provider:

        type:  onap.capabilities.AllottedResourceProvider

        valid_source_types: [provider.resource.MyAllottedResource]

    interfaces:

      # left out for brevity

  • No labels