From 23b2730941fff26082de9e8a308e1a29758c96a5 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Tue, 4 Jun 2019 17:27:31 -0400 Subject: Undeploy policies when subgroup is deleted When a subgroup is deleted via the PDP Group create/update API, any PDPs in the subgroup should have all of its policies undeployed. In the process, refactored addOrUpdateSubGroups() out of updateGroup(). Change-Id: I0750802bfb133a655e38493a868744b512ca3fb4 Issue-ID: POLICY-1803 Signed-off-by: Jim Hahn --- .../resources/simpleDeploy/createGroupsDelSub.json | 64 ++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 main/src/test/resources/simpleDeploy/createGroupsDelSub.json (limited to 'main/src/test/resources/simpleDeploy') diff --git a/main/src/test/resources/simpleDeploy/createGroupsDelSub.json b/main/src/test/resources/simpleDeploy/createGroupsDelSub.json new file mode 100644 index 00000000..cba308ec --- /dev/null +++ b/main/src/test/resources/simpleDeploy/createGroupsDelSub.json @@ -0,0 +1,64 @@ +{ + "groups": [ + { + "name": "groupA", + "version": "200.2.3", + "description": "my description", + "pdpGroupState": "ACTIVE", + "properties": { + "hello": "world" + }, + "pdpSubgroups": [ + { + "pdpType": "pdpTypeA", + "desiredInstanceCount": 1, + "properties": { + "abc": "def" + }, + "supportedPolicyTypes": [ + { + "name": "typeA", + "version": "100.2.3" + } + ], + "pdpInstances": [ + { + "instanceId": "pdpA" + } + ], + "policies": [ + { + "name": "policyA", + "version": "1.2.3" + } + ] + }, + { + "pdpType": "pdpTypeB", + "desiredInstanceCount": 1, + "currentInstanceCount": 22, + "supportedPolicyTypes": [ + { + "name": "typeA", + "version": "100.2.3" + } + ], + "pdpInstances": [ + { + "instanceId": "pdpB" + }, + { + "instanceId": "pdpD" + } + ], + "policies": [ + { + "name": "policyA", + "version": "1.2.3" + } + ] + } + ] + } + ] +} -- cgit 1.2.3-korg