From 7ec9d2ca8f1bb83eb3f9ab30a2f14f3b475df6cf Mon Sep 17 00:00:00 2001 From: liamfallon Date: Mon, 4 Jan 2021 13:55:12 +0000 Subject: Changed identifiers to concept identifiers The policy models tosca classes ToscaPolicyIdentifier and ToscaPolicyIdentifierOptVersion can be used to identify any TOSCA concept, not just TOSCA policies so they are renamed to ToscaConceptIdentifier and ToscaCinceptIdentifierOptVersion respectively. The class ToscaPolicyTypeIdentifier is redundant and is replaced by ToscaConceptIdentifier. Issue-ID: POLICY-2900 Change-Id: Id5da4e5894a0d646f9f4b68c1e6b0476d4deae05 Signed-off-by: liamfallon --- .../onap/policy/controlloop/common/rules/test/BaseTestTest.java | 5 +++-- .../policy/controlloop/common/rules/test/DroolsRuleTestTest.java | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'controlloop') diff --git a/controlloop/common/rules-test/src/test/java/org/onap/policy/controlloop/common/rules/test/BaseTestTest.java b/controlloop/common/rules-test/src/test/java/org/onap/policy/controlloop/common/rules/test/BaseTestTest.java index ea90a6ba6..4a1cef0d9 100644 --- a/controlloop/common/rules-test/src/test/java/org/onap/policy/controlloop/common/rules/test/BaseTestTest.java +++ b/controlloop/common/rules-test/src/test/java/org/onap/policy/controlloop/common/rules/test/BaseTestTest.java @@ -3,6 +3,7 @@ * ONAP * ================================================================================ * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2021 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -54,8 +55,8 @@ import org.onap.policy.common.utils.coder.StandardCoderInstantAsMillis; import org.onap.policy.controlloop.ControlLoopNotificationType; import org.onap.policy.controlloop.VirtualControlLoopNotification; import org.onap.policy.drools.controller.DroolsController; +import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier; import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicy; -import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyIdentifier; import org.onap.policy.sdnr.PciBody; import org.onap.policy.sdnr.PciCommonHeader; import org.onap.policy.sdnr.PciMessage; @@ -97,7 +98,7 @@ public class BaseTestTest { @Mock private ToscaPolicy policy; @Mock - private ToscaPolicyIdentifier policyIdent; + private ToscaConceptIdentifier policyIdent; /** diff --git a/controlloop/common/rules-test/src/test/java/org/onap/policy/controlloop/common/rules/test/DroolsRuleTestTest.java b/controlloop/common/rules-test/src/test/java/org/onap/policy/controlloop/common/rules/test/DroolsRuleTestTest.java index 43392b9bb..0aca1b2b8 100644 --- a/controlloop/common/rules-test/src/test/java/org/onap/policy/controlloop/common/rules/test/DroolsRuleTestTest.java +++ b/controlloop/common/rules-test/src/test/java/org/onap/policy/controlloop/common/rules/test/DroolsRuleTestTest.java @@ -3,6 +3,7 @@ * ONAP * ================================================================================ * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2021 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -52,8 +53,8 @@ import org.onap.policy.controlloop.ControlLoopNotificationType; import org.onap.policy.controlloop.VirtualControlLoopNotification; import org.onap.policy.drools.controller.DroolsController; import org.onap.policy.drools.system.PolicyController; +import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier; import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicy; -import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyIdentifier; import org.onap.policy.sdnr.PciMessage; import org.powermock.reflect.Whitebox; @@ -97,7 +98,7 @@ public class DroolsRuleTestTest { @Mock private ToscaPolicy policy; @Mock - private ToscaPolicyIdentifier policyIdent; + private ToscaConceptIdentifier policyIdent; /** @@ -291,4 +292,4 @@ public class DroolsRuleTestTest { return policyClMgt.await(notif -> notif.getNotification() == finalType); } } -} \ No newline at end of file +} -- cgit 1.2.3-korg