2 * Copyright (c) 2017 Ericsson India Global Services Pvt Ltd. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.openflowplugin.applications.frm.impl;
10 import com.google.common.util.concurrent.ListenableFuture;
11 import java.util.ArrayList;
12 import java.util.List;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.AddBundleMessagesInput;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.AddBundleMessagesOutput;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.AddBundleMessagesOutputBuilder;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.ControlBundleInput;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.ControlBundleOutput;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.ControlBundleOutputBuilder;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.SalBundleService;
20 import org.opendaylight.yangtools.yang.common.RpcResult;
21 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
23 public class SalBundleServiceMock implements SalBundleService {
25 private final List<ControlBundleInput> controlBundleInput = new ArrayList<>();
26 private final List<AddBundleMessagesInput> addBundleMessagesInput = new ArrayList<>();
29 public ListenableFuture<RpcResult<ControlBundleOutput>> controlBundle(ControlBundleInput input) {
30 getControlBundleInput().add(input);
31 return RpcResultBuilder.success(new ControlBundleOutputBuilder().build()).buildFuture();
35 public ListenableFuture<RpcResult<AddBundleMessagesOutput>> addBundleMessages(AddBundleMessagesInput input) {
36 getAddBundleMessagesInput().add(input);
37 return RpcResultBuilder.success(new AddBundleMessagesOutputBuilder().build()).buildFuture();
40 public List<ControlBundleInput> getControlBundleInput() {
41 return controlBundleInput;
44 public List<AddBundleMessagesInput> getAddBundleMessagesInput() {
45 return addBundleMessagesInput;