- CPS-817Getting issue details... STATUS
Creating a new get cm handle endpoint.
REST layer
- nmcp.yml
- New endpoint for retrieveCmHandleByName to retrieve cm handle details by the cm handles name/id.
- NetworkComProxyController.java
- New method retrieveCmHandleByName() which calls a new method getCmHandleDetails from NetworkCmProxyDataService
- NetworkCmProxyController.groovy
- Add test for scenario above.
Service Layer
- NetworkCmProxyDataService.java
- New getCmHandleDetails() method to be overwritten.
- NetworkCmProxyDataServiceImp.java
- Implement getCmHandleDetails and call retrieveCmHandleDetails from the persistence layer.
Persistence Layer
PersistenceCmHandleRetriever.java
- New method retrieveCmHandleDetails().
API details
Description | URI | Sample Response Body |
---|---|---|
Get Cm Handle details by name. | GET {ncmpRoot}/ncmp/v1/ch/PNFDemo | { |
Open Issues
Currently within CPS we have two separate models for CmHandles these being CmHandle and PersistenceCmHandle. These are both very similar models, the primary difference being that persistenceCmHandle also contains references to the dmiServiceName, the dmiDataServiceName and the dmiModelServiceName as seen below.
/** * CmHandle. */ @Validated @Getter @Setter @NoArgsConstructor public class CmHandle { @JsonProperty("cmHandle") private String cmHandleID; @JsonSetter(nulls = Nulls.AS_EMPTY) @JsonProperty("cmHandleProperties") private Map<String, String> dmiProperties = Collections.emptyMap(); @JsonSetter(nulls = Nulls.AS_EMPTY) @JsonProperty("publicCmHandleProperties") private Map<String, String> publicProperties = Collections.emptyMap(); }
/** * DmiRegistry. */ @Getter @Setter @NoArgsConstructor public class PersistenceCmHandle { private String id; @JsonProperty("dmi-service-name") private String dmiServiceName; @JsonProperty("dmi-data-service-name") private String dmiDataServiceName; @JsonProperty("dmi-model-service-name") private String dmiModelServiceName; @JsonProperty("additional-properties") private List<Property> dmiProperties; @JsonProperty("public-properties") private List<Property> publicProperties;