aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/rules-test/src/main/resources/service123
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/common/rules-test/src/main/resources/service123')
-rw-r--r--controlloop/common/rules-test/src/main/resources/service123/service123.appc.migrate.success.json22
-rw-r--r--controlloop/common/rules-test/src/main/resources/service123/service123.appc.rebuild.failure.json22
-rw-r--r--controlloop/common/rules-test/src/main/resources/service123/service123.appc.restart.failure.json22
-rw-r--r--controlloop/common/rules-test/src/main/resources/service123/service123.onset.json17
-rw-r--r--controlloop/common/rules-test/src/main/resources/service123/tosca-compliant-service123.json75
5 files changed, 158 insertions, 0 deletions
diff --git a/controlloop/common/rules-test/src/main/resources/service123/service123.appc.migrate.success.json b/controlloop/common/rules-test/src/main/resources/service123/service123.appc.migrate.success.json
new file mode 100644
index 000000000..563e2c762
--- /dev/null
+++ b/controlloop/common/rules-test/src/main/resources/service123/service123.appc.migrate.success.json
@@ -0,0 +1,22 @@
+{
+ "body": {
+ "output": {
+ "common-header": {
+ "timestamp": "2017-08-25T21:06:23.037Z",
+ "api-ver": "5.00",
+ "originator-id": "664be3d2-6c12-4f4b-a3e7-c349acced200",
+ "request-id": "664be3d2-6c12-4f4b-a3e7-c349acced200",
+ "sub-request-id": "${replaceMe}",
+ "flags": {}
+ },
+ "status": {
+ "code": 400,
+ "message": "Migrate Successful"
+ }
+ }
+ },
+ "version": "2.0",
+ "rpc-name": "migrate",
+ "correlation-id": "664be3d2-6c12-4f4b-a3e7-c349acced200-1",
+ "type": "response"
+}
diff --git a/controlloop/common/rules-test/src/main/resources/service123/service123.appc.rebuild.failure.json b/controlloop/common/rules-test/src/main/resources/service123/service123.appc.rebuild.failure.json
new file mode 100644
index 000000000..88e70ef7a
--- /dev/null
+++ b/controlloop/common/rules-test/src/main/resources/service123/service123.appc.rebuild.failure.json
@@ -0,0 +1,22 @@
+{
+ "body": {
+ "output": {
+ "common-header": {
+ "timestamp": "2017-08-25T21:06:23.037Z",
+ "api-ver": "5.00",
+ "originator-id": "664be3d2-6c12-4f4b-a3e7-c349acced200",
+ "request-id": "664be3d2-6c12-4f4b-a3e7-c349acced200",
+ "sub-request-id": "${replaceMe}",
+ "flags": {}
+ },
+ "status": {
+ "code": 401,
+ "message": "Rebuild Failed"
+ }
+ }
+ },
+ "version": "2.0",
+ "rpc-name": "rebuild",
+ "correlation-id": "664be3d2-6c12-4f4b-a3e7-c349acced200-1",
+ "type": "response"
+}
diff --git a/controlloop/common/rules-test/src/main/resources/service123/service123.appc.restart.failure.json b/controlloop/common/rules-test/src/main/resources/service123/service123.appc.restart.failure.json
new file mode 100644
index 000000000..7376c8ad3
--- /dev/null
+++ b/controlloop/common/rules-test/src/main/resources/service123/service123.appc.restart.failure.json
@@ -0,0 +1,22 @@
+{
+ "body": {
+ "output": {
+ "common-header": {
+ "timestamp": "2017-08-25T21:06:23.037Z",
+ "api-ver": "5.00",
+ "originator-id": "664be3d2-6c12-4f4b-a3e7-c349acced200",
+ "request-id": "664be3d2-6c12-4f4b-a3e7-c349acced200",
+ "sub-request-id": "${replaceMe}",
+ "flags": {}
+ },
+ "status": {
+ "code": 401,
+ "message": "Restart Failed"
+ }
+ }
+ },
+ "version": "2.0",
+ "rpc-name": "restart",
+ "correlation-id": "664be3d2-6c12-4f4b-a3e7-c349acced200-1",
+ "type": "response"
+}
diff --git a/controlloop/common/rules-test/src/main/resources/service123/service123.onset.json b/controlloop/common/rules-test/src/main/resources/service123/service123.onset.json
new file mode 100644
index 000000000..a78cb5337
--- /dev/null
+++ b/controlloop/common/rules-test/src/main/resources/service123/service123.onset.json
@@ -0,0 +1,17 @@
+{
+ "closedLoopControlName": "ControlLoop-Service123-cbed919f-2212-4ef7-8051-fe6308da1bda",
+ "closedLoopAlarmStart": 1463679805324,
+ "closedLoopEventClient": "DCAE_INSTANCE_ID.dcae-tca",
+ "closedLoopEventStatus": "ONSET",
+ "requestID": "664be3d2-6c12-4f4b-a3e7-c349acced200",
+ "target_type": "VNF",
+ "target": "generic-vnf.vnf-name",
+ "AAI": {
+ "vserver.is-closed-loop-disabled": "false",
+ "vserver.prov-status": "ACTIVE",
+ "generic-vnf.vnf-name": "fw0002vm002fw002",
+ "vserver.vserver-name": "OzVServer"
+ },
+ "from": "DCAE",
+ "version": "1.0.2"
+}
diff --git a/controlloop/common/rules-test/src/main/resources/service123/tosca-compliant-service123.json b/controlloop/common/rules-test/src/main/resources/service123/tosca-compliant-service123.json
new file mode 100644
index 000000000..4eaa9e70a
--- /dev/null
+++ b/controlloop/common/rules-test/src/main/resources/service123/tosca-compliant-service123.json
@@ -0,0 +1,75 @@
+{
+ "type": "onap.policies.controlloop.operational.common.Drools",
+ "type_version": "1.0.0",
+ "version": "1.0.0",
+ "name": "operational.service123",
+ "metadata": {
+ "policy-id": "operational.service123"
+ },
+ "properties": {
+ "controllerName": "usecases",
+ "id": "ControlLoop-Service123-cbed919f-2212-4ef7-8051-fe6308da1bda",
+ "timeout": 60,
+ "abatement": true,
+ "trigger": "unique-policy-id-1-restart",
+ "operations": [
+ {
+ "id": "unique-policy-id-1-restart",
+ "description": "Restart the VM",
+ "operation": {
+ "actor": "APPC",
+ "operation": "Restart",
+ "target": {
+ "targetType": "VM"
+ }
+ },
+ "timeout": 20,
+ "retries": 3,
+ "success": "final_success",
+ "failure": "unique-policy-id-2-rebuild",
+ "failure_timeout": "unique-policy-id-2-rebuild",
+ "failure_retries": "unique-policy-id-2-rebuild",
+ "failure_guard": "unique-policy-id-2-rebuild",
+ "failure_exception": "final_failure_exception"
+ },
+ {
+ "id": "unique-policy-id-2-rebuild",
+ "name": "Rebuild Policy",
+ "operation": {
+ "actor": "APPC",
+ "operation": "Rebuild",
+ "target": {
+ "targetType": "VM"
+ }
+ },
+ "timeout": 10,
+ "retries": 0,
+ "success": "final_success",
+ "failure": "unique-policy-id-3-migrate",
+ "failure_timeout": "unique-policy-id-3-migrate",
+ "failure_retries": "unique-policy-id-3-migrate",
+ "failure_guard": "unique-policy-id-3-migrate",
+ "failure_exception": "final_failure_exception"
+ },
+ {
+ "id": "unique-policy-id-3-migrate",
+ "name": "Migrate Policy",
+ "operation": {
+ "actor": "APPC",
+ "operation": "Migrate",
+ "target": {
+ "targetType": "VM"
+ }
+ },
+ "timeout": 30,
+ "retries": 0,
+ "success": "final_success",
+ "failure": "final_failure",
+ "failure_timeout": "final_failure_timeout",
+ "failure_retries": "final_failure_retries",
+ "failure_guard": "final_failure_guard",
+ "failure_exception": "final_failure_exception"
+ }
+ ]
+ }
+}