From 55164b23839f187ae089fd08c34487dcfd165188 Mon Sep 17 00:00:00 2001 From: sourabh_sourabh Date: Tue, 26 Sep 2023 12:11:42 +0100 Subject: Expose REST endpoint to update YANG schema set using moduleSetTag - Added new schema to upgrade model into component. - Modified Ncmp rest input mapper to add upgradedCmHandles attributes. - Modified cm handle state mapper to add new lock reason. - Added new method to parse and upgrade Cm handles in DmiRegistration. - YANG data converter is modified to add "module-set-tag" atribute. - Cm handle new query method is added for cps path without appending ancestor. - Modified setCompositeStateForRetry to add lock reason. - New lock reason category is added. - Existing module sync service is modified to upgrade the model "syncAndCreateOrUpgradeSchemaSetAndAnchor". - Sync util method "getModuleSyncFailedCmHandles" to modified to add another lock reason "LOCKED_MISBEHAVING". - Added new attribute "UpgradedCmHandles" into DmiPluginRegistration and DmiPluginRegistrationResponse. - New attribute "moduleSetTag" is added into NcmpServiceCmHandle. - New model "UpgradedCmHandles" is added. - New method "updateSchemaSetWithExistingModules" is added into cps module service to update cm handle with exsting model. - Code coverage is reducced to 96 percentage that would be addressed and pushed into new patch. Issue-ID: CPS-1798 Signed-off-by: sourabh_sourabh Change-Id: I540acb404e38fc434de87a0d959bfde710a18b03 Signed-off-by: sourabh_sourabh --- .../rest/controller/NetworkCmProxyInventoryController.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyInventoryController.java') 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 cd61c5a4a..453abcabb 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 @@ -110,16 +110,16 @@ public class NetworkCmProxyInventoryController implements NetworkCmProxyInventor getFailedResponses(dmiPluginRegistrationResponse.getUpdatedCmHandles())); dmiPluginRegistrationErrorResponse.setFailedRemovedCmHandles( getFailedResponses(dmiPluginRegistrationResponse.getRemovedCmHandles())); - + dmiPluginRegistrationErrorResponse.setFailedUpgradeCmHandles( + getFailedResponses(dmiPluginRegistrationResponse.getUpgradedCmHandles())); return dmiPluginRegistrationErrorResponse; } private List getFailedResponses( - final List cmHandleRegistrationResponseList) { + final List cmHandleRegistrationResponseList) { return cmHandleRegistrationResponseList.stream() - .filter(cmHandleRegistrationResponse -> cmHandleRegistrationResponse.getStatus() == Status.FAILURE) - .map(this::toCmHandleRegistrationErrorResponse) - .collect(Collectors.toList()); + .filter(cmHandleRegistrationResponse -> cmHandleRegistrationResponse.getStatus() == Status.FAILURE) + .map(this::toCmHandleRegistrationErrorResponse).collect(Collectors.toList()); } private CmHandlerRegistrationErrorResponse toCmHandleRegistrationErrorResponse( -- cgit 1.2.3-korg