SO to CDS Interface Design -- Frankfurt Release
1. Overview of CDS Actor support in Service Orchestrator (SO)
ONAP Service Orchestrator (SO) Framework now enables Controller Design Studio (CDS) as one of the supported actors. This allows the users to configure Operational Service orchestrator (SO) to use CDS as an actor to remedy a situation.
Behind the scene, when an incoming event is received and validated against rules, Service orchestrator (SO) uses gRPC to trigger the CBA (Controller Blueprint Archive: CDS artifact) as configured in the operational service orchestrator (SO) and providing CDS with all the input parameters that is required to execute the chosen CBA.
2. Objective
The goal of the user guide is to clarify the contract between Service orchestrator (SO) and CDS so that a CBA developer can respect this input contract towards CDS when implementing the CBA.
3. Contract between Service Orchestrator (SO) and CDS
Service orchestrator (SO) upon receiving an incoming event decides which actor to trigger. If the CDS actor is the chosen, Service orchestrator (SO) triggers the CBA execution using gRPC.
The parameters required for the execution of a CBA are internally handled by Service orchestrator (SO).
3.1 CDS Blueprint Execution Payload format as invoked by Service orchestrator (SO)
In Frankfurt release, SO Orchestration Flow Reference Table is enhanced to include Scope and Action.
· SCOPE defines the level of execution and key identifiers that are passed to the controller
o “service”
§ “service-instance-id”
o “vnf”
§ “service-instance-id”, “vnf-id”, “vnf-customization-uuid”
o “vfModule”
§ “service-instance-id”, “vnf-id”, “vnf-customization-uuid”, “vf-module-id”, “vf-module-customization-uuid”
o “pnf”
§ “service-instance-id”, “pnf-id”, “pnf-customization-uuid”
· ACTION defines the action that will be passed. The current supported for CDS are as follows config-assign, config-deploy, “modify-config”, etc…
Sample table
Id | Composite_Action | SEQ_NO | FLOW_NAME | FLOW_VERSION | LOOKUP_ID | SCOPE | ACTION |
1 | Service-Macro-Assign | 1 | ControllerExecutionBB | 1 | 1 | vnf | config-assign |
2 | Service-Macro-Assign | 2 | ControllerExecutionBB | 1 | 1 | vfModule | config-deploy |
Below are the details of the contract established between Service orchestrator (SO) and CDS to enable the automation of a remediation action within the scope of a closed loop usecase in ONAP.
The format of the input payload for CDS follows the below guidelines, hence a CBA developer must consider this when implementing the CBA logic. For the sake of simplicity a JSON payload is used instead of a gRPC payload and each attribute of the child-nodes is documented.
3.1.1 CommonHeader
The “commonHeader” field in the CBA execute payload is built by service orchestrator (SO).
“commonHeader” field name | Type | Description |
subRequestId | String | Generated by Service orchestrator (SO). Is a UUID and used internally by service orchestrator (SO). |
requestId | String | Inserted by Service orchestrator (SO). Maps to the UUID sent by DCAE i.e. the ID used throughout the closed loop lifecycle to identify a request. |
originatorId | String | Generated by Service orchestrator (SO) and fixed to “SERVICE ORCHESTRATOR (SO)” |
3.1.2 ActionIdentifiers
The “actionIdentifiers” field uniquely identifies the CBA and the workflow to execute.
“actionIdentifiers” field name | Type | Description |
Mode | String | Inserted by Service orchestrator (SO) and fixed to “sync” presently. |
blueprintName | String | Inserted by Service orchestrator (SO). Maps to the attribute that holds the blueprint-name in the operational service orchestrator (SO) configuration. |
blueprintVersion | string | Inserted by Service orchestrator (SO). Maps to the attribute that holds the blueprint-version in the operational service orchestrator (SO) configuration. |
actionName | string | Inserted by Service orchestrator (SO). Maps to the attribute that holds the action-name in the operational service orchestrator (SO) configuration. |
3.1.3 Payload
The “payload” JSON node is generated by Service orchestrator (SO) for the action-name specified in the “actionIdentifiers” field which is eventually supplied through the operational service orchestrator (SO) configuration as indicated above.
3.1.3.1 Action request object
The “$actionName-request” object is generated by CDS for the action-name specified in the “actionIdentifiers” field.
The “$actionName-request” object contains:
a field called “resolution-key” which CDS uses to store the resolved parameters into the CDS context
a child node object called “$actionName-properties” which holds a map of all the parameters that serve as inputs to the CBA. It presently holds the below information:
all the AAI enriched attributes
additional parameters embedded in the Control Loop Event format which is sent by DCAE (analytics application).
any static information supplied through operational service orchestrator (SO) configuration which is not specific to an event but applies across all the events.
The data description for the action request object fields is as below:
“$actionName-request” field name | type | Description |
resolution-key | string | Generated by Service orchestrator (SO). Is a UUID, generated each time CBA execute request is invoked. |
Action properties object
“$actionName-properties” field name | type | Description |
[$attribute] | map | Inserted by Service orchestrator (SO) for all the instance params and key identifiers based on scope. |
3.1.4 Summing it up: CBA execute payload generation as done by Service Orchestrator (SO)
Putting all the above information together below is the REST equivalent of the CDS blueprint execute gRPC request generated by Service Orchestrator (SO).
REST equivalent of the gRPC request from Service orchestrator (SO) to CDS to execute a CBA.
curl -X POST \ 'http://{{ip}}:{{port}}/api/v1/execution-service/process' \ -H 'Authorization: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==' \ -H 'Content-Type: application/json' \ -H 'cache-control: no-cache' \ -d '{ "commonHeader":{ "subRequestId":"{generated_by_service orchestrator (SO)}", "requestId":"{req_id_from_DCAE}", "originatorId":"SERVICE ORCHESTRATOR (SO)" }, "actionIdentifiers":{ "mode":"sync", "blueprintName":"{blueprint_name_from_operational_service orchestrator (SO)_config}", "blueprintVersion":"{blueprint_version_from_operational_service orchestrator (SO)_config}", "actionName":"{blueprint_action_name_from_operational_service orchestrator (SO)_config}" }, "payload":{ "$actionName-request":{ "resolution-key":"{generated_by_service orchestrator (SO)}", "$actionName-properties":{ "$attribute_1":"", "$attribute_2":"", } } }}'
3.1.5 Examples
Sample CBA execute request generated by Service orchestrator (SO) for PNF target type when “data” field is a string:
curl -X POST \ 'http://{{ip}}:{{port}}/api/v1/execution-service/process' \ -H 'Authorization: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==' \ -H 'Content-Type: application/json' \ -H 'cache-control: no-cache' \ -d '{ "commonHeader":{ "subRequestId":"14384b21-8224-4055-bb9b-0469397db801", "requestId":"d57709fb-bbec-491d-a2a6-8a25c8097ee8", "originatorId":"SERVICE ORCHESTRATOR (SO)" }, "actionIdentifiers":{ "mode":"sync", "blueprintName":"PNF-demo", "blueprintVersion":"1.0.0", "actionName":"reconfigure-pnf" }, "payload":{ "reconfigure-pnf-request":{ "resolution-key":"8338b828-51ad-4e7c-ac8b-08d6978892e2", "reconfigure-pnf-properties":{ "pnf.equip-vendor":"Vendor-A", "pnf.ipaddress-v4-oam":"10.10.10.10", "pnf.in-maint":false, "pnf.pnf-ipv4-address":"3.3.3.3", "pnf.resource-version":"1570746989505", "pnf.nf-role":"ToR DC101", "pnf.equip-type":"Router", "pnf.equip-model":"model-123456", "pnf.frame-id":"3", "pnf.pnf-name":"demo-pnf", "data": "peer-as=64577", "peer-group":"demo-peer-group", "neighbor-address":"4.4.4.4" } } }}'
Sample CBA execute request generated by Service orchestrator (SO) for VNF target type when “data” field is a valid JSON string:
curl -X POST \ 'http://{{ip}}:{{port}}/api/v1/execution-service/process' \ -H 'Authorization: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==' \ -H 'Content-Type: application/json' \ -H 'cache-control: no-cache' \ -d '{ "commonHeader":{ "subRequestId":"14384b21-8224-4055-bb9b-0469397db801", "requestId":"d57709fb-bbec-491d-a2a6-8a25c8097ee8", "originatorId":"SERVICE ORCHESTRATOR (SO)" }, "actionIdentifiers":{ "mode":"sync", "blueprintName":"vFW-CDS", "blueprintVersion":"1.0.0", "actionName":"config-deploy" }, "payload":{ "config-deploy-request":{ "resolution-key":"6128eb53-0eac-4c79-855c-ff56a7b81141", "config-deploy-properties":{ "service-instance.service-instance-id":"40004db6-c51f-45b0-abab-ea4156bae422", "generic-vnf.vnf-id":"8d09e3bd-ae1d-4765-b26e-4a45f568a092", "data":{ "active-streams":"7" } } } }}'