From 8b3fc62050a344fe9a9c8909e4c672cb9aa3281d Mon Sep 17 00:00:00 2001 From: efiacor Date: Fri, 24 Jan 2020 13:19:01 +0000 Subject: Adding DB Init and setup Signed-off-by: efiacor Change-Id: Ie32efcf007c9b6fa25b0072019f4a91a841d9d0c Issue-ID: DCAEGEN2-1828 --- .../tests/data/cbs_data.json | 109 --------------------- .../tests/data/cbs_data_1.json | 109 +++++++++++++++++++++ .../tests/data/cbs_data_2.json | 68 +++++++++++++ 3 files changed, 177 insertions(+), 109 deletions(-) delete mode 100644 components/pm-subscription-handler/tests/data/cbs_data.json create mode 100644 components/pm-subscription-handler/tests/data/cbs_data_1.json create mode 100755 components/pm-subscription-handler/tests/data/cbs_data_2.json (limited to 'components/pm-subscription-handler/tests/data') diff --git a/components/pm-subscription-handler/tests/data/cbs_data.json b/components/pm-subscription-handler/tests/data/cbs_data.json deleted file mode 100644 index ccc0626d..00000000 --- a/components/pm-subscription-handler/tests/data/cbs_data.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "policy":{ - "subscription":{ - "subscriptionName":"ExtraPM-All-gNB-R2B", - "administrativeState":"UNLOCKED", - "fileBasedGP":15, - "fileLocation":"\/pm\/pm.xml", - "nfTypeModelInvariantId":"2829292", - "nfFilter":{ - "swVersions":[ - "1.0.0", - "1.0.1" - ], - "nfNames":[ - "^pnf.*", - "^vnf.*" - ] - }, - "measurementGroups":[ - { - "measurementGroup":{ - "measurementTypes":[ - { - "measurementType":"countera" - }, - { - "measurementType":"counterb" - } - ], - "managedObjectDNsBasic":[ - { - "DN":"dna" - }, - { - "DN":"dnb" - } - ] - } - }, - { - "measurementGroup":{ - "measurementTypes":[ - { - "measurementType":"counterc" - }, - { - "measurementType":"counterd" - } - ], - "managedObjectDNsBasic":[ - { - "DN":"dnc" - }, - { - "DN":"dnd" - } - ] - } - } - ] - } - }, - "config":{ - "aaf_password":"demo123456!", - "aaf_identity":"dcae@dcae.onap.org", - "cert_path":"/opt/app/pm-mapper/etc/certs/cert.pem", - "key_path":"/opt/app/pm-mapper/etc/certs/key.pem", - "streams_subscribes":{ - "aai_subscriber":{ - "type":"message_router", - "dmaap_info":{ - "topic_url":"https://node:30226/events/AAI_EVENT", - "client_role":"org.onap.dcae.aaiSub", - "location":"san-francisco", - "client_id":"1575976809466" - } - }, - "policy_pm_subscriber":{ - "type":"message_router", - "dmaap_info":{ - "topic_url":"https://node:30226/events/org.onap.dmaap.mr.PM_SUBSCRIPTIONS", - "client_role":"org.onap.dcae.pmSubscriber", - "location":"san-francisco", - "client_id":"1575876809456" - } - } - }, - "streams_publishes":{ - "policy_pm_publisher":{ - "type":"message_router", - "dmaap_info":{ - "topic_url":"https://node:30226/events/org.onap.dmaap.mr.PM_SUBSCRIPTIONS", - "client_role":"org.onap.dcae.pmPublisher", - "location":"san-francisco", - "client_id":"1475976809466" - } - }, - "other_publisher":{ - "type":"message_router", - "dmaap_info":{ - "topic_url":"https://node:30226/events/org.onap.dmaap.mr.SOME_OTHER_TOPIC", - "client_role":"org.onap.dcae.pmControlPub", - "location":"san-francisco", - "client_id":"1875976809466" - } - } - } - } -} \ No newline at end of file diff --git a/components/pm-subscription-handler/tests/data/cbs_data_1.json b/components/pm-subscription-handler/tests/data/cbs_data_1.json new file mode 100644 index 00000000..ccc0626d --- /dev/null +++ b/components/pm-subscription-handler/tests/data/cbs_data_1.json @@ -0,0 +1,109 @@ +{ + "policy":{ + "subscription":{ + "subscriptionName":"ExtraPM-All-gNB-R2B", + "administrativeState":"UNLOCKED", + "fileBasedGP":15, + "fileLocation":"\/pm\/pm.xml", + "nfTypeModelInvariantId":"2829292", + "nfFilter":{ + "swVersions":[ + "1.0.0", + "1.0.1" + ], + "nfNames":[ + "^pnf.*", + "^vnf.*" + ] + }, + "measurementGroups":[ + { + "measurementGroup":{ + "measurementTypes":[ + { + "measurementType":"countera" + }, + { + "measurementType":"counterb" + } + ], + "managedObjectDNsBasic":[ + { + "DN":"dna" + }, + { + "DN":"dnb" + } + ] + } + }, + { + "measurementGroup":{ + "measurementTypes":[ + { + "measurementType":"counterc" + }, + { + "measurementType":"counterd" + } + ], + "managedObjectDNsBasic":[ + { + "DN":"dnc" + }, + { + "DN":"dnd" + } + ] + } + } + ] + } + }, + "config":{ + "aaf_password":"demo123456!", + "aaf_identity":"dcae@dcae.onap.org", + "cert_path":"/opt/app/pm-mapper/etc/certs/cert.pem", + "key_path":"/opt/app/pm-mapper/etc/certs/key.pem", + "streams_subscribes":{ + "aai_subscriber":{ + "type":"message_router", + "dmaap_info":{ + "topic_url":"https://node:30226/events/AAI_EVENT", + "client_role":"org.onap.dcae.aaiSub", + "location":"san-francisco", + "client_id":"1575976809466" + } + }, + "policy_pm_subscriber":{ + "type":"message_router", + "dmaap_info":{ + "topic_url":"https://node:30226/events/org.onap.dmaap.mr.PM_SUBSCRIPTIONS", + "client_role":"org.onap.dcae.pmSubscriber", + "location":"san-francisco", + "client_id":"1575876809456" + } + } + }, + "streams_publishes":{ + "policy_pm_publisher":{ + "type":"message_router", + "dmaap_info":{ + "topic_url":"https://node:30226/events/org.onap.dmaap.mr.PM_SUBSCRIPTIONS", + "client_role":"org.onap.dcae.pmPublisher", + "location":"san-francisco", + "client_id":"1475976809466" + } + }, + "other_publisher":{ + "type":"message_router", + "dmaap_info":{ + "topic_url":"https://node:30226/events/org.onap.dmaap.mr.SOME_OTHER_TOPIC", + "client_role":"org.onap.dcae.pmControlPub", + "location":"san-francisco", + "client_id":"1875976809466" + } + } + } + } +} \ No newline at end of file diff --git a/components/pm-subscription-handler/tests/data/cbs_data_2.json b/components/pm-subscription-handler/tests/data/cbs_data_2.json new file mode 100755 index 00000000..43f67e88 --- /dev/null +++ b/components/pm-subscription-handler/tests/data/cbs_data_2.json @@ -0,0 +1,68 @@ +{ + "config":{}, + "policy": { + "subscription": { + "subscriptionName": "someExtraPM-AllKista-gNB-R2B", + "administrativeState": "UNLOCKED", + "fileBasedGP": 15, + "fileLocation": "c:\/\/PM", + "nfTypeModelInvariantId": "2829292", + "nfFilter": { + "swVersions": [ + "A21", + "B" + ], + "nfNames": [ + "ABC", + "DEF", + "foo.*" + ] + }, + "measurementGroups": [ + { + "measurementGroup": { + "measurementTypes": [ + { + "measurementType": "countera" + }, + { + "measurementType": "counterb" + } + ], + "managedObjectDNsBasic": [ + { + "DN": "dna" + }, + { + "DN": "dnb" + } + ] + } + }, + { + "measurementGroup": { + "measurementTypes": [ + { + "measurementType": "counterc" + }, + { + "measurementType": "counterd" + } + ], + "managedObjectDNsBasic": [ + { + "DN": "dnc" + }, + { + "DN": "dnd" + } + ] + } + } + ] + } +} + + + +} \ No newline at end of file -- cgit 1.2.3-korg