summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'cps-ncmp-service/src/main')
-rwxr-xr-xcps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImpl.java29
1 files changed, 10 insertions, 19 deletions
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImpl.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImpl.java
index 6c1a1b464a..ea2f72fef7 100755
--- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImpl.java
+++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImpl.java
@@ -295,26 +295,17 @@ public class NetworkCmProxyDataServiceImpl implements NetworkCmProxyDataService
*/
public List<CmHandleRegistrationResponse> parseAndCreateCmHandlesInDmiRegistrationAndSyncModules(
final DmiPluginRegistration dmiPluginRegistration) {
- List<CmHandleRegistrationResponse> cmHandleRegistrationResponses = new ArrayList<>();
final Map<YangModelCmHandle, CmHandleState> cmHandleStatePerCmHandle = new HashMap<>();
- try {
- dmiPluginRegistration.getCreatedCmHandles()
- .forEach(cmHandle -> {
- final YangModelCmHandle yangModelCmHandle = YangModelCmHandle.toYangModelCmHandle(
- dmiPluginRegistration.getDmiPlugin(),
- dmiPluginRegistration.getDmiDataPlugin(),
- dmiPluginRegistration.getDmiModelPlugin(),
- cmHandle);
- cmHandleStatePerCmHandle.put(yangModelCmHandle, CmHandleState.ADVISED);
- });
- cmHandleRegistrationResponses = registerNewCmHandles(cmHandleStatePerCmHandle);
- } catch (final DataValidationException dataValidationException) {
- cmHandleRegistrationResponses.add(CmHandleRegistrationResponse.createFailureResponse(dmiPluginRegistration
- .getCreatedCmHandles().stream()
- .map(NcmpServiceCmHandle::getCmHandleId).findFirst().orElse(null),
- RegistrationError.CM_HANDLE_INVALID_ID));
- }
- return cmHandleRegistrationResponses;
+ dmiPluginRegistration.getCreatedCmHandles()
+ .forEach(cmHandle -> {
+ final YangModelCmHandle yangModelCmHandle = YangModelCmHandle.toYangModelCmHandle(
+ dmiPluginRegistration.getDmiPlugin(),
+ dmiPluginRegistration.getDmiDataPlugin(),
+ dmiPluginRegistration.getDmiModelPlugin(),
+ cmHandle);
+ cmHandleStatePerCmHandle.put(yangModelCmHandle, CmHandleState.ADVISED);
+ });
+ return registerNewCmHandles(cmHandleStatePerCmHandle);
}
protected List<CmHandleRegistrationResponse> parseAndRemoveCmHandlesInDmiRegistration(