Uploaded image for project: 'Common Controller SDK'
  1. Common Controller SDK
  2. CCSDK-263

Add LCM Consumer in CCSDK DMaap Client

XMLWordPrintable

      Add a Consumer that can process LCM DMaap messages, extract the body and POST the msg to the LCM API Handler.

      1. LCM needs to support requests of the following format(see ** towards bottom of email)
      2. All the LCM ODL api (LCM:<rpc-name>) needs is the body jsonNode from the request
      3. Create a new consumer SdncLcmDmaapConsumer.java that would simply extract the body JsonNode from the incoming msg and send to LCM api handler
      4. I would also update the dmapp-listener.properties to add a lcm subscription (as below )

      subscriptions=org.onap.ccsdk.sli.northbound.dmaapclient.SdncDhcpEventConsumer:dhcpalert.properties;org.onap.ccsdk.sli.northbound.dmaapclient.SdncLcmConsumer:lcm.properties

       

      1. Copy dhcpalert.properties (below from gerrit oam) to lcm.properties and update the topic to the LCM topic. Am assuming the values can be updated later if incorrect..

       

      TransportType=HTTPAUTH

      Latitude =50.000000

      Longitude =-100.000000

      Version =1.0

      ServiceName =dmaap-v1.dev.dmaap.dt.saat.acsi.openecomp.org/events

      Environment =TEST

      Partner = BOT_R

      routeOffer=MR1

      SubContextPath =/

      Protocol =http

      MethodType =GET

      username =admin

      password =admin

      contenttype =application/json

      authKey=fxoW4jZrO7mdLWWa:f4KxkoBtToyoEG7suMoV8KhnkwM=

      authDate=2016-02-18T13:57:37-0800

      host=ueb.api.simpledemo.onap.org:3904

      topic=VCPE-DHCP-EVENT

      group=jmsgrp

      id=sdnc_1

      timeout=15000

      limit=1000

      filter=

      AFT_DME2_EXCHANGE_REQUEST_HANDLERS=com.att.nsa.test.PreferredRouteRequestHandler

      AFT_DME2_EXCHANGE_REPLY_HANDLERS=com.att.nsa.test.PreferredRouteReplyHandler

      AFT_DME2_REQ_TRACE_ON=true

      AFT_ENVIRONMENT=AFTUAT

      AFT_DME2_EP_CONN_TIMEOUT=15000

      AFT_DME2_ROUNDTRIP_TIMEOUT_MS=240000

      AFT_DME2_EP_READ_TIMEOUT_MS=50000

      sessionstickinessrequired=NO

      DME2preferredRouterFilePath=/opt/onap/sdnc/data/properties/dmaap-listener.preferredRoute.txt

      sdnc.odl.user=admin

      sdnc.odl.password=admin

      *sdnc.odl.url-base=https://sdncodl.st.us.aic.cip.att.com:8443/restconf/operations*

      Thx

      Ruchira

      -----------------------------------------------------------------------------------------------------------------------------------------------

      **

                      Message In/Out

                      {

                      "version" : "2.0",

                      "cambria.partition" : "<TOPIC eg "MSO" for response and "APP-C" for request>",

                      "correlation-id" :"<CORRELATION_ID>",

                      "rpc-name" : "<RPC_NME>",

                      "type" : <MESSAGE_TYPE eg "response">

                      "body" : <RPC_SPECIFIC_BODY>

                      }

                     

                      Body - REQUEST - sent to rpc

                     

                      {

                          "input": {

                              "common-header": {

                                  "timestamp": "<TIMESTAMP>",

                                  "api-ver": "<API_VERSION>",

                                  "originator-id": "<ECOMP_SYSTEM_ID>",

                                  "request-id": "<ECOMP_REQUEST_ID>",

                                  "sub-request-id": "<ECOMP_SUBREQUEST_ID>",

                                  "flags": {

                                      "mode": "<EXCLUSIVE|NORMAL>",

                                      "force": "<TRUE|FALSE>",

                                      "ttl": "<TTL_VALUE>"

                                  }

                              },

                              "action": "<COMMAND_ACTION>",

                              "action-identifiers": {

                                  "vnf-id": "<ECOMP_VNF_ID>",

                                  "vnfc-name": "<ECOMP_VNFC_NAME>",

                                  "vserver-id": "VSERVER_ID"

                              },

                             [ "payload": "PAYLOAD"]  // this is a free format valid json eg with 2 fields existing-software-version, new-software-version

                          }

                      }

                     

                      "payload":

                      "{\"existing-software-version\": \"3.1\", "{\"new-software-version\": \"3.2\"}”

            ra1926 ra1926
            ra1926 ra1926
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: