summaryrefslogtreecommitdiffstats
path: root/components/pm-subscription-handler/tests/data
diff options
context:
space:
mode:
authorefiacor <fiachra.corcoran@est.tech>2019-12-11 12:00:26 +0000
committerefiacor <fiachra.corcoran@est.tech>2020-01-20 12:54:46 +0000
commitbbe05d8a65ee0ac698d906b50282406bafe34f80 (patch)
treed2698f139427f9741eb8712682ffb73940a81d6e /components/pm-subscription-handler/tests/data
parent85888c96619588108b7c97000ece0c13b27ac015 (diff)
Adding AAI client and apply filter
# Adding Subscription class # Adding MR and Utils helper classes Signed-off-by: efiacor <fiachra.corcoran@est.tech> Change-Id: I791b506d8cf166737d67cef22052852256f8a811 Issue-ID: DCAEGEN2-1930
Diffstat (limited to 'components/pm-subscription-handler/tests/data')
-rw-r--r--components/pm-subscription-handler/tests/data/aai_xnfs.json209
-rw-r--r--components/pm-subscription-handler/tests/data/cbs_data.json109
2 files changed, 318 insertions, 0 deletions
diff --git a/components/pm-subscription-handler/tests/data/aai_xnfs.json b/components/pm-subscription-handler/tests/data/aai_xnfs.json
new file mode 100644
index 00000000..78fc6548
--- /dev/null
+++ b/components/pm-subscription-handler/tests/data/aai_xnfs.json
@@ -0,0 +1,209 @@
+{
+ "results": [
+ {
+ "id": "200904",
+ "node-type": "pnf",
+ "url": "/aai/v16/network/pnfs/pnf/asd",
+ "properties": {
+ "pnf-name": "nokia_123",
+ "pnf-id": "10cc1039-5098-4b77-9ae9-359d74d7bba6",
+ "equip-type": "val8",
+ "equip-vendor": "Nokia",
+ "equip-model": "val6",
+ "ipaddress-v4-oam": "10.10.10.25",
+ "orchestration-status": "Inventoried",
+ "sw-version": "val7",
+ "in-maint": false,
+ "serial-number": "6061ZW3",
+ "ipaddress-v6-oam": "2001:0db8:0:0:0:0:1428:57ab",
+ "resource-version": "1572609320819",
+ "nf-role": "gNB"
+ }
+ },
+ {
+ "id": "209096",
+ "node-type": "pnf",
+ "url": "/aai/v16/network/pnfs/pnf/pnf201",
+ "properties": {
+ "pnf-name": "pnf201",
+ "pnf-id": "99700432-df00-473d-8ff9-2fb14243417a",
+ "equip-type": "val8",
+ "equip-vendor": "Nokia",
+ "equip-model": "val6",
+ "ipaddress-v4-oam": "10.10.10.32",
+ "sw-version": "val7",
+ "in-maint": false,
+ "serial-number": "6061ZW3",
+ "ipaddress-v6-oam": "2001:0db8:0:0:0:0:1428:57ab",
+ "resource-version": "1573053304574",
+ "nf-role": "gNB"
+ }
+ },
+ {
+ "id": "217288",
+ "node-type": "pnf",
+ "url": "/aai/v16/network/pnfs/pnf/pnf202",
+ "properties": {
+ "pnf-name": "pnf_33_ericsson",
+ "pnf-id": "1a9dc493-402c-4d13-b5cc-d555c386860c",
+ "equip-type": "val8",
+ "equip-vendor": "Nokia",
+ "equip-model": "val6",
+ "ipaddress-v4-oam": "10.10.10.66",
+ "orchestration-status": "Inventoried",
+ "sw-version": "val7",
+ "in-maint": false,
+ "serial-number": "6061ZW3",
+ "ipaddress-v6-oam": "2001:0db8:0:0:0:0:1428:57ab",
+ "resource-version": "1573054784925",
+ "nf-role": "gNB"
+ }
+ },
+ {
+ "id": "262144",
+ "node-type": "pnf",
+ "url": "/aai/v16/network/pnfs/pnf/pnf5",
+ "properties": {
+ "pnf-name": "pnf5",
+ "pnf-id": "cd7ee211-2595-49b6-b85c-76eab621d4b4",
+ "equip-type": "val8",
+ "equip-vendor": "Nokia",
+ "equip-model": "val6",
+ "ipaddress-v4-oam": "10.10.13.26",
+ "sw-version": "val7",
+ "in-maint": false,
+ "serial-number": "6061ZW3",
+ "ipaddress-v6-oam": "2001:0db8:0:0:0:0:1428:57ab",
+ "resource-version": "1572543742093",
+ "nf-role": "gNB"
+ }
+ },
+ {
+ "id": "270472",
+ "node-type": "pnf",
+ "url": "/aai/v16/network/pnfs/pnf/pnf205",
+ "properties": {
+ "pnf-name": "eric_23",
+ "pnf-id": "d82ca5aa-cf05-407a-bc84-0ebf22cd83be",
+ "equip-type": "val8",
+ "equip-vendor": "Ericsson",
+ "equip-model": "val6",
+ "ipaddress-v4-oam": "10.40.10.26",
+ "orchestration-status": "Inventoried",
+ "sw-version": "val7",
+ "in-maint": false,
+ "serial-number": "6061ZW3",
+ "ipaddress-v6-oam": "2001:0db8:0:0:0:0:1428:57ab",
+ "resource-version": "1573064215776",
+ "nf-role": "gNB"
+ }
+ },
+ {
+ "id": "278664",
+ "node-type": "pnf",
+ "url": "/aai/v16/network/pnfs/pnf/pnf300",
+ "properties": {
+ "pnf-name": "huawei_22",
+ "pnf-id": "eabcfaf7-b7f3-45fb-94e7-e6112fb3e8b8",
+ "equip-type": "val8",
+ "equip-vendor": "Huawei",
+ "equip-model": "val6",
+ "ipaddress-v4-oam": "30.10.10.26",
+ "orchestration-status": "Inventoried",
+ "sw-version": "val7",
+ "in-maint": false,
+ "serial-number": "6061ZW3",
+ "ipaddress-v6-oam": "2001:0db8:0:0:0:0:1428:57ab",
+ "resource-version": "1573127626866",
+ "nf-role": "gNB"
+ }
+ },
+ {
+ "id": "667696",
+ "node-type": "pnf",
+ "url": "/aai/v16/network/pnfs/pnf/pnf303",
+ "properties": {
+ "pnf-name": "pnf_1111",
+ "pnf-id": "5cd35ce5-48a3-47c2-a5ab-787bfa5e3027",
+ "equip-type": "val8",
+ "equip-vendor": "Ericsson",
+ "equip-model": "val6",
+ "ipaddress-v4-oam": "10.60.10.26",
+ "sw-version": "val7",
+ "in-maint": false,
+ "serial-number": "6061ZW3",
+ "ipaddress-v6-oam": "2001:0db8:0:0:0:0:1428:57ab",
+ "resource-version": "1573138552022",
+ "nf-role": "gNB"
+ }
+ },
+ {
+ "id": "671792",
+ "node-type": "pnf",
+ "url": "/aai/v16/network/pnfs/pnf/my_pnf_is_good",
+ "properties": {
+ "pnf-name": "my_pnf_is_bad",
+ "pnf-id": "4f043f83-3ddf-49d0-a878-ae6b2f9bd7e5",
+ "in-maint": false,
+ "resource-version": "1574701401896"
+ }
+ },
+ {
+ "id": "241864",
+ "node-type": "generic-vnf",
+ "url": "/aai/v16/network/generic-vnfs/generic-vnf/1083ecbb-f3b3-49da-b5f5-b5962140ee99",
+ "properties": {
+ "vnf-id": "1083ecbb-f3b3-49da-b5f5-b5962140ee99",
+ "vnf-name": "vnf-eric-1",
+ "vnf-type": "demoVCPEvBNG/vCPE_vbng 5eb5661a-0cb6 0",
+ "service-id": "2db01c96-4baa-4393-8d79-af8d7bf4698e",
+ "prov-status": "PREPROV",
+ "orchestration-status": "Inventoried",
+ "in-maint": false,
+ "is-closed-loop-disabled": false,
+ "resource-version": "1575541662410",
+ "model-invariant-id": "7129e420-d396-4efb-af02-6b83499b12f8",
+ "model-version-id": "e80a6ae3-cafd-4d24-850d-e14c084a5ca9",
+ "model-customization-id": "376dbe87-e9c5-4f2b-80e2-a420b373ee87"
+ }
+ },
+ {
+ "id": "241864",
+ "node-type": "generic-vnf",
+ "url": "/aai/v16/network/generic-vnfs/generic-vnf/1083ecbb-f3b3-49da-b5f5-b5962140ee99",
+ "properties": {
+ "vnf-id": "1083ecbb-f3b3-49da-b5f5-b5962140ee98",
+ "vnf-name": "vnf-nokia-22",
+ "vnf-type": "demoVCPEvBNG/vCPE_vbng 5eb5661a-0cb6 0",
+ "service-id": "2db01c96-4baa-4393-8d79-af8d7bf4698e",
+ "prov-status": "PREPROV",
+ "orchestration-status": "Inventoried",
+ "in-maint": false,
+ "is-closed-loop-disabled": false,
+ "resource-version": "1575541662410",
+ "model-invariant-id": "7129e420-d396-4efb-af02-6b83499b12f8",
+ "model-version-id": "e80a6ae3-cafd-4d24-850d-e14c084a5ca9",
+ "model-customization-id": "376dbe87-e9c5-4f2b-80e2-a420b373ee87"
+ }
+ },
+ {
+ "id": "303240",
+ "node-type": "generic-vnf",
+ "url": "/aai/v16/network/generic-vnfs/generic-vnf/230f339c-3e75-4f6b-8c9c-da4759da8222",
+ "properties": {
+ "vnf-id": "230f339c-3e75-4f6b-8c9c-da4759da8222",
+ "vnf-name": "vcpe_1",
+ "vnf-type": "demoVCPEInfra/vCPE_infra 0d1234cf-100c 0",
+ "service-id": "2db01c96-4baa-4393-8d79-af8d7bf4698e",
+ "prov-status": "PREPROV",
+ "orchestration-status": "Inventoried",
+ "in-maint": false,
+ "is-closed-loop-disabled": false,
+ "resource-version": "1575542300539",
+ "model-invariant-id": "c6aef848-e119-4572-9643-0b68da217358",
+ "model-version-id": "77c1a3d9-422a-4f78-bd8f-f7a357685b25",
+ "model-customization-id": "1f6a305d-74b6-4b92-b407-cd03284b6432"
+ }
+ }
+ ]
+} \ No newline at end of file
diff --git a/components/pm-subscription-handler/tests/data/cbs_data.json b/components/pm-subscription-handler/tests/data/cbs_data.json
new file mode 100644
index 00000000..ccc0626d
--- /dev/null
+++ b/components/pm-subscription-handler/tests/data/cbs_data.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