Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

Overview

The BBS-ep service is responsible for handling two types of events for the BBS use case.

The first type of event are PNF re-registration internal events that is published by PRH. The BBS-ep service processes the internal events to understand if they

actually constitute ONT(CPE) relocation events. In the relocation case, the BBS-ep service publishes an event towards unauthenticated.DCAE_CL_OUTPUT

DMaaP topic to trigger further Policy actions related to BBS use case.


The second type of event us the CPE authentication event originally published by the Edge SDN M&C component of BBS use case architecture.

Through the RestConf-Collector or VES-Collector, this event us consumed by the BBS-ep service and then forwarded towards unauthenticated.DCAE_CL_OUTPUT

DMaaP topic to trigger further Policy actions related to BBS use case.


The BBE-ep service periodically polls for the two events. The polling interval is configurable and can be changed dynamically from Consul. Its implementation

is based on Reactive Streams (Reactor library), so it is fully asynchronous and non-blocking.

Blueprint/model/image


Βlueprint component file can be found in
  https://gerrit.onap.org/r/gitweb?p=dcaegen2/services.git;a=blob_plain;f=components/bbs-event-processor/dpo/blueprints/k8s-bbs-event-processor.yaml-template;hb=refs/heads/master
Blueprint inputs file can be found in
  https://gerrit.onap.org/r/gitweb?p=dcaegen2/services.git;a=blob_plain;f=components/bbs-event-processor/dpo/blueprints/bbs-event-processor-input.yaml;h=f503eb823160aa7d2aae763d322818227f0f00b7;hb=refs/heads/master

Docker image metadata for component can be found in

  https://nexus3.onap.org/repository/docker.snapshot/v2/onap/org.onap.dcaegen2.services.components.bbs-event-processor/manifests/1.0.0-SNAPSHOT

Deployment Prerequisite/dependencies

The BBS-ep service requires DMaaP and A&AI to be functional in ONAP.

The BBS-ep service consumes/publishes messages from/to DMaaP and fetches (never updates) information from A&AI related to the BBS use-case logic.

Deployment Steps

To deploy

  • Transfer blueprint component file in DCAE bootstrap POD under /blueprints directory
  • Transfer blueprint component inputs file in DCAE bootstrap POD under / directory
  • Log-in to the DCAE bootstrap POD's main container
  • Validate blueprint

    Validate Blueprint
    cfy blueprints validate /blueprints/k8s-bbs-event-processor.yaml-template
  • Upload validated blueprint

    Upload validated blueprint
    cfy blueprints upload -b bbs-ep /blueprints/k8s-bbs-event-processor.yaml-template
  • Create Cloudify Deployment

    Create Cloudify deployment
    cfy deployments create -b bbs-ep -i /bbs-event-processor-input.yaml bbs-ep
  • Deploy component

    Deploy component
    cfy executions start -d bbs-ep install

To un-deploy

  • Uninstall running component and delete deployment

    Uninstall component
    cfy uninstall bbs-ep
  • Delete blueprint

    Delete blueprint
    cfy blueprints delete bbs-ep
    

Deployment steps for VES-Mapper

  • VES-Mapper blueprint is available @
    https://gerrit.onap.org/r/gitweb?p=dcaegen2/services/mapper.git;a=blob_plain;f=UniversalVesAdapter/dpo/blueprints/k8s-vesmapper.yaml-template.yaml
  • Transfer blueprint file in DCAE bootstrap POD under /blueprints directory
  • Log-in to the DCAE bootstrap POD's main container
  • To deploy::
    1.  Validate blueprint

      cfy blueprints validate /blueprints/k8s-vesmapper.yaml-template.yaml
    2. Upload validated blueprint

      cfy blueprints upload -b ves-mapper /blueprints/k8s-vesmapper.yaml-template.yaml
    3. Create Cloudify Deployment

      cfy deployments create -b ves-mapper ves-mapper
    4. Deploy component

      cfy executions start -d ves-mapper install
  • To un-deploy::
    1. Uninstall component

      cfy uninstall ves-mapper
    2. Delete blueprint

      cfy blueprints delete ves-mapper

Initial Validation

After deployment, we can check if BBS-ep POD is running correctly

Verify BBS-ep is running
root@cluster-admin:~# kubectl -n onap get pods | grep -i bbs
dep-bbs-event-processor-6b6df75d94-g7jw8                          2/2       Running            0          1d


And then check the logs to see if it can connect to DMaaP, polling for events. Even in the absence of events, we can at least verify that there is nothing to consume for both PNF re-registration messages and CPE authentication messages.

Verify BBS-ep can poll DMaaP
kubectl -n onap logs dep-bbs-event-processor-6b6df75d94-g7jw8 -c bbs-event-processor


2019-04-10 09:37:58.151  INFO 1 --- [pipeline-thrd-4] o.o.b.e.p.p.ReRegistrationPipeline       : Process next Re-Registration events
2019-04-10 09:37:58.152  INFO 1 --- [pipeline-thrd-1] o.o.b.e.p.p.CpeAuthenticationPipeline    : Process next CPE Authentication events
2019-04-10 09:38:07.680  INFO 1 --- [tor-http-nio-10] o.o.b.e.p.p.CpeAuthenticationPipeline    : Nothing to consume from DMaaP
2019-04-10 09:38:07.681  INFO 1 --- [tor-http-nio-10] o.o.b.e.p.p.CpeAuthenticationPipeline    : CPE Authentication processing pipeline has been completed
2019-04-10 09:38:07.681  INFO 1 --- [tor-http-nio-10] o.o.b.e.p.p.ReRegistrationPipeline       : Nothing to consume from DMaaP
2019-04-10 09:38:07.681  INFO 1 --- [tor-http-nio-10] o.o.b.e.p.p.ReRegistrationPipeline       : PNF Re-Registration processing pipeline has been completed
2019-04-10 09:38:28.151  INFO 1 --- [pipeline-thrd-4] o.o.b.e.p.p.ReRegistrationPipeline       : Process next Re-Registration events


Initial Validation for VES-Mapper

After Cloudify deployment,

  1. Check that VES-Mapper POD is created and it is in running state

    kubectl get pods -n onap | grep mapper
    dep-s36f1a2fadd614a42872bd680516e271a-dcaegen2-svc-mapper-l2cms 1/1 Running 0 1d
  2. Check the logs. Here are some important log statements that could be looked for.


    VES Mapper validation logs
    kubectl logs -n onap dep-s36f1a2fadd614a42872bd680516e271a-dcaegen2-svc-mapper-l2cms | more
    11:10:12.078 [main] INFO  debugLogger - Triggering controller's start url
    11:10:12.078 [main] INFO  debugLogger - Running curl command for url:http://localhost:8085/start
    11:10:12.186 [http-nio-8085-exec-1] INFO  o.a.c.c.C.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet'
    11:10:12.186 [http-nio-8085-exec-1] INFO  o.s.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet'
    11:10:12.200 [http-nio-8085-exec-1] INFO  o.s.web.servlet.DispatcherServlet - Completed initialization in 14 ms
    11:10:12.243 [http-nio-8085-exec-1] INFO  metricsLogger - UniversalVesAdapter Application starting...
    11:10:12.243 [http-nio-8085-exec-1] INFO  debugLogger - Creating Subcriber and Publisher with creator.............
    ...
    ...
    ...
    11:10:13.219 [http-nio-8085-exec-1] INFO  debugLogger - Created scriber topic:unauthenticated.DCAE_RCC_OUTPUTpublisher topic:unauthenticated.VES_PNFREG_OUTPUT
    11:10:13.230 [rcc-notification] INFO  metricsLogger - fetch and publish from and to Dmaap started:rcc-notification
    ...
    ...
    ...
    11:10:13.322 [http-nio-8085-exec-1] INFO  debugLogger - Created scriber topic:unauthenticated.ONAP-COLLECTOR-SNMPTRAPpublisher topic:unauthenticated.SEC_FAULT_OUTPUT
    11:10:13.326 [snmp-notification] INFO  metricsLogger - fetch and publish from and to Dmaap started:snmp-notification
    ...
    ...
    ...
    11:13:11.873 [snmp-notification] DEBUG debugLogger - number of messages to be converted :0
    11:13:13.044 [rcc-notification] DEBUG debugLogger - number of messages to be converted :0

Feed test data

To perform functional tests for BBS-ep, we must first populate test data to A&AI. This can be done by running the following Postman collection along with the required input file.

Postman Collection

JSON Input

Import the Collection JSON file into Postman and then execute it via the Runner utility after changing appropriately the external test-data input (for example give the appropriate A&AI IP address)

Populated objects inside A&AI are:

  • New business customer
  • New HSIA CFS service instance
  • New logical-link
  • New PNF related to logical-link and to the HSIA CFS service instance

Please note that new UUIDs for the test objects are automatically generated by the script.

Functional tests

With the test data successfully inside A&AI, we can perform two functional tests for BBS-ep

PNF re-registration handling

Send a triggering event to DMaaP topic 'unauthenticated.PNF_UPDATE

Before sending, make sure you have the

  • Correct DMaaP address
  • correlationId matches the 'pnf-name' in test data
  • attachment-point is different than the one found in test-data (otherwise it will not be considered as a true ONU relocation


Trigger a PNF re-registration event
curl -X POST http://10.133.115.190:30227/events/unauthenticated.PNF_UPDATE -H 'Content-Type: application/json' -d '{
	"nf-role":"gNB",
	"equip-type":"Unit-type-3",
	"equip-vendor":"Nokia",
	"equip-model":"SN-1",
	"serial-number":"",
	"sw-version":"SW-version-2",
	"correlationId":"pnf-11",
	"additionalFields": {
		"attachment-point": "olt11-1-1",
		"cvlan": "1005",
		"svlan": "100",
		"remote-id": "some-remote-id"
	}
}'


Logs showing PNF re-registration event handling
2019-04-24 10:40:10.334 TRACE 1 --- [ctor-http-nio-8] .u.ReRegistrationDmaapConsumerJsonParser : Event from DMaaP to be parsed:
{"nf-role":"gNB","equip-type":"Unit-type-3","equip-vendor":"Nokia","equip-model":"SN-1","additionalFields":{"remote-id":"some-remote-id","attachment-point":"olt11-1-1","cvlan":"1005","svlan":"100"},"serial-number":"","sw-version":"SW-version-2","correlationId":"pnf-11"}
2019-04-24 10:40:10.342 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.p.ReRegistrationPipeline : Processing Step: Retrieve PNF. Url: (/aai/v14/network/pnfs/pnf/pnf-11?depth=all)
2019-04-24 10:40:10.343 INFO 1 --- [ctor-http-nio-8] o.o.b.e.p.tasks.AaiClientTaskImpl : Executing task (PNF Retrieval) for retrieving PNF object
2019-04-24 10:40:10.343 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.utilities.AaiReactiveClient : Will issue Reactive GET request to URL (/aai/v14/network/pnfs/pnf/pnf-11?depth=all) for object (org.onap.bbs.event.processor.model.PnfAaiObject)
2019-04-24 10:40:10.469 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.utilities.AaiReactiveClient : Request: GET https://10.133.115.190:30233/aai/v14/network/pnfs/pnf/pnf-11?depth=all
2019-04-24 10:40:10.485 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.utilities.AaiReactiveClient : X-FromAppId=bbs
2019-04-24 10:40:10.488 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.utilities.AaiReactiveClient : Accept=application/json
2019-04-24 10:40:10.489 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.utilities.AaiReactiveClient : Authorization=Basic QUFJOkFBSQ==
2019-04-24 10:40:10.492 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.utilities.AaiReactiveClient : Content-Type=application/json
2019-04-24 10:40:10.493 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.utilities.AaiReactiveClient : Real-Time=true
2019-04-24 10:40:10.493 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.utilities.AaiReactiveClient : X-TransactionId=9999
2019-04-24 10:40:11.961 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.utilities.AaiReactiveClient : Response status 200 OK
2019-04-24 10:40:12.079 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.utilities.AaiReactiveClient : Response body
{"pnf-name":"pnf-11","in-maint":true,"resource-version":"1551889263181","relationship-list":{"relationship":[{"related-to":"service-instance","relationship-label":"org.onap.relationships.inventory.ComposedOf","related-link":"/aai/v14/business/customers/customer/766162a3-53a9-42b8-8fe2-ebaa2213a6dd/service-subscriptions/service-subscription/BBS-CFS11/service-instances/service-instance/1923eaa8-8ab7-49ef-b4c2-e185efbbe832","relationship-data":[{"relationship-key":"customer.global-customer-id","relationship-value":"766162a3-53a9-42b8-8fe2-ebaa2213a6dd"},{"relationship-key":"service-subscription.service-type","relationship-value":"BBS-CFS11"},{"relationship-key":"service-instance.service-instance-id","relationship-value":"1923eaa8-8ab7-49ef-b4c2-e185efbbe832"}],"related-to-property":[{"property-key":"service-instance.service-instance-name"}]},{"related-to":"logical-link","relationship-label":"org.onap.relationships.inventory.BridgedTo","related-link":"/aai/v14/network/logical-links/logical-link/olt11-11-11","relationship-data":[{"relationship-key":"logical-link.link-name","relationship-value":"olt11-11-11"}]}]}}
2019-04-24 10:40:12.198 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.p.ReRegistrationPipeline : Processing Step: Retrieve HSI CFS Service. Url: (/aai/v14/nodes/service-instances/service-instance/1923eaa8-8ab7-49ef-b4c2-e185efbbe832?depth=all)
2019-04-24 10:40:12.198 INFO 1 --- [ctor-http-nio-8] o.o.b.e.p.tasks.AaiClientTaskImpl : Executing task (HSI CFS Service Instance Retrieval) for retrieving Service Instance object
2019-04-24 10:40:12.198 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.utilities.AaiReactiveClient : Will issue Reactive GET request to URL (/aai/v14/nodes/service-instances/service-instance/1923eaa8-8ab7-49ef-b4c2-e185efbbe832?depth=all) for object (org.onap.bbs.event.processor.model.ServiceInstanceAaiObject)
2019-04-24 10:40:12.200 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.utilities.AaiReactiveClient : Request: GET https://10.133.115.190:30233/aai/v14/nodes/service-instances/service-instance/1923eaa8-8ab7-49ef-b4c2-e185efbbe832?depth=all
2019-04-24 10:40:12.200 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.utilities.AaiReactiveClient : X-FromAppId=bbs
2019-04-24 10:40:12.200 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.utilities.AaiReactiveClient : Accept=application/json
2019-04-24 10:40:12.200 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.utilities.AaiReactiveClient : Authorization=Basic QUFJOkFBSQ==
2019-04-24 10:40:12.200 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.utilities.AaiReactiveClient : Content-Type=application/json
2019-04-24 10:40:12.201 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.utilities.AaiReactiveClient : Real-Time=true
2019-04-24 10:40:12.201 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.utilities.AaiReactiveClient : X-TransactionId=9999
2019-04-24 10:40:12.495 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.utilities.AaiReactiveClient : Response status 200 OK
2019-04-24 10:40:12.500 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.utilities.AaiReactiveClient : Response body
{"service-instance-id":"1923eaa8-8ab7-49ef-b4c2-e185efbbe832","resource-version":"1551889260591","orchestration-status":"assigned","relationship-list":{"relationship":[{"related-to":"pnf","relationship-label":"org.onap.relationships.inventory.ComposedOf","related-link":"/aai/v14/network/pnfs/pnf/pnf-11","relationship-data":[{"relationship-key":"pnf.pnf-name","relationship-value":"pnf-11"}]}]},"metadata":{"metadatum":[{"metaname":"cvlan","metaval":"1005","resource-version":"1551889260599"},{"metaname":"svlan","metaval":"100","resource-version":"1551889260608"},{"metaname":"oltName","metaval":"olt1","resource-version":"1551889260616"},{"metaname":"rgw-mac-address","metaval":"01:02:03:04:05:06","resource-version":"1551889260624"}]}}
2019-04-24 10:40:12.523 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.p.ReRegistrationPipeline : Processing Step: Publish for Policy
2019-04-24 10:40:12.525 TRACE 1 --- [ctor-http-nio-8] o.o.b.e.p.p.ReRegistrationPipeline : Trigger Policy event: (ControlLoopPublisherDmaapModel{closedLoopEventClient=DCAE.BBS_event_processor_mSInstance, policyVersion=1.0.0.5, policyName=Nomadic_ONT, policyScope=policyScope, targetType=VM, aaiEnrichmentData={attachmentPoint=olt11-1-1, service-information.hsia-cfs-service-instance-id=1923eaa8-8ab7-49ef-b4c2-e185efbbe832, cvlan=1005, svlan=100, remoteId=some-remote-id}, closedLoopAlarmStart=1556102412, closedLoopEventStatus=ONSET, closedLoopControlName=controName, version=1.0.2, target=vserver.vserver-name, requestId=f96abe95-fb8c-4edf-9b9a-4ad922ae5aa9, originator=DCAE-bbs-event-processor})
2019-04-24 10:40:12.541 INFO 1 --- [ctor-http-nio-8] o.o.b.e.p.tasks.DmaapPublisherTaskImpl : Executing task for publishing control loop message
2019-04-24 10:40:12.546 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.tasks.DmaapPublisherTaskImpl : CL message
ControlLoopPublisherDmaapModel{closedLoopEventClient=DCAE.BBS_event_processor_mSInstance, policyVersion=1.0.0.5, policyName=Nomadic_ONT, policyScope=policyScope, targetType=VM, aaiEnrichmentData={attachmentPoint=olt11-1-1, service-information.hsia-cfs-service-instance-id=1923eaa8-8ab7-49ef-b4c2-e185efbbe832, cvlan=1005, svlan=100, remoteId=some-remote-id}, closedLoopAlarmStart=1556102412, closedLoopEventStatus=ONSET, closedLoopControlName=controName, version=1.0.2, target=vserver.vserver-name, requestId=f96abe95-fb8c-4edf-9b9a-4ad922ae5aa9, originator=DCAE-bbs-event-processor}
2019-04-24 10:40:12.940 INFO 1 --- [ctor-http-nio-8] o.o.b.e.p.p.ReRegistrationPipeline : PNF Re-Registration event successfully handled. Publishing to DMaaP for Policy returned a status code of (200 OK)
2019-04-24 10:40:12.940 INFO 1 --- [ctor-http-nio-8] o.o.b.e.p.p.ReRegistrationPipeline : PNF Re-Registration processing pipeline has been completed
2019-04-24 10:40:19.263 INFO 1 --- [ctor-http-nio-7] o.o.b.e.p.p.CpeAuthenticationPipeline : Nothing to consume from DMaaP
2019-04-24 10:40:19.264 INFO 1 --- [ctor-http-nio-7] o.o.b.e.p.p.CpeAuthenticationPipeline : CPE Authentication processing pipeline has been completed


We can check that a new DCAE_CL_OUTPUT event has been published (make sure you target the correct DMaaP IP address)

Fetch events from DCAE_CL_OUTPUT topic
curl -X GET http://10.133.115.190:30227/events/unauthenticated.DCAE_CL_OUTPUT/foo/bar


Published event
[
"{\"closedLoopEventClient\":\"DCAE.BBS_event_processor_mSInstance\",\"policyVersion\":\"1.0.0.5\",\"policyName\":\"Nomadic_ONT\",\"policyScope\":\"policyScope\",\"target_type\":\"VM\",\"AAI\":{\"attachmentPoint\":\"olt11-1-1\",\"service-information.hsia-cfs-service-instance-id\":\"1923eaa8-8ab7-49ef-b4c2-e185efbbe832\",\"cvlan\":\"1005\",\"svlan\":\"100\",\"remoteId\":\"some-remote-id\"},\"closedLoopAlarmStart\":1556102412,\"closedLoopEventStatus\":\"ONSET\",\"closedLoopControlName\":\"controName\",\"version\":\"1.0.2\",\"target\":\"vserver.vserver-name\",\"requestID\":\"f96abe95-fb8c-4edf-9b9a-4ad922ae5aa9\",\"from\":\"DCAE-bbs-event-processor\"}",
]


CPE authentication handling

Send a triggering event to DMaaP topic 'unauthenticated.CPE_AUTHENTICATION

Before sending, make sure you have the

  • Correct DMaaP address
  • sourceName matches the 'pnf-name' in test data
  • macAddress matches the 'rgw-mac-address' in test data


Trigger a PNF re-registration event
curl -X POST http://10.133.115.190:30227/events/unauthenticated.CPE_AUTHENTICATION -H 'Content-Type: application/json' -d '{
    "event": {
        "commonEventHeader": {
            "version": 7.1,
            "eventName": "StateChange_cpe_authentication",
            "domain": "stateChange",
            "eventId": "ab305d54-85b4-a31b-7db2fb6b9e546015",
            "eventType": "applicationNf",
            "sourceId": "",
            "sourceName": "pnf-11",
            "reportingEntityId": "",
            "reportingEntityName": "thirdparty-sdnc-idfromesrrequest",
            "priority": "Normal",
            "startEpochMicrosec": 1.413378172e+15,
            "lastEpochMicrosec": 1.413378172e+15,
            "sequence": 0,
            "internalHeaderFields": {},
            "vesEventListenerVersion": "",
            "timeZoneOffset": ""
        },
        "stateChangeFields": {
            "stateChangeFieldsVersion": 1,
            "oldState": "outOfService",
            "newState": "inService",
            "stateInterface": "",
            "additionalFields": {
                "macAddress": "01:02:03:04:05:06",
                "swVersion": "1.2.3"
            }
        }
    }
}'


Logs showing CPE authentication event handling
2019-04-24 10:42:09.513  INFO 1 --- [pipeline-thrd-5] o.o.b.e.p.p.ReRegistrationPipeline       : Process next Re-Registration events
2019-04-24 10:42:09.513  INFO 1 --- [pipeline-thrd-3] o.o.b.e.p.p.CpeAuthenticationPipeline    : Process next CPE Authentication events
2019-04-24 10:42:09.514 DEBUG 1 --- [pipeline-thrd-3] t.DmaapCpeAuthenticationConsumerTaskImpl : Executing task for CPE-Authentication with name "Consume CPE Authentication DMaaP message"
2019-04-24 10:42:09.514 DEBUG 1 --- [pipeline-thrd-5] .p.t.DmaapReRegistrationConsumerTaskImpl : Executing task for Re-Registration with name "Consume Re-registration DMaaP message"
2019-04-24 10:42:09.521 TRACE 1 --- [pipeline-thrd-3] o.o.b.e.p.p.CpeAuthenticationPipeline    : Reactive CPE Authentication pipeline subscribed - Execution started
2019-04-24 10:42:09.525 TRACE 1 --- [pipeline-thrd-5] o.o.b.e.p.p.ReRegistrationPipeline       : Reactive PNF Re-registration pipeline subscribed - Execution started
2019-04-24 10:42:10.301 TRACE 1 --- [ctor-http-nio-7] CpeAuthenticationDmaapConsumerJsonParser : Event from DMaaP to be parsed: 
{"event":{"commonEventHeader":{"sourceId":"","startEpochMicrosec":1.413378172E15,"eventId":"ab305d54-85b4-a31b-7db2fb6b9e546015","timeZoneOffset":"","reportingEntityId":"","internalHeaderFields":{},"eventType":"applicationNf","priority":"Normal","version":7.1,"reportingEntityName":"thirdparty-sdnc-idfromesrrequest","sequence":0,"domain":"stateChange","lastEpochMicrosec":1.413378172E15,"eventName":"StateChange_cpe_authentication","vesEventListenerVersion":"","sourceName":"pnf-11"},"stateChangeFields":{"additionalFields":{"macAddress":"01:02:03:04:05:06","swVersion":"1.2.3"},"oldState":"outOfService","stateChangeFieldsVersion":1,"stateInterface":"","newState":"inService"}}}
2019-04-24 10:42:10.304 DEBUG 1 --- [ctor-http-nio-7] o.o.b.e.p.p.CpeAuthenticationPipeline    : Processing Step: Retrieve PNF. Url: (/aai/v14/network/pnfs/pnf/pnf-11?depth=all)
2019-04-24 10:42:10.307  INFO 1 --- [ctor-http-nio-7] o.o.b.e.p.tasks.AaiClientTaskImpl        : Executing task (PNF Retrieval) for retrieving PNF object
2019-04-24 10:42:10.307 DEBUG 1 --- [ctor-http-nio-7] o.o.b.e.p.utilities.AaiReactiveClient    : Will issue Reactive GET request to URL (/aai/v14/network/pnfs/pnf/pnf-11?depth=all) for object (org.onap.bbs.event.processor.model.PnfAaiObject)
2019-04-24 10:42:10.308 DEBUG 1 --- [ctor-http-nio-7] o.o.b.e.p.utilities.AaiReactiveClient    : Request: GET https://10.133.115.190:30233/aai/v14/network/pnfs/pnf/pnf-11?depth=all
2019-04-24 10:42:10.309 DEBUG 1 --- [ctor-http-nio-7] o.o.b.e.p.utilities.AaiReactiveClient    : X-FromAppId=bbs
2019-04-24 10:42:10.309 DEBUG 1 --- [ctor-http-nio-7] o.o.b.e.p.utilities.AaiReactiveClient    : Accept=application/json
2019-04-24 10:42:10.309 DEBUG 1 --- [ctor-http-nio-7] o.o.b.e.p.utilities.AaiReactiveClient    : Authorization=Basic QUFJOkFBSQ==
2019-04-24 10:42:10.309 DEBUG 1 --- [ctor-http-nio-7] o.o.b.e.p.utilities.AaiReactiveClient    : Content-Type=application/json
2019-04-24 10:42:10.309 DEBUG 1 --- [ctor-http-nio-7] o.o.b.e.p.utilities.AaiReactiveClient    : Real-Time=true
2019-04-24 10:42:10.309 DEBUG 1 --- [ctor-http-nio-7] o.o.b.e.p.utilities.AaiReactiveClient    : X-TransactionId=9999
2019-04-24 10:42:10.934 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.utilities.AaiReactiveClient    : Response status 200 OK
2019-04-24 10:42:10.937 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.utilities.AaiReactiveClient    : Response body 
{"pnf-name":"pnf-11","in-maint":true,"resource-version":"1551889263181","relationship-list":{"relationship":[{"related-to":"service-instance","relationship-label":"org.onap.relationships.inventory.ComposedOf","related-link":"/aai/v14/business/customers/customer/766162a3-53a9-42b8-8fe2-ebaa2213a6dd/service-subscriptions/service-subscription/BBS-CFS11/service-instances/service-instance/1923eaa8-8ab7-49ef-b4c2-e185efbbe832","relationship-data":[{"relationship-key":"customer.global-customer-id","relationship-value":"766162a3-53a9-42b8-8fe2-ebaa2213a6dd"},{"relationship-key":"service-subscription.service-type","relationship-value":"BBS-CFS11"},{"relationship-key":"service-instance.service-instance-id","relationship-value":"1923eaa8-8ab7-49ef-b4c2-e185efbbe832"}],"related-to-property":[{"property-key":"service-instance.service-instance-name"}]},{"related-to":"logical-link","relationship-label":"org.onap.relationships.inventory.BridgedTo","related-link":"/aai/v14/network/logical-links/logical-link/olt11-11-11","relationship-data":[{"relationship-key":"logical-link.link-name","relationship-value":"olt11-11-11"}]}]}}
2019-04-24 10:42:10.942 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.p.CpeAuthenticationPipeline    : Processing Step: Retrieve HSI CFS Service. Url: (/aai/v14/nodes/service-instances/service-instance/1923eaa8-8ab7-49ef-b4c2-e185efbbe832?depth=all)
2019-04-24 10:42:10.942  INFO 1 --- [ctor-http-nio-8] o.o.b.e.p.tasks.AaiClientTaskImpl        : Executing task (HSI CFS Service Instance Retrieval) for retrieving Service Instance object
2019-04-24 10:42:10.942 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.utilities.AaiReactiveClient    : Will issue Reactive GET request to URL (/aai/v14/nodes/service-instances/service-instance/1923eaa8-8ab7-49ef-b4c2-e185efbbe832?depth=all) for object (org.onap.bbs.event.processor.model.ServiceInstanceAaiObject)
2019-04-24 10:42:10.944 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.utilities.AaiReactiveClient    : Request: GET https://10.133.115.190:30233/aai/v14/nodes/service-instances/service-instance/1923eaa8-8ab7-49ef-b4c2-e185efbbe832?depth=all
2019-04-24 10:42:10.944 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.utilities.AaiReactiveClient    : X-FromAppId=bbs
2019-04-24 10:42:10.944 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.utilities.AaiReactiveClient    : Accept=application/json
2019-04-24 10:42:10.945 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.utilities.AaiReactiveClient    : Authorization=Basic QUFJOkFBSQ==
2019-04-24 10:42:10.945 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.utilities.AaiReactiveClient    : Content-Type=application/json
2019-04-24 10:42:10.947 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.utilities.AaiReactiveClient    : Real-Time=true
2019-04-24 10:42:10.947 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.utilities.AaiReactiveClient    : X-TransactionId=9999
2019-04-24 10:42:11.230 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.utilities.AaiReactiveClient    : Response status 200 OK
2019-04-24 10:42:11.239 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.utilities.AaiReactiveClient    : Response body 
{"service-instance-id":"1923eaa8-8ab7-49ef-b4c2-e185efbbe832","resource-version":"1551889260591","orchestration-status":"assigned","relationship-list":{"relationship":[{"related-to":"pnf","relationship-label":"org.onap.relationships.inventory.ComposedOf","related-link":"/aai/v14/network/pnfs/pnf/pnf-11","relationship-data":[{"relationship-key":"pnf.pnf-name","relationship-value":"pnf-11"}]}]},"metadata":{"metadatum":[{"metaname":"cvlan","metaval":"1005","resource-version":"1551889260599"},{"metaname":"svlan","metaval":"100","resource-version":"1551889260608"},{"metaname":"oltName","metaval":"olt1","resource-version":"1551889260616"},{"metaname":"rgw-mac-address","metaval":"01:02:03:04:05:06","resource-version":"1551889260624"}]}}
2019-04-24 10:42:11.253 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.p.CpeAuthenticationPipeline    : Processing Step: Publish for Policy
2019-04-24 10:42:11.253 TRACE 1 --- [ctor-http-nio-8] o.o.b.e.p.p.CpeAuthenticationPipeline    : Trigger Policy event: (ControlLoopPublisherDmaapModel{closedLoopEventClient=DCAE.BBS_event_processor_mSInstance, policyVersion=1.0.0.5, policyName=CPE_Authentication, policyScope=policyScope, targetType=VM, aaiEnrichmentData={cpe.old-authentication-state=outOfService, cpe.new-authentication-state=inService, cpe.swVersion=1.2.3, service-information.hsia-cfs-service-instance-id=1923eaa8-8ab7-49ef-b4c2-e185efbbe832}, closedLoopAlarmStart=1556102531, closedLoopEventStatus=ONSET, closedLoopControlName=controlName, version=1.0.2, target=vserver.vserver-name, requestId=205f5550-37a0-4be7-be63-effefe181b37, originator=DCAE-bbs-event-processor})
2019-04-24 10:42:11.253  INFO 1 --- [ctor-http-nio-8] o.o.b.e.p.tasks.DmaapPublisherTaskImpl   : Executing task for publishing control loop message
2019-04-24 10:42:11.254 DEBUG 1 --- [ctor-http-nio-8] o.o.b.e.p.tasks.DmaapPublisherTaskImpl   : CL message 
ControlLoopPublisherDmaapModel{closedLoopEventClient=DCAE.BBS_event_processor_mSInstance, policyVersion=1.0.0.5, policyName=CPE_Authentication, policyScope=policyScope, targetType=VM, aaiEnrichmentData={cpe.old-authentication-state=outOfService, cpe.new-authentication-state=inService, cpe.swVersion=1.2.3, service-information.hsia-cfs-service-instance-id=1923eaa8-8ab7-49ef-b4c2-e185efbbe832}, closedLoopAlarmStart=1556102531, closedLoopEventStatus=ONSET, closedLoopControlName=controlName, version=1.0.2, target=vserver.vserver-name, requestId=205f5550-37a0-4be7-be63-effefe181b37, originator=DCAE-bbs-event-processor}
2019-04-24 10:42:11.631  INFO 1 --- [ctor-http-nio-7] o.o.b.e.p.p.CpeAuthenticationPipeline    : CPE Authentication event successfully handled. Publishing to DMaaP for Policy returned a status code of (200 OK)
2019-04-24 10:42:11.633  INFO 1 --- [ctor-http-nio-7] o.o.b.e.p.p.CpeAuthenticationPipeline    : CPE Authentication processing pipeline has been completed


We can check that a new DCAE_CL_OUTPUT event has been published (make sure you target the correct DMaaP IP address)

Fetch events from DCAE_CL_OUTPUT topic
curl -X GET http://10.133.115.190:30227/events/unauthenticated.DCAE_CL_OUTPUT/foo/bar
Published event
[
"{\"closedLoopEventClient\":\"DCAE.BBS_event_processor_mSInstance\",\"policyVersion\":\"1.0.0.5\",\"policyName\":\"CPE_Authentication\",\"policyScope\":\"policyScope\",\"target_type\":\"VM\",\"AAI\":{\"cpe.old-authentication-state\":\"outOfService\",\"cpe.new-authentication-state\":\"inService\",\"cpe.swVersion\":\"1.2.3\",\"service-information.hsia-cfs-service-instance-id\":\"1923eaa8-8ab7-49ef-b4c2-e185efbbe832\"},\"closedLoopAlarmStart\":1556102531,\"closedLoopEventStatus\":\"ONSET\",\"closedLoopControlName\":\"controlName\",\"version\":\"1.0.2\",\"target\":\"vserver.vserver-name\",\"requestID\":\"205f5550-37a0-4be7-be63-effefe181b37\",\"from\":\"DCAE-bbs-event-processor\"}"
]

Functional testing of VES-Mapper individually

  1. Send a PNF registration notification on behalf of RestConf Collector by calling DMaaP API
    curl -v -k -H 'Content-Type:application/json' -POST http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.DCAE_RCC_OUTPUT -d @rcc_noti.json
    rcc_noti.json
  2. Invoke DMaaP API to fetch message on the topic unauthenticated.VES_PNFREG_OUTPUT . VES-Mapper should have published converted VES event on this topic.
curl -X GET 'http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_PNFREG_OUTPUT/grp2/con2?timeout=1600'

PNF_registration_VES_event.json

VES-Mapper Logs

12:35:27.886 [rcc-notification] DEBUG debugLogger - number of messages to be converted :1
12:35:27.889 [rcc-notification] INFO debugLogger - Retrieved JsonArray from Collector Config File
12:35:27.889 [rcc-notification] INFO debugLogger - returning identifier array from Collector Config
12:35:27.890 [rcc-notification] DEBUG debugLogger - Using Default Mapping file as Mapping file is not available for Enterprise Id / identifer ID:2541256
12:35:28.075 [rcc-notification] INFO debugLogger - Transforming incoming json
12:35:28.114 [rcc-notification] INFO debugLogger - Context created
12:35:28.125 [rcc-notification] DEBUG debugLogger - consversion successful to VES Event
12:35:28.125 [rcc-notification] INFO debugLogger - Incoming json transformed to VES format successfully:rcc-notification
12:35:28.137 [rcc-notification] INFO debugLogger - Serialized VES json
12:35:28.138 [rcc-notification] DEBUG debugLogger - Batch Queue capacity exceeds messages size. Flushing of all pending messages to DMaaP MR Publisher Topic.
12:35:28.138 [rcc-notification] DEBUG debugLogger - Force publishing messages to DMaaP MR Topic. Messages Size: 1
12:35:28.138 [rcc-notification] DEBUG debugLogger - DMaaP MR Publisher Authentication is disabled as username or password is not present.
12:35:28.167 [rcc-notification] DEBUG debugLogger - DMaaP MR Messages published successfully. DMaaP Response Code: 200. DMaaP Response Body: {
"serverTimeMs": 0,
"count": 1
}, Number of Messages published: 1
12:35:28.168 [rcc-notification] INFO metricsLogger - Message successfully published to DMaaP Topic-
{"event":{"commonEventHeader":{"domain":"pnfRegistration","eventId":"registration_1556627728115","eventName":"pnfRegistration","eventType":"pnfRegistration","lastEpochMicrosec":1.556627728115E12,"priority":"Normal","reportingEntityName":"VESMapper","sequence":0,"sourceName":"Huawei-HWTCC01B7504","startEpochMicrosec":1.556627728115E12,"version":"4.0.1","vesEventListenerVersion":"7.0.1"},"pnfRegistrationFields":{"additionalFields":{"remote-id":"some-remote-id","attachment-point":"NE=167772165-5-1","cvlan":"1005","svlan":"100"},"lastServiceDate":"somestring","manufactureDate":"","modelNumber":" somestring","oamV4IpAddress":"somestring","oamV6IpAddress":"somestring","pnfRegistrationFieldsVersion":"2.0","serialNumber":"HWTCC01B7504","softwareVersion":"v1","unitFamily":"somestring","unitType":"somestring","vendorName":"Huawei"}}}




  • No labels