Add CSIT for son-handler

Issue-ID: DCAEGEN2-1433
Signed-off-by: Niranjana <niranjana.y60@wipro.com>
Change-Id: Id7ea296ebef70964f5e8b751969595320b49d00a
diff --git a/plans/dcaegen2-services-son-handler/testsuites/config/dmaap/MsgRtrApi.properties b/plans/dcaegen2-services-son-handler/testsuites/config/dmaap/MsgRtrApi.properties
new file mode 100644
index 0000000..712cbcb
--- /dev/null
+++ b/plans/dcaegen2-services-son-handler/testsuites/config/dmaap/MsgRtrApi.properties
@@ -0,0 +1,172 @@
+# LICENSE_START=======================================================
+#  org.onap.dmaap
+#  ================================================================================
+#  Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+#  Copyright (C) 2020 Wipro Limited.
+#  ================================================================================
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#        http://www.apache.org/licenses/LICENSE-2.0
+#  
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#  ============LICENSE_END=========================================================
+#
+#  ECOMP is a trademark and service mark of AT&T Intellectual Property.
+#  
+###############################################################################
+###############################################################################
+##
+## Cambria API Server config
+##
+##	- Default values are shown as commented settings.
+##
+
+###############################################################################
+##
+## HTTP service
+##
+##		- 3904 is standard as of 7/29/14.
+#
+## Zookeeper Connection
+##
+##	Both Cambria and Kafka make use of Zookeeper.
+##
+#config.zk.servers=172.18.1.1
+config.zk.servers=zookeeper:2181
+#config.zk.root=/fe3c/cambria/config
+
+
+###############################################################################
+##
+## Kafka Connection
+##
+##	Items below are passed through to Kafka's producer and consumer
+##	configurations (after removing "kafka.")
+##	if you want to change request.required.acks it can take this one value
+#kafka.metadata.broker.list=localhost:9092,localhost:9093
+kafka.metadata.broker.list=kafka:9092
+##kafka.request.required.acks=-1
+#kafka.client.zookeeper=${config.zk.servers}
+consumer.timeout.ms=100
+zookeeper.connection.timeout.ms=6000
+zookeeper.session.timeout.ms=20000
+zookeeper.sync.time.ms=2000
+auto.commit.interval.ms=1000
+fetch.message.max.bytes =1000000
+auto.commit.enable=false
+
+#(backoff*retries > zksessiontimeout)
+kafka.rebalance.backoff.ms=10000
+kafka.rebalance.max.retries=6
+
+
+###############################################################################
+##
+##	Secured Config
+##
+##	Some data stored in the config system is sensitive -- API keys and secrets,
+##	for example. to protect it, we use an encryption layer for this section
+##	of the config.
+##
+## The key is a base64 encode AES key. This must be created/configured for
+## each installation.
+#cambria.secureConfig.key=
+##
+## The initialization vector is a 16 byte value specific to the secured store.
+## This must be created/configured for each installation.
+#cambria.secureConfig.iv=
+
+## Southfield Sandbox
+cambria.secureConfig.key=b/7ouTn9FfEw2PQwL0ov/Q==
+cambria.secureConfig.iv=wR9xP5k5vbz/xD0LmtqQLw==
+authentication.adminSecret=fe3cCompound
+#cambria.secureConfig.key[pc569h]=YT3XPyxEmKCTLI2NK+Sjbw==
+#cambria.secureConfig.iv[pc569h]=rMm2jhR3yVnU+u2V9Ugu3Q==
+
+
+###############################################################################
+##
+## Consumer Caching
+##
+##	Kafka expects live connections from the consumer to the broker, which
+##	obviously doesn't work over connectionless HTTP requests. The Cambria
+##	server proxies HTTP requests into Kafka consumer sessions that are kept
+##	around for later re-use. Not doing so is costly for setup per request,
+##	which would substantially impact a high volume consumer's performance.
+##
+##	This complicates Cambria server failover, because we often need server
+##	A to close its connection before server B brings up the replacement.    
+##
+
+## The consumer cache is normally enabled.
+#cambria.consumer.cache.enabled=true
+
+## Cached consumers are cleaned up after a period of disuse. The server inspects
+## consumers every sweepFreqSeconds and will clean up any connections that are
+## dormant for touchFreqMs.
+#cambria.consumer.cache.sweepFreqSeconds=15
+cambria.consumer.cache.touchFreqMs=120000
+##stickforallconsumerrequests=false
+## The cache is managed through ZK. The default value for the ZK connection
+## string is the same as config.zk.servers.
+#cambria.consumer.cache.zkConnect=${config.zk.servers}
+
+##
+## Shared cache information is associated with this node's name. The default
+## name is the hostname plus the HTTP service port this host runs on. (The
+## hostname is determined via InetAddress.getLocalHost ().getCanonicalHostName(),
+## which is not always adequate.) You can set this value explicitly here.
+##
+#cambria.api.node.identifier=<use-something-unique-to-this-instance>
+
+#cambria.rateLimit.maxEmptyPollsPerMinute=30
+#cambria.rateLimitActual.delay.ms=10
+
+###############################################################################
+##
+## Metrics Reporting
+##
+##	This server can report its metrics periodically on a topic.
+##
+#metrics.send.cambria.enabled=true
+#metrics.send.cambria.topic=cambria.apinode.metrics                                  #msgrtr.apinode.metrics.dmaap 
+#metrics.send.cambria.sendEverySeconds=60
+
+cambria.consumer.cache.zkBasePath=/fe3c/cambria/consumerCache
+consumer.timeout=17
+default.partitions=3
+default.replicas=3
+##############################################################################
+#100mb
+maxcontentlength=10000
+
+
+##############################################################################
+#AAF Properties
+msgRtr.namespace.aaf=org.onap.dmaap.mr.topic
+msgRtr.topicfactory.aaf=org.onap.dmaap.mr.topicFactory|:org.onap.dmaap.mr.topic:
+enforced.topic.name.AAF=org.onap
+forceAAF=false
+transidUEBtopicreqd=false
+defaultNSforUEB=org.onap.dmaap.mr
+##############################################################################
+#Mirror Maker Agent
+msgRtr.mirrormakeradmin.aaf=com.onap.dmaap.mr.dev.mirrormaker|*|admin
+msgRtr.mirrormakeruser.aaf=com.onap.dmaap.mr.dev.mirrormaker|*|user
+msgRtr.mirrormakeruser.aaf.create=com.onap.dmaap.mr.dev.topicFactory|:com.onap.dmaap.mr.dev.topic:
+msgRtr.mirrormaker.timeout=15000
+msgRtr.mirrormaker.topic=com.onap.dmaap.mr.prod.mm.agent
+msgRtr.mirrormaker.consumergroup=mmagentserver
+msgRtr.mirrormaker.consumerid=1
+
+kafka.max.poll.interval.ms=300000
+kafka.heartbeat.interval.ms=60000
+kafka.session.timeout.ms=240000
+kafka.max.poll.records=1000
+
+
diff --git a/plans/dcaegen2-services-son-handler/testsuites/config/sonhms/config_all.json b/plans/dcaegen2-services-son-handler/testsuites/config/sonhms/config_all.json
new file mode 100644
index 0000000..8372142
--- /dev/null
+++ b/plans/dcaegen2-services-son-handler/testsuites/config/sonhms/config_all.json
@@ -0,0 +1,134 @@
+{
+  "config": {
+    "sonhandler.badCountThreshold": 1,
+    "streams_subscribes": {
+      "performance_management_topic": {
+        "aaf_password": null,
+        "type": "message-router",
+        "dmaap_info": {
+          "topic_url": "https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.VES_MEASUREMENT_OUTPUT",
+          "client_role": "son-subscriber",
+          "location": "onap",
+          "client_id": "sdnr-son-1"
+        },
+        "aaf_username": null
+      },
+      "fault_management_topic": {
+        "aaf_password": null,
+        "type": "message-router",
+        "dmaap_info": {
+          "topic_url": "https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.SEC_FAULT_OUTPUT",
+          "client_role": "son-subscriber",
+          "location": "onap",
+          "client_id": "sdnr-son-1"
+        },
+        "aaf_username": null
+      },
+      "nbr_list_change_topic": {
+        "aaf_password": null,
+        "type": "message-router",
+        "dmaap_info": {
+          "topic_url": "https://message-router.onap.svc.cluster.local:3905/events/PCI-NOTIF-TOPIC-NGHBR-LIST-CHANGE-INFO",
+          "client_role": "son-subscriber",
+          "location": "onap",
+          "client_id": "sdnr-son-1"
+        },
+        "aaf_username": null
+      },
+      "dcae_cl_response_topic": {
+        "aaf_password": null,
+        "type": "message-router",
+        "dmaap_info": {
+          "topic_url": "https://message-router.onap.svc.cluster.local:3905/events/DCAE_CL_RSP",
+          "client_role": "son-subscriber",
+          "location": "onap",
+          "client_id": "sdnr-son-1"
+        },
+        "aaf_username": null
+      }
+    },
+    "postgres.port": "5432",
+    "sonhandler.pciOptimizer": "pci",
+    "sonhandler.maximumClusters": 5,
+    "sonhandler.numSolutions": 5,
+    "sonhandler.poorCountThreshold": 1,
+    "sonhandler.minCollision": 5,
+    "streams_publishes": {
+      "CL_topic": {
+        "aaf_password": null,
+        "type": "message-router",
+        "dmaap_info": {
+          "topic_url": "https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.DCAE_CL_OUTPUT",
+          "client_role": "son-subscriber",
+          "location": "onap",
+          "client_id": "sdnr-son-1"
+        },
+        "aaf_username": null
+      }
+    },
+    "sonhandler.namespace": "onap",
+    "sonhandler.oof.endpoint": "/api/oof/v1/pci",
+    "postgres.password": "postgres",
+    "sonhandler.minConfusion": 5,
+    "sonhandler.sourceId": "SONHMS",
+    "postgres.username": "sonhms_admin",
+    "postgres.host": "postgres",
+    "sonhandler.policyRespTimer": 10,
+    "sonhandler.dmaap.server": [
+      "dmaap"
+    ],
+    "sonhandler.poorThreshold": 70,
+    "sonhandler.oofTriggerCountTimer": 30,
+    "cbsPollingInterval": 60,
+    "sonhandler.cg": "sonhms-cg",
+    "sonhandler.pollingInterval": 20,
+    "sonhandler.badThreshold": 50,
+    "sonhandler.bufferTime": 60,
+    "sonhandler.cid": "sonhms-cid",
+    "sonhandler.configDb.service": "http://configdb_oof_sim:5000",
+    "sonhandler.oofTriggerCountThreshold": 5,
+    "sonhandler.oof.service": "http://configdb_oof_sim:5000",
+    "sonhandler.pciAnrOptimizer": "pci_anr",
+    "sonhandler.policyNegativeAckThreshold": 1,
+    "sonhandler.policyFixedPciTimeInterval": 10000,
+    "sonhandler.pollingTimeout": 60,
+    "sonhandler.nfNamingCode": "RansimAgent",
+    "service_calls": {
+      "sdnr-getpnfname": [],
+      "sdnr-getpci": [],
+      "sdnr-getnbrlist": [],
+      "sdnr-getcelllist": [],
+      "oof-req": [],
+      "policy-req": []
+    }
+  },
+  "policies": {
+    "event": {
+      "action": "gathered",
+      "timestamp": "2019-09-18T14:57:55.320Z",
+      "update_id": "dbb88da8-8df1-489d-b51d-8d5cbbfbcd99",
+      "policies_count": 1
+    },
+    "items": [
+      {
+        "policyName": "com.Config_PCIMS_CONFIG_POLICY.1.xml",
+        "name": "com.Config_PCIMS_CONFIG_POLICY",
+        "config": {
+          "PCI_SDNR_TARGET_NAME": "SDNR",
+          "PCI_OPTMIZATION_ALGO_CATEGORY_IN_OOF": "OOF-PCI-OPTIMIZATION",
+          "PCI_NEIGHBOR_CHANGE_CLUSTER_TIMEOUT_IN_SECS": 60,
+          "PCI_MODCONFIGANR_POLICY_NAME": "ControlLoop-vSONH-7d4baf04-8875-4d1f-946d-06b874048b61",
+          "PCI_MODCONFIG_POLICY_NAME": "ControlLoop-vPCI-fb41f388-a5f2-11e8-98d0-529269fb1459"
+        },
+        "type_version": "1.0.0",
+        "version": "1.0.0",
+        "policyVersion": "1",
+        "type": "onap.policies.monitoring.docker.sonhandler.app",
+        "metadata": {
+          "policy-id": "com.Config_PCIMS_CONFIG_POLICY",
+          "policy-version": "1"
+        }
+      }
+    ]
+  }
+}