Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagetext
titleConverted 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
languagetext
titleAAI APIs
collapsetrue

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
languagetext
titleAlarm Correlation Rule
collapsetrue


Upon receiving NNI up notification - update the status of the NNI in AAI.

Output

Code Block
titleDCAE_Output_Event
{
    "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
languagetext
titleOperational Policy
collapsetrue
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
languagetext
titleApex Configuration - OnapPfConfig.json
collapsetrue
  "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
languagetext
titleApex Policy Model - ApexMDONSPolicy
collapsetrue
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
titleServiceInstanceType.avsc
{
  "name": "AAI",
  "type": "record",
  "fields": [
    {
      "name": "request-id",
      "type": "string"
    },
    {
      "name": "service-name",
      "type": "string"
    },
    {
      "name": "service-type",
      "type": "string"
    }
  ]
}


Code Block
titleSDNCRequestEventPayloadType.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:

  1. Upda, te OTN service instance status.
  2. Lookup for available IDL
  3. Delete original domain services
  4. Create new domain service accordingly
  5. Associate the new IDL and domain services with the existing OTN service instance.


Code Block
languagetext
titleSDNC API for CL Actions
collapsetrue
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

...