Versions Compared

Key

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

...

DCAE

Data Collection Diagram

Option 1 - RCC/VES Mapper

If the notification data is received from domain controller in non-VES format, such as, TAPI, and/or other JSON format, RCC is the data collection micro-service and VES Mapper micro-service is needed to convert the alarm notification into VES format.

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.

...

Code Block
languagetext
titleConverted VES Event
collapsetrue

HOLMES

...

...

Option 2 - VES Colloctor

In case the domain controller acts like a VES client that can deliver the notification data in VES format,  VES collector micro-service is needed and VES mapper could be skipped in the data collection flow in MDONS closed instance.


HOLMES

Jira Legacy
serverSystem Jira
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId4733707d-2057-3a0f-ae5e-4fd8aff50176
keyHOLMES-312

...

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

Policy Engine - Apex

...

Apex Policy Engine is used in MDONS use case to execute the operational Policy.

Code Block
languagetext
titleApex Configuration - OnapPfConfig.json
collapsetrue
{
  "engineServiceParameters": {
	      "name": "MDONSPolicyModelEngineMDONSApexEngine",
	      "version": "0.0.1",
	      "id": 10145,
	      "instanceCount": 21,
	      "deploymentPort": 1234512561,
	      "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                "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": "httphttps://message-router:39043905/events/unauthenticated.DCAE_Output_Event/g1/c1?timeout=60000"
		          }
		      },
		      "eventProtocolParameters": {
		          "eventProtocol": "JSON",
		          "parameters": {
			          "nameAlias": "policyNameclosedLoopControlName",
			      "versionAlias": "version",
			          "sourceAlias": "from",
			"pojoField": "VirtualControlLoopEvent"
		  }
		}
	  }
	 },
  
        }
      }
    }
  },
  "eventOutputParameters": {

	  "SDNC    "logOutputter": {
		      "carrierTechnologyParameters": {
		          "carrierTechnology": "RESTCLIENTFILE",
		  "parameterClassName        "parameters": {
          "fileName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
		  "parametersoutputevents.log"
        }
      },
      "eventProtocolParameters": {
			        "urleventProtocol": "http://<SDNC-IP>:<SDNC-PORT>//service/optical-service/?"
		  }
		},
		"eventProtocolParametersJSON"
      }
    },
    "SDNCRequestProducer": {
		  "eventProtocol        "carrierTechnologyParameters": {
          "carrierTechnology": "JSONRESTCLIENT",
		  "parameters          "parameterClassName": {
			"nameAlias": "policyName",
			"versionAlias": "version",
			"sourceAlias": "from",
			"pojoField": "VirtualControlLoopEvent"
		  }
		}
	  }
	}
  }
}"org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
          "parameters": {
            "url": "http://sdnc-oam:8282/restconf/operations/SLI-API:execute-graph", 
            "httpMethod": "POST",
            "httpHeaders" : [
                        ["Authorization", "Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ=="],
                        ["Accept","application/json"],
            ["Content-Type","application/json"]
                    ]
          }
        },
        "eventProtocolParameters": {
          "eventProtocol": "JSON",
      "parameters": {
          "pojoField": "SDNCInput"
        }
 
        }
      }
  }
}

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 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=VirtualControlLoopEvent flavour=Avro schema=LS
#MACROFILE:"src/main/resources/schemas/VirtualControlLoopEvent.avsc"
LE
  
schema create name=SDNCInput flavour=Avro schema=LS
#MACROFILE:"src/main/resources/schemas/SDNCInput.avsc"
LE
 
  
event create name=ControlLoop-MDONS-2179b738-fd36-4843-a71a-a8c24c70c66b version=0.0.1 nameSpace=org.onap.policy.apex.onap.pmcontrol source=DCAE target=APEX
event parameter create name=ControlLoop-MDONS-2179b738-fd36-4843-a71a-a8c24c70c66b parName=closedLoopEventClient schemaName=SimpleStringType 
event parameter create name=ControlLoop-MDONS-2179b738-fd36-4843-a71a-a8c24c70c66b parName=policyVersion schemaName=SimpleStringType
event parameter create name=ControlLoop-MDONS-2179b738-fd36-4843-a71a-a8c24c70c66b parName=policyName schemaName=SimpleStringType
event parameter create name=ControlLoop-MDONS-2179b738-fd36-4843-a71a-a8c24c70c66b parName=policyScope schemaName=SimpleStringType
event parameter create name=ControlLoop-MDONS-2179b738-fd36-4843-a71a-a8c24c70c66b parName=target_type schemaName=SimpleStringType
event parameter create name=ControlLoop-MDONS-2179b738-fd36-4843-a71a-a8c24c70c66b parName=closedLoopAlarmStart schemaName=SimpleStringType
event parameter create name=ControlLoop-MDONS-2179b738-fd36-4843-a71a-a8c24c70c66b parName=closedLoopEventStatus schemaName=SimpleStringType
event parameter create name=ControlLoop-MDONS-2179b738-fd36-4843-a71a-a8c24c70c66b parName=closedLoopControlName schemaName=SimpleStringType
event parameter create name=inputEventControlLoop-MDONS-2179b738-fd36-4843-a71a-a8c24c70c66b parName=nfNameversion schemaName=SimpleStringType
event parameter create name=inputEventControlLoop-MDONS-2179b738-fd36-4843-a71a-a8c24c70c66b parName=policyNametarget schemaName=SimpleStringType
event parameter create name=inputEvent=ControlLoop-MDONS-2179b738-fd36-4843-a71a-a8c24c70c66b parName=changeTyperequestID schemaName=SimpleStringType
event parameter create name=inputEventControlLoop-MDONS-2179b738-fd36-4843-a71a-a8c24c70c66b parName=closedLoopControlNamefrom schemaName=SimpleStringType
event parameter create name=inputEventControlLoop-MDONS-2179b738-fd36-4843-a71a-a8c24c70c66b parName=serviceInfoAAI schemaName=ServiceInstanceTypeVirtualControlLoopEvent
  
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 inputfieldpmcontrol source=APEX target=SDNC
event parameter create name=CreateSDNCRequestPayloadTaskSDNCRequestEvent fieldNameparName=serviceInfoSDNCInput schemaName=ServiceInstanceTypeSDNCInput
  
task outputfield create name=CreateSDNCRequestPayloadTask fieldName=payload schemaName=SDNCRequestEventPayloadType
task outputfieldinputfield create name=CreateSDNCRequestPayloadTask fieldName=commonHeaderAAI schemaName=SDNCRequestEventHeaderTypeVirtualControlLoopEvent
task outputfield create name=CreateSDNCRequestPayloadTask fieldName=albumIDSDNCInput schemaName=UUIDTypeSDNCInput
task logic create name=CreateSDNCRequestPayloadTask logicFlavour=JAVASCRIPT logic=LS
#MACROFILE:"src/main/resources/logic/CreateSDNCRequestPayloadTask.js""
LE
  
policy create name=CreateEventPolicy template=Freestyle firstState=CreateService
  
policy state create name=CreateEventPolicy stateName=CreateService triggerName=inputEventControlLoop-MDONS-2179b738-fd36-4843-a71a-a8c24c70c66b defaultTaskName=CreateSDNCRequestPayloadTask
policy state output create name=CreateEventPolicy stateName=CreateService outputName=SDNCRequestPayloadOutputSDNCRequestOutput eventName=SDNCRequestEvent nextState=NULL
policy state taskref create name=CreateEventPolicy stateName=CreateServicesCreateService taskName=CreateSDNCRequestPayloadTask outputType=DIRECT outputName=SDNCRequestOutput
validate

Policy Tosca Json

Code Block
titleApexMDONSToscaPloicy.json
collapsetrue


Policy Schema

Code Block
titleServiceInstanceType.avsc
collapsetrue
{
  "name": "AAI",
  "type": "record",
  "fields": [
    {
      "name": "request-id",
      "type": "string"
    },
    {
      "name": "service-name",
      "type": "string"
    },
    {
      "name": "service-type",
      "type": "string"
    }
  ]
}

...