diff options
author | mpriyank <priyank.maheshwari@est.tech> | 2024-08-23 16:33:44 +0100 |
---|---|---|
committer | mpriyank <priyank.maheshwari@est.tech> | 2024-08-27 12:44:15 +0100 |
commit | 9718417885caa9581a9115ba07e2060bd38ec9b8 (patch) | |
tree | fe718fcfef86d3f7174966ffa4d0659dec828c87 /cps-ncmp-service/src/main | |
parent | 102127e47d8ce02a73ccadbd4c60498b59241925 (diff) |
Support for alternate-id CPS-E05 composite state
- Added support for alternate id for the composite state API for
CPS-E05#15
Issue-ID: CPS-2377
Change-Id: I1af41efb8cec762be68250cae7c1e98fbc61a4f5
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
Diffstat (limited to 'cps-ncmp-service/src/main')
-rw-r--r-- | cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/inventory/NetworkCmProxyInventoryFacade.java | 7 |
1 files changed, 5 insertions, 2 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 6f51a8d011..1acd937a31 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 @@ -44,6 +44,7 @@ import org.onap.cps.ncmp.impl.inventory.models.CmHandleQueryConditions; import org.onap.cps.ncmp.impl.inventory.models.InventoryQueryConditions; import org.onap.cps.ncmp.impl.inventory.models.YangModelCmHandle; import org.onap.cps.ncmp.impl.inventory.trustlevel.TrustLevelManager; +import org.onap.cps.ncmp.impl.utils.AlternateIdMatcher; import org.onap.cps.ncmp.impl.utils.YangDataConverter; import org.onap.cps.spi.model.ModuleDefinition; import org.onap.cps.spi.model.ModuleReference; @@ -61,6 +62,7 @@ public class NetworkCmProxyInventoryFacade { private final InventoryPersistence inventoryPersistence; private final JsonObjectMapper jsonObjectMapper; private final TrustLevelManager trustLevelManager; + private final AlternateIdMatcher alternateIdMatcher; /** * Registration of Created, Removed, Updated or Upgraded CM Handles. @@ -198,10 +200,11 @@ public class NetworkCmProxyInventoryFacade { /** * Get cm handle composite state for a given cm handle id. * - * @param cmHandleId cm handle identifier + * @param cmHandleReference cm handle or alternate identifier * @return cm handle state */ - public CompositeState getCmHandleCompositeState(final String cmHandleId) { + public CompositeState getCmHandleCompositeState(final String cmHandleReference) { + final String cmHandleId = alternateIdMatcher.getCmHandleId(cmHandleReference); return inventoryPersistence.getYangModelCmHandle(cmHandleId).getCompositeState(); } |