Allotted Resource Examples



Overview

This example includes the models of two services. These services are very loosely coupled. None of them contains any direct reference to another. In fact, they are totally unaware of the existence of each another. The relationship between them is established by the orchestrator in runtime based on a few global type definitions.

Shared type definitions

These definitions are included into both the providing and the consuming services.

Core DM Types

Node type onap.nodes.Service

Node type onap.nodes.Resource

Node type onap.nodes.NetworkFunction

Capability type onap.capabilities,AllottedResorceProvider

Relationship type onap.relationships.AllottedBy

Imaginary Types made up for this example

Capability type onap.examples.capabilities.Firewall
capability_types: onap.examples.capabilities.Firewall: derived_from: tosca.capabilities.Root description: an ability to serve as a firewall
Node type onap.examples.node.Firewall
node_types: onap.examples.nodes.Firewall: derived_from: onap.nodes.NetworkFunction description: an abstract firewall capabilities: i_can_be_a_firewall: type: onap.examples.capabilities.Firewall



Providing Service

The Providing Service CSAR will include these definitions and templates along with the Shared Type Definitions.



An implementation of the onap.capabilities.AllottedResource by the providing vendor.

The providing service will most likely define its own subtype the ONAP DM's onap.capabilities.AllottedResourceProvider capability type - to augment this core type with its own properties and a restricted list of valid source types.

The specialized capability type
capability_types: vendorXXX.capabilities.FirewallsProvider: derived_from: onap.capabilities.AllottedResourceProvider valid_source_types: [onap.examples.nodes.Firewall]

The "Interface node type" for this service 

According to the Service Model Principles, any service definition will include a node type derived from onap.nodes.Service. This is a general ONAP service modeling convention rather than something specific for AR providing services. Just to remind - this type may be later use to create nodes of embedded services in a higher-order topology.

Providing Service, "interface" node type



Firewall implementation node type

This is a concrete node type, implementing the shared generic type definition of onap.examples.nodes.Firewall.

Firewall implementing node type

The example above shows one of the possible ways to implement a node type, through implementation script artifacts. These scripts may include a special logic that communicates to a "factory" node inside the service. 

All other TOSCA ways to implement an abstract node are also valid. For example, a vendor may choose to have an implementing (substituting) topology for this node type.

Providing service topology

Service Model Principles stipulate that any ONAP service definition includes, besides the "interface" node type, the implementing topology. The AR services are no exception of this principle.

AR Providing Service Topology

TODO: separate nodes for the share and the "manager"

Consuming Service



The "Interface node type" of the Consuming Service 

The Consuming service definition, like any other ONAP service definition, will include an "interface node type". Its details are irrelevant for this example.



Consuming Service Topology

The service topology includes firewall abstract nodes.

Consuming service topology



TODO: add a section on the orchestration logic