diff options
Diffstat (limited to 'cps-ncmp-service/src/main')
-rwxr-xr-x | cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImpl.java | 12 | ||||
-rw-r--r-- | cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/models/CmHandle.java | 4 |
2 files changed, 8 insertions, 8 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 f97ea029db..d6d1ec75ce 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 @@ -51,8 +51,6 @@ public class NetworkCmProxyDataServiceImpl implements NetworkCmProxyDataService private static final String NCMP_ANCHOR_NAME = "ncmp-dmi-registry"; - private static final String NCMP_DATA_TOP_PATH = "/dmi-registry"; - private CpsDataService cpsDataService; private ObjectMapper objectMapper; @@ -118,16 +116,16 @@ public class NetworkCmProxyDataServiceImpl implements NetworkCmProxyDataService final List<PersistenceCmHandle> persistenceCmHandles = new ArrayList<>(); for (final CmHandle cmHandle: dmiPluginRegistration.getCreatedCmHandles()) { - final PersistenceCmHandle persistenceCmHandle = new PersistenceCmHandle(); + final var persistenceCmHandle = new PersistenceCmHandle(); persistenceCmHandle.setDmiServiceName(dmiPluginRegistration.getDmiPlugin()); - persistenceCmHandle.setId(cmHandle.getCmHandle()); + persistenceCmHandle.setId(cmHandle.getCmHandleID()); persistenceCmHandle.setAdditionalProperties(cmHandle.getCmHandleProperties()); persistenceCmHandles.add(persistenceCmHandle); } - final PersistenceCmHandlesList persistenceCmHandlesList = new PersistenceCmHandlesList(); + final var persistenceCmHandlesList = new PersistenceCmHandlesList(); persistenceCmHandlesList.setCmHandles(persistenceCmHandles); - final String cmHandleJsonData = objectMapper.writeValueAsString(persistenceCmHandlesList); - cpsDataService.saveListNodeData(NCMP_DATASPACE_NAME, NCMP_ANCHOR_NAME, NCMP_DATA_TOP_PATH, + final var cmHandleJsonData = objectMapper.writeValueAsString(persistenceCmHandlesList); + cpsDataService.saveListNodeData(NCMP_DATASPACE_NAME, NCMP_ANCHOR_NAME, "/dmi-registry", cmHandleJsonData); } catch (final JsonProcessingException e) { throw new DataValidationException( diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/models/CmHandle.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/models/CmHandle.java index 0d1c7693a6..84227ed6b3 100644 --- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/models/CmHandle.java +++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/models/CmHandle.java @@ -20,6 +20,7 @@ package org.onap.cps.ncmp.api.models; +import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; import lombok.Getter; import lombok.Setter; @@ -33,7 +34,8 @@ import org.springframework.validation.annotation.Validated; @Setter public class CmHandle { - private String cmHandle; + @JsonProperty("cmHandle") + private String cmHandleID; private Map<String, String> cmHandleProperties; |