diff options
author | Pamela Dragosh <pdragosh@research.att.com> | 2020-03-01 18:02:35 -0500 |
---|---|---|
committer | Pamela Dragosh <pdragosh@research.att.com> | 2020-03-01 18:05:18 -0500 |
commit | 4ac655ffee021bfe0566ca654f3a8f8282e4b4b3 (patch) | |
tree | 160d982f1e4fef84ccd5ed46b19590744ba06587 /controlloop/common/eventmanager/src | |
parent | dcaa906f72630669f958f2fd3291a1e77be50d1c (diff) |
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 <pdragosh@research.att.com>
Diffstat (limited to 'controlloop/common/eventmanager/src')
-rw-r--r-- | controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java | 14 |
1 files changed, 7 insertions, 7 deletions
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<PolicyResult, String> result = + Pair<PolicyResult, String> 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; } |