diff options
author | Jim Hahn <jrh3@att.com> | 2020-04-02 13:32:01 -0400 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2020-04-02 13:34:49 -0400 |
commit | 1ebe7ecef97bdac055c8ed67c5b379a4f6c89c4c (patch) | |
tree | 78c2ae8fd01f5b62ada851a3e3909e208ac62a3c /tests/policy/pap | |
parent | 72ae9c392dd2c8493b3fbe50c491b4e0870caecf (diff) |
Move policy preload to robot script
Moved the policy preload for the PAP CSIT from setup.sh to
the robot script; policy type preload isn't needed, so it
was removed altogether.
Also cleaned up some unneeded entries related to networking
and ports in the docker yml files.
Issue-ID: POLICY-2464
Change-Id: I1794dd905f2dcbdbe5f8da8c106b43b98d9a97ea
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'tests/policy/pap')
-rw-r--r-- | tests/policy/pap/data/vCPE.policy.monitoring.input.tosca.json | 51 | ||||
-rw-r--r-- | tests/policy/pap/pap-test.robot | 11 |
2 files changed, 62 insertions, 0 deletions
diff --git a/tests/policy/pap/data/vCPE.policy.monitoring.input.tosca.json b/tests/policy/pap/data/vCPE.policy.monitoring.input.tosca.json new file mode 100644 index 00000000..3003d9a8 --- /dev/null +++ b/tests/policy/pap/data/vCPE.policy.monitoring.input.tosca.json @@ -0,0 +1,51 @@ +{ + "tosca_definitions_version": "tosca_simple_yaml_1_1_0", + "topology_template": { + "policies": [ + { + "onap.restart.tca": { + "type": "onap.policies.monitoring.cdap.tca.hi.lo.app", + "version": "1.0.0", + "type_version": "1.0.0", + "metadata": { + "policy-id": "onap.restart.tca" + }, + "properties": { + "tca_policy": { + "domain": "measurementsForVfScaling", + "metricsPerEventName": [ + { + "eventName": "Measurement_vGMUX", + "controlLoopSchemaType": "VNF", + "policyScope": "DCAE", + "policyName": "DCAE.Config_tca-hi-lo", + "policyVersion": "v0.0.1", + "thresholds": [ + { + "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e", + "version": "1.0.2", + "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value", + "thresholdValue": 0, + "direction": "EQUAL", + "severity": "MAJOR", + "closedLoopEventStatus": "ABATED" + }, + { + "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e", + "version": "1.0.2", + "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value", + "thresholdValue": 0, + "direction": "GREATER", + "severity": "CRITICAL", + "closedLoopEventStatus": "ONSET" + } + ] + } + ] + } + } + } + } + ] + } +} diff --git a/tests/policy/pap/pap-test.robot b/tests/policy/pap/pap-test.robot index 36b593c7..67a57828 100644 --- a/tests/policy/pap/pap-test.robot +++ b/tests/policy/pap/pap-test.robot @@ -5,6 +5,17 @@ Library OperatingSystem Library json *** Test Cases *** +LoadPolicy + [Documentation] Loads prerequisite Policy via API + ${auth}= Create List healthcheck zb!XztG34 + Log Creating session https://${POLICY_API_IP}:6969 + ${session}= Create Session policy https://${POLICY_API_IP}:6969 auth=${auth} + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json + ${postjson}= Get file ${CURDIR}/data/vCPE.policy.monitoring.input.tosca.json + ${resp}= Post Request policy /policy/api/v1/policytypes/onap.policies.monitoring.cdap.tca.hi.lo.app/versions/1.0.0/policies data=${postjson} headers=${headers} + Log Received response from API ${resp.text} + Should Be Equal As Strings ${resp.status_code} 200 + Healthcheck [Documentation] Runs Policy PAP Health check ${auth}= Create List healthcheck zb!XztG34 |