sort deploy and undeploy policy lists 19/116719/1
authorjhh <jorge.hernandez-herrero@att.com>
Mon, 11 Jan 2021 13:39:17 +0000 (07:39 -0600)
committerjhh <jorge.hernandez-herrero@att.com>
Mon, 11 Jan 2021 13:39:17 +0000 (07:39 -0600)
commitb73ceb906a6b8feabe88383ed35121dffbc20201
tree1ad749ff10e6d9abadc8a74b6280443ab88b3230
parenta4e03e4efd11858f4ea69ea97c4c273e0792daa4
sort deploy and undeploy policy lists

An order is imposed in the deployment and undeployment actions when
the list of active policies is retrieved from PAP.   This is to
ensure that the operations are applied in a sane way, for example
to try to prevent to undeploy policies before deleting a controller,
etc ..

The deployment order is 1) native controller, 2) native rule, and 3)
non-native policies.

The undeployment order is 1) non-native, 2) native rule, and 3)
native controller policies.

Issue-ID: POLICY-2762
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Icb15dcec87fd5d9917ee152ab15ca7277e13590a
feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleFsm.java
feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleFsmTest.java [new file with mode: 0644]