...
Code Block |
---|
language | text |
---|
title | Converted VES Event |
---|
|
|
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 Block |
---|
language | text |
---|
title | AAI APIs |
---|
collapse | true |
---|
|
|
Drools Rule - Alarm Correlation
AAI APIs
Output
POLICY
Operational Policy
Apex Engine
...
- Alarm Correlation Rules - Drools rules design time from SDC or Holmes UI to correlate the alarms.
Code Block |
---|
language | text |
---|
title | Alarm Correlation Rule |
---|
collapse | true |
---|
|
|
Upon receiving NNI up notification - update the status of the NNI in AAI.
Output
Code Block |
---|
|
{
"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
Code Block |
---|
language | text |
---|
title | Operational Policy |
---|
collapse | true |
---|
|
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.
Code Block |
---|
language | text |
---|
title | Apex Configuration - OnapPfConfig.json |
---|
collapse | true |
---|
|
"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
Code Block |
---|
language | text |
---|
title | Apex Policy Model - ApexMDONSPolicy |
---|
collapse | true |
---|
|
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
Code Block |
---|
title | ServiceInstanceType.avsc |
---|
|
{
"name": "AAI",
"type": "record",
"fields": [
{
"name": "request-id",
"type": "string"
},
{
"name": "service-name",
"type": "string"
},
{
"name": "service-type",
"type": "string"
}
]
} |
Code Block |
---|
title | SDNCRequestEventPayloadType.avsc |
---|
|
{
"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.
Code Block |
---|
language | text |
---|
title | SDNC API for CL Actions |
---|
collapse | true |
---|
|
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"
} |
CLAMP
CL Template
CL Instance
...