From e348db7581b64de9540db193e88ebbaf62c78a45 Mon Sep 17 00:00:00 2001 From: sourabh_sourabh Date: Thu, 2 May 2024 10:08:04 +0100 Subject: Handle error in case of upgrade operation - Send an error response if cm handle not found for upgrade operation. - Restrict upgrade operation if it is already in progress. Issue-ID:CPS-2204 Change-Id: Iad63732c5b1d2215b06a09ddda1c0c604cd7648c Signed-off-by: sourabh_sourabh --- .../cps/ncmp/rest/controller/NetworkCmProxyInventoryController.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cps-ncmp-rest/src/main/java/org') diff --git a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyInventoryController.java b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyInventoryController.java index 453abcabb1..5467eeffca 100755 --- a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyInventoryController.java +++ b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyInventoryController.java @@ -96,8 +96,9 @@ public class NetworkCmProxyInventoryController implements NetworkCmProxyInventor private boolean allRegistrationsSuccessful( final DmiPluginRegistrationErrorResponse dmiPluginRegistrationErrorResponse) { return dmiPluginRegistrationErrorResponse.getFailedCreatedCmHandles().isEmpty() - && dmiPluginRegistrationErrorResponse.getFailedUpdatedCmHandles().isEmpty() - && dmiPluginRegistrationErrorResponse.getFailedRemovedCmHandles().isEmpty(); + && dmiPluginRegistrationErrorResponse.getFailedUpdatedCmHandles().isEmpty() + && dmiPluginRegistrationErrorResponse.getFailedRemovedCmHandles().isEmpty() + && dmiPluginRegistrationErrorResponse.getFailedUpgradeCmHandles().isEmpty(); } private DmiPluginRegistrationErrorResponse getFailureRegistrationResponse( -- cgit