aboutsummaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.sdnr
diff options
context:
space:
mode:
Diffstat (limited to 'models-interactions/model-actors/actor.sdnr')
-rw-r--r--models-interactions/model-actors/actor.sdnr/src/main/java/org/onap/policy/controlloop/actor/sdnr/SdnrActorServiceProvider.java19
1 files changed, 11 insertions, 8 deletions
diff --git a/models-interactions/model-actors/actor.sdnr/src/main/java/org/onap/policy/controlloop/actor/sdnr/SdnrActorServiceProvider.java b/models-interactions/model-actors/actor.sdnr/src/main/java/org/onap/policy/controlloop/actor/sdnr/SdnrActorServiceProvider.java
index 4367f54c5..0919779a5 100644
--- a/models-interactions/model-actors/actor.sdnr/src/main/java/org/onap/policy/controlloop/actor/sdnr/SdnrActorServiceProvider.java
+++ b/models-interactions/model-actors/actor.sdnr/src/main/java/org/onap/policy/controlloop/actor/sdnr/SdnrActorServiceProvider.java
@@ -3,7 +3,7 @@
* SdnrActorServiceProvider
* ================================================================================
* Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,14 +23,12 @@ package org.onap.policy.controlloop.actor.sdnr;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
-
import java.util.Collections;
import java.util.List;
-
import org.onap.policy.controlloop.ControlLoopOperation;
import org.onap.policy.controlloop.ControlLoopResponse;
import org.onap.policy.controlloop.VirtualControlLoopEvent;
-import org.onap.policy.controlloop.actorserviceprovider.spi.Actor;
+import org.onap.policy.controlloop.actorserviceprovider.impl.ActorImpl;
import org.onap.policy.controlloop.policy.Policy;
import org.onap.policy.controlloop.policy.PolicyResult;
import org.onap.policy.sdnr.PciCommonHeader;
@@ -39,11 +37,12 @@ import org.onap.policy.sdnr.PciRequestWrapper;
import org.onap.policy.sdnr.PciResponse;
import org.onap.policy.sdnr.PciResponseCode;
import org.onap.policy.sdnr.PciResponseWrapper;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class SdnrActorServiceProvider implements Actor {
+public class SdnrActorServiceProvider extends ActorImpl {
+
+ private static final String NAME = "SDNR";
public static class Pair<A, B> {
public final A result;
@@ -81,9 +80,13 @@ public class SdnrActorServiceProvider implements Actor {
private static final ImmutableMap<String, List<String>> payloads = new ImmutableMap.Builder<String, List<String>>()
.put(RECIPE_MODIFY, ImmutableList.of(SDNR_REQUEST_PARAMS, SDNR_CONFIG_PARAMS)).build();
+ public SdnrActorServiceProvider() {
+ super(NAME);
+ }
+
@Override
public String actor() {
- return "SDNR";
+ return NAME;
}
@Override
@@ -275,7 +278,7 @@ public class SdnrActorServiceProvider implements Actor {
/* The ControlLoop response determined from the SDNR Response and input event. */
ControlLoopResponse clRsp = new ControlLoopResponse();
clRsp.setPayload(sdnrResponse.getPayload());
- clRsp.setFrom("SDNR");
+ clRsp.setFrom(NAME);
clRsp.setTarget("DCAE");
clRsp.setClosedLoopControlName(event.getClosedLoopControlName());
clRsp.setPolicyName(event.getPolicyName());