aboutsummaryrefslogtreecommitdiffstats
path: root/cps-ncmp-rest/src/main
diff options
context:
space:
mode:
authorseanbeirne <sean.beirne@est.tech>2024-08-26 14:13:29 +0100
committerseanbeirne <sean.beirne@est.tech>2024-09-02 14:09:25 +0100
commit081f605d960fcba79a82e8dfe70c4b20e232ea94 (patch)
treebeb6211a6c8c2c90c9610363d7504c155cadda4c /cps-ncmp-rest/src/main
parent29aefda31575e17ef5d8584f7b3a92b882995a15 (diff)
Support Alternate-id for CPS-E05 module definition
Issue-ID: CPS-2379 Change-Id: Idd180c5792575522ceaaa094b94c8f5b36790186 Signed-off-by: seanbeirne <sean.beirne@est.tech>
Diffstat (limited to 'cps-ncmp-rest/src/main')
-rwxr-xr-xcps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java14
1 files changed, 8 insertions, 6 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 ca2907b8d6..b98d8c3abf 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
@@ -334,21 +334,23 @@ public class NetworkCmProxyController implements NetworkCmProxyApi {
/**
* Return module definitions.
*
- * @param cmHandleId cm-handle identifier
- * @param moduleName module name
- * @param revision the revision of the module
+ * @param cmHandleReference cm handle or alternate id identifier
+ * @param moduleName module name
+ * @param revision the revision of the module
* @return list of module definitions (module name, revision, yang resource content)
*/
@Override
- public ResponseEntity<List<RestModuleDefinition>> getModuleDefinitions(final String cmHandleId,
+ public ResponseEntity<List<RestModuleDefinition>> getModuleDefinitions(final String cmHandleReference,
final String moduleName,
final String revision) {
final Collection<ModuleDefinition> moduleDefinitions;
if (StringUtils.hasText(moduleName)) {
moduleDefinitions =
- networkCmProxyInventoryFacade.getModuleDefinitionsByCmHandleAndModule(cmHandleId, moduleName, revision);
+ networkCmProxyInventoryFacade.getModuleDefinitionsByCmHandleAndModule(cmHandleReference,
+ moduleName, revision);
} else {
- moduleDefinitions = networkCmProxyInventoryFacade.getModuleDefinitionsByCmHandleId(cmHandleId);
+ moduleDefinitions =
+ networkCmProxyInventoryFacade.getModuleDefinitionsByCmHandleReference(cmHandleReference);
if (StringUtils.hasText(revision)) {
log.warn("Ignoring revision filter as no module name is provided");
}