diff options
author | 2022-05-06 12:02:42 +0100 | |
---|---|---|
committer | 2022-05-20 14:43:05 +0100 | |
commit | bed18fd895d1ac240c7fdb361cb0ed994d392ecf (patch) | |
tree | 1ef6bf26c2dd4e295c99fe7060e8930c3bca74bf /cps-ncmp-rest/src/main/java/org/onap | |
parent | 806d31aed57c798cba0ecc33d92e5b43fa1d957b (diff) |
Get cm-handle public properties endpoint
Added RestOuputCmHandlePublicProperties OpenApi Object
Added Get cm-handle public properties endpoint
Added rest and service layer functionality for endpoint with tests
Fixed Copyright Checker violations
Issue-ID: CPS-1018
Signed-off-by: lukegleeson <luke.gleeson@est.tech>
Change-Id: Ifc13cde350a49f6ba705a09e31853dc9c73be168
Diffstat (limited to 'cps-ncmp-rest/src/main/java/org/onap')
-rwxr-xr-x | cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java index 5c1f8704d..ca7e258bc 100755 --- a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java +++ b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * Copyright (C) 2021 Pantheon.tech * Modifications Copyright (C) 2021-2022 Nordix Foundation - * Modification Copyright (C) 2021 highstreet technologies GmbH - * Modifications (C) 2021-2022 Bell Canada + * Modifications Copyright (C) 2021 highstreet technologies GmbH + * Modifications Copyright (C) 2021-2022 Bell Canada * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -57,6 +57,7 @@ import org.onap.cps.ncmp.rest.model.ModuleNameAsJsonObject; import org.onap.cps.ncmp.rest.model.ModuleNamesAsJsonArray; import org.onap.cps.ncmp.rest.model.RestModuleReference; import org.onap.cps.ncmp.rest.model.RestOutputCmHandle; +import org.onap.cps.ncmp.rest.model.RestOutputCmHandlePublicProperties; import org.onap.cps.utils.CpsValidator; import org.onap.cps.utils.JsonObjectMapper; import org.springframework.http.HttpStatus; @@ -241,6 +242,22 @@ public class NetworkCmProxyController implements NetworkCmProxyApi { } /** + * Get Cm Handle Properties by Cm Handle Id. + * @param cmHandleId cm-handle identifier + * @return cm handle and its properties + */ + @Override + public ResponseEntity<RestOutputCmHandlePublicProperties> getCmHandlePublicPropertiesByCmHandleId( + final String cmHandleId) { + final CmHandlePublicProperties cmHandlePublicProperties = new CmHandlePublicProperties(); + cmHandlePublicProperties.add(networkCmProxyDataService.getCmHandlePublicProperties(cmHandleId)); + final RestOutputCmHandlePublicProperties restOutputCmHandlePublicProperties = + new RestOutputCmHandlePublicProperties(); + restOutputCmHandlePublicProperties.setPublicCmHandleProperties(cmHandlePublicProperties); + return ResponseEntity.ok(restOutputCmHandlePublicProperties); + } + + /** * Return module references for a cm handle. * * @param cmHandle the cm handle |