Table of Contents |
---|
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
@Override public void updateDmiPluginRegistration(final DmiPluginRegistration dmiPluginRegistration) { try { final List<PersistenceCmHandle> persistenceCmHandles = new ArrayList<>(); for (final CmHandle cmHandle: dmiPluginRegistration.getCreatedCmHandles()) { final PersistenceCmHandle persistenceCmHandle = new PersistenceCmHandle(); persistenceCmHandle.setDmiServiceName(dmiPluginRegistration.getDmiPlugin()); persistenceCmHandle.setId(cmHandle.getCmHandle()); persistenceCmHandle.setAdditionalProperties(cmHandle.getCmHandleProperties()); persistenceCmHandles.add(persistenceCmHandle); } final PersistenceCmHandlesList persistenceCmHandlesList = new PersistenceCmHandlesList(); persistenceCmHandlesList.setCmHandles(persistenceCmHandles); final String cmHandleJsonData = objectMapper.writeValueAsString(persistenceCmHandlesList); cpsDataService.saveListNodeData(NCMP_DATASPACE_NAME, NCMP_ANCHOR_NAME, NCMP_DATA_TOP_PATH, cmHandleJsonData); } catch (final JsonProcessingException e) { throw new DataValidationException( "Parsing error occurred while processing DMI Plugin Registration" + dmiPluginRegistration, e .getMessage(), e); } } |
...
Return cmHandleJsonData from updateDmiPluginRegistration() in NetworkCmProxyDataService
Append deriving modules after line 137 127 in method updateDmiPluginRegistration() in NetworkCmProxyDataServiceImplNetworkCmProxyDataController
deriveModulesForCmHandle(cmHandleJsonData);
get cm handles from string
call dmi to get modules for this cmhandle
compare with cps and get delta
call dmi for delta modules
return Map<String, String> newYangResourcesModuleNameToContentMap
...