From dfa86ca8a3d8380487261da22cbf582b547e3276 Mon Sep 17 00:00:00 2001 From: sebdet Date: Fri, 5 Apr 2019 15:15:31 +0200 Subject: Introduce Camel route Camel route for Submit operation using http4 component Issue-ID: CLAMP-303 Change-Id: I29804a7db6286dfa84f7eed63813f25299a385e6 Signed-off-by: sebdet --- .../resources/tosca/guard1-policy-payload.json | 16 +++++ .../resources/tosca/guard2-policy-payload.json | 16 +++++ .../tosca/operational-policy-payload.yaml | 31 ++++++++++ .../tosca/operational-policy-properties.json | 71 ++++++++++++++++++++++ 4 files changed, 134 insertions(+) create mode 100644 src/test/resources/tosca/guard1-policy-payload.json create mode 100644 src/test/resources/tosca/guard2-policy-payload.json create mode 100644 src/test/resources/tosca/operational-policy-payload.yaml create mode 100644 src/test/resources/tosca/operational-policy-properties.json (limited to 'src/test/resources/tosca') diff --git a/src/test/resources/tosca/guard1-policy-payload.json b/src/test/resources/tosca/guard1-policy-payload.json new file mode 100644 index 000000000..bacf174fe --- /dev/null +++ b/src/test/resources/tosca/guard1-policy-payload.json @@ -0,0 +1,16 @@ +{ + "policy-id": "guard1", + "contents": { + "recipe": "Rebuild", + "actor": "SO", + "clname": "testloop", + "guardTargets": ".*", + "minGuard": "3", + "maxGuard": "7", + "limitGuard": "", + "timeUnitsGuard": "", + "timeWindowGuard": "", + "guardActiveStart": "00:00:01-05:00", + "guardActiveEnd": "23:59:01-05:00" + } +} \ No newline at end of file diff --git a/src/test/resources/tosca/guard2-policy-payload.json b/src/test/resources/tosca/guard2-policy-payload.json new file mode 100644 index 000000000..89f7ec89c --- /dev/null +++ b/src/test/resources/tosca/guard2-policy-payload.json @@ -0,0 +1,16 @@ +{ + "policy-id": "guard2", + "contents": { + "recipe": "Migrate", + "actor": "SO", + "clname": "testloop", + "guardTargets": ".*", + "minGuard": "1", + "maxGuard": "2", + "limitGuard": "", + "timeUnitsGuard": "", + "timeWindowGuard": "", + "guardActiveStart": "00:00:01-05:00", + "guardActiveEnd": "23:59:01-05:00" + } +} \ No newline at end of file diff --git a/src/test/resources/tosca/operational-policy-payload.yaml b/src/test/resources/tosca/operational-policy-payload.yaml new file mode 100644 index 000000000..68116b00b --- /dev/null +++ b/src/test/resources/tosca/operational-policy-payload.yaml @@ -0,0 +1,31 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +topology_template: + policies: + - testPolicy: + type: onap.policies.controlloop.Operational + version: 1.0.0 + metadata: {policy-id: testPolicy} + properties: + controlLoop: {controlLoopName: control loop, version: 2.0.0, trigger_policy: new1, + timeout: '30', abatement: 'true'} + policies: + - id: new1 + recipe: Rebuild + retry: '10' + timeout: '20' + actor: SO + payload: test + success: new2 + failure: new2 + failure_timeout: new2 + failure_retries: new2 + failure_exception: new2 + failure_guard: new2 + target: {type: VFC, resourceTargetId: test} + - id: new2 + recipe: Migrate + retry: '30' + timeout: '40' + actor: SDNC + payload: test + target: {type: VFC, resourceTargetId: test} diff --git a/src/test/resources/tosca/operational-policy-properties.json b/src/test/resources/tosca/operational-policy-properties.json new file mode 100644 index 000000000..503616593 --- /dev/null +++ b/src/test/resources/tosca/operational-policy-properties.json @@ -0,0 +1,71 @@ +{ + "guard_policies": { + "guard1":{ + "recipe": "Rebuild", + "actor": "SO", + "clname": "testloop", + "guardTargets": ".*", + "minGuard": "3", + "maxGuard": "7", + "limitGuard": "", + "timeUnitsGuard": "", + "timeWindowGuard": "", + "guardActiveStart": "00:00:01-05:00", + "guardActiveEnd": "23:59:01-05:00" + }, + "guard2":{ + "recipe": "Migrate", + "actor": "SO", + "clname": "testloop", + "guardTargets": ".*", + "minGuard": "1", + "maxGuard": "2", + "limitGuard": "", + "timeUnitsGuard": "", + "timeWindowGuard": "", + "guardActiveStart": "00:00:01-05:00", + "guardActiveEnd": "23:59:01-05:00" + } + }, + "operational_policy": { + "controlLoop": { + "controlLoopName": "control loop", + "version": "2.0.0", + "trigger_policy": "new1", + "timeout": "30", + "abatement": "true" + }, + "policies": [ + { + "id": "new1", + "recipe": "Rebuild", + "retry": "10", + "timeout": "20", + "actor": "SO", + "payload": "test", + "success": "new2", + "failure": "new2", + "failure_timeout": "new2", + "failure_retries": "new2", + "failure_exception": "new2", + "failure_guard": "new2", + "target": { + "type": "VFC", + "resourceTargetId": "test" + } + }, + { + "id": "new2", + "recipe": "Migrate", + "retry": "30", + "timeout": "40", + "actor": "SDNC", + "payload": "test", + "target": { + "type": "VFC", + "resourceTargetId": "test" + } + } + ] + } +} -- cgit 1.2.3-korg