From f9455834e7e014fed6e941184ab80eb9fe91d89f Mon Sep 17 00:00:00 2001 From: liamfallon Date: Mon, 4 Jan 2021 13:55:46 +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: I5df89d023949cdf0f649951dbbd81a0b30f44ef6 Signed-off-by: liamfallon --- .../apex/service/engine/main/ApexActivator.java | 20 ++++++++++---------- .../policy/apex/service/engine/main/ApexMain.java | 20 ++++++++++---------- .../apex/service/engine/main/ApexMainTest.java | 18 +++++++++--------- .../apex/services/onappf/ApexStarterActivator.java | 6 +++--- .../services/onappf/handler/ApexEngineHandler.java | 14 +++++++------- .../services/onappf/handler/PdpMessageHandler.java | 17 ++++++++--------- .../onappf/handler/PdpStateChangeMessageHandler.java | 8 ++++---- .../onappf/handler/PdpUpdateMessageHandler.java | 8 ++++---- 8 files changed, 55 insertions(+), 56 deletions(-) diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexActivator.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexActivator.java index 4d3349b83..cadcc7ee8 100644 --- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexActivator.java +++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexActivator.java @@ -1,7 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. - * Modifications Copyright (C) 2019-2020 Nordix Foundation. + * Modifications Copyright (C) 2019-2021 Nordix Foundation. * Modifications Copyright (C) 2020 Bell Canada. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -50,7 +50,7 @@ import org.onap.policy.apex.service.parameters.engineservice.EngineServiceParame import org.onap.policy.apex.service.parameters.eventhandler.EventHandlerParameters; import org.onap.policy.apex.service.parameters.eventhandler.EventHandlerPeeredMode; import org.onap.policy.common.parameters.ParameterService; -import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyIdentifier; +import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier; import org.slf4j.ext.XLogger; import org.slf4j.ext.XLoggerFactory; @@ -69,10 +69,10 @@ public class ApexActivator { // The parameters of the Apex activator when running with multiple policies @Getter @Setter - private Map apexParametersMap; + private Map apexParametersMap; @Getter - Map policyModelsMap; + Map policyModelsMap; // Event unmarshalers are used to receive events asynchronously into Apex private final Map unmarshallerMap = new LinkedHashMap<>(); @@ -95,7 +95,7 @@ public class ApexActivator { * * @param parametersMap the apex parameters map for the Apex service */ - public ApexActivator(Map parametersMap) { + public ApexActivator(Map parametersMap) { apexParametersMap = parametersMap; } @@ -128,7 +128,7 @@ public class ApexActivator { policyModelsMap = new LinkedHashMap<>(); Map inputParametersMap = new LinkedHashMap<>(); Map outputParametersMap = new LinkedHashMap<>(); - Set> apexParamsEntrySet = new LinkedHashSet<>( + Set> apexParamsEntrySet = new LinkedHashSet<>( apexParametersMap.entrySet()); apexParamsEntrySet.stream().forEach(apexParamsEntry -> { ApexParameters apexParams = apexParamsEntry.getValue(); @@ -175,12 +175,12 @@ public class ApexActivator { startUnmarshallers(inputParametersMap); } - private AxPolicyModel aggregatePolicyModels(Map policyModelsMap) { + private AxPolicyModel aggregatePolicyModels(Map policyModelsMap) { // Doing a deep copy so that original values in policyModelsMap is retained // after reduction operation - Set> policyModelsEntries = policyModelsMap.entrySet().stream() + Set> policyModelsEntries = policyModelsMap.entrySet().stream() .map(entry -> new AbstractMap.SimpleEntry<>(entry.getKey(), entry.getValue())).collect(Collectors.toSet()); - Optional> finalPolicyModelEntry = policyModelsEntries.stream() + Optional> finalPolicyModelEntry = policyModelsEntries.stream() .reduce((entry1, entry2) -> { try { entry1.setValue( @@ -303,7 +303,7 @@ public class ApexActivator { * @param apexParamsMap the apex parameters map for the Apex service * @throws ApexException on errors */ - public void updateModel(Map apexParamsMap) throws ApexException { + public void updateModel(Map apexParamsMap) throws ApexException { try { ApexParameters apexParameters = apexParamsMap.values().iterator().next(); setUpModelMarshallerAndUnmarshaller(apexParameters); diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexMain.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexMain.java index 459cdff24..5707c95ad 100644 --- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexMain.java +++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexMain.java @@ -1,7 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. - * Modification Copyright (C) 2019-2020 Nordix Foundation. + * Modification Copyright (C) 2019-2021 Nordix Foundation. * Modifications Copyright (C) 2020 Bell Canada. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -43,7 +43,7 @@ import org.onap.policy.apex.service.parameters.ApexParameterHandler; import org.onap.policy.apex.service.parameters.ApexParameters; import org.onap.policy.apex.service.parameters.eventhandler.EventHandlerParameters; import org.onap.policy.common.parameters.ParameterService; -import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyIdentifier; +import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier; import org.slf4j.ext.XLogger; import org.slf4j.ext.XLoggerFactory; @@ -62,7 +62,7 @@ public class ApexMain { // The parameters read in from JSON for each policy @Getter - private Map apexParametersMap; + private Map apexParametersMap; //engineParameters are aggregated in case of multiple policies private EngineParameters aggregatedEngineParameters; @@ -83,7 +83,7 @@ public class ApexMain { apexParametersMap = new LinkedHashMap<>(); aggregatedEngineParameters = new EngineParameters(); try { - apexParametersMap.put(new ToscaPolicyIdentifier(), populateApexParameters(args)); + apexParametersMap.put(new ToscaConceptIdentifier(), populateApexParameters(args)); } catch (ApexException e) { LOGGER.error(APEX_SERVICE_FAILED_MSG, e); return; @@ -112,10 +112,10 @@ public class ApexMain { * @param policyArgumentsMap the map with command line arguments as value and policy-id as key * @throws ApexException on errors */ - public ApexMain(Map policyArgumentsMap) throws ApexException { + public ApexMain(Map policyArgumentsMap) throws ApexException { apexParametersMap = new LinkedHashMap<>(); aggregatedEngineParameters = new EngineParameters(); - for (Entry policyArgsEntry: policyArgumentsMap.entrySet()) { + for (Entry policyArgsEntry: policyArgumentsMap.entrySet()) { try { apexParametersMap.put(policyArgsEntry.getKey(), populateApexParameters(policyArgsEntry.getValue())); } catch (ApexException e) { @@ -157,14 +157,14 @@ public class ApexMain { * @param policyArgsMap the map with command line arguments as value and policy-id as key * @throws ApexException on errors */ - public void updateModel(Map policyArgsMap) throws ApexException { + public void updateModel(Map policyArgsMap) throws ApexException { // flag that determines if any policy received in PDP_UPDATE is already deployed in the engine boolean isAnyPolicyDeployed = policyArgsMap.keySet().stream().anyMatch(apexParametersMap::containsKey); apexParametersMap.clear(); aggregatedEngineParameters = new EngineParameters(); AxContextAlbums albums = ModelService.getModel(AxContextAlbums.class); Map albumsMap = new TreeMap<>(); - for (Entry policyArgsEntry : policyArgsMap.entrySet()) { + for (Entry policyArgsEntry : policyArgsMap.entrySet()) { findAlbumsToHold(albumsMap, policyArgsEntry.getKey()); try { apexParametersMap.put(policyArgsEntry.getKey(), populateApexParameters(policyArgsEntry.getValue())); @@ -207,8 +207,8 @@ public class ApexMain { * @param albumsMap the albums which should be kept during model update * @param policyId the policy id of current policy */ - private void findAlbumsToHold(Map albumsMap, ToscaPolicyIdentifier policyId) { - for (Entry policyModelsEntry : activator.getPolicyModelsMap() + private void findAlbumsToHold(Map albumsMap, ToscaConceptIdentifier policyId) { + for (Entry policyModelsEntry : activator.getPolicyModelsMap() .entrySet()) { // If a policy with the same major version is received in PDP_UPDATE, // context for that policy has to be retained. For this, take such policies' albums diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/main/ApexMainTest.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/main/ApexMainTest.java index 122e47bb1..68472d4de 100644 --- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/main/ApexMainTest.java +++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/main/ApexMainTest.java @@ -1,7 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2018 Ericsson. All rights reserved. - * Modifications Copyright (C) 2020 Nordix Foundation. + * Modifications Copyright (C) 2020-2021 Nordix Foundation. * Modifications Copyright (C) 2020 Bell Canada. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -37,7 +37,7 @@ import org.junit.After; import org.junit.Test; import org.onap.policy.apex.model.basicmodel.concepts.ApexException; import org.onap.policy.apex.service.parameters.ApexParameters; -import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyIdentifier; +import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier; /** * Test the ApexMain class. @@ -146,9 +146,9 @@ public class ApexMainTest { public void testCorrectParametersWithMultiplePolicies() throws ApexException { OutputStream outContent = new ByteArrayOutputStream(); System.setOut(new PrintStream(outContent)); - Map argsMap = new HashMap(); + Map argsMap = new HashMap(); String[] args = {"-p", "src/test/resources/parameters/correctParams.json"}; - argsMap.put(new ToscaPolicyIdentifier("id1", "v1"), args); + argsMap.put(new ToscaConceptIdentifier("id1", "v1"), args); final ApexMain apexMain = new ApexMain(argsMap); ApexParameters apexParam = (ApexParameters) apexMain.getApexParametersMap().values().toArray()[0]; assertEquals("MyApexEngine", apexParam.getEngineServiceParameters().getName()); @@ -161,10 +161,10 @@ public class ApexMainTest { public void testInCorrectParametersWithMultiplePolicies() throws ApexException { OutputStream outContent = new ByteArrayOutputStream(); System.setOut(new PrintStream(outContent)); - Map argsMap = new HashMap(); + Map argsMap = new HashMap(); String[] args = {"-p", "src/test/resources/parameters/correctParams.json"}; - argsMap.put(new ToscaPolicyIdentifier("id1", "v1"), args); - argsMap.put(new ToscaPolicyIdentifier("id2", "v2"), args); + argsMap.put(new ToscaConceptIdentifier("id1", "v1"), args); + argsMap.put(new ToscaConceptIdentifier("id2", "v2"), args); final ApexMain apexMain = new ApexMain(argsMap); ApexParameters apexParam = (ApexParameters) apexMain.getApexParametersMap().values().toArray()[0]; assertEquals("MyApexEngine", apexParam.getEngineServiceParameters().getName()); @@ -179,9 +179,9 @@ public class ApexMainTest { public void testInvalidArgsWithMultiplePolicies() throws ApexException { OutputStream outContent = new ByteArrayOutputStream(); System.setOut(new PrintStream(outContent)); - Map argsMap = new HashMap(); + Map argsMap = new HashMap(); String[] args = {"-c", "file1", "-m", "file2"}; - argsMap.put(new ToscaPolicyIdentifier("id1", "v1"), args); + argsMap.put(new ToscaConceptIdentifier("id1", "v1"), args); final ApexMain apexMain = new ApexMain(argsMap); final String outString = outContent.toString(); apexMain.shutdown(); diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterActivator.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterActivator.java index 364221fc1..6a309632e 100644 --- a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterActivator.java +++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterActivator.java @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2019 Nordix Foundation. + * Copyright (C) 2019-2021 Nordix Foundation. * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -41,7 +41,7 @@ import org.onap.policy.common.utils.services.Registry; import org.onap.policy.common.utils.services.ServiceManager; import org.onap.policy.common.utils.services.ServiceManagerException; import org.onap.policy.models.pdp.enums.PdpMessageType; -import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyTypeIdentifier; +import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -78,7 +78,7 @@ public class ApexStarterActivator { private volatile boolean alive = false; @Getter - private List supportedPolicyTypes; + private List supportedPolicyTypes; /** * Instantiate the activator for onappf PDP-A. diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/ApexEngineHandler.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/ApexEngineHandler.java index f90938013..4d560a3bb 100644 --- a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/ApexEngineHandler.java +++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/ApexEngineHandler.java @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2019-2020 Nordix Foundation. + * Copyright (C) 2019-2021 Nordix Foundation. * Modifications Copyright (C) 2020 Bell Canada. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -33,8 +33,8 @@ import org.onap.policy.apex.service.engine.main.ApexMain; import org.onap.policy.apex.services.onappf.exception.ApexStarterException; import org.onap.policy.common.utils.coder.CoderException; import org.onap.policy.common.utils.coder.StandardCoder; +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.ToscaServiceTemplate; import org.onap.policy.models.tosca.authorative.concepts.ToscaTopologyTemplate; import org.slf4j.Logger; @@ -58,7 +58,7 @@ public class ApexEngineHandler { * @throws ApexStarterException if the apex engine instantiation failed using the policies passed */ public ApexEngineHandler(List policies) throws ApexStarterException { - Map policyArgsMap = createPolicyArgsMap(policies); + Map policyArgsMap = createPolicyArgsMap(policies); LOGGER.debug("Starting apex engine."); try { apexMain = new ApexMain(policyArgsMap); @@ -77,7 +77,7 @@ public class ApexEngineHandler { if (null == apexMain || !apexMain.isAlive()) { throw new ApexStarterException("Apex Engine not initialized."); } - Map policyArgsMap = createPolicyArgsMap(policies); + Map policyArgsMap = createPolicyArgsMap(policies); try { apexMain.updateModel(policyArgsMap); } catch (ApexException e) { @@ -85,9 +85,9 @@ public class ApexEngineHandler { } } - private Map createPolicyArgsMap(List policies) + private Map createPolicyArgsMap(List policies) throws ApexStarterException { - Map policyArgsMap = new LinkedHashMap<>(); + Map policyArgsMap = new LinkedHashMap<>(); for (ToscaPolicy policy : policies) { String policyName = policy.getIdentifier().getName(); final StandardCoder standardCoder = new StandardCoder(); @@ -129,7 +129,7 @@ public class ApexEngineHandler { /** * Method that return the list of running policies in the apex engine. */ - public List getRunningPolicies() { + public List getRunningPolicies() { return new ArrayList<>(apexMain.getApexParametersMap().keySet()); } diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/PdpMessageHandler.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/PdpMessageHandler.java index e82e34755..c16f11c9c 100644 --- a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/PdpMessageHandler.java +++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/PdpMessageHandler.java @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2019-2020 Nordix Foundation. + * Copyright (C) 2019-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. @@ -39,9 +39,8 @@ import org.onap.policy.models.pdp.enums.PdpEngineWorkerState; import org.onap.policy.models.pdp.enums.PdpHealthStatus; 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.ToscaPolicyIdentifier; -import org.onap.policy.models.tosca.authorative.concepts.ToscaPolicyTypeIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -80,13 +79,13 @@ public class PdpMessageHandler { * @param pdpStatusParameters pdp status parameters * @return supportedPolicyTypes list of PolicyTypeIdent */ - public List getSupportedPolicyTypesFromParameters( + public List getSupportedPolicyTypesFromParameters( final PdpStatusParameters pdpStatusParameters) { - final List supportedPolicyTypes = + final List supportedPolicyTypes = new ArrayList<>(pdpStatusParameters.getSupportedPolicyTypes().size()); for (final ToscaPolicyTypeIdentifierParameters policyTypeIdentParameters : pdpStatusParameters .getSupportedPolicyTypes()) { - supportedPolicyTypes.add(new ToscaPolicyTypeIdentifier(policyTypeIdentParameters.getName(), + supportedPolicyTypes.add(new ToscaConceptIdentifier(policyTypeIdentParameters.getName(), policyTypeIdentParameters.getVersion())); } return supportedPolicyTypes; @@ -222,11 +221,11 @@ public class PdpMessageHandler { * * @return policyTypeIdentifiers */ - public List getToscaPolicyIdentifiers(final List policies) { - final List policyIdentifiers = new ArrayList<>(policies.size()); + public List getToscaPolicyIdentifiers(final List policies) { + final List policyIdentifiers = new ArrayList<>(policies.size()); for (final ToscaPolicy policy : policies) { if (null != policy.getName() && null != policy.getVersion()) { - policyIdentifiers.add(new ToscaPolicyIdentifier(policy.getName(), policy.getVersion())); + policyIdentifiers.add(new ToscaConceptIdentifier(policy.getName(), policy.getVersion())); } } return policyIdentifiers; diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/PdpStateChangeMessageHandler.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/PdpStateChangeMessageHandler.java index 46d04f63f..bbdbb22db 100644 --- a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/PdpStateChangeMessageHandler.java +++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/PdpStateChangeMessageHandler.java @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2019-2020 Nordix Foundation. + * Copyright (C) 2019-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. @@ -32,8 +32,8 @@ import org.onap.policy.models.pdp.concepts.PdpStateChange; import org.onap.policy.models.pdp.concepts.PdpStatus; 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.ToscaPolicyIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -118,7 +118,7 @@ public class PdpStateChangeMessageHandler { final ApexEngineHandler apexEngineHandler = new ApexEngineHandler(policies); Registry.registerOrReplace(ApexStarterConstants.REG_APEX_ENGINE_HANDLER, apexEngineHandler); if (apexEngineHandler.isApexEngineRunning()) { - List runningPolicies = apexEngineHandler.getRunningPolicies(); + List runningPolicies = apexEngineHandler.getRunningPolicies(); // only the policies which are succesfully executed should be there in the heartbeat pdpStatusContext.setPolicies(runningPolicies); if (new HashSet<>(runningPolicies) @@ -129,7 +129,7 @@ public class PdpStateChangeMessageHandler { } else { StringBuilder message = new StringBuilder( "Apex engine started. But, only the following polices are running - "); - for (ToscaPolicyIdentifier policy : runningPolicies) { + for (ToscaConceptIdentifier policy : runningPolicies) { message.append(policy.getName()).append(":").append(policy.getVersion()).append(" "); } message.append(". Other policies failed execution. Please see the logs for more details."); diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/PdpUpdateMessageHandler.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/PdpUpdateMessageHandler.java index aa5a6457e..bf72b0999 100644 --- a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/PdpUpdateMessageHandler.java +++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/handler/PdpUpdateMessageHandler.java @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2019-2020 Nordix Foundation. + * Copyright (C) 2019-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. @@ -34,7 +34,7 @@ import org.onap.policy.models.pdp.concepts.PdpStatus; 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.ToscaPolicyIdentifier; +import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -170,7 +170,7 @@ public class PdpUpdateMessageHandler { Registry.registerOrReplace(ApexStarterConstants.REG_APEX_ENGINE_HANDLER, apexEngineHandler); } if (apexEngineHandler.isApexEngineRunning()) { - List runningPolicies = apexEngineHandler.getRunningPolicies(); + List runningPolicies = apexEngineHandler.getRunningPolicies(); if (new HashSet<>(runningPolicies) .equals(new HashSet<>(pdpMessageHandler.getToscaPolicyIdentifiers(pdpUpdateMsg.getPolicies())))) { pdpResponseDetails = pdpMessageHandler.createPdpResonseDetails(pdpUpdateMsg.getRequestId(), @@ -178,7 +178,7 @@ public class PdpUpdateMessageHandler { } else { StringBuilder message = new StringBuilder("Apex engine started. But, only the following polices are running - "); - for (ToscaPolicyIdentifier policy : runningPolicies) { + for (ToscaConceptIdentifier policy : runningPolicies) { message.append(policy.getName()).append(":").append(policy.getVersion()).append(" "); } message.append(". Other policies failed execution. Please see the logs for more details."); -- cgit 1.2.3-korg