From 9f41ede37c78dd5dcea1851e114b7bdf9a5df7a5 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Wed, 5 Jun 2019 11:00:21 -0400 Subject: Reject policy deployment with version mismatch PAP should not allow multiple versions of a policy to be deployed to the same PDP. Modified the code to reject deployment requests where a different version of the policy is already deployed. This impacts both the PDP-Group-Deploy and the Simple-Deploy REST APIs. Change-Id: I586b764951c20228d0d80ec8326869215e970fdf Issue-ID: POLICY-1785 Signed-off-by: Jim Hahn --- .../simpleDeploy/upgradeGroupDao_DiffVers.json | 72 ++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 main/src/test/resources/simpleDeploy/upgradeGroupDao_DiffVers.json (limited to 'main/src/test/resources/simpleDeploy/upgradeGroupDao_DiffVers.json') diff --git a/main/src/test/resources/simpleDeploy/upgradeGroupDao_DiffVers.json b/main/src/test/resources/simpleDeploy/upgradeGroupDao_DiffVers.json new file mode 100644 index 00000000..3697389e --- /dev/null +++ b/main/src/test/resources/simpleDeploy/upgradeGroupDao_DiffVers.json @@ -0,0 +1,72 @@ +{ + "groups": [ + { + "name": "groupA", + "version": "200.2.3", + "pdpSubgroups": [ + { + "pdpType": "pdpTypeA", + "supportedPolicyTypes": [], + "pdpInstances": [ + { + "instanceId": "pdpA" + } + ], + "policies": [] + }, + { + "pdpType": "pdpTypeB", + "supportedPolicyTypes": [ + { + "name": "typeA", + "version": "100.2.3" + } + ], + "pdpInstances": [ + { + "instanceId": "pdpB" + } + ], + "policies": [] + }, + { + "pdpType": "pdpTypeC", + "supportedPolicyTypes": [ + { + "name": "typeA", + "version": "100.2.3" + } + ], + "pdpInstances": [ + { + "instanceId": "pdpC" + } + ], + "policies": [ + { + "name": "policyA", + "version": "9.9.9", + "type": "typeA", + "type_version": "100.2.3" + } + ] + }, + { + "pdpType": "pdpTypeD", + "supportedPolicyTypes": [ + { + "name": "typeA", + "version": "100.2.3" + } + ], + "pdpInstances": [ + { + "instanceId": "pdpD" + } + ], + "policies": [] + } + ] + } + ] +} -- cgit 1.2.3-korg