diff options
author | pramod.jamkhedkar <pramod@research.att.com> | 2020-03-24 15:54:09 -0400 |
---|---|---|
committer | pramod.jamkhedkar <pramod@research.att.com> | 2020-04-10 13:40:25 -0400 |
commit | 40ba10444edf0b1ee74429b9b01ad1be40aa203b (patch) | |
tree | 7bc2969cdb45baa48246719050a148750897e8b6 /controlloop/common/rules-test/src/main/resources | |
parent | dc272e0912390292fa09e84d56380ac3697250cd (diff) |
Added vpci and vsonh tests
Added test cases for vpci and vsonh usecases
Issue-ID: POLICY-2162
Change-Id: Ia69b16e74b82b92366b5065eeccab8d35f647742
Signed-off-by: pramod.jamkhedkar <pramod@research.att.com>
Signed-off-by: Jim Hahn <jrh3@att.com>
Signed-off-by: pramod.jamkhedkar <pramod@research.att.com>
Diffstat (limited to 'controlloop/common/rules-test/src/main/resources')
8 files changed, 177 insertions, 0 deletions
diff --git a/controlloop/common/rules-test/src/main/resources/vpci/tosca-compliant-vpci.json b/controlloop/common/rules-test/src/main/resources/vpci/tosca-compliant-vpci.json new file mode 100644 index 000000000..692b4e7ae --- /dev/null +++ b/controlloop/common/rules-test/src/main/resources/vpci/tosca-compliant-vpci.json @@ -0,0 +1,37 @@ +{ + "type": "onap.policies.controlloop.operational.common.Drools", + "type_version": "1.0.0", + "name": "operational.modifyconfig", + "version": "1.0.0", + "metadata": { + "policy-id": "operational.pcihandler" + }, + "properties": { + "controllerName": "usecases", + "id": "ControlLoop-vPCI-fb41f388-a5f2-11e8-98d0-529269fb1459", + "timeout": 1200, + "abatement": false, + "trigger": "unique-policy-id-123-modifyconfig", + "operations": [ + { + "id": "unique-policy-id-123-modifyconfig", + "description": "Modify the packet generator", + "operation": { + "actor": "SDNR", + "operation": "ModifyConfig", + "target": { + "targetType": "PNF" + } + }, + "timeout": 7, + "retries": 0, + "success": "final_success", + "failure": "final_failure", + "failure_timeout": "final_failure_timeout", + "failure_retries": "final_failure_retries", + "failure_exception": "final_failure_exception", + "failure_guard": "final_failure_guard" + } + ] + } +} diff --git a/controlloop/common/rules-test/src/main/resources/vpci/tosca-vpci.json b/controlloop/common/rules-test/src/main/resources/vpci/tosca-vpci.json new file mode 100644 index 000000000..84b047e4d --- /dev/null +++ b/controlloop/common/rules-test/src/main/resources/vpci/tosca-vpci.json @@ -0,0 +1,11 @@ +{ + "type": "onap.policies.controlloop.Operational", + "type_version": "1.0.0", + "properties": { + "policy-id": "operational.pcihandler", + "content": "controlLoop%3A%0A%20%20version%3A%203.0.0%0A%20%20controlLoopName%3A%20ControlLoop-vPCI-fb41f388-a5f2-11e8-98d0-529269fb1459%0A%20%20trigger_policy%3A%20unique-policy-id-123-modifyconfig%0A%20%20timeout%3A%201200%0A%20%20abatement%3A%20false%0A%20%0Apolicies%3A%0A%20%20-%20id%3A%20unique-policy-id-123-modifyconfig%0A%20%20%20%20name%3A%20modify%20PCI%20config%0A%20%20%20%20description%3A%0A%20%20%20%20actor%3A%20SDNR%0A%20%20%20%20recipe%3A%20ModifyConfig%0A%20%20%20%20target%3A%0A%20%20%20%20%20%20%23%20These%20fields%20are%20not%20used%0A%20%20%20%20%20%20resourceID%3A%20Eace933104d443b496b8.nodes.heat.vpg%0A%20%20%20%20%20%20type%3A%20PNF%0A%20%20%20%20retry%3A%200%0A%20%20%20%20timeout%3A%207000%0A%20%20%20%20success%3A%20final_success%0A%20%20%20%20failure%3A%20final_failure%0A%20%20%20%20failure_timeout%3A%20final_failure_timeout%0A%20%20%20%20failure_retries%3A%20final_failure_retries%0A%20%20%20%20failure_exception%3A%20final_failure_exception%0A%20%20%20%20failure_guard%3A%20final_failure_guard" + }, + "name": "vpci", + "version": "1.0.0" + +} diff --git a/controlloop/common/rules-test/src/main/resources/vpci/vpci.onset.json b/controlloop/common/rules-test/src/main/resources/vpci/vpci.onset.json new file mode 100644 index 000000000..880c3ccf0 --- /dev/null +++ b/controlloop/common/rules-test/src/main/resources/vpci/vpci.onset.json @@ -0,0 +1,18 @@ +{ + "closedLoopControlName": "ControlLoop-vPCI-fb41f388-a5f2-11e8-98d0-529269fb1459", + "closedLoopAlarmStart": 1510187409180, + "closedLoopEventClient": "microservice.PCI", + "closedLoopEventStatus": "ONSET", + "requestID": "9d2d790e-a5f0-11e8-98d0-529269fb1459", + "target_type": "PNF", + "target": "pnf.pnf-name", + "AAI": { + "generic-vnf.is-closed-loop-disabled": "false", + "generic-vnf.prov-status": "ACTIVE", + "pnf.pnf-name": "OzPServer" + }, + "from": "PCIMS", + "version": "1.0.2", + "Action": "ModifyConfig", + "payload": "{\"Configurations\":[{\"data\":{\"FAPService\":{\"alias\":\"Chn0330\",\"X0005b9Lte\":{\"phyCellIdInUse\":6,\"pnfName\":\"ncserver23\"},\"CellConfig\":{\"LTE\":{\"RAN\":{\"Common\":{\"CellIdentity\":\"Chn0330\"}}}}}}},{\"data\":{\"FAPService\":{\"alias\":\"Chn0331\",\"X0005b9Lte\":{\"phyCellIdInUse\":7,\"pnfName\":\"ncserver23\"},\"CellConfig\":{\"LTE\":{\"RAN\":{\"Common\":{\"CellIdentity\":\"Chn0331\"}}}}}}}]}" +} diff --git a/controlloop/common/rules-test/src/main/resources/vpci/vpci.sdnr.success.json b/controlloop/common/rules-test/src/main/resources/vpci/vpci.sdnr.success.json new file mode 100644 index 000000000..b9137d2c4 --- /dev/null +++ b/controlloop/common/rules-test/src/main/resources/vpci/vpci.sdnr.success.json @@ -0,0 +1,23 @@ +{ + "body": { + "output": { + "CommonHeader": { + "TimeStamp": "2018-09-10T07:10:05.614Z", + "APIver": "1.0", + "RequestID": "9d2d790e-a5f0-11e8-98d0-529269fb1459", + "SubRequestID": "${replaceMe}", + "RequestTrack": [], + "Flags": [] + }, + "Status": { + "Code": 200, + "Value": "SUCCESS" + }, + "Payload": "{ \"Configurations\":[ { \"Status\": { \"Code\": 200, \"Value\": \"SUCCESS\" }, \"data\":{\"FAPService\":{\"alias\":\"Chn0330\",\"X0005b9Lte\":{\"phyCellIdInUse\":6,\"pnfName\":\"ncserver23\"},\"CellConfig\":{\"LTE\":{\"RAN\":{\"Common\":{\"CellIdentity\":\"Chn0330\"}}}}}} } ] }" + } + }, + "version": "1.0", + "rpc-name": "ModifyConfig", + "correlation-id": "9d2d790e-a5f0-11e8-98d0-529269fb1459-1", + "type": "response" +} diff --git a/controlloop/common/rules-test/src/main/resources/vsonh/tosca-compliant-vsonh.json b/controlloop/common/rules-test/src/main/resources/vsonh/tosca-compliant-vsonh.json new file mode 100644 index 000000000..e01dceb21 --- /dev/null +++ b/controlloop/common/rules-test/src/main/resources/vsonh/tosca-compliant-vsonh.json @@ -0,0 +1,37 @@ +{ + "type": "onap.policies.controlloop.operational.common.Drools", + "type_version": "1.0.0", + "name": "operational.modifyconfig", + "version": "1.0.0", + "metadata": { + "policy-id": "operational.sonhandler" + }, + "properties": { + "controllerName": "usecases", + "id": "ControlLoop-vSONH-7d4baf04-8875-4d1f-946d-06b874048b61", + "timeout": 1200, + "abatement": false, + "trigger": "unique-policy-id-123-modifyconfig", + "operations": [ + { + "id": "unique-policy-id-123-modifyconfig", + "description": "Modify the packet generator", + "operation": { + "actor": "SDNR", + "operation": "ModifyConfigANR", + "target": { + "targetType": "PNF" + } + }, + "timeout": 7, + "retries": 0, + "success": "final_success", + "failure": "final_failure", + "failure_timeout": "final_failure_timeout", + "failure_retries": "final_failure_retries", + "failure_exception": "final_failure_exception", + "failure_guard": "final_failure_guard" + } + ] + } +} diff --git a/controlloop/common/rules-test/src/main/resources/vsonh/tosca-vsonh.json b/controlloop/common/rules-test/src/main/resources/vsonh/tosca-vsonh.json new file mode 100644 index 000000000..4927bee96 --- /dev/null +++ b/controlloop/common/rules-test/src/main/resources/vsonh/tosca-vsonh.json @@ -0,0 +1,10 @@ +{ + "type": "onap.policies.controlloop.Operational", + "type_version": "1.0.0", + "properties": { + "policy-id": "operational.sonhandler", + "content": "controlLoop%3A%0A%20%20version%3A%204.0.0%0A%20%20controlLoopName%3A%20ControlLoop-vSONH-7d4baf04-8875-4d1f-946d-06b874048b61%0A%20%20trigger_policy%3A%20unique-policy-id-456-modifyconfig%0A%20%20timeout%3A%201200%0A%20%20abatement%3A%20false%0A%20%0Apolicies%3A%0A%20%20-%20id%3A%20unique-policy-id-456-modifyconfig%0A%20%20%20%20name%3A%20modify%20ANR%20config%0A%20%20%20%20description%3A%0A%20%20%20%20actor%3A%20SDNR%0A%20%20%20%20recipe%3A%20ModifyConfigANR%0A%20%20%20%20target%3A%0A%20%20%20%20%20%20%23%20These%20fields%20are%20not%20used%0A%20%20%20%20%20%20resourceID%3A%20Eace933104d443b496b8.nodes.heat.vpg%0A%20%20%20%20%20%20type%3A%20PNF%0A%20%20%20%20retry%3A%200%0A%20%20%20%20timeout%3A%20300%0A%20%20%20%20success%3A%20final_success%0A%20%20%20%20failure%3A%20final_failure%0A%20%20%20%20failure_timeout%3A%20final_failure_timeout%0A%20%20%20%20failure_retries%3A%20final_failure_retries%0A%20%20%20%20failure_exception%3A%20final_failure_exception%0A%20%20%20%20failure_guard%3A%20final_failure_guard" + }, + "name": "sonh", + "version": "1.0.0" +} diff --git a/controlloop/common/rules-test/src/main/resources/vsonh/vsonh.onset.json b/controlloop/common/rules-test/src/main/resources/vsonh/vsonh.onset.json new file mode 100644 index 000000000..4337477be --- /dev/null +++ b/controlloop/common/rules-test/src/main/resources/vsonh/vsonh.onset.json @@ -0,0 +1,18 @@ +{ + "closedLoopControlName": "ControlLoop-vSONH-7d4baf04-8875-4d1f-946d-06b874048b61", + "closedLoopAlarmStart": 1510187409180, + "closedLoopEventClient": "microservice.SONH", + "closedLoopEventStatus": "ONSET", + "requestID": "722ee65a-8afd-48df-bf57-c152ae45bacc", + "target_type": "PNF", + "target": "pnf.pnf-name", + "AAI": { + "generic-vnf.is-closed-loop-disabled": "false", + "generic-vnf.prov-status": "ACTIVE", + "pnf.pnf-name": "OzPServer" + }, + "from": "SONHMS", + "version": "1.0.2", + "Action": "ModifyConfigANR", + "payload": "{ \"Configurations\":[ { \"data\":{ \"FAPService\":{ \"alias\":\"Cell1\", \"CellConfig\":{ \"LTE\":{ \"RAN\":{ \"Common\":{ \"CellIdentity\":\"1\" }, \"NeighborListInUse\" : { \"LTECellNumberOfEntries\" : \"1\" , \"LTECell\" : [{ \"PLMNID\" :\"plmnid1\", \"CID\":\"Chn0001\", \"PhyCellID\":\"3\", \"PNFName\":\"ncserver01\", \"Blacklisted\":\"false\"}] } } } } } } } ] }" +} diff --git a/controlloop/common/rules-test/src/main/resources/vsonh/vsonh.sdnr.success.json b/controlloop/common/rules-test/src/main/resources/vsonh/vsonh.sdnr.success.json new file mode 100644 index 000000000..98211c7a4 --- /dev/null +++ b/controlloop/common/rules-test/src/main/resources/vsonh/vsonh.sdnr.success.json @@ -0,0 +1,23 @@ +{ + "body": { + "output": { + "CommonHeader": { + "TimeStamp": "2018-09-10T07:10:05.614Z", + "APIver": "1.0", + "RequestID": "722ee65a-8afd-48df-bf57-c152ae45bacc", + "SubRequestID": "${replaceMe}", + "RequestTrack": [], + "Flags": [] + }, + "Status": { + "Code": 200, + "Value": "SUCCESS" + }, + "Payload": "{ \"Configurations\":[ { \"Status\": { \"Code\": 200, \"Value\": \"SUCCESS\" }, \"data\":{ \"FAPService\":{ \"alias\":\"Cell1\", \"CellConfig\":{ \"LTE\":{ \"RAN\":{ \"Common\":{ \"CellIdentity\":\"1\" }, \"NeighborListInUse\" : { \"LTECellNumberOfEntries\" : \"1\" , \"LTECell\" : [{ \"PLMNID\" :\"plmnid1\", \"CID\":\"Chn0001\", \"PhyCellID\":\"3\", \"PNFName\":\"ncserver01\", \"Blacklisted\":\"false\"}] } } } } } } } ] }" + } + }, + "version": "1.0", + "rpc-name": "ModifyConfigANR", + "correlation-id": "722ee65a-8afd-48df-bf57-c152ae45bacc-1", + "type": "response" +} |