From 4ac655ffee021bfe0566ca654f3a8f8282e4b4b3 Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Sun, 1 Mar 2020 18:02:35 -0500 Subject: Use apache Pair not Sdnr custom Pair Companion review to https://gerrit.onap.org/r/c/policy/models/+/102162 in which use of Pair from apache vs creating our own. Removed an unused import. Issue-ID: POLICY-2382 Change-Id: Id3cf9a170480c7a621dddf93540d61f993f3553a Signed-off-by: Pamela Dragosh --- .../eventmanager/ControlLoopOperationManager.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'controlloop/common/eventmanager/src/main') diff --git a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java index 20425f259..2a5e64d97 100644 --- a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java +++ b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * controlloop operation manager * ================================================================================ - * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved. * Modifications Copyright (C) 2019 Huawei Technologies Co., Ltd. All rights reserved. * Modifications Copyright (C) 2019 Tech Mahindra * Modifications Copyright (C) 2019 Bell Canada. @@ -37,7 +37,7 @@ import java.util.Properties; import javax.persistence.EntityManager; import javax.persistence.Persistence; -import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.tuple.Pair; import org.eclipse.persistence.config.PersistenceUnitProperties; import org.onap.aai.domain.yang.GenericVnf; import org.onap.aai.domain.yang.ServiceInstance; @@ -448,7 +448,7 @@ public class ControlLoopOperationManager implements Serializable { /** * Build AAI parameters for CDS operation. - * + * * @return a map containing vnf id key and value for the vnf to apply the action to. * @throws AaiException if the vnf can not be found. */ @@ -676,15 +676,15 @@ public class ControlLoopOperationManager implements Serializable { /* * Process the SDNR response to see what PolicyResult should be returned */ - SdnrActorServiceProvider.Pair result = + Pair result = SdnrActorServiceProvider.processResponse(dmaapResponse); - if (result.getResult() != null) { - this.completeOperation(operationAttempt, result.getMessage(), result.getResult()); + if (result.getLeft() != null) { + this.completeOperation(operationAttempt, result.getRight(), result.getLeft()); if (PolicyResult.FAILURE_TIMEOUT.equals(this.policyResult)) { return null; } - return result.getResult(); + return result.getLeft(); } return null; } -- cgit 1.2.3-korg