diff options
author | 2019-05-22 12:40:48 -0400 | |
---|---|---|
committer | 2019-05-22 12:40:59 -0400 | |
commit | 85e47aa6a194bc8069a628390708a62711a6197b (patch) | |
tree | 7e21330e52e68e922274d10409fdb7f3e442badb /main/src/main | |
parent | bbf59429cf462ae417a16afa631c87f495e261df (diff) |
Reserve version integer check and delete eligibility check
Per Jim's comment, version integer check should come first before
checking delete elibibility (i.e. checking if policy is deployed
in PDP group or not).
Issue-ID: POLICY-1777
Change-Id: Ibd3d8d05a40ef34c558a2e9389596396a69469fe
Signed-off-by: Chenfei Gao <cgao@research.att.com>
Diffstat (limited to 'main/src/main')
2 files changed, 2 insertions, 2 deletions
diff --git a/main/src/main/java/org/onap/policy/api/main/rest/provider/LegacyGuardPolicyProvider.java b/main/src/main/java/org/onap/policy/api/main/rest/provider/LegacyGuardPolicyProvider.java index 236d26eb..44cc046f 100644 --- a/main/src/main/java/org/onap/policy/api/main/rest/provider/LegacyGuardPolicyProvider.java +++ b/main/src/main/java/org/onap/policy/api/main/rest/provider/LegacyGuardPolicyProvider.java @@ -98,8 +98,8 @@ public class LegacyGuardPolicyProvider implements AutoCloseable { public Map<String, LegacyGuardPolicyOutput> deleteGuardPolicy(String policyId, String policyVersion) throws PfModelException { - validateDeleteEligibility(policyId, policyVersion); validateLegacyGuardPolicyVersion(policyVersion); + validateDeleteEligibility(policyId, policyVersion); return modelsProvider.deleteGuardPolicy(policyId, policyVersion); } diff --git a/main/src/main/java/org/onap/policy/api/main/rest/provider/LegacyOperationalPolicyProvider.java b/main/src/main/java/org/onap/policy/api/main/rest/provider/LegacyOperationalPolicyProvider.java index 5b9fdcf8..a931f593 100644 --- a/main/src/main/java/org/onap/policy/api/main/rest/provider/LegacyOperationalPolicyProvider.java +++ b/main/src/main/java/org/onap/policy/api/main/rest/provider/LegacyOperationalPolicyProvider.java @@ -95,8 +95,8 @@ public class LegacyOperationalPolicyProvider implements AutoCloseable { public LegacyOperationalPolicy deleteOperationalPolicy(String policyId, String policyVersion) throws PfModelException { - validateDeleteEligibility(policyId, policyVersion); validateLegacyOperationalPolicyVersion(policyVersion); + validateDeleteEligibility(policyId, policyVersion); return modelsProvider.deleteOperationalPolicy(policyId, policyVersion); } |