aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/eventmanager
diff options
context:
space:
mode:
authorXin Miao <xin.miao@huawei.com>2018-10-01 18:09:24 -0500
committerPamela Dragosh <pdragosh@research.att.com>2018-10-05 11:32:44 -0400
commit4498fc2617e0003b7d2f53a6b09051fd216c840e (patch)
tree70238cb07b5bde82625e63f2aa3b337a05438f29 /controlloop/common/eventmanager
parent8c87163466a4eb5a010a9977adf8a365faec8631 (diff)
Add new actor SDNC to support CCVPN Closed Loop
Issue-ID: POLICY-1183 Change-Id: I1b77b5b9cefca104382d9d84dd00bbd63b20e0f2 Signed-off-by: Xin Miao <xin.miao@huawei.com> Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'controlloop/common/eventmanager')
-rw-r--r--controlloop/common/eventmanager/pom.xml12
-rw-r--r--controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java12
2 files changed, 24 insertions, 0 deletions
diff --git a/controlloop/common/eventmanager/pom.xml b/controlloop/common/eventmanager/pom.xml
index 846a69fa7..c26f6049f 100644
--- a/controlloop/common/eventmanager/pom.xml
+++ b/controlloop/common/eventmanager/pom.xml
@@ -90,6 +90,12 @@
</dependency>
<dependency>
<groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId>
+ <artifactId>actor.sdnc</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.policy.drools-applications.controlloop.common.actors</groupId>
<artifactId>actor.appclcm</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
@@ -126,6 +132,12 @@
</dependency>
<dependency>
<groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
+ <artifactId>sdnc</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.policy.drools-applications.controlloop.common.model-impl</groupId>
<artifactId>appclcm</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
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 0b2c14e54..980799171 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
@@ -43,6 +43,7 @@ import org.onap.policy.controlloop.ControlLoopOperation;
import org.onap.policy.controlloop.VirtualControlLoopEvent;
import org.onap.policy.controlloop.actor.appc.AppcActorServiceProvider;
import org.onap.policy.controlloop.actor.appclcm.AppcLcmActorServiceProvider;
+import org.onap.policy.controlloop.actor.sdnc.SdncActorServiceProvider;
import org.onap.policy.controlloop.actor.sdnr.SdnrActorServiceProvider;
import org.onap.policy.controlloop.actor.so.SoActorServiceProvider;
import org.onap.policy.controlloop.actor.vfc.VfcActorServiceProvider;
@@ -50,6 +51,7 @@ import org.onap.policy.controlloop.policy.Policy;
import org.onap.policy.controlloop.policy.PolicyResult;
import org.onap.policy.drools.system.PolicyEngine;
import org.onap.policy.guard.Util;
+import org.onap.policy.sdnc.SdncResponse;
import org.onap.policy.sdnr.PciResponseWrapper;
import org.onap.policy.so.SOResponseWrapper;
import org.onap.policy.vfc.VFCResponse;
@@ -121,6 +123,8 @@ public class ControlLoopOperationManager implements Serializable {
break;
case "VFC":
break;
+ case "SDNC":
+ break;
default:
throw new ControlLoopException("ControlLoopEventManager: policy has an unknown actor.");
}
@@ -304,6 +308,14 @@ public class ControlLoopOperationManager implements Serializable {
}
return operationRequest;
+ case "SDNC":
+ this.operationRequest = SdncActorServiceProvider.constructRequest((VirtualControlLoopEvent) onset,
+ operation.clOperation, this.policy);
+ this.currentOperation = operation;
+ if (this.operationRequest == null) {
+ this.policyResult = PolicyResult.FAILURE;
+ }
+ return operationRequest;
default:
throw new ControlLoopException("invalid actor " + policy.getActor() + " on policy");
}