aboutsummaryrefslogtreecommitdiffstats
path: root/lcm/provider/src/main
diff options
context:
space:
mode:
authorAgarwal, Ruchira(ra1926) <ra1926@att.com>2018-08-20 16:13:20 +0000
committerAgarwal, Ruchira(ra1926) <ra1926@att.com>2018-08-20 16:13:20 +0000
commit634b640f2aa3779b94ab54ebf959030b563fb072 (patch)
tree4d7bae9c6f69cf112ba671a875026bdf0ceba88b /lcm/provider/src/main
parent7ee4aa9653fc38b3da51bece8fd854abf4918535 (diff)
add LCM DistributeTraffic
LCM API for DistributeTraffic Change-Id: I4b3c323d46bd088421d0d6d66fc23982bf086679 Issue-ID: CCSDK-477 Signed-off-by: Agarwal, Ruchira(ra1926) <ra1926@att.com>
Diffstat (limited to 'lcm/provider/src/main')
-rw-r--r--lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmProvider.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmProvider.java b/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmProvider.java
index 787a94e2..939836be 100644
--- a/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmProvider.java
+++ b/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmProvider.java
@@ -351,6 +351,27 @@ public class LcmProvider implements AutoCloseable, LCMService {
}
@Override
+ public Future<RpcResult<DistributeTrafficOutput>> distributeTraffic(DistributeTrafficInput input) {
+ DistributeTrafficInputBuilder iBuilder = new DistributeTrafficInputBuilder(input);
+ DistributeTrafficOutputBuilder oBuilder = new DistributeTrafficOutputBuilder();
+
+ try {
+ CommonLcmFields retval = callDG("distribute-traffic", iBuilder.build());
+ oBuilder.setStatus(retval.getStatusBuilder().build());
+ oBuilder.setCommonHeader(retval.getCommonHeaderBuilder().build());
+ } catch (LcmRpcInvocationException e) {
+ LOG.debug("Caught exception", e);
+ oBuilder.setCommonHeader(e.getCommonHeader());
+ oBuilder.setStatus(e.getStatus());
+ }
+
+ RpcResult<DistributeTrafficOutput> rpcResult =
+ RpcResultBuilder.<DistributeTrafficOutput> status(true).withResult(oBuilder.build()).build();
+ // return error
+ return Futures.immediateFuture(rpcResult);
+ }
+
+ @Override
public Future<RpcResult<ConfigureOutput>> configure(ConfigureInput input) {
ConfigureInputBuilder iBuilder = new ConfigureInputBuilder(input);
ConfigureOutputBuilder oBuilder = new ConfigureOutputBuilder();