diff options
author | 2023-11-14 10:47:42 +0000 | |
---|---|---|
committer | 2023-11-14 10:47:42 +0000 | |
commit | 2240e46412ca11a6deb4b678b52e4e242e298b03 (patch) | |
tree | 76bfddb2e544f09c31fb9b6c261ca3aa341e82fa /cps-ncmp-service/src/main/java/org/onap | |
parent | ed9d179947325bbb9b81378b469341d023b46cd8 (diff) | |
parent | 4d2894f9856c701e7cd15c69f4e26ee41cfd1a72 (diff) |
Merge "Add DMI trustlevel at registration"
Diffstat (limited to 'cps-ncmp-service/src/main/java/org/onap')
-rwxr-xr-x | cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImpl.java | 14 |
1 files changed, 13 insertions, 1 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 e1ff400c8..1f87a1ef9 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 @@ -101,6 +101,7 @@ public class NetworkCmProxyDataServiceImpl implements NetworkCmProxyDataService private final CpsDataService cpsDataService; private final IMap<String, Object> moduleSyncStartedOnCmHandles; private final Map<String, TrustLevel> trustLevelPerCmHandle; + private final Map<String, TrustLevel> trustLevelPerDmiPlugin; @Override public DmiPluginRegistrationResponse updateDmiRegistrationAndSyncModule( @@ -108,15 +109,17 @@ public class NetworkCmProxyDataServiceImpl implements NetworkCmProxyDataService dmiPluginRegistration.validateDmiPluginRegistration(); final DmiPluginRegistrationResponse dmiPluginRegistrationResponse = new DmiPluginRegistrationResponse(); + setTrustLevelPerDmiPlugin(dmiPluginRegistration); + if (!dmiPluginRegistration.getRemovedCmHandles().isEmpty()) { dmiPluginRegistrationResponse.setRemovedCmHandles( parseAndProcessDeletedCmHandlesInRegistration(dmiPluginRegistration.getRemovedCmHandles())); } if (!dmiPluginRegistration.getCreatedCmHandles().isEmpty()) { - populateTrustLevelPerCmHandleCache(dmiPluginRegistration); dmiPluginRegistrationResponse.setCreatedCmHandles( parseAndProcessCreatedCmHandlesInRegistration(dmiPluginRegistration)); + populateTrustLevelPerCmHandleCache(dmiPluginRegistration); } if (!dmiPluginRegistration.getUpdatedCmHandles().isEmpty()) { dmiPluginRegistrationResponse.setUpdatedCmHandles( @@ -128,6 +131,7 @@ public class NetworkCmProxyDataServiceImpl implements NetworkCmProxyDataService dmiPluginRegistrationResponse.setUpgradedCmHandles( parseAndProcessUpgradedCmHandlesInRegistration(dmiPluginRegistration)); } + return dmiPluginRegistrationResponse; } @@ -521,4 +525,12 @@ public class NetworkCmProxyDataServiceImpl implements NetworkCmProxyDataService } } + private void setTrustLevelPerDmiPlugin(final DmiPluginRegistration dmiPluginRegistration) { + if (DmiPluginRegistration.isNullEmptyOrBlank(dmiPluginRegistration.getDmiDataPlugin())) { + trustLevelPerDmiPlugin.put(dmiPluginRegistration.getDmiPlugin(), TrustLevel.COMPLETE); + } else { + trustLevelPerDmiPlugin.put(dmiPluginRegistration.getDmiDataPlugin(), TrustLevel.COMPLETE); + } + } + } |