aboutsummaryrefslogtreecommitdiffstats
path: root/feature-lifecycle
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2021-01-04 15:58:25 +0000
committerliamfallon <liam.fallon@est.tech>2021-01-04 16:22:19 +0000
commitca2f61793ab1d971414c25c68f9007c7c9abfaac (patch)
treef3551785175224a2007dc9eff4b1fea078f22538 /feature-lifecycle
parent223519c0c263ea2f9b2b9a94efe52d40ab2cf6f7 (diff)
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: I677cc1f8730001b300ab2041f2d57c2485cbc4ed Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'feature-lifecycle')
-rw-r--r--feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleFsm.java22
-rw-r--r--feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleStateRunning.java5
-rw-r--r--feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/PolicyTypeController.java5
-rw-r--r--feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/PolicyTypeDroolsController.java11
-rw-r--r--feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/PolicyTypeNativeArtifactController.java7
-rw-r--r--feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/PolicyTypeNativeDroolsController.java7
-rw-r--r--feature-lifecycle/src/main/java/org/onap/policy/drools/server/restful/RestLifecycleManager.java10
-rw-r--r--feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActivePoliciesTest.java13
-rw-r--r--feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActiveTest.java9
-rw-r--r--feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java7
-rw-r--r--feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/PolicyTypeNativeArtifactControllerTest.java7
11 files changed, 56 insertions, 47 deletions
diff --git a/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleFsm.java b/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleFsm.java
index a45f2b4e..ef47e1d6 100644
--- a/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleFsm.java
+++ b/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleFsm.java
@@ -3,6 +3,7 @@
* ONAP
* ================================================================================
* Copyright (C) 2019-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.
@@ -59,9 +60,8 @@ import org.onap.policy.models.pdp.concepts.PdpUpdate;
import org.onap.policy.models.pdp.enums.PdpHealthStatus;
import org.onap.policy.models.pdp.enums.PdpMessageType;
import org.onap.policy.models.pdp.enums.PdpState;
+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.models.tosca.authorative.concepts.ToscaPolicyTypeIdentifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -84,11 +84,11 @@ public class LifecycleFsm implements Startable {
protected static final long MIN_STATUS_INTERVAL_SECONDS = 5L;
protected static final String PDP_MESSAGE_NAME = "messageName";
- protected static final ToscaPolicyTypeIdentifier POLICY_TYPE_DROOLS_NATIVE_RULES =
- new ToscaPolicyTypeIdentifier("onap.policies.native.drools.Artifact", "1.0.0");
+ protected static final ToscaConceptIdentifier POLICY_TYPE_DROOLS_NATIVE_RULES =
+ new ToscaConceptIdentifier("onap.policies.native.drools.Artifact", "1.0.0");
- protected static final ToscaPolicyTypeIdentifier POLICY_TYPE_DROOLS_NATIVE_CONTROLLER =
- new ToscaPolicyTypeIdentifier("onap.policies.native.drools.Controller", "1.0.0");
+ protected static final ToscaConceptIdentifier POLICY_TYPE_DROOLS_NATIVE_CONTROLLER =
+ new ToscaConceptIdentifier("onap.policies.native.drools.Controller", "1.0.0");
@Getter
protected final Properties properties;
@@ -135,10 +135,10 @@ public class LifecycleFsm implements Startable {
protected Set<String> mandatoryPolicyTypes = new HashSet<>();
@Getter
- protected final Map<ToscaPolicyTypeIdentifier, PolicyTypeController> policyTypesMap = new HashMap<>();
+ protected final Map<ToscaConceptIdentifier, PolicyTypeController> policyTypesMap = new HashMap<>();
@Getter
- protected final Map<ToscaPolicyIdentifier, ToscaPolicy> policiesMap = new HashMap<>();
+ protected final Map<ToscaConceptIdentifier, ToscaPolicy> policiesMap = new HashMap<>();
/**
* Constructor.
@@ -200,7 +200,7 @@ public class LifecycleFsm implements Startable {
return;
}
- for (ToscaPolicyTypeIdentifier id : controller.getPolicyTypes()) {
+ for (ToscaConceptIdentifier id : controller.getPolicyTypes()) {
PolicyTypeDroolsController ptDc = (PolicyTypeDroolsController) policyTypesMap.get(id); //NOSONAR
if (ptDc == null) {
policyTypesMap.put(id, new PolicyTypeDroolsController(this, id, controller));
@@ -374,7 +374,7 @@ public class LifecycleFsm implements Startable {
return (this.scheduler.submit(() -> state.updatePolicies(toscaPolicies)) != null);
}
- protected PolicyTypeController getController(ToscaPolicyTypeIdentifier policyType) {
+ protected PolicyTypeController getController(ToscaConceptIdentifier policyType) {
return policyTypesMap.get(policyType);
}
@@ -387,7 +387,7 @@ public class LifecycleFsm implements Startable {
protected Set<String> getCurrentPolicyTypes() {
return getPolicyTypesMap().keySet().stream()
- .map(ToscaPolicyTypeIdentifier::getName).collect(Collectors.toSet());
+ .map(ToscaConceptIdentifier::getName).collect(Collectors.toSet());
}
/* ** Action Helpers ** */
diff --git a/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleStateRunning.java b/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleStateRunning.java
index 860986d5..86540093 100644
--- a/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleStateRunning.java
+++ b/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/LifecycleStateRunning.java
@@ -4,6 +4,7 @@
* ================================================================================
* Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019 Bell Canada.
+ * 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.
@@ -30,8 +31,8 @@ import org.onap.policy.models.pdp.concepts.PdpStateChange;
import org.onap.policy.models.pdp.concepts.PdpUpdate;
import org.onap.policy.models.pdp.enums.PdpResponseStatus;
import org.onap.policy.models.pdp.enums.PdpState;
+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.ToscaPolicyTypeIdentifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -164,7 +165,7 @@ public abstract class LifecycleStateRunning extends LifecycleStateDefault {
boolean success = true;
DomainMaker domain = fsm.getDomainMaker();
for (ToscaPolicy policy : policies) {
- ToscaPolicyTypeIdentifier policyType = policy.getTypeIdentifier();
+ ToscaConceptIdentifier policyType = policy.getTypeIdentifier();
PolicyTypeController controller = fsm.getController(policyType);
if (controller == null) {
logger.warn("no controller found for {}", policyType);
diff --git a/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/PolicyTypeController.java b/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/PolicyTypeController.java
index a61088dc..a376506e 100644
--- a/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/PolicyTypeController.java
+++ b/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/PolicyTypeController.java
@@ -3,6 +3,7 @@
* ONAP
* ================================================================================
* Copyright (C) 2017-2019 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.
@@ -20,8 +21,8 @@
package org.onap.policy.drools.lifecycle;
+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.ToscaPolicyTypeIdentifier;
/**
* Policy Type Controller.
@@ -32,7 +33,7 @@ public interface PolicyTypeController {
/**
* Get Policy Type.
*/
- ToscaPolicyTypeIdentifier getPolicyType();
+ ToscaConceptIdentifier getPolicyType();
/**
* Deploy a Tosca Policy.
diff --git a/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/PolicyTypeDroolsController.java b/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/PolicyTypeDroolsController.java
index 39930c4c..cdf9f147 100644
--- a/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/PolicyTypeDroolsController.java
+++ b/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/PolicyTypeDroolsController.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.
@@ -31,8 +32,8 @@ import org.onap.policy.common.gson.annotation.GsonJsonIgnore;
import org.onap.policy.common.utils.coder.CoderException;
import org.onap.policy.drools.domain.models.operational.OperationalPolicy;
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.ToscaPolicyTypeIdentifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -43,8 +44,8 @@ import org.slf4j.LoggerFactory;
public class PolicyTypeDroolsController implements PolicyTypeController {
- protected static final ToscaPolicyTypeIdentifier compliantType =
- new ToscaPolicyTypeIdentifier("onap.policies.controlloop.operational.common.Drools", "1.0.0");
+ protected static final ToscaConceptIdentifier compliantType =
+ new ToscaConceptIdentifier("onap.policies.controlloop.operational.common.Drools", "1.0.0");
private static final Logger logger = LoggerFactory.getLogger(PolicyTypeDroolsController.class);
@@ -52,7 +53,7 @@ public class PolicyTypeDroolsController implements PolicyTypeController {
protected final Map<String, PolicyController> controllers = new ConcurrentHashMap<>();
@Getter
- protected final ToscaPolicyTypeIdentifier policyType;
+ protected final ToscaConceptIdentifier policyType;
@GsonJsonIgnore
protected final LifecycleFsm fsm;
@@ -61,7 +62,7 @@ public class PolicyTypeDroolsController implements PolicyTypeController {
* Creates a Policy Type Drools Controller.
*/
public PolicyTypeDroolsController(
- LifecycleFsm fsm, ToscaPolicyTypeIdentifier policyType, PolicyController controller) {
+ LifecycleFsm fsm, ToscaConceptIdentifier policyType, PolicyController controller) {
this.policyType = policyType;
this.controllers.put(controller.getName(), controller);
this.fsm = fsm;
diff --git a/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/PolicyTypeNativeArtifactController.java b/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/PolicyTypeNativeArtifactController.java
index 53945f55..b97d9026 100644
--- a/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/PolicyTypeNativeArtifactController.java
+++ b/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/PolicyTypeNativeArtifactController.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.
@@ -30,8 +31,8 @@ import org.onap.policy.drools.protocol.configuration.DroolsConfiguration;
import org.onap.policy.drools.system.PolicyController;
import org.onap.policy.drools.system.PolicyControllerConstants;
import org.onap.policy.drools.system.PolicyEngineConstants;
+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.ToscaPolicyTypeIdentifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -39,12 +40,12 @@ public class PolicyTypeNativeArtifactController implements PolicyTypeController
private static final Logger logger = LoggerFactory.getLogger(PolicyTypeNativeArtifactController.class);
@Getter
- protected final ToscaPolicyTypeIdentifier policyType;
+ protected final ToscaConceptIdentifier policyType;
@GsonJsonIgnore
protected final LifecycleFsm fsm;
- public PolicyTypeNativeArtifactController(LifecycleFsm fsm, ToscaPolicyTypeIdentifier policyType) {
+ public PolicyTypeNativeArtifactController(LifecycleFsm fsm, ToscaConceptIdentifier policyType) {
this.policyType = policyType;
this.fsm = fsm;
}
diff --git a/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/PolicyTypeNativeDroolsController.java b/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/PolicyTypeNativeDroolsController.java
index 48e0a49c..cb7da95e 100644
--- a/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/PolicyTypeNativeDroolsController.java
+++ b/feature-lifecycle/src/main/java/org/onap/policy/drools/lifecycle/PolicyTypeNativeDroolsController.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.
@@ -41,8 +42,8 @@ import org.onap.policy.drools.properties.DroolsPropertyConstants;
import org.onap.policy.drools.system.PolicyController;
import org.onap.policy.drools.system.PolicyControllerConstants;
import org.onap.policy.drools.system.PolicyEngineConstants;
+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.ToscaPolicyTypeIdentifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -50,12 +51,12 @@ public class PolicyTypeNativeDroolsController implements PolicyTypeController {
private static final Logger logger = LoggerFactory.getLogger(PolicyTypeNativeDroolsController.class);
@Getter
- protected final ToscaPolicyTypeIdentifier policyType;
+ protected final ToscaConceptIdentifier policyType;
@GsonJsonIgnore
protected final LifecycleFsm fsm;
- public PolicyTypeNativeDroolsController(LifecycleFsm fsm, ToscaPolicyTypeIdentifier policyType) {
+ public PolicyTypeNativeDroolsController(LifecycleFsm fsm, ToscaConceptIdentifier policyType) {
this.policyType = policyType;
this.fsm = fsm;
}
diff --git a/feature-lifecycle/src/main/java/org/onap/policy/drools/server/restful/RestLifecycleManager.java b/feature-lifecycle/src/main/java/org/onap/policy/drools/server/restful/RestLifecycleManager.java
index b430533d..b28f06e1 100644
--- a/feature-lifecycle/src/main/java/org/onap/policy/drools/server/restful/RestLifecycleManager.java
+++ b/feature-lifecycle/src/main/java/org/onap/policy/drools/server/restful/RestLifecycleManager.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019-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.
@@ -46,9 +47,8 @@ import org.onap.policy.drools.lifecycle.PolicyTypeController;
import org.onap.policy.models.pdp.concepts.PdpStateChange;
import org.onap.policy.models.pdp.concepts.PdpUpdate;
import org.onap.policy.models.pdp.enums.PdpState;
+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.models.tosca.authorative.concepts.ToscaPolicyTypeIdentifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -239,7 +239,7 @@ public class RestLifecycleManager {
@PathParam("policyTypeVersion") String policyTypeVersion) {
PolicyTypeController typeController =
LifecycleFeature.fsm.getPolicyTypesMap()
- .get(new ToscaPolicyTypeIdentifier(policyType, policyTypeVersion));
+ .get(new ToscaConceptIdentifier(policyType, policyTypeVersion));
if (typeController == null) {
return Response.status(Response.Status.NOT_FOUND).build();
}
@@ -307,7 +307,7 @@ public class RestLifecycleManager {
ToscaPolicy policy;
try {
policy =
- LifecycleFeature.fsm.getPoliciesMap().get(new ToscaPolicyIdentifier(policyName, policyVersion));
+ LifecycleFeature.fsm.getPoliciesMap().get(new ToscaConceptIdentifier(policyName, policyVersion));
} catch (RuntimeException r) {
logger.debug("policy {}:{} has not been found", policyName, policyVersion, r);
return Response.status(Response.Status.NOT_FOUND).build();
@@ -334,7 +334,7 @@ public class RestLifecycleManager {
ToscaPolicy policy;
try {
policy =
- LifecycleFeature.fsm.getPoliciesMap().get(new ToscaPolicyIdentifier(policyName, policyVersion));
+ LifecycleFeature.fsm.getPoliciesMap().get(new ToscaConceptIdentifier(policyName, policyVersion));
} catch (RuntimeException r) {
logger.debug("policy {}:{} has not been found", policyName, policyVersion, r);
return Response.status(Response.Status.NOT_FOUND).build();
diff --git a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActivePoliciesTest.java b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActivePoliciesTest.java
index 2b0e65bf..d961dce3 100644
--- a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActivePoliciesTest.java
+++ b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActivePoliciesTest.java
@@ -1,6 +1,7 @@
/*
* ============LICENSE_START=======================================================
* 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.
@@ -44,8 +45,8 @@ import org.onap.policy.common.utils.network.NetworkUtil;
import org.onap.policy.models.pdp.concepts.PdpStateChange;
import org.onap.policy.models.pdp.concepts.PdpUpdate;
import org.onap.policy.models.pdp.enums.PdpState;
+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.ToscaPolicyTypeIdentifier;
/**
* Lifecycle State Active Test.
@@ -104,9 +105,9 @@ public class LifecycleStateActivePoliciesTest extends LifecycleStateRunningTest
public void testUpdatePolicies() throws IOException, CoderException {
assertEquals(2, fsm.policyTypesMap.size());
assertNotNull(fsm.getPolicyTypesMap().get(
- new ToscaPolicyTypeIdentifier("onap.policies.native.drools.Controller", "1.0.0")));
+ new ToscaConceptIdentifier("onap.policies.native.drools.Controller", "1.0.0")));
assertNotNull(fsm.getPolicyTypesMap().get(
- new ToscaPolicyTypeIdentifier("onap.policies.native.drools.Artifact", "1.0.0")));
+ new ToscaConceptIdentifier("onap.policies.native.drools.Artifact", "1.0.0")));
//
// create controller using native policy
@@ -177,11 +178,11 @@ public class LifecycleStateActivePoliciesTest extends LifecycleStateRunningTest
assertEquals(3, fsm.policyTypesMap.size());
assertNotNull(fsm.getPolicyTypesMap().get(
- new ToscaPolicyTypeIdentifier("onap.policies.native.drools.Controller", "1.0.0")));
+ new ToscaConceptIdentifier("onap.policies.native.drools.Controller", "1.0.0")));
assertNotNull(fsm.getPolicyTypesMap().get(
- new ToscaPolicyTypeIdentifier("onap.policies.native.drools.Artifact", "1.0.0")));
+ new ToscaConceptIdentifier("onap.policies.native.drools.Artifact", "1.0.0")));
assertNotNull(fsm.getPolicyTypesMap().get(
- new ToscaPolicyTypeIdentifier("onap.policies.controlloop.operational.common.Drools",
+ new ToscaConceptIdentifier("onap.policies.controlloop.operational.common.Drools",
"1.0.0")));
// invalid controller name
diff --git a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActiveTest.java b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActiveTest.java
index 39a3a939..8a5ea6e4 100644
--- a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActiveTest.java
+++ b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActiveTest.java
@@ -1,6 +1,7 @@
/*
* ============LICENSE_START=======================================================
* Copyright (C) 2019-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.
@@ -46,8 +47,8 @@ import org.onap.policy.models.pdp.concepts.PdpStateChange;
import org.onap.policy.models.pdp.concepts.PdpStatus;
import org.onap.policy.models.pdp.concepts.PdpUpdate;
import org.onap.policy.models.pdp.enums.PdpState;
+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.ToscaPolicyTypeIdentifier;
/**
* Lifecycle State Active Test.
@@ -215,11 +216,11 @@ public class LifecycleStateActiveTest extends LifecycleStateRunningTest {
assertEquals(qlength + 1, fsm.client.getSink().getRecentEvents().length);
assertEquals(3, fsm.policyTypesMap.size());
assertNotNull(fsm.getPolicyTypesMap().get(
- new ToscaPolicyTypeIdentifier("onap.policies.native.drools.Controller", "1.0.0")));
+ new ToscaConceptIdentifier("onap.policies.native.drools.Controller", "1.0.0")));
assertNotNull(fsm.getPolicyTypesMap().get(
- new ToscaPolicyTypeIdentifier("onap.policies.native.drools.Artifact", "1.0.0")));
+ new ToscaConceptIdentifier("onap.policies.native.drools.Artifact", "1.0.0")));
assertNotNull(fsm.getPolicyTypesMap().get(
- new ToscaPolicyTypeIdentifier("onap.policies.controlloop.operational.common.Drools",
+ new ToscaConceptIdentifier("onap.policies.controlloop.operational.common.Drools",
"1.0.0")));
PdpStatus cachedStatus = new StandardCoder()
.decode(fsm.client.getSink().getRecentEvents()[qlength], PdpStatus.class);
diff --git a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java
index 23c6e201..9547aa47 100644
--- a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java
+++ b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java
@@ -3,6 +3,7 @@
* ONAP
* ================================================================================
* Copyright (C) 2019-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.
@@ -43,8 +44,8 @@ import org.onap.policy.models.pdp.concepts.PdpUpdate;
import org.onap.policy.models.pdp.enums.PdpHealthStatus;
import org.onap.policy.models.pdp.enums.PdpMessageType;
import org.onap.policy.models.pdp.enums.PdpState;
+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.ToscaPolicyTypeIdentifier;
/**
* Lifecycle State Passive Tests.
@@ -73,12 +74,12 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest {
fsm.start(controllerSupport.getController());
assertSame(controllerSupport.getController(),
((PolicyTypeDroolsController) fsm.getController(
- new ToscaPolicyTypeIdentifier(
+ new ToscaConceptIdentifier(
ControllerSupport.POLICY_TYPE_COMPLIANT_OP, ControllerSupport.POLICY_TYPE_VERSION)))
.controllers().get(0));
fsm.stop(controllerSupport.getController());
- assertNull(fsm.getController(new ToscaPolicyTypeIdentifier(ControllerSupport.POLICY_TYPE_COMPLIANT_OP,
+ assertNull(fsm.getController(new ToscaConceptIdentifier(ControllerSupport.POLICY_TYPE_COMPLIANT_OP,
ControllerSupport.POLICY_TYPE_VERSION)));
fsm.shutdown();
diff --git a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/PolicyTypeNativeArtifactControllerTest.java b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/PolicyTypeNativeArtifactControllerTest.java
index cd17385d..3c8be31c 100644
--- a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/PolicyTypeNativeArtifactControllerTest.java
+++ b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/PolicyTypeNativeArtifactControllerTest.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.
@@ -35,8 +36,8 @@ import org.onap.policy.drools.controller.internal.MavenDroolsController;
import org.onap.policy.drools.controller.internal.NullDroolsController;
import org.onap.policy.drools.domain.models.artifact.NativeArtifactPolicy;
import org.onap.policy.drools.system.PolicyControllerConstants;
+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.ToscaPolicyTypeIdentifier;
/**
* Rules Controller Test.
@@ -61,7 +62,7 @@ public class PolicyTypeNativeArtifactControllerTest extends LifecycleStateRunnin
nativePolicy = fsm.getDomainMaker().convertTo(policy, NativeArtifactPolicy.class);
controller =
new PolicyTypeNativeArtifactController(fsm,
- new ToscaPolicyTypeIdentifier("onap.policies.native.drools.Artifact", "1.0.0"));
+ new ToscaConceptIdentifier("onap.policies.native.drools.Artifact", "1.0.0"));
assertTrue(controllerSupport.getController().getDrools().isBrained());
assertFalse(controllerSupport.getController().isAlive());
@@ -147,4 +148,4 @@ public class PolicyTypeNativeArtifactControllerTest extends LifecycleStateRunnin
assertTrue(controllerSupport.getController().getDrools() instanceof MavenDroolsController);
}
-} \ No newline at end of file
+}