diff options
author | seanbeirne <sean.beirne@est.tech> | 2024-08-26 14:13:29 +0100 |
---|---|---|
committer | seanbeirne <sean.beirne@est.tech> | 2024-09-02 14:09:25 +0100 |
commit | 081f605d960fcba79a82e8dfe70c4b20e232ea94 (patch) | |
tree | beb6211a6c8c2c90c9610363d7504c155cadda4c /cps-ncmp-service/src/main/java | |
parent | 29aefda31575e17ef5d8584f7b3a92b882995a15 (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-service/src/main/java')
-rw-r--r-- | cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/inventory/NetworkCmProxyInventoryFacade.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/inventory/NetworkCmProxyInventoryFacade.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/inventory/NetworkCmProxyInventoryFacade.java index 785eb8f022..cd3c00cc16 100644 --- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/inventory/NetworkCmProxyInventoryFacade.java +++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/inventory/NetworkCmProxyInventoryFacade.java @@ -113,24 +113,26 @@ public class NetworkCmProxyInventoryFacade { /** * Retrieve module definitions for the given cm handle. * - * @param cmHandleId cm handle identifier + * @param cmHandleReference cm handle or alternate id identifier * @return a collection of module definition (moduleName, revision and yang resource content) */ - public Collection<ModuleDefinition> getModuleDefinitionsByCmHandleId(final String cmHandleId) { + public Collection<ModuleDefinition> getModuleDefinitionsByCmHandleReference(final String cmHandleReference) { + final String cmHandleId = alternateIdMatcher.getCmHandleId(cmHandleReference); return inventoryPersistence.getModuleDefinitionsByCmHandleId(cmHandleId); } /** * Get module definitions for the given parameters. * - * @param cmHandleId cm-handle identifier - * @param moduleName module name - * @param moduleRevision the revision of the module + * @param cmHandleReference cm handle or alternate id identifier + * @param moduleName module name + * @param moduleRevision the revision of the module * @return list of module definitions (module name, revision, yang resource content) */ - public Collection<ModuleDefinition> getModuleDefinitionsByCmHandleAndModule(final String cmHandleId, + public Collection<ModuleDefinition> getModuleDefinitionsByCmHandleAndModule(final String cmHandleReference, final String moduleName, final String moduleRevision) { + final String cmHandleId = alternateIdMatcher.getCmHandleId(cmHandleReference); return inventoryPersistence.getModuleDefinitionsByCmHandleAndModule(cmHandleId, moduleName, moduleRevision); } |