aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/resources/example
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2021-03-22 18:55:46 +0100
committersebdet <sebastien.determe@intl.att.com>2021-04-01 16:53:14 +0200
commitee233569e74e4620cb35ce4e9c4320b30d108824 (patch)
tree5c0dbbbe575381d9696ae3f6cf841bea499c0254 /src/test/resources/example
parent1da36e7c13bc7efac7bdd8425cede0e69d3f1335 (diff)
Rework the backend to support PDP updates
Add new mem structure so that we do not need to parse the same Json for each policy/type + rework the camel flows so that we use the same code for loop and policies related calls Issue-ID: POLICY-2930 Issue-ID: POLICY-2931 Signed-off-by: sebdet <sebastien.determe@intl.att.com> Change-Id: I3c30c4f87cf669b40511472d518fe5ccc89f56f0
Diffstat (limited to 'src/test/resources/example')
-rw-r--r--src/test/resources/example/policy/pdp-deployment-testos-1_0_0.json30
-rw-r--r--src/test/resources/example/policy/pdp-deployment-testos-2_0_0.json204
-rw-r--r--src/test/resources/example/policy/policy-merger.json76
3 files changed, 302 insertions, 8 deletions
diff --git a/src/test/resources/example/policy/pdp-deployment-testos-1_0_0.json b/src/test/resources/example/policy/pdp-deployment-testos-1_0_0.json
new file mode 100644
index 000000000..3b4a0eafc
--- /dev/null
+++ b/src/test/resources/example/policy/pdp-deployment-testos-1_0_0.json
@@ -0,0 +1,30 @@
+{
+ "pdpGroupInfo": [
+ {
+ "pdpGroup2": {
+ "name": "pdpGroup2",
+ "pdpGroupState": "ACTIVE",
+ "pdpSubgroups": [
+ {
+ "pdpType": "subGroup2",
+ "supportedPolicyTypes": [
+ {
+ "name": "org.onap.test",
+ "version": "1.0.0"
+ }
+ ],
+ "policies": [
+ {
+ "name": "org.onap.testos",
+ "version": "1.0.0"
+ }
+ ],
+ "currentInstanceCount": 0,
+ "desiredInstanceCount": 0,
+ "pdpInstances": []
+ }
+ ]
+ }
+ }
+ ]
+} \ No newline at end of file
diff --git a/src/test/resources/example/policy/pdp-deployment-testos-2_0_0.json b/src/test/resources/example/policy/pdp-deployment-testos-2_0_0.json
new file mode 100644
index 000000000..0040052f2
--- /dev/null
+++ b/src/test/resources/example/policy/pdp-deployment-testos-2_0_0.json
@@ -0,0 +1,204 @@
+{
+ "pdpGroupInfo": [
+ {
+ "pdpGroup3": {
+ "name": "pdpGroup3",
+ "pdpGroupState": "ACTIVE",
+ "pdpSubgroups": [
+ {
+ "pdpType": "subGroupBad",
+ "supportedPolicyTypes": [
+ {
+ "name": "org.onap.test",
+ "version": "2.0.0"
+ },
+ {
+ "name": "org.onap.test.*",
+ "version": "1.0.0"
+ },
+ {
+ "name": "org.onip.testos",
+ "version": "1.0.0"
+ },
+ {
+ "name": "org.onap.testos3",
+ "version": "2.0.0"
+ },
+ {
+ "name": "org.onap.tes",
+ "version": "1.0.0"
+ },
+ {
+ "name": "org.onap",
+ "version": "1.0.0"
+ }
+ ],
+ "policies": [
+ {
+ "name": "org.onap",
+ "version": "1.0.0"
+ },
+ {
+ "name": "org.onap.testos",
+ "version": "2.0.0"
+ },
+ {
+ "name": "org.onap.testos",
+ "version": "1.0.1"
+ },
+ {
+ "name": "org.onap.testos.new",
+ "version": "1.0.0"
+ },
+ {
+ "name": "org.onap.",
+ "version": "1.0.0"
+ }
+ ],
+ "currentInstanceCount": 0,
+ "desiredInstanceCount": 0,
+ "pdpInstances": []
+ }
+ ]
+ },
+ "pdpGroup1": {
+ "name": "pdpGroup1",
+ "pdpGroupState": "ACTIVE",
+ "pdpSubgroups": [
+ {
+ "pdpType": "subGroupBad",
+ "supportedPolicyTypes": [
+ {
+ "name": "org.onap.test",
+ "version": "2.0.0"
+ },
+ {
+ "name": "org.onap.test.*",
+ "version": "1.0.0"
+ },
+ {
+ "name": "org.onip.testos",
+ "version": "1.0.0"
+ },
+ {
+ "name": "org.onap.testos3",
+ "version": "2.0.0"
+ },
+ {
+ "name": "org.onap.tes",
+ "version": "1.0.0"
+ },
+ {
+ "name": "org.onap",
+ "version": "1.0.0"
+ }
+ ],
+ "policies": [
+ {
+ "name": "org.onap",
+ "version": "1.0.0"
+ },
+ {
+ "name": "org.onap.testos",
+ "version": "2.0.0"
+ },
+ {
+ "name": "org.onap.testos",
+ "version": "1.0.1"
+ },
+ {
+ "name": "org.onap.testos.new",
+ "version": "1.0.0"
+ },
+ {
+ "name": "org.onap.",
+ "version": "1.0.0"
+ }
+ ],
+ "currentInstanceCount": 0,
+ "desiredInstanceCount": 0,
+ "pdpInstances": []
+ }
+ ]
+ },
+ "pdpGroup2": {
+ "name": "pdpGroup2",
+ "pdpGroupState": "ACTIVE",
+ "pdpSubgroups": [
+ {
+ "pdpType": "subGroup3",
+ "supportedPolicyTypes": [
+ {
+ "name": "org.onap.test*",
+ "version": "1.0.0"
+ }
+ ],
+ "policies": [
+ {
+ "name": "org.onap.testos",
+ "version": "2.0.0"
+ }
+ ],
+ "currentInstanceCount": 0,
+ "desiredInstanceCount": 0,
+ "pdpInstances": []
+ },
+ {
+ "pdpType": "subGroupBad",
+ "supportedPolicyTypes": [
+ {
+ "name": "org.onap.test",
+ "version": "2.0.0"
+ },
+ {
+ "name": "org.onap.test.*",
+ "version": "1.0.0"
+ },
+ {
+ "name": "org.onip.testos",
+ "version": "1.0.0"
+ },
+ {
+ "name": "org.onap.testos3",
+ "version": "2.0.0"
+ },
+ {
+ "name": "org.onap.tes",
+ "version": "1.0.0"
+ },
+ {
+ "name": "org.onap",
+ "version": "1.0.0"
+ }
+ ],
+ "policies": [
+ {
+ "name": "org.onap",
+ "version": "1.0.0"
+ },
+ {
+ "name": "org.onap.testos",
+ "version": "2.0.0"
+ },
+ {
+ "name": "org.onap.testos",
+ "version": "1.0.1"
+ },
+ {
+ "name": "org.onap.testos.new",
+ "version": "1.0.0"
+ },
+ {
+ "name": "org.onap.",
+ "version": "1.0.0"
+ }
+ ],
+ "currentInstanceCount": 0,
+ "desiredInstanceCount": 0,
+ "pdpInstances": []
+ }
+ ]
+ }
+ }
+ ]
+} \ No newline at end of file
diff --git a/src/test/resources/example/policy/policy-merger.json b/src/test/resources/example/policy/policy-merger.json
index e1424fffb..c3291ef71 100644
--- a/src/test/resources/example/policy/policy-merger.json
+++ b/src/test/resources/example/policy/policy-merger.json
@@ -34,10 +34,38 @@
"policy-id": "MICROSERVICE_vLoadBalancerMS_v1_0_tcagen2_1_0_0_AV0",
"policy-version": "1.0.0"
},
- "pdpGroupInfo": {
- "pdpGroup": "pdpGroup2",
- "pdpSubGroup": "subGroup2"
- },
+ "pdpGroupInfo": [
+ {
+ "pdpGroup2": {
+ "name": "pdpGroup2",
+ "pdpGroupState": "ACTIVE",
+ "pdpSubgroups": [
+ {
+ "pdpType": "subGroup2",
+ "supportedPolicyTypes": [
+ {
+ "name": "onap.policies.monitoring.tcagen2",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.controlloop.operational.common.Drools",
+ "version": "1.0.0"
+ }
+ ],
+ "policies": [
+ {
+ "name": "MICROSERVICE_vLoadBalancerMS_v1_0_tcagen2_1_0_0_AV0",
+ "version": "1.0.0"
+ }
+ ],
+ "currentInstanceCount": 0,
+ "desiredInstanceCount": 0,
+ "pdpInstances": []
+ }
+ ]
+ }
+ }
+ ],
"supportedPdpGroups": [
{
"pdpGroup2": [
@@ -97,10 +125,42 @@
"policy-id": "OPERATIONAL_vLoadBalancerMS_v1_0_Drools_1_0_0_7xd",
"policy-version": "1.0.0"
},
- "pdpGroupInfo": {
- "pdpGroup": "pdpGroup2",
- "pdpSubGroup": "subGroup3"
- },
+ "pdpGroupInfo": [
+ {
+ "pdpGroup2": {
+ "name": "pdpGroup2",
+ "pdpGroupState": "ACTIVE",
+ "pdpSubgroups": [
+ {
+ "pdpType": "subGroup3",
+ "supportedPolicyTypes": [
+ {
+ "name": "onap.policies.monitoring.tcagen2",
+ "version": "1.0.0"
+ },
+ {
+ "name": "onap.policies.controlloop.operational.common.Drools",
+ "version": "1.0.0"
+ }
+ ],
+ "policies": [
+ {
+ "name": "org.onap.testos",
+ "version": "2.0.0"
+ },
+ {
+ "name": "OPERATIONAL_vLoadBalancerMS_v1_0_Drools_1_0_0_7xd",
+ "version": "1.0.0"
+ }
+ ],
+ "currentInstanceCount": 0,
+ "desiredInstanceCount": 0,
+ "pdpInstances": []
+ }
+ ]
+ }
+ }
+ ],
"supportedPdpGroups": [
{
"pdpGroup2": [