Introduction
This CL story is specified here as inter domain link restoration process. It is considered as an extension of MDONS use case from ONAP Frankfurt release.
key |
summary |
type |
created |
updated |
due |
assignee |
reporter |
priority |
status |
resolution |
Design & Implementation
The scope of code change will be very limited with the existing capability at ONAP CLAMP, DCAE and POLICY components. Given the fact that FNC Virtuora MSA support has already delivered
L0/L1 alarms and PM data in VES (CEDM) (7.0 version) format. However, those delivered through TAPI APIs are retrieved from FPM server and converted into TAPI standard in Json format.
HLD
Close Loop Diagram in MDONS
- SDC/DCAEMOD/Policy Portal design and activate policy.
- Policy config and activate the policy.
- SDC/DCAEMOD distribute the DCAE config.
- SDC/DCAEMOD/HOMES UI distribute the alarm correlation rules to Holmes.
- 3rd party domain controllers report link down alarm to DCAE
- DCAE will do data cleaning and filtering for the alarms
- DCAE keep track the data.
- Holmes do analysis for the alarms.
- Holmes notify the reroute event.
- Policy matching the reroute rules.
- Policy call SO or SDNC to delete the old services and create the new services. For the creation flow, a variable route will be recalculated.
Domain Controller APIs
MSA
TAPI
DCAE
Data Collection Diagram
RestConf Collector (RCC)
In MDONS use case, prior to subscribing to topics to get event notifications. We manually register 'DCAE' in the domain controller (DC). Once registration is successful, system can subscribe to different topics of DC to get event notification. It is mandatory to pass 'notification URL' to DC so that when event occurs it posts notification to that URL.
Alarm Notification
- TAPI Alarm Notification[TAPI format]
{
"notification": [
{
"notification-type": "ALARM_EVENT",
"target-object-name": [
{
"value-name": "node-id",
"value": "S100-NODE2"
},
{
"value-name": "entity-type",
"value": "slot"
},
{
"value-name": "entity-id",
"value": "Slot-1/4"
}
],
"source-indicator": "RESOURCE_OPERATION",
"uuid": "76234954-30a2-11e9-a785-dd6c51454c4e",
"event-time-stamp": "20190208220426.3Z",
"additional-text": "Equipment Removed:Type=PIS1-PG31",
"alarm-info": {
"service-affecting": "SERVICE_AFFECTING",
"probable-cause": "al-types:equipmentRemoved",
"is-transient": false,
"pervceived-severity": "CRITICAL"
},
"additional-info": [
{
"value-name": "location",
"value": "NEND"
},
{
"value-name": "direction",
"value": "NA"
}
],
"target-object-identifier": "S100-NODE2:slot:Slot-1/4",
"name": [
{
"value-name": "alarm-id",
"value": "S100-NODE2slotal-types:equipmentRemovedSlot-1/4NANEND"
}
]
},
...
...
]
}
- OpenRoadM Alarm Notification[VES format]
{
"event": {
"commonEventHeader": {
"sourceId": "owb-rdm-003",
"startEpochMicrosec": 1469528413000,
"eventId": "owb-rdm-003 1",
"reportingEntityId": "127.0.1.1",
"eventType": "fault_owb-rdm-003_lossOfSignal",
"priority": "High",
"version": 1.0,
"reportingEntityName": "agilevm",
"sequence": 0,
"domain": "fault",
"functionalRole": "rdm",
"lastEpochMicrosec": 1469528413000,
"sourceName": "owb-rdm-003"
},
"faultFields": {
"eventSeverity": "CRITICAL",
"alarmCondition": "lossOfSignal",
"faultFieldsVersion": 1.0,
"specificProblem": "lossOfSignal",
"alarmInterfaceA": "oms-1/0/0/E1",
"alarmAdditionalInformation": [
{
"name": "direction",
"value": "rx"
},
{
"name": “location",
"value": "NEND"
},
{
"name": "type",
"value": "communication"
},
{
"name": "circuit-id",
"value": "100 OMS DLLSTXRIS50 DLLSTXTAW10"
},
{
"name": "additional-detail",
"value": "sample detail"
},
{
"name": "corrective-action",
"value": "sample action"
}
],
"eventSourceType": "interface",
"vfStatus": "Active"
}
}
}
Since MSA notification is already in VES format, it could be posted directly on to DMAAP with relevant topic to be consumed by Hulmes directly. If RCC does not support such configuration, then a 1n1 attribute mirroring mapping xml file need to be designed to feed the data into the existing flow. Thus, VES Mapper plays the role of VES event validation as it is required functionality in VES collector.
MS Blueprint
This is the RCC blueprint which defines the initial configuration for alarm collection in MDONS close loop. RCC supports multiple DC connections.
rcc_policy:
rcc_policy: '[{"controller_name":"VirtuoraNC","controller_restapiUrl":"167.254.204.181:8443","controller_restapiUser":"admin","controller_restapiPassword":"admin","controller_accessTokenUrl":"/rest/plat/smapp/v1/oauth/token","controller_accessTokenFile":"./etc/access-token.json","controller_accessTokenMethod":"put","controller_subsMethod":"post","controller_subscriptionUrl":"/cxf/subscriptions","controller_disableSsl":"true","event_details":[{"event_name":"MSA_Alarm_Subscription","event_description":"AlarmEvent","event_sseventUrlEmbed":"false","event_sseventsField":"null","event_sseventsUrl":"null","event_subscriptionTemplate":"./etc/MSA_Alarm_Subscription_template.json","event_unSubscriptionTemplate":"./etc/MSA_Alarm_Unsubscription_template.json","modifyData": "true","modifyMethod": "modifyMSAEvent"]}]'
RCC_Output Event
This event is the output to be posted on Dmaap by RCC and will be consumed by VES Mapper.
{
"tapi-notifyid":"example-mappingfile-id.x.1",
"notification": [
{
"notification-type": "ALARM_EVENT",
"target-object-name": [
{
"value-name": "node-id",
"value": "S100-NODE2"
},
{
"value-name": "entity-type",
"value": "slot"
},
{
"value-name": "entity-id",
"value": "Slot-1/4"
}
],
"source-indicator": "RESOURCE_OPERATION",
"uuid": "76234954-30a2-11e9-a785-dd6c51454c4e",
"event-time-stamp": "20190208220426.3Z",
"additional-text": "Equipment Removed:Type=PIS1-PG31",
"alarm-info": {
"service-affecting": "SERVICE_AFFECTING",
"probable-cause": "al-types:equipmentRemoved",
"is-transient": false,
"pervceived-severity": "CRITICAL"
},
"additional-info": [
{
"value-name": "location",
"value": "NEND"
},
{
"value-name": "direction",
"value": "NA"
}
],
"target-object-identifier": "S100-NODE2:slot:Slot-1/4",
"name": [
{
"value-name": "alarm-id",
"value": "S100-NODE2slotal-types:equipmentRemovedSlot-1/4NANEND"
}
]
},
...
...
]
}
VES Mapper
Mapping File
- TAPI Alarm to VES Mapping template
<?xml version="1.0" encoding="UTF-8"?><smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd" xmlns:jb="http://www.milyn.org/xsd/smooks/javabean-1.4.xsd" xmlns:json="http://www.milyn.org/xsd/smooks/json-1.1.xsd">
<json:reader rootName="vesevent" keyWhitspaceReplacement="-">
<json:keyMap>
<json:key from="date&time" to="date-and-time" />
</json:keyMap>
</json:reader>
<jb:bean class="org.onap.dcaegen2.ves.domain.ves54.VesEvent" beanId="vesEvent" createOnElement="vesevent">
<jb:wiring property="event" beanIdRef="event" />
</jb:bean>
<jb:bean class="org.onap.dcaegen2.ves.domain.ves54.Event" beanId="event" createOnElement="vesevent">
<jb:wiring property="commonEventHeader" beanIdRef="commonEventHeader" />
<jb:wiring property="faultFields" beanIdRef="faultFields" />
</jb:bean>
<jb:bean class="org.onap.dcaegen2.ves.domain.ves54.CommonEventHeader" beanId="commonEventHeader" createOnElement="vesevent">
<jb:expression property="version">'1.0'</jb:expression>
<jb:expression property="eventType">'fault_OWB-RDM-NE1_equipmentFault'</jb:expression>
<jb:expression property="eventId" execOnElement="vesevent">'QWB-RDM-NE1 23'</jb:expression>
<jb:expression property="functionalRole">'NA'</jb:expression>
<jb:expression property="reportingEntityName">'emf171195Cluster'</jb:expression>
<jb:expression property="reportingEntityId">'10.249.26.175'</jb:expression>
<jb:expression property="domain">'fault'</jb:expression>
<jb:value property="sequence" data="0" default="0" decoder="Long" />
<jb:value property="lastEpochMicrosec" data="1487894721807000"/>
<jb:value property="startEpochMicrosec" data="1487894721807000"/>
<jb:expression property="priority">'Medium'</jb:expression>
<jb:expression property="sourceName">'OWB-RDM-NE1'</jb:expression>
<jb:expression property="sourceId">'OWB-RDM-NE1'</jb:expression>
</jb:bean>
<jb:bean class="org.onap.dcaegen2.ves.domain.ves54.FaultFields" beanId="faultFields" createOnElement="vesevent">
<jb:value property="faultFieldsVersion" data="1.0" default="1.0" decoder="Double" />
<jb:value property="alarmCondition" data="equipmentFault" />
<jb:Value property="alarmInterfaceA" data="2"/>
<jb:expression property="specificProblem">'equipmentFault'</jb:expression>
<jb:expression property="vfStatus">'Active'</jb:expression>
<jb:expression property="eventSeverity">'MAJOR'</jb:expression>
<jb:expression property="eventSourcTeype">'Shelf'</jb:expression>
<jb:wiring property="alarmAdditionalInformation" beanIdRef="alarmAdditionalInformationroot" />
</jb:bean>
<jb:bean class="java.util.ArrayList" beanId="alarmAdditionalInformationroot" createOnElement="vesevent">
<jb:wiring beanIdRef="alarmAdditionalInformation" />
</jb:bean>
<jb:bean class="org.onap.dcaegen2.ves.domain.ves54.AlarmAdditionalInformation" beanId="alarmAdditionalInformation" createOnElement="varbinds/element">
<jb:value property="name" data="direction" />
<jb:value property="value" data="tx" />
<jb:value property="name" data="location" />
<jb:value property="value" data="NEND" />
<jb:value property="name" data="type" />
<jb:value property="value" data="equipment" />
<jb:value property="name" data="circuit-id" />
<jb:value property="value" data="" />
</jb:bean></smooks-resource-list>
- MSA Data are already in VES format. If VES Collector supports Rest API notification mode, MDONS can use VES collector for OpenRoadM data collection from domain controller.
VES Event
Mapper output as an VES event is posted back to Dmaap.
HOLMES
AAI APIs
Upon receiving NNI down alarm:
- AAI APIs - APIs to update status of related NNI status, retrieve alarm correlation keys and related service instance IDs, etc.
Code change needs to be introduced for functions to adapt the above AAI APIs from the correlation rules.
Drools Rule - Alarm Correlation
- Alarm Correlation Rules - Drools rules design time from SDC or Holmes UI to correlate the alarms.
Upon receiving NNI up notification - update the status of the NNI in AAI.
Output
{
"closedLoopEventClient": "DCAE.MDONS-eventProcessor",
"policyVersion": "1.6.3",
"policyName": "MDONS",
"policyScope": "service=OTNService,type=SampleType,closedLoopControlName=ControlLoop-MDONS-2179b738-fd36-4843-a71a-a8c24c70c66b",
"target_type": "VM",
"AAI": {
"request-id":"1166bf8b-17a2-42ba-87c9-d05dc99799a1",
"service-name":"ECHService1",
"service-type":"MDONS_OTN"
},
"closedLoopAlarmStart": 1484677482204798,
"closedLoopEventStatus": "ONSET",
"closedLoopControlName": "ControlLoop-MDONS-2179b738-fd36-4843-a71a-a8c24c70c66b",
"version": "1.0.2",
"target": "vserver.vserver-name",
"requestID": "97964e10-686e-4790-8c45-bdfa61df770f",
"from": "DCAE"
}
POLICY
Operational Policy
controlLoop:
version: 2.0.0
controlLoopName: ControlLoop-MDONS-2179b738-fd36-4843-a71a-a8c24c70c66b
trigger_policy: unique-policy-id-for-Reroute
timeout: 3600
policies:
- id: unique-policy-id-for-Reroute
name: Domain Service Creation Reroute
description:
actor: SDNC
recipe: Reroute
target:
resourceID: 2179b738-fd36-4843-a71a-a8c24c70c66b
type: VM
retry: 3
timeout: 1200
success: final_success
failure: final_failure
failure_timeout: final_failure_timeout
failure_retries: final_failure_retries
failure_exception: final_failure_exception
failure_guard: final_failure_guard
Apex Engine
Apex Policy Engine is used in MDONS use case to execute the operational Policy.
"engineServiceParameters":{
"name": "MDONSPolicyModelEngine",
"version": "0.0.1",
"id": 101,
"instanceCount": 2,
"deploymentPort": 12345,
"engineParameters": {
"executorParameters": {
"MVEL": {
"parameterClassName": "org.onap.policy.apex.plugins.executor.mvel.MvelExecutorParameters"
},
"JAVASCRIPT": {
"parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
}
},
"contextParameters": {
"parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters",
"schemaParameters": {
"Avro": {
"parameterClassName": "org.onap.policy.apex.plugins.context.schema.avro.AvroSchemaHelperParameters"
},
"Java": {
"parameterClassName": "org.onap.policy.apex.context.impl.schema.java.JavaSchemaHelperParameters",
"jsonAdapters": {
"Instant": {
"adaptedClass": "java.time.Instant",
"adaptorClass": "org.onap.policy.controlloop.util.Serialization$GsonInstantAdapter"
}
}
}
}
}
}
},
"eventInputParameters":{
"DCAEConsumer": {
"carrierTechnologyParameters": {
"carrierTechnology": "RESTCLIENT",
"parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
"parameters": {
"url": "http://message-router:3904/events/unauthenticated.DCAE_Output_Event/g1/c1?timeout=60000"
}
},
"eventProtocolParameters": {
"eventProtocol": "JSON",
"parameters": {
"nameAlias": "policyName",
"versionAlias": "version",
"sourceAlias": "from",
"pojoField": "VirtualControlLoopEvent"
}
}
}
},
"eventOutputParameters":{
"SDNC": {
"carrierTechnologyParameters": {
"carrierTechnology": "RESTCLIENT",
"parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
"parameters": {
"url": "http://<SDNC-IP>:<SDNC-PORT>//service/optical-service/?"
}
},
"eventProtocolParameters": {
"eventProtocol": "JSON",
"parameters": {
"nameAlias": "policyName",
"versionAlias": "version",
"sourceAlias": "from",
"pojoField": "VirtualControlLoopEvent"
}
}
}
}
}
}
Apex Policy
model create name=ApexMDONSPolicy
schema create name=SimpleStringType flavour=Java schema=java.lang.String
schema create name=UUIDType flavour=Java schema=java.util.UUID
schema create name=SimpleIntType flavour=Java schema=java.lang.Integer
schema create name=ServiceInstanceType flavour=Avro schema=LS
#MACROFILE:"src/main/resources/schemas/ServiceInstanceType.avsc"
schema create name=SDNCRequestEventPayloadType flavourAvro schema=LS
#MACROFILE:"src/main/resources/schemas/SDNCRequestEventPayloadType.avsc"
schema create name=SDNCRequestEventHeaderType flavourAvro schema=LS
#MACROFILE:"src/main/resources/schemas/SDNCRequestEventHeaderType.avsc"
event create name=inputEvent version=0.0.1 nameSpace=org.onap.policy.apex.onap.pmcontrol source=DCAE target=APEX
event parameter create name=inputEvent parName=nfName schemaName=SimpleStringType
event parameter create name=inputEvent parName=policyName schemaName=SimpleStringType
event parameter create name=inputEvent parName=changeType schemaName=SimpleStringType
event parameter create name=inputEvent parName=closedLoopControlName schemaName=SimpleStringType
event parameter create name=inputEvent parName=serviceInfo schemaName=ServiceInstanceType
event create name=SDNCRequestEvent nameSpace=org.onap.policy.apex.onap.pmcontrol source=APEX target=SDNC
event parameter create name=SDNCRequestEvent parName=commonHeader schemaName=SDNCRequestEventHeaderType
event parameter create name=SDNCRequestEvent parName=payload schemaName=SDNCRequestEventPayloadType
task create name=CreateSDNCRequestPayloadTask
task inputfield create name=CreateSDNCRequestPayloadTask fieldName=serviceInfo =ServiceInstanceType
task outputfield create name=CreateSDNCRequestPayloadTask fieldName=payload schemaName=SDNCRequestEventPayloadType
task outputfield create name=CreateSDNCRequestPayloadTask fieldName=commonHeader schemaName=SDNCRequestEventHeaderType
task outputfield create name=CreateSDNCRequestPayloadTask fieldName=albumID schemaName=UUIDType
task logic create name=CreateSDNCRequestPayloadTask logicFlavour=JAVASCRIPT logic=LS
#MACROFILE:"src/main/resources/logic/CreateSDNCRequestPayloadTask.js""
policy create name=CreateEventPolicy template=Freestyle firstState=CreateService
policy state create name=CreateEventPolicy stateName=CreateService triggerName=inputEvent defaultTaskName=CreateSDNCRequestPayloadTask
policy state output create name=CreateEventPolicy stateName=CreateService outputName=SDNCRequestPayloadOutput eventName=SDNCRequestEvent nextState=NULL
policy state taskref create name=CreateEventPolicy stateName=CreateServices taskName=CreateSDNCRequestPayloadTask outputType=DIRECT outputName=SDNCRequestOutput
Policy Schema
{
"name": "AAI",
"type": "record",
"fields": [
{
"name": "request-id",
"type": "string"
},
{
"name": "service-name",
"type": "string"
},
{
"name": "service-type",
"type": "string"
}
]
}
{
"name": "SDNCRequestEventPayloadEntry",
"type": "record",
"fields": [
{
"name": "request-id",
"type": "string"
},
{
"name": "service-name",
"type": "string"
},
{
"name": "service-type",
"type": "string"
}
]
}
SDNC API
Upon receiving the alarm event, DCAE_Output_Event, an SDNC API is called to do the following:
- Upda, te OTN service instance status.
- Lookup for available IDL
- Delete original domain services
- Create new domain service accordingly
- Associate the new IDL and domain services with the existing OTN service instance.
URL : https://<SDNC-IP>:<SDNC-PORT>/service/optical-service/logical-links?link-type=inter-domain
METHOD : PATCH
Request Body:
{
"request-id":"1166bf8b-17a2-42ba-87c9-d05dc99799a1",
"service-name":"ECHService1",
"service-type":"MDONS_OTN"
}
Code change needs to be introduced to support this API at SDNC as well as new DG(s) to be defined for the action logic.
CLAMP
CL Template
The template is defined at SDC in design time by user.
CL Instance
Ideally, DCAE micro-services are deployed and can be configured at Close Loop instance instantiation at runtime while Apex policy defined above being created and deployed as well.
References