[BUG] Effective trust factors in DMI trust level 46/139646/1
authordanielhanrahan <daniel.hanrahan@est.tech>
Wed, 4 Dec 2024 14:37:26 +0000 (14:37 +0000)
committerdanielhanrahan <daniel.hanrahan@est.tech>
Wed, 4 Dec 2024 14:54:15 +0000 (14:54 +0000)
commit9249dd6211d2e5b818f26477458f7633a35a4b32
treeb8c20c369dcebc6a9e6c33193523a05afd4d8e1b
parent45c75e4716c4dd4575168d29016fba0b2fe3c50a
[BUG] Effective trust factors in DMI trust level

Effective trust of a CM handle should be the trust level of the
handle or the DMI, whichever is lower. Currently, effective trust
level of a CM handle is not reported correctly when the DMI is down,
as DMI trust level is not considered.

- Add DMI service names to NcmpServiceCmHandle
- Introduce new DmiServiceNameResolver class
- Correctly calculate effective trust level

Issue-ID: CPS-2375
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: Iaded0fadad58d960eb76c69f79a308df8329e534
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/inventory/models/NcmpServiceCmHandle.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/dmi/DmiServiceNameResolver.java [new file with mode: 0644]
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/models/YangModelCmHandle.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/trustlevel/TrustLevelManager.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/utils/YangDataConverter.java
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/inventory/trustlevel/TrustLevelManagerSpec.groovy
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/utils/YangDataConverterSpec.groovy