Fixing APEX and Distribution csit failures due to invalid key name in policy 66/104066/1
authora.sreekumar <ajith.sreekumar@est.tech>
Fri, 20 Mar 2020 14:23:00 +0000 (14:23 +0000)
committera.sreekumar <ajith.sreekumar@est.tech>
Fri, 20 Mar 2020 14:28:30 +0000 (14:28 +0000)
When the key name doesn't match with the name field in policy,
creation of policy is failing. Due to some recent changes in API and
models. So, correcting the policy in this review.

Change-Id: I8a57f734a25f46fef623edb078fabc2641722816
Issue-ID: POLICY-2438
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
scripts/policy/policy-distribution/config/distribution/csar/sample_csar_with_apex_policy.csar
tests/policy/apex-pdp/data/onap.policies.controlloop.operational.Apex.tosca.json
tests/policy/apex-pdp/data/pdp_update.json

index 33c601f..c2f90ea 100644 (file)
Binary files a/scripts/policy/policy-distribution/config/distribution/csar/sample_csar_with_apex_policy.csar and b/scripts/policy/policy-distribution/config/distribution/csar/sample_csar_with_apex_policy.csar differ
index 07118ac..179bbea 100644 (file)
@@ -3,11 +3,14 @@
   "topology_template": {
     "policies": [
       {
-        "operational.sampledomain": {
+        "operational.apex.sampledomain": {
           "type": "onap.policies.controlloop.operational.Apex",
           "type_version": "1.0.0",
-          "name": "onap.policies.controlloop.Operational.apex.sampledomain",
           "version": "1.0.0",
+          "metadata": {
+            "policy-id": "operational.apex.sampledomain",
+            "policy-version": 1
+          },
           "properties": {
             "engineServiceParameters": {
               "name": "MyApexEngine",
index e880d5e..5b4dfde 100644 (file)
@@ -7,7 +7,7 @@
                     "pdpType": "apex",
                     "action": "POST",
                     "policies": [{
-                            "name": "onap.policies.controlloop.Operational.apex.sampledomain",
+                            "name": "operational.apex.sampledomain",
                             "version": "1.0.0"
                         }]
                 }