Allotted Resources are portions of one service which can be allotted to be used as resources by another. The distinguishing factor that makes a Resource allotted is simply the requirement for a provider. The capabilities of this or matching type are supposed to be exposed by providing services (derived from the onap.nodes.Service node type, as any other service).
This permits allotted network functions to be chosen during abstraction resolution as long as filtering criteria are matched.
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). This relationship will have implications on the declarative workflows on the both sides. At this time, there are no specific attributes defined for this relationship.
See also:
TIDM onap.capabilities.AllottedResourceProvider
TIDM onap.relationships.AllottedBy
The following is a simple example of an allotted resource and its providing service.
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
# 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)
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